Commit 59b814cb by zhangzh

初始化项目

parents
Showing with 15100 additions and 0 deletions
# OSX
#
.DS_Store
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace
# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
# node.js
#
node_modules/
npm-debug.log
yarn-error.log
# BUCK
buck-out/
\.buckd/
*.keystore
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/
*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
# Bundle artifact
*.jsbundle
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/
import React, {Component} from 'react';
import { Text, TextInput } from 'react-native';
import {Provider} from 'react-redux';
import configureStore from './app/store/configureStore';
import Router from './app/Router';
const store = configureStore();
// 字体不随系统字体变化
Text.defaultProps = Object.assign({}, Text.defaultProps, { allowFontScaling: false })
TextInput.defaultProps = Object.assign({}, TextInput.defaultProps, { allowFontScaling: false })
export default class App extends Component {
render() {
return (
<Provider store={store}>
<Router/>
</Provider>
);
}
}
# To learn about Buck see [Docs](https://buckbuild.com/).
# To run your application with Buck:
# - install Buck
# - `npm start` - to start the packager
# - `cd android`
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
# - `buck install -r android/app` - compile, install and run application
#
load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
lib_deps = []
create_aar_targets(glob(["libs/*.aar"]))
create_jar_targets(glob(["libs/*.jar"]))
android_library(
name = "all-libs",
exported_deps = lib_deps,
)
android_library(
name = "app-code",
srcs = glob([
"src/main/java/**/*.java",
]),
deps = [
":all-libs",
":build_config",
":res",
],
)
android_build_config(
name = "build_config",
package = "com.bonehouse_business_app",
)
android_resource(
name = "res",
package = "com.bonehouse_business_app",
res = "src/main/res",
)
android_binary(
name = "app",
keystore = "//android/keystores:debug",
manifest = "src/main/AndroidManifest.xml",
package_type = "debug",
deps = [
":app-code",
],
)
apply plugin: "com.android.application"
import com.android.build.OutputFile
/**
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
* and bundleReleaseJsAndAssets).
* These basically call `react-native bundle` with the correct arguments during the Android build
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
* bundle directly from the development server. Below you can see all the possible configurations
* and their defaults. If you decide to add a configuration block, make sure to add it before the
* `apply from: "../../node_modules/react-native/react.gradle"` line.
*
* project.ext.react = [
* // the name of the generated asset file containing your JS bundle
* bundleAssetName: "index.android.bundle",
*
* // the entry file for bundle generation
* entryFile: "index.android.js",
*
* // whether to bundle JS and assets in debug mode
* bundleInDebug: false,
*
* // whether to bundle JS and assets in release mode
* bundleInRelease: true,
*
* // whether to bundle JS and assets in another build variant (if configured).
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
* // The configuration property can be in the following formats
* // 'bundleIn${productFlavor}${buildType}'
* // 'bundleIn${buildType}'
* // bundleInFreeDebug: true,
* // bundleInPaidRelease: true,
* // bundleInBeta: true,
*
* // whether to disable dev mode in custom build variants (by default only disabled in release)
* // for example: to disable dev mode in the staging build type (if configured)
* devDisabledInStaging: true,
* // The configuration property can be in the following formats
* // 'devDisabledIn${productFlavor}${buildType}'
* // 'devDisabledIn${buildType}'
*
* // the root of your project, i.e. where "package.json" lives
* root: "../../",
*
* // where to put the JS bundle asset in debug mode
* jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
*
* // where to put the JS bundle asset in release mode
* jsBundleDirRelease: "$buildDir/intermediates/assets/release",
*
* // where to put drawable resources / React Native assets, e.g. the ones you use via
* // require('./image.png')), in debug mode
* resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
*
* // where to put drawable resources / React Native assets, e.g. the ones you use via
* // require('./image.png')), in release mode
* resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
*
* // by default the gradle tasks are skipped if none of the JS files or assets change; this means
* // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
* // for example, you might want to remove it from here.
* inputExcludes: ["android/**", "ios/**"],
*
* // override which node gets called and with what additional arguments
* nodeExecutableAndArgs: ["node"],
*
* // supply additional arguments to the packager
* extraPackagerArgs: []
* ]
*/
project.ext.react = [
entryFile: "index.js"
]
apply from: "../../node_modules/react-native/react.gradle"
/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
* - An APK that only works on x86 devices
* The advantage is the size of the APK is reduced by about 4MB.
* Upload all the APKs to the Play Store and people will download
* the correct one based on the CPU architecture of their device.
*/
def enableSeparateBuildPerCPUArchitecture = false
/**
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = false
android {
compileSdkVersion rootProject.ext.compileSdkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.bonehouse_business_app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
dependencies {
implementation project(':react-native-date-picker')
implementation project(':react-native-sound')
implementation project(':react-native-audio')
implementation project(':react-native-gesture-handler')
implementation project(':react-native-image-picker')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
"""Helper definitions to glob .aar and .jar targets"""
def create_aar_targets(aarfiles):
for aarfile in aarfiles:
name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
lib_deps.append(":" + name)
android_prebuilt_aar(
name = name,
aar = aarfile,
)
def create_jar_targets(jarfiles):
for jarfile in jarfiles:
name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
lib_deps.append(":" + name)
prebuilt_jar(
name = name,
binary_jar = jarfile,
)
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
package com.bonehouse_business_app;
import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "BoneHouse_Business_APP";
}
}
package com.bonehouse_business_app;
import android.app.Application;
import com.facebook.react.ReactApplication;
import com.henninghall.date_picker.DatePickerPackage;
import com.zmxv.RNSound.RNSoundPackage;
import com.rnim.rn.audio.ReactNativeAudioPackage;
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
import com.imagepicker.ImagePickerPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;
import java.util.Arrays;
import java.util.List;
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new DatePickerPackage(),
new RNSoundPackage(),
new ReactNativeAudioPackage(),
new RNGestureHandlerPackage(),
new ImagePickerPackage()
);
}
@Override
protected String getJSMainModuleName() {
return "index";
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
}
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:3.4.0")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
google()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
No preview for this file type
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
keystore(
name = "debug",
properties = "debug.keystore.properties",
store = "debug.keystore",
visibility = [
"PUBLIC",
],
)
key.store=debug.keystore
key.alias=androiddebugkey
key.store.password=android
key.alias.password=android
rootProject.name = 'BoneHouse_Business_APP'
include ':react-native-date-picker'
project(':react-native-date-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-date-picker/android')
include ':react-native-sound'
project(':react-native-sound').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sound/android')
include ':react-native-audio'
project(':react-native-audio').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-audio/android')
include ':react-native-gesture-handler'
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
include ':react-native-image-picker'
project(':react-native-image-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-picker/android')
include ':app'
{
"name": "BoneHouse_Business_APP",
"displayName": "BoneHouse_Business_APP"
}
\ No newline at end of file
import React, {Component} from 'react';
import {
Easing,
Animated
} from 'react-native';
import { createStackNavigator, createAppContainer} from 'react-navigation';
// import { createAppContainer} from 'react-navigation';
// import { createStackNavigator } from 'react-navigation-stack';
import LoginPage from './containers/login/LoginPage';
import HomePage from './containers/home/HomePage';
import SelfOrderPage from './containers/selfOrder/SelfOrderPage';
import ChooseProductPage from './containers/selfOrder/module/ChooseProductPage';
import EditStencilPage from './containers/selfOrder/module/EditStencilPage';
import SubSuccessPage from './containers/selfOrder/module/SubSuccessPage';
import EquipConsuPage from './containers/equipConsu/EquipConsuPage';
import QuickOrderPage from './containers/quickOrder/QuickOrderPage';
import TransOrderPage from './containers/transOrder/TransOrderPage';
import TransSearchPage from './containers/transOrder/module/TransSearchPage';
import SubSuccPage from './containers/common/SubSuccPage';
const Router = createAppContainer(createStackNavigator({
LoginPage: { screen: LoginPage },
HomePage: {screen: HomePage},
SelfOrderPage: {screen: SelfOrderPage},
ChooseProductPage: {screen: ChooseProductPage},
EditStencilPage: {screen: EditStencilPage},
SubSuccessPage: {screen: SubSuccessPage},
EquipConsuPage: {screen: EquipConsuPage},
QuickOrderPage: {screen: QuickOrderPage},
TransOrderPage: {screen: TransOrderPage},
TransSearchPage: {screen: TransSearchPage},
SubSuccPage: {screen: SubSuccPage}
}, {
navigationOptions: {
gesturesEnabled: true
},
headerMode: 'none',
transitionConfig: () => ({
transitionSpec: {
duration: 300,
easing: Easing.out(Easing.poly(4)),
timing: Animated.timing
},
screenInterpolator: sceneProps => {
const {layout, position, scene} = sceneProps;
const {index} = scene;
const Width = layout.initWidth;
//沿X轴平移
const translateX = position.interpolate({
inputRange: [index - 1, index, index + 1],
outputRange: [Width, 0, -(Width - 10)],
});
//透明度
const opacity = position.interpolate({
inputRange: [index - 1, index - 0.99, index],
outputRange: [0, 1, 1]
});
return {opacity, transform: [{translateX}]};
}
})
}))
// const defaultGetStateForAction = Router.router.getStateForAction;
// Router.router.getStateForAction = ((action, state) => {
// // goBack返回指定页面
// if (state && action.type === 'Navigation/BACK' && action.key) {
// const backRoute = state.routes.find((route) => route.routeName === action.key);
// if (backRoute) {
// const backRouteIndex = state.routes.indexOf(backRoute);
// const purposeState = {
// ...state,
// routes: state.routes.slice(0, backRouteIndex + 1),
// index: backRouteIndex,
// };
// return purposeState;
// }
// }
// return defaultGetStateForAction(action, state)
// })
export default Router
\ No newline at end of file
import { PostRequest, GetRequest } from '../network/RequestUtils';
import { show } from '../utils/Utils';
import { exitLoginStatus } from './LoginAction';
// import { SELF_ORDER_LIST_DOING, SELF_ORDER_LIST_SUCCESS, SELF_ORDER_LIST_FAILURE } from '../base/ActionTypes';
import {LOGIN_DOING,LOGIN_SUCCESS,LOGIN_FAILURE,EXIT_LOGIN,AUTO_LOGIN_SUCCESS,AUTO_LOGIN_FAILURE} from '../base/ActionTypes';
import { PostRequest,GetRequest } from '../network/RequestUtils';
import {show} from '../utils/Utils';
export function requestLogin(params) {
return dispatch => {
dispatch(logining());
PostRequest('/access_token/password/search?app_code=PDA', params).then((res) => {
if(res.error_code === 0){
show('登录成功');
dispatch(loginSuccess(res, params.data.user_name, params.data.user_password));
}else {
show(res.error_msg);
dispatch(loginFailure())
}
}).catch((err) => {
show(err.error);
})
}
}
function logining() {
return {
type: LOGIN_DOING
}
}
function loginSuccess(userInfo, username, password) {
return {
type: LOGIN_SUCCESS,
rawData:userInfo,
username,
password
}
}
function loginFailure() {
return {
type: LOGIN_FAILURE
}
}
export function exitLoginStatus(){
return {
type: EXIT_LOGIN
}
}
function autoLoginSuccess(userInfo) {
return {
type: AUTO_LOGIN_SUCCESS,
rawData: userInfo
}
}
function autoLoginFailure() {
return {
type: AUTO_LOGIN_FAILURE
}
}
export function autoLogin(params) {
return dispatch => {
PostRequest('/access_token/password/search?app_code=PDA', params).then((res) => {
if(res.error_code === 0){
console.warn('auto------',res);
dispatch(autoLoginSuccess(res))
}else {
console.warn(res.error_msg);
show(res.error_msg);
dispatch(autoLoginFailure())
}
}).catch((err) => {
show(err.error);
})
}
}
\ No newline at end of file
import { PostRequest, GetRequest, UploadRequest } from '../network/RequestUtils';
import { show, getUrlParams } from '../utils/Utils';
import { exitLoginStatus } from './LoginAction';
import {
QUICK_ORDER_LIST_DOING,
QUICK_ORDER_LIST_SUCCESS,
QUICK_ORDER_LIST_FAILURE,
QUICK_SUBMIT_DOING,
QUICK_SUBMIT_SUCCESS,
QUICK_SUBMIT_FAILURE
} from '../base/ActionTypes';
// 获取组织 params={access_token:''}
export function requestQuickOrganizations(params) {
return dispatch => {
console.log('----requestQuickOrganizations====================')
dispatch(requestOrganizationsing());
// GetRequest(`/authorized_inventory/search?access_token=${access_token}`)
GetRequest(getUrlParams('/authorized_inventory/search', params))
.then(res => {
console.log('res=====', Object.keys(res), res);
if(res.error_code == 0) {
let { data: { organizations } } = res
dispatch(requestOrganizationsSuccess(organizations));
} else if(res.error_code === 41006) {
show('登录过期,请重新登录');
dispatch(exitLoginStatus());
} else {
let error_msg = res.error_msg || res.message
show(error_msg);
dispatch(requestOrganizationsFail());
}
})
.catch(err => {
console.log('------err--====organizations----', Object.keys(err), err)
show(err.error);
})
}
}
// 获取手术医院 params={access_token:'', org_code:'', seller_code:''}
export function requestQuickSurgeryHospital(params) {
return dispatch => {
console.log('----requestQuickSurgeryHospital====================', params)
dispatch(requestOrganizationsing());
GetRequest(getUrlParams('/sale/seller_customer/search', params))
.then(res => {
console.log('res===!!==', Object.keys(res));
if(res.error_code == 0) {
let { data: { customers } } = res
dispatch(requestOrganizationsSuccess(customers));
} else if(res.error_code === 41006) {
show('登录过期,请重新登录');
dispatch(exitLoginStatus());
} else {
let error_msg = res.error_msg || res.message
show(error_msg);
dispatch(requestOrganizationsFail());
}
})
.catch(err => {
console.log('------err--====requestQuickSurgeryHospital----', Object.keys(err), err)
show(err.error);
})
}
}
// 获取订单类型 params={access_token:'', value_set_code:'SUR_ORDER_TYPE'}
export function requestQuickOrderType(params) {
return dispatch => {
console.log('----requestQuickOrderType====================', params)
dispatch(requestOrganizationsing());
GetRequest(getUrlParams('/system/value_set/search', params))
.then(res => {
console.log('res===!!==', Object.keys(res));
if(res.error_code == 0) {
let { data: { sys_values } } = res
dispatch(requestOrganizationsSuccess(sys_values));
} else if(res.error_code === 41006) {
show('登录过期,请重新登录');
dispatch(exitLoginStatus());
} else {
let error_msg = res.error_msg || res.message
show(error_msg);
dispatch(requestOrganizationsFail());
}
})
.catch(err => {
console.log('------err--====requestQuickSurgeryHospital----', Object.keys(err), err)
show(err.error);
})
}
}
// 获取配台模版 params={access_token:'', org_code:'', seller_code: 'shi.ming', customer_code: '', surgery_type: '', doctor_name: ''}
export function requestQuickTemplateCollect(params) {
return dispatch => {
console.log('----requestQuickTemplateCollect====================', params)
dispatch(requestOrganizationsing());
GetRequest(getUrlParams('/surgery/template_header/search', params))
.then(res => {
console.log('res===!!==', Object.keys(res));
if(res.error_code == 0) {
let { data: { surgery_template_headers } } = res
dispatch(requestOrganizationsSuccess(surgery_template_headers));
} else if(res.error_code === 41006) {
show('登录过期,请重新登录');
dispatch(exitLoginStatus());
} else {
let error_msg = res.error_msg || res.message
show(error_msg);
dispatch(requestOrganizationsFail());
}
})
.catch(err => {
console.log('------err--====requestQuickTemplateCollect----', Object.keys(err), err)
show(err.error);
})
}
}
function requestOrganizationsing() {
return {
type: QUICK_ORDER_LIST_DOING
}
}
function requestOrganizationsSuccess(data) {
return {
type: QUICK_ORDER_LIST_SUCCESS,
rawData: data
}
}
function requestOrganizationsFail() {
return {
type: QUICK_ORDER_LIST_FAILURE
}
}
// 上传语音 params={ access_token:'', path='录音地址' } -- 待修改
export function requestQuickAudio(params) {
return dispatch => {
let { access_token, path } = params
// 临时
// access_token = "201904091445193616b5e3d3a777848dda1de1a8123d0fdf9xw7t566c1S92U88"
let formData = new FormData()
let soundPath = `file://${path}`
// soundPath = "file:///Users/wwt/Library/Developer/CoreSimulator/Devices/65EAD11E-A398-499D-916C-B346552EFF59/data/Containers/Data/Application/3B458954-880D-4001-AC47-C85F2C97B471/Documents/quickAudio243.ogg"
// let tempPath = 'file:///storage/emulated/0/Pictures/image.jpg'
let fileName = path.substring(path.lastIndexOf('/') + 1, path.length)
let fileType = path.split('.')[1]
let file = { uri: soundPath, type: "multipart/form-data", name: fileName} // 类型和名字固定???
// let file = { uri: tempPath, type: 'multipart/form-data', name: fileName } // 类型和名字固定???
formData.append('file', file)
console.log('----file====================', file, soundPath, formData)
dispatch(requestSubmitOrganizationsing());
// /system/attachment/create
// /dingding/upload_media
UploadRequest(getUrlParams('/dingding/upload_media', { access_token }), formData)
.then(res => {
console.log('res===!!==', Object.keys(res), res);
if(res.error_code == 0) {
let { data: { url } } = res
dispatch(requestSubmitOrganizationsSuccess(url));
} else if(res.error_code === 41006) {
show('登录过期,请重新登录');
dispatch(exitLoginStatus());
} else {
let error_msg = res.error_msg || res.message
show(error_msg);
dispatch(requestSubmitOrganizationsFail());
}
})
.catch(err => {
console.log('------err--====requestQuickAudio----', Object.keys(err), err)
show(err.error);
})
}
}
//上传头像 -- 测试
export const uploadAttachment = async (token,datas) => {
return await UploadRequest('/dingding/upload_media' + '?access_token=' + token,datas)
};
// 提交数据
export function requestQuickSumbit({access_token, ...params}) {
return dispatch => {
console.warn('----requestQuickSumbit====================', access_token, params)
dispatch(requestSubmitOrganizationsing());
PostRequest(getUrlParams('/surgery/collect_order/via_data/create', {access_token: access_token}), params)
.then(res => {
console.warn('res=====', Object.keys(res));
if(res.error_code == 0) {
console.warn('res====requestQuickSumbit==========', res.data);
let { data } = res
dispatch(requestSubmitOrganizationsSuccess(data));
} else if(res.error_code === 41006) {
show('登录过期,请重新登录');
dispatch(exitLoginStatus());
} else {
let error_msg = res.error_msg || res.message
show(error_msg);
dispatch(requestSubmitOrganizationsFail());
}
})
.catch(err => {
console.log('------err--====requestQuickSumbit----', Object.keys(err), err)
show(err.error);
})
}
}
function requestSubmitOrganizationsing() {
return {
type: QUICK_SUBMIT_DOING
}
}
function requestSubmitOrganizationsSuccess(data) {
return {
type: QUICK_SUBMIT_SUCCESS,
rawData: data
}
}
function requestSubmitOrganizationsFail() {
return {
type: QUICK_SUBMIT_FAILURE
}
}
\ No newline at end of file
import { PostRequest, GetRequest } from '../network/RequestUtils';
import { show } from '../utils/Utils';
import { exitLoginStatus } from './LoginAction';
import { SELF_ORDER_LIST_DOING, SELF_ORDER_LIST_SUCCESS, SELF_ORDER_LIST_FAILURE } from '../base/ActionTypes';
// 获取组织
// export const requestOrganizations = async (params) => {
// return await GetRequest(`/api/latest/authorized_inventory/search?access_token=${params.access_token}`)
// }
export function requestOrganizations(access_token) {
return dispatch => {
// console.warn('----requestOrganizations')
dispatch(requestOrganizationsing());
GetRequest(`/authorized_inventory/search?access_token=${access_token}`)
.then(res => {
// console.warn('res=====', Object.keys(res));
if(res.error_code == 0) {
// console.warn('res====organizations=', res.data.organizations);
let { data: { organizations } } = res
dispatch(requestOrganizationsSuccess(organizations));
} else if(res.error_code === 41006) {
show('登录过期,请重新登录');
dispatch(exitLoginStatus());
} else {
show(res.error_msg);
dispatch(requestOrganizationsFail());
}
})
.catch(err => {
show(err.error);
})
}
}
function requestOrganizationsing() {
return {
type: SELF_ORDER_LIST_DOING
}
}
function requestOrganizationsSuccess(data) {
return {
type: SELF_ORDER_LIST_SUCCESS,
rawData: data
}
}
function requestOrganizationsFail() {
return {
type: SELF_ORDER_LIST_FAILURE
}
}
import { PostRequest, GetRequest } from '../network/RequestUtils';
import { show } from '../utils/Utils';
import { exitLoginStatus } from './LoginAction';
// import { SELF_ORDER_LIST_DOING, SELF_ORDER_LIST_SUCCESS, SELF_ORDER_LIST_FAILURE } from '../base/ActionTypes';
//-----------user---------------------------
export const LOGIN_NO = "LOGIN_NO"
export const LOGIN_DOING = "LOGIN_DOING"
export const LOGIN_SUCCESS = "LOGIN_SUCCESS"
export const LOGIN_FAILURE = "LOGIN_FAILURE"
export const EXIT_LOGIN = "EXIT_LOGIN"
export const AUTO_LOGIN_SUCCESS = "AUTO_LOGIN_SUCCESS"
export const AUTO_LOGIN_FAILURE = "AUTO_LOGIN_FAILURE"
//-----------self order---------------------
export const SELF_ORDER_LIST_NO = "SELF_ORDER_LIST_NO"
export const SELF_ORDER_LIST_DOING = "SELF_ORDER_LIST_DOING"
export const SELF_ORDER_LIST_SUCCESS = "SELF_ORDER_LIST_SUCCESS"
export const SELF_ORDER_LIST_FAILURE = "SELF_ORDER_LIST_FAILURE"
export const SELF_SUBMIT_NO = "SELF_SUBMIT_NO"
export const SELF_SUBMIT_DOING = "SELF_SUBMIT_DOING"
export const SELF_SUBMIT_SUCCESS = "SELF_SUBMIT_SUCCESS"
export const SELF_SUBMIT_FAILURE = "SELF_SUBMIT_FAILURE"
//-----------quick order---------------------
export const QUICK_ORDER_LIST_NO = "QUICK_ORDER_LIST_NO"
export const QUICK_ORDER_LIST_DOING = "QUICK_ORDER_LIST_DOING"
export const QUICK_ORDER_LIST_SUCCESS = "QUICK_ORDER_LIST_SUCCESS"
export const QUICK_ORDER_LIST_FAILURE = "QUICK_ORDER_LIST_FAILURE"
export const QUICK_SUBMIT_NO = "QUICK_SUBMIT_NO"
export const QUICK_SUBMIT_DOING = "QUICK_SUBMIT_DOING"
export const QUICK_SUBMIT_SUCCESS = "QUICK_SUBMIT_SUCCESS"
export const QUICK_SUBMIT_FAILURE = "QUICK_SUBMIT_FAILURE"
\ No newline at end of file
// export const BaseUrl = "http://192.168.10.188:8200"; // https://obs.uat.sfrx.guke.tech https://sob-os.uat.sfrx.guke.tech
// export const BaseUrlOther = "http://192.168.10.188:8200"; //http://192.168.10.188:8200/v1/dingding/upload_media
// export const VERSION = '/v1'; // /api/latest
export const BaseUrl = "https://obs.uat.sfrx.guke.tech"; // https://obs.uat.sfrx.guke.tech https://sob-os.uat.sfrx.guke.tech
export const BaseUrlOther = "https://sob-os.uat.sfrx.guke.tech"; //http://192.168.10.188:8200/v1/dingding/upload_media
export const VERSION = '/api/latest'; //
export const ACCESS_TOKEN = '201904091445193616b5e3d3a777848dda1de1a8123d0fdf9xw7t566c1S92U88';//未获取到access_token时使用
import {
Dimensions
} from 'react-native'
const { width, height } = Dimensions.get('window');
export const Height = () => {
return height
};
export const Width = () => {
return width
};
// UI 默认图是414*896
const uiWidthPx = 414;
const uiHeightPx = 896;
export function pxSize(uiElementPx) {
return uiElementPx * Width() / uiWidthPx;
}
export function pxHeight(uiElementPx) {
return uiElementPx * Height() / uiHeightPx;
}
// 背景色
export const promary_color = "#007EFF"; // 主色
export const foundation_color = "#ffffff"; // 底色
export const promary_shadow_color = "#3CA2FF"; // 按钮阴影色
export const home_background_color = "#F7F7F7"; // 背景色
export const btn_sub_color = "#0296F7"; // 按钮色
export const dis_sub_color = "#BBBBBB"; // 禁用按钮色
// 字体色
export const promary_text_color = "#000000"; // 主字颜色
export const title_text_color = "#ffffff"; // 标题颜色
export const placehold_text_color = "#919191"; // input placeholder颜色
export const first_text_color = '#333333'; // 一级字体
export const second_text_color = "#666666"; // 次级字体
export const third_text_color = "#999999"; // 三级字体
export const point_color = "#ff0000"; // * 颜色
// 字号
export const first_text_size = 20; // 一级字号
export const second_text_size = 16; // 二级字号
export const third_text_size = 12; // 三级字号
// 字体样式
export const font_family_semibold = "PingFangSC-Semibold";
export const font_family_medium = "PingFangSC-Medium";
export const font_family_regular = "PingFangSC-Regular";
export const font_family_light = "PingFangSC-Light";
export const header_height = 58
export const icon_style = {
resizeMode: 'contain',
width: '100%',
height: '100%'
}
export const safe_view = {
flex: 1
}
\ No newline at end of file
import React from 'react';
import {
View,
Text,
StyleSheet,
TextInput,
TouchableOpacity
} from 'react-native';
import {
first_text_color,
third_text_color,
foundation_color,
dis_sub_color,
title_text_color,
second_text_size,
font_family_medium,
font_family_semibold,
font_family_regular
} from '../../base/BaseStyle';
// 星号
export function AsteriskTextStyle({style, ...props}) {
return <Text style={[styles.asterisk_text, style]} {...props} />
}
// 列表标题
export function TitleTextStyle({style, ...props}) {
return <Text style={[styles.title_text, style]} {...props} />
}
// 列表内容
export function ContTextStyle({style, ...props}) {
return <Text style={[styles.cont_text, style]} {...props} />
}
// 列表输入框内容
export function ContInputTextStyle({style, ...props}) {
return <TextInput style={[styles.cont_text, styles.text_input, style]} {...props} />
}
// 列表右侧箭头
export function ImageTextStyle({style, ...props}) {
return <View style={[styles.image_box, style]} {...props} />
}
// 包含每一个列表的样式
export function CellTextStyle({style, ...props}) {
return <View style={[styles.call_box, style]} {...props} />
}
// 子页面底部按钮
export function FooterBtnStyle({style, textStyle, title, activeOpacity, ...props}) {
return <TouchableOpacity
activeOpacity={activeOpacity}
style={[styles.sub_btn_box, style]}
{...props}>
<Text style={[styles.sub_btn, textStyle]}>{title}</Text>
</TouchableOpacity>
}
const styles = StyleSheet.create({
asterisk_text: {
color: '#FF0000',
fontSize: second_text_size
},
title_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_semibold
// fontWeight: 'bold'
},
cont_text: {
fontSize: second_text_size,
color: third_text_color,
flex: 1,
textAlign: 'right',
fontFamily: font_family_regular,
paddingLeft: 20
},
text_input: {
// height: 38,
paddingRight: 20
},
image_box: {
width: 14,
marginLeft: 6
},
call_box: {
flexDirection: 'row',
alignItems: 'center',
height: 58,
backgroundColor: foundation_color,
paddingHorizontal: 20,
// paddingVertical: 20,
marginBottom: 18
},
sub_btn_box: {
backgroundColor: dis_sub_color,
height: 64,
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
},
sub_btn: {
color: title_text_color,
fontSize: 18,
fontFamily: font_family_medium
}
})
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
Modal,
ScrollView,
TouchableOpacity,
SafeAreaView
} from 'react-native';
import {
Width,
pxHeight,
third_text_color,
first_text_color,
safe_view,
font_family_regular,
promary_color
} from '../../base/BaseStyle';
import DatePicker from 'react-native-date-picker';
import { changeDateFormat } from '../../utils/Utils';
class DateModel extends Component {
constructor(props) {
super(props);
this.state = {
isVisible: this.props.show,
// entityList: this.props.entityList
currentDate: this.props.date
}
}
componentWillReceiveProps(nextProps) {
// console.warn('------show--------------',nextProps.show, this.state.isVisible )
if (this.state.isVisible != nextProps.show) {
this.setState({
isVisible: nextProps.show
});
}
if (this.state.currentDate != nextProps.date) {
this.setState({
currentDate: nextProps.date
});
}
}
handleCloseModal() {
this.setState({
isVisible: false
});
this.props.closeModal(false);
}
subCancel() {
// console.warn('取消')
this.handleCloseModal()
}
subSure(date) {
// console.warn('确认',date, date instanceof Date)
if(date instanceof Date) {
date = changeDateFormat(date, 'yyyy-MM-dd hh:mm')
}
this.props.callback(date)
this.handleCloseModal()
}
currentDateChange(date) {
// let formatDate = changeDateFormat(date, 'yyyy-MM-dd hh:mm')
// console.warn('date',date)
// console.warn(formatDate)
this.setState({
currentDate: date
});
}
renderDialog() {
// let { entityList } = this.state
let { currentDate } = this.state
return (
<View style={styles.opt_area}>
<View style={styles.modal_style}>
<View style={styles.scro_box}>
<View style={ styles.box_btn }>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.subCancel()}
style={[styles.btn_sty, styles.btn_sty_left]}
>
<Text style={[styles.btn_text, styles.btn_text_left]}>取消</Text>
</TouchableOpacity>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.subSure(currentDate)}
style={styles.btn_sty}
>
<Text style={[styles.btn_text, styles.btn_text_right]}>确认</Text>
</TouchableOpacity>
</View>
<View style={styles.date_box}>
<DatePicker
date={currentDate}
onDateChange={(date) => this.currentDateChange(date)}
locale="zh"
mode="datetime"
// style={{height:100}}
/>
</View>
</View>
</View>
</View>
)
}
render() {
return (
// <View style={styles.dia_container}>
// <Text style={styles.dis_cont}>遮照层</Text>
// </View>
<View style={styles.dia_container}>
<Modal
transparent={true}
visible={this.state.isVisible}
animationType={'fade'}
onRequestClose={() => this.handleCloseModal()}>
<SafeAreaView style={safe_view}>
<TouchableOpacity style={styles.container} activeOpacity={1}
// onPress={() => this.handleCloseModal()}
>
{this.renderDialog()}
</TouchableOpacity>
</SafeAreaView>
</Modal>
</View>
);
}
}
const styles = StyleSheet.create({
dia_container: {
flex: 1,
// position: 'absolute',
// top: 0,
// left: 0,
// right: 0,
// backgroundColor: '#ccc',
// width: Width(),
// height: Height()
},
dis_cont: {
width: '80%',
maxHeight: '80%',
backgroundColor: '#FFF',
borderRadius: 10
},
container: {
flex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.5)',
},
opt_area: {
flex: 1,
flexDirection: 'column',
justifyContent: 'center',
position: 'relative',
// marginTop: 12,
// marginBottom: 12,
// height: pxHeight(420)
},
modal_style: {
position: "absolute",
left: 0,
bottom: 0,
width: Width(),
flex: 1,
flexDirection: "column",
backgroundColor: '#ffffff',
borderTopLeftRadius: 12,
borderTopRightRadius: 12,
maxHeight: pxHeight(480)
// maxHeight: '100%'
},
item: {
width: Width(),
height: 40,
paddingLeft: 20,
paddingRight: 20,
alignItems: 'center'
},
itemText: {
fontSize: 16,
color: third_text_color
},
curr_item: {
color: first_text_color,
fontWeight: 'bold'
},
scro_box: {
paddingVertical: 30,
paddingTop: 10
// paddingTop: 42,
// alignItems: 'center'
},
box_btn: {
flex: 1,
paddingHorizontal: 20,
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'flex-start',
borderBottomColor: '#e8e8e8',
borderBottomWidth: 1
},
btn_sty: {
// backgroundColor: '#ccc',
width: '50%',
height: 42
},
btn_sty_left: {
// borderRightWidth: 1,
// borderRightColor: '#FF0000'
},
btn_text: {
fontFamily: font_family_regular,
fontSize: 16,
lineHeight: 42,
color: promary_color
},
btn_text_left: {
},
btn_text_right: {
textAlign: 'right'
},
date_box: {
transform: [
{ scale: .9 }
],
alignItems: 'center'
},
item_scroll: {
// height: '80%',
// marginTop: 30,
// paddingBottom: 30
},
// cancel: {
// width: Width(),
// height: 30,
// marginTop: 12,
// alignItems: 'center',
// backgroundColor: '#ffffff'
// },
})
export default DateModel;
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
Modal,
ScrollView,
TouchableOpacity,
SafeAreaView
} from 'react-native';
import {
Width,
pxHeight,
third_text_color,
first_text_color,
safe_view
} from '../../base/BaseStyle';
class DialogModel extends Component {
constructor(props) {
super(props);
this.state = {
isVisible: this.props.show,
entityList: this.props.entityList
}
// this.entityList = this.props.entityList
}
componentWillReceiveProps(nextProps) {
// console.warn('------show--------------',nextProps.show, this.state.isVisible )
if (this.state.isVisible != nextProps.show) {
this.setState({
isVisible: nextProps.show
});
}
if (this.state.entityList != nextProps.entityList) {
// this.entityList = nextProps.entityList
this.setState({
entityList: nextProps.entityList
})
}
}
closeModal() {
this.setState({
isVisible: false
});
this.props.closeModal(false);
}
renderItem(item, index) {
// console.warn(this.props.itemIndex)
let { itemIndex, itemValue } = this.props
return (
<TouchableOpacity key={index} onPress={this.choose.bind(this, item, index)} style={[styles.item]}>
{/* <TouchableOpacity key={i} onPress={this.choose.bind(this, index)} style={[styles.item]}> */}
{/* <Text style={[styles.itemText, itemIndex == index ? styles.curr_item : '']}>{item.name}</Text> */}
<Text style={[styles.itemText, itemValue == item.value ? styles.curr_item : '']}>{item.name}</Text>
</TouchableOpacity>
);
}
choose(item, index) {
let { itemTitle } = this.props
if (this.state.isVisible) {
// this.props.callback(i);
this.props.callback(item, itemTitle);
this.closeModal();
}
}
renderDialog() {
let { entityList } = this.state
return (
<View style={styles.opt_area}>
<View style={styles.modal_style}>
<View style={styles.scro_box}>
<ScrollView
style={styles.item_scroll}
// showsVerticalScrollIndicator={false}
>
{
entityList.map((item, index) => this.renderItem(item, index))
}
</ScrollView>
</View>
</View>
</View>
)
}
render() {
return (
// <View style={styles.dia_container}>
// <Text style={styles.dis_cont}>遮照层</Text>
// </View>
<View style={styles.dia_container}>
<Modal
transparent={true}
visible={this.state.isVisible}
animationType={'fade'}
onRequestClose={() => this.closeModal()}>
<SafeAreaView style={safe_view}>
<TouchableOpacity style={styles.container} activeOpacity={1}
onPress={() => this.closeModal()}>
{this.renderDialog()}
</TouchableOpacity>
</SafeAreaView>
</Modal>
</View>
);
}
}
const styles = StyleSheet.create({
dia_container: {
flex: 1,
// position: 'absolute',
// top: 0,
// left: 0,
// right: 0,
// backgroundColor: '#ccc',
// width: Width(),
// height: Height()
},
dis_cont: {
width: '80%',
maxHeight: '80%',
backgroundColor: '#FFF',
borderRadius: 10
},
container: {
flex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.5)',
},
opt_area: {
flex: 1,
flexDirection: 'column',
justifyContent: 'center',
position: 'relative',
// marginTop: 12,
// marginBottom: 12,
// height: pxHeight(420)
},
modal_style: {
position: "absolute",
left: 0,
bottom: 0,
width: Width(),
flex: 1,
flexDirection: "column",
backgroundColor: '#ffffff',
borderTopLeftRadius: 12,
borderTopRightRadius: 12,
maxHeight: pxHeight(480)
// maxHeight: '100%'
},
item: {
width: Width(),
height: 40,
paddingLeft: 20,
paddingRight: 20,
alignItems: 'center'
},
itemText: {
fontSize: 16,
color: third_text_color
},
curr_item: {
color: first_text_color,
fontWeight: 'bold'
},
scro_box: {
paddingVertical: 40,
paddingTop: 46
},
item_scroll: {
// height: '80%',
// marginTop: 30,
// paddingBottom: 30
},
// cancel: {
// width: Width(),
// height: 30,
// marginTop: 12,
// alignItems: 'center',
// backgroundColor: '#ffffff'
// },
})
export default DialogModel;
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image
} from 'react-native';
import {
header_height,
promary_color,
title_text_color,
font_family_regular,
pxSize,
Width
} from '../../base/BaseStyle';
class HeadBackItem extends Component {
constructor(props) {
super(props);
this.state = { }
}
goBack() {
// console.warn('返回!=====')
// console.warn(this.props)
this.props.navigation.goBack()
}
render() {
// console.warn(this.props)
let {title} = this.props
return (
<View style={styles.header_style}>
<TouchableOpacity
activeOpacity={.8}
style={styles.head_img_box}
onPress={() => this.goBack()}
>
<View style={styles.back_style}>
<Image source={require('../../images/arrow_icon.png')} style={styles.back_style_img}/>
</View>
</TouchableOpacity>
<Text style={styles.title_style}>{title}</Text>
</View>
);
}
}
const styles = StyleSheet.create({
header_style: {
flexDirection: 'row',
height: header_height,
width: Width(),
backgroundColor: promary_color,
alignItems: 'center',
justifyContent: 'flex-start',
paddingLeft: '5%'
},
head_img_box: {
width: 40,
alignItems: 'flex-start',
justifyContent: 'flex-start'
},
back_style: {
width: pxSize(18),
height: pxSize(18)
},
back_style_img: {
resizeMode: 'contain',
width: '100%'
},
title_style: {
width: Width() - 120,
textAlign: 'center',
fontSize: 18,
color: title_text_color,
fontFamily: font_family_regular
}
})
export default HeadBackItem;
\ No newline at end of file
import React, { Component } from 'react';
import {
TouchableOpacity,
Image,
StyleSheet,
SafeAreaView
} from 'react-native';
import {connect} from 'react-redux';
import {
icon_style
} from '../../base/BaseStyle';
import {
AsteriskTextStyle,
TitleTextStyle,
ContTextStyle,
ImageTextStyle,
CellTextStyle,
ContInputTextStyle
} from '../common/CellTextStyle';
import DialogModel from '../common/DialogModel';
import LodingModel from '../common/LodingModel';
import { requestOrganizations } from '../../action/SelfAction';
import { SELF_ORDER_LIST_DOING, SELF_ORDER_LIST_SUCCESS, SELF_ORDER_LIST_FAILURE } from '../../base/ActionTypes';
import { show } from '../../utils/Utils';
// const typeArr = ["不限", "男", "女", "难", "测试1", "测试2" ,"测试3", "测试4", "测试5", "测试6", "测试7", "测试8","测试9", "测试10测试1测试1测试1测试1测试1","测试11"];
// const typeArr = ["不限", "男", "女"];
const typeOption = [
{
name: '男',
value: 'boy'
},
{
name: '女',
value: 'girl'
},
{
name: '其他',
value: 'other'
},
{
name: '其他1',
value: 'other1'
},
{
name: '其他2',
value: 'other2'
},
{
name: '其他3',
value: 'other3'
},
{
name: '其他4',
value: 'other4'
},
{
name: '其他5',
value: 'other5'
},
{
name: '其他6',
value: 'other6'
}
]
class ItemCellModel extends Component {
constructor(props) {
super(props);
this.state = {
inputValue: 'nihao',
typeName: '性别',
type: 0,
currentItem: {
name: '请选择',
value: '-1'
},
showTypePop: false, // 选择器弹窗
isSubLoding: false, // 加载中弹窗
lodingTitle: '加载中',
listCurrentOption: [], // 当前选择器数据
}
}
componentWillReceiveProps(nextProps) {
let {item: {title}, self_list_status} = this.props
if(self_list_status != nextProps.self_list_status) {
console.warn('0-------', nextProps.self_list_status)
console.warn('0-----self_list_status--', self_list_status)
switch (nextProps.self_list_status) {
case SELF_ORDER_LIST_DOING:
// this.changeSubLoding(true)
break;
case SELF_ORDER_LIST_SUCCESS:
if(title === '组织') {
console.warn('组织-----!!!--')
this.changeListCurrentOption(nextProps.selfOrderOption, 'org_name', 'org_code');
}
// this.changeSubLoding()
break;
case SELF_ORDER_LIST_FAILURE:
// this.changeSubLoding()
break;
}
// this.changeListCurrentOption(nextProps.selfOrderOption, 'org_name', 'org_code')
// console.warn('0---selfOrderOption----', nextProps.selfOrderOption)
// let obj = {}
// let tempArr = []
// nextProps.selfOrderOption.map((item, index) => {
// obj.name = item.org_name,
// obj.value = item.org_code
// tempArr.push(obj)
// })
// // typeOption = [...tempArr]
// console.warn('---typeOption----',tempArr)
}
}
componentDidMount(){
// console.warn('item======')
// console.warn(this.props.item)
}
// 修改选择器需要的数据类型
changeListCurrentOption(data, nameType, valueType) {
console.warn('0---changeListCurrentOption----', data)
let tempArr = []
data.map((item, index) => {
console.warn('-----item[nameType]---',item[nameType])
let obj = {}
obj.name = item[nameType],
obj.value = item[valueType]
tempArr.push(obj)
})
// typeOption = [...tempArr]
console.warn('---tempArr----',tempArr)
this.setState({
listCurrentOption: tempArr,
// showTypePop: !this.state.showTypePop
showTypePop: true
})
// this.changeSubLoding()
}
// 加载中 || 加载成功/失败
changeSubLoding(loading) {
if (loading) {
this.setState({
isSubLoding: true
})
} else {
this.setState({
isSubLoding: false
})
}
}
// 弹窗回调函数
handleCallBack(item) {
this.setState({
// type: i,
// typeName: typeArr[i],
currentItem: item
})
}
// 关闭弹窗
handleCloseModal(show) {
this.setState({
showTypePop: show
})
}
// 打开选择器弹窗
handleOpenDialog() {
let {item: {title}, navigation, token, userInfo, selfOrderOption, self_list_status} = this.props
// console.warn(title, this.props.navigation)
let superTitle = navigation.state.params.title
if(title === '选择产品') {
navigation.navigate('ChooseProductPage', {title: `${superTitle} - ${title}`})
} else {
if(title === '组织') {
console.warn('组织',self_list_status)
this.props.requestOrganizations(token)
console.warn(selfOrderOption)
}
// this.setState({
// showTypePop: !this.state.showTypePop
// })
}
}
// 返回星号✳️
renderAsteriskItem() {
let {item} = this.props
if(item.isRequest) {
return (
<AsteriskTextStyle>*</AsteriskTextStyle>
)
}
}
// 返回选择器或输入框
renderIsPickerItem() {
let {item} = this.props
let isPickerItem = null
if(item.isPicker) {
isPickerItem = <ContTextStyle>{item.value}{this.state.currentItem.name}-{this.state.currentItem.value}</ContTextStyle>
// isPickerItem = <ContTextStyle>{item.value}{this.state.typeName}-{this.state.type}</ContTextStyle>
} else {
isPickerItem = <ContInputTextStyle editable={!item.isEditText} placeholder={item.value}></ContInputTextStyle>
}
return isPickerItem
}
// 返回右侧箭头
renderRightArrowItem() {
let {item} = this.props
if(item.isPicker) {
return (
<ImageTextStyle>
<Image source={require('../../images/arr_rig.png')} style={icon_style}/>
</ImageTextStyle>
)
}
}
// 返回列表
renderCellItem() {
let {item} = this.props
return (
<CellTextStyle>
{ this.renderAsteriskItem() }
<TitleTextStyle>{item.title}</TitleTextStyle>
{ this.renderIsPickerItem() }
{ this.renderRightArrowItem() }
</CellTextStyle>
)
}
// 返回医生列下方的输入框
renderCellDownInputItem() {
let {item} = this.props
if(item.showInput) {
return (
<CellTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入${item.title}`}
></ContInputTextStyle>
</CellTextStyle>
)
}
}
render() {
let { listCurrentOption, lodingTitle, isSubLoding } = this.state
console.warn('item======!!!',listCurrentOption)
let { item } = this.props
let active_opacity = .7
item.isEditText ? active_opacity = 1 : ''
return (
<SafeAreaView style={styles.item_container}>
<TouchableOpacity
activeOpacity={active_opacity}
onPress={() => this.handleOpenDialog()}>
{ this.renderCellItem() }
</TouchableOpacity>
{ this.renderCellDownInputItem() }
{
listCurrentOption.length ?
<DialogModel
// entityList={typeArr}
// callback={(i) => {
// this.setState({
// type: i,
// typeName: typeArr[i],
// })
// }}
// itemIndex={this.state.type}
entityList={listCurrentOption.length ? listCurrentOption : typeOption}
callback={(item) => this.handleCallBack(item)}
show={this.state.showTypePop}
itemValue={this.state.currentItem.value}
closeModal={(show) => this.handleCloseModal(show)}
/> :
// show('当前组织为空')
null
}
{/* <DialogModel
// entityList={typeArr}
// callback={(i) => {
// this.setState({
// type: i,
// typeName: typeArr[i],
// })
// }}
// itemIndex={this.state.type}
entityList={listCurrentOption.length ? listCurrentOption : typeOption}
callback={(item) => this.handleCallBack(item)}
show={this.state.showTypePop}
itemValue={this.state.currentItem.value}
closeModal={(show) => this.handleCloseModal(show)}
/> */}
<LodingModel title={lodingTitle} show={isSubLoding} />
</SafeAreaView>
);
}
}
const styles = StyleSheet.create({
item_container: {
flex: 1
},
cell_input: {
textAlign: 'left'
}
})
const mapStateToProps = (state) => {
return {
userInfo: state.login.userInfo,
token: state.login.token,
self_list_status: state.selfOrder.self_list_status,
selfOrderOption: state.selfOrder.selfOrderOption
}
}
const mapDispatchToProps = (dispatch) => {
return {
requestOrganizations: (token) => {
dispatch(requestOrganizations(token))
}
}
}
export default connect(mapStateToProps, mapDispatchToProps)(ItemCellModel);
\ No newline at end of file
import React, { Component } from 'react';
import {
ActivityIndicator,
SafeAreaView,
View,
Text,
StyleSheet,
Modal
} from 'react-native';
import {
safe_view,
promary_color
} from '../../base/BaseStyle';
class LodingModel extends Component {
constructor(props) {
super(props);
this.state = {
title: '加载中',
isVisible: this.props.show
}
}
componentWillReceiveProps(nextProps) {
if (this.state.isVisible != nextProps.show) {
this.setState({
isVisible: nextProps.show
})
}
}
render() {
let { title, size, color, style_back } = this.props
return (
<View style={styles.container}>
<Modal
transparent={true}
visible={this.state.isVisible}
animationType={'fade'}
// onRequestClose={() => this.closeModal()}>
>
<SafeAreaView style={safe_view}>
<View style={[styles.loding_cont, style_back]}>
<View style={styles.loding_title}>
<ActivityIndicator size={size ? size : "small"} color={color ? color : promary_color} />
<Text style={styles.tit_inner}>{title ? title : this.state.title}</Text>
</View>
</View>
</SafeAreaView>
</Modal>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1
},
loding_cont: {
flex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.1)',
paddingTop: '55%',
alignItems: 'center'
},
loding_title: {
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row'
},
tit_inner: {
fontSize: 16,
paddingLeft: 10,
color: promary_color
}
})
export default LodingModel;
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
Modal,
ScrollView,
TouchableOpacity,
Image
} from 'react-native';
import {
Width,
pxHeight,
third_text_color,
second_text_color,
first_text_color,
safe_view,
pxSize,
font_family_medium,
icon_style,
font_family_regular,
font_family_semibold,
title_text_color,
promary_color
} from '../../base/BaseStyle';
class NotEnoughModel extends Component {
constructor(props) {
super(props);
this.state = {
isVisible: this.props.show,
notEnoughList: this.props.notEnoughList,
title: '以下物品缺失,是否继续提交?',
not_enough_items_list: [
{
"item_code": "AR00000004",
"reg_number": "国械注进20173466362",
"plan_quantity": 10,
"specification": "2.2mm带线锚钉,蓝色缝线",
"item_name": "钛合金缝线锚钉",
"general_name": "钛合金锚钉",
"storage_quantity": 0
},
{
"item_code": "AR00000003",
"reg_number": "国械注进20173466362",
"plan_quantity": 10,
"specification": "3.5*12.1,蓝色缝线",
"item_name": "钛合金缝线锚钉",
"general_name": "钛合金锚钉",
"storage_quantity": 6
},
{
"item_code": "AR00000002",
"reg_number": "国械注进20173466362",
"plan_quantity": 10,
"specification": "5.0X15.5,蓝色缝线",
"item_name": "钛合金缝线锚钉",
"general_name": "钛合金锚钉",
"storage_quantity": 4
}
],
}
}
componentWillReceiveProps(nextProps) {
// console.warn('------show--------------',nextProps.show, this.state.isVisible )
if (this.state.isVisible != nextProps.show) {
this.setState({
isVisible: nextProps.show
});
}
if (this.state.notEnoughList != nextProps.notEnoughList) {
this.setState({
notEnoughList: nextProps.notEnoughList
})
}
}
// 取消
closeModal() {
this.setState({
isVisible: false
});
this.props.closeModal(false);
}
// 确定
submitModal() {
console.log('确定!!!')
this.props.callback();
this.closeModal()
}
renderNotEnItem(item, index) {
return (
<TouchableOpacity
activeOpacity={1}
style={styles.cont_list}>
<Text style={[styles.co_li, styles.co_str]}>{item.item_name}({item.item_code})</Text>
<Text style={styles.co_li}>{item.general_name}</Text>
<Text style={styles.co_li}>{item.specification}</Text>
<Text style={styles.co_li}>{item.reg_number}</Text>
<Text style={styles.co_li}>{item.item_name}</Text>
<Text style={styles.co_li}>
计划数量:
<Text style={styles.plan_num}>{item.plan_quantity}</Text>
</Text>
<Text style={styles.co_li}>
库存数量:
<Text style={styles.sto_num}>{item.storage_quantity}</Text>
</Text>
</TouchableOpacity>
)
}
renderDialog() {
let { notEnoughList, title, not_enough_items_list } = this.state
return (
<View style={styles.opt_area}>
<View style={styles.modal_style}>
<View style={styles.modal_head}>
<View style={styles.modal_tit}>
<Image style={styles.err_icon} source={require('../../images/err_tit.png')} />
<Text style={styles.inner_tit}>{title}</Text>
</View>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.closeModal()}
style={styles.head_tou_clo}
>
<Image style={icon_style} source={require('../../images/close_icon.png')}></Image>
</TouchableOpacity>
</View>
<View style={styles.scro_box}>
<ScrollView
style={styles.item_scroll}
// showsVerticalScrollIndicator={false}
>
{/* notEnoughList not_enough_items_list */}
{
notEnoughList.map((item, index) => this.renderNotEnItem(item, index))
}
</ScrollView>
</View>
<View style={styles.model_footer}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.closeModal()}
style={[styles.foo_btn, styles.btn_cel]}
>
<Text style={[styles.btn_tit, styles.tit_cel]}>取消</Text>
</TouchableOpacity>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.submitModal()}
style={[styles.foo_btn, styles.btn_sub]}
>
<Text style={styles.btn_tit}>确定</Text>
</TouchableOpacity>
</View>
</View>
</View>
)
}
render() {
return (
<View style={styles.dia_container}>
<Modal
transparent={true}
visible={this.state.isVisible}
animationType={'fade'}
onRequestClose={() => this.closeModal()}>
<View style={safe_view}>
<TouchableOpacity style={styles.container} activeOpacity={1}
// onPress={() => this.closeModal()}
>
{this.renderDialog()}
</TouchableOpacity>
</View>
</Modal>
</View>
);
}
}
const styles = StyleSheet.create({
dia_container: {
flex: 1,
},
dis_cont: {
width: '80%',
maxHeight: '80%',
backgroundColor: '#FFF',
borderRadius: 10
},
container: {
flex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.5)',
},
opt_area: {
flex: 1,
flexDirection: 'column',
justifyContent: 'center',
position: 'relative'
},
modal_style: {
position: "absolute",
left: 0,
top: '26%',
width: Width() - 40,
flex: 1,
flexDirection: "column",
backgroundColor: '#ffffff',
minHeight: pxHeight(380),
borderRadius: 20,
marginHorizontal: 20,
paddingHorizontal: 20,
paddingTop: 20,
paddingBottom: 30
},
item: {
width: Width(),
height: 40,
paddingLeft: 20,
paddingRight: 20,
alignItems: 'center'
},
itemText: {
fontSize: 16,
color: third_text_color
},
curr_item: {
color: first_text_color,
fontWeight: 'bold'
},
scro_box: {
marginTop: 14,
maxHeight: pxHeight(320),
minHeight: pxHeight(220),
borderWidth: 1,
borderColor: '#E0E0E0',
paddingLeft: 4
},
item_scroll: {},
modal_head: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'flex-end'
},
modal_tit: {
flexDirection: 'row',
alignItems: 'center'
},
err_icon: {
width: pxSize(18),
height: pxSize(18),
marginRight: 4
},
inner_tit: {
fontSize: 16,
fontFamily: font_family_medium
},
head_tou_clo: {
width: pxSize(28),
height: pxSize(28)
},
cont_list: {},
co_li: {
lineHeight: 20,
fontSize: 14,
fontFamily: font_family_regular,
color: second_text_color
},
co_str: {
fontFamily: font_family_semibold,
fontWeight: '500',
fontSize: 16,
paddingTop: 6,
paddingBottom: 2,
color: first_text_color
},
plan_num: {
fontSize: 16,
fontFamily: font_family_semibold
},
sto_num: {
fontSize: 16,
fontFamily: font_family_semibold,
color: 'red'
},
model_footer: {
flexDirection: 'row',
justifyContent: 'space-around'
},
foo_btn: {
width: pxSize(100),
height: pxSize(36),
borderRadius: 5,
marginTop: 20
},
btn_cel: {
backgroundColor: '#E0E0E0'
},
btn_sub: {
backgroundColor: promary_color
},
btn_tit: {
fontSize: 16,
color: title_text_color,
textAlign: 'center',
lineHeight: 32
},
tit_cel: {
color: first_text_color
},
})
export default NotEnoughModel;
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
SafeAreaView,
Modal,
ScrollView,
TouchableOpacity,
FlatList,
Image
} from 'react-native';
import {
pxHeight,
foundation_color,
promary_color,
second_text_color,
third_text_color,
first_text_color,
second_text_size,
Width,
pxSize,
dis_sub_color,
safe_view,
font_family_medium,
font_family_light
} from '../../base/BaseStyle';
import { FooterBtnStyle } from '../common/CellTextStyle';
class ProductModel extends Component {
constructor(props) {
super(props);
this.state = {
isVisible: this.props.show,
topProcOptionList: [
{
title: '编辑产品'
},
{
title: '螺钉盒'
},
{
title: '器械包'
},
{
title: '工具'
}
],
topActiveIndex: 0,
contOptionData: [ // 底部产品内容
{
"id": "0",
title: '规格:JS-CGO PE 10',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 20,
imgIcon: require('../../images/model_test.png'),
select: false
},
{
"id": "1",
title: '规格:JS-CGO PE 10 11',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../images/model_test.png'),
select: false
},
{
"id": "2",
title: '规格:JS-CGO PE 10 22',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../images/model_test.png'),
select: false
},
{
"id": "3",
title: '规格:JS-CGO PE 10 33',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../images/model_test.png'),
select: false
},
{
"id": "4",
title: '规格:JS-CGO PE 10 44',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../images/model_test.png'),
select: false
},
{
"id": "5",
title: '规格:JS-CGO PE 10 55',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../images/model_test.png'),
select: false
}
]
}
}
componentWillReceiveProps(nextProps) {
if (this.state.isVisible != nextProps.show) {
this.setState({isVisible: nextProps.show});
}
}
// 共计已选 点击
handleCloseSelected() {
console.warn('共计已选:666--model')
this.closeModal()
this.props.closeSelected(false)
}
// 选好了 点击
handleCloseSubmit() {
console.warn('选好了--model')
this.closeModal()
this.props.closeSubmit(false)
}
closeModal() {
this.setState({
isVisible: false
});
this.props.closeModal(false);
}
/**
* 点击当前产品加减
* @param {object} item 当前小类数据
* @param {number} index 当前角标
* @param {boolean} isPlus 默认减法 false,加法 true,
*/
handelCalculationList(item, index, isPlus) {
let { contOptionData } = this.state
let { value } = contOptionData[index]
if(isPlus) {
contOptionData[index].value += 1
} else if(!isPlus && value > 0) {
contOptionData[index].value -= 1
}
this.setState({
contOptionData
})
}
// 点击顶部菜单
handleTopNav(item, index) {
this.setState({
topActiveIndex: index
})
}
// 返回顶部编辑选项
renderTopProItem() {
let { topProcOptionList, topActiveIndex } = this.state
return (
<View style={styles.top_box}>
<ScrollView
style={styles.top_scroll_cont}
horizontal={true}
showsHorizontalScrollIndicator={false}
>
{
topProcOptionList.map((item, index) =>
<TouchableOpacity
activeOpacity={.8}
style={styles.top_touch_cont}
onPress={() => this.handleTopNav(item, index)}
>
<View style={[
styles.top_inner,
(index == 1 || index == 2) ? styles.se_thr_width : '',
index == 3 ? styles.four_width : '',
index == topActiveIndex ? styles.top_inner_act : ''
]}>
<Text style={[styles.top_tit, index == topActiveIndex ? styles.top_tit_act : '']}>
{item.title}
</Text>
</View>
</TouchableOpacity>
)
}
</ScrollView>
</View>
)
}
// 返回底部主要元素
renderContItem() {
return(
<View style={styles.edit_cont}>
<ScrollView
style={styles.edit_scroll_cont}
showsVerticalScrollIndicator={false}
>
<FlatList
style={styles.edit_list}
keyExtractor={item => item.id}
data={this.state.contOptionData}
extraData={this.state}
renderItem={ ({item, index}) => this.renderContColumnItem(item, index) }
/>
</ScrollView>
</View>
)
}
// 返回每一列元素
renderContColumnItem(item, index) {
return (
<TouchableOpacity
activeOpacity={1}
style={styles.column_container}>
<View style={styles.ri_inner}>
<View style={styles.oth_img_box}>
<Image style={styles.oth_img} source={item.imgIcon}/>
</View>
<View style={styles.ri_text_box}>
<Text style={styles.ri_te_tit}>
{ item.title }
</Text>
<Text style={[styles.ri_te_ot, styles.thr_ot]}>{item.tip1}</Text>
<Text style={styles.ri_te_ot}>{item.tip2}</Text>
</View>
<View style={styles.ri_num_box}>
<TouchableOpacity
activeOpacity={.9}
style={styles.btn_inner}
onPress={() => this.handelCalculationList(item, index)}
>
<View style={[styles.thr_num_btn, styles.thr_btn_left]}>
<Image source={require('../../images/less_icon.png')} style={styles.thr_num_icon}></Image>
</View>
</TouchableOpacity>
<Text style={styles.thr_num}>{ item.value }</Text>
<TouchableOpacity
activeOpacity={.9}
style={styles.btn_inner}
onPress={() => this.handelCalculationList(item, index, true)}
>
<View style={[styles.thr_num_btn, styles.thr_btn_right]}>
<Image source={require('../../images/plur_icon.png')} style={styles.thr_num_icon}></Image>
</View>
</TouchableOpacity>
</View>
</View>
</TouchableOpacity>
)
}
// 返回底部按钮
renderFooterBtnItem() {
// let { selectShowPopup } = this.state
return (
<View style={styles.sub_box}>
<FooterBtnStyle
style={styles.sub_btn_left}
activeOpacity={.8}
title={'共计已选:666'}
textStyle= {[styles.sub_btn_tit, styles.sub_btn_left_text]}
onPress={() => this.handleCloseSelected()}
/>
<FooterBtnStyle
style={styles.sub_btn_rig}
activeOpacity={.8}
title={'选好了'}
textStyle= {[styles.sub_btn_tit, styles.sub_btn_rig_text]}
onPress={() => this.handleCloseSubmit()}
/>
</View>
)
}
renderDialog() {
return (
<View style={styles.opt_area}>
<View style={styles.modal_style}>
<View style={styles.scro_box}>
{this.renderTopProItem()}
{this.renderContItem()}
{/* {this.renderFooterBtnItem()} */}
</View>
{this.renderFooterBtnItem()}
</View>
</View>
)
}
render() {
return (
<View style={styles.dia_container}>
<Modal
transparent={true}
visible={this.state.isVisible}
animationType={'fade'}
onRequestClose={() => this.closeModal()}>
<SafeAreaView style={safe_view}>
<TouchableOpacity style={styles.container} activeOpacity={1}
// onPress={() => this.closeModal()}
>
{this.renderDialog()}
</TouchableOpacity>
</SafeAreaView>
</Modal>
</View>
);
}
}
const styles = StyleSheet.create({
dia_container: {
flex: 1,
},
container: {
flex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.5)'
},
opt_area: {
flex: 1,
flexDirection: 'column',
justifyContent: 'center',
position: 'relative'
},
modal_style: {
position: "absolute",
left: 0,
bottom: 0,
width: Width(),
flex: 1,
flexDirection: "column",
backgroundColor: '#ffffff',
borderTopLeftRadius: 12,
borderTopRightRadius: 12,
height: pxHeight(580)
},
// item: {
// width: Width(),
// height: 40,
// paddingLeft: 20,
// paddingRight: 20,
// alignItems: 'center'
// },
// itemText: {
// fontSize: 16,
// color: third_text_color
// },
// curr_item: {
// color: first_text_color,
// fontWeight: 'bold'
// },
scro_box: {
flex: 1
},
top_box: {
width: Width(),
paddingHorizontal: 20
// backgroundColor: foundation_color,
},
top_scroll_cont: {
paddingBottom: 4,
borderBottomColor: '#F9F9F9',
borderBottomWidth: 1
},
top_touch_cont: {},
top_inner: {
justifyContent: 'center',
alignItems: 'center',
marginRight: 14,
borderBottomWidth: 2,
borderBottomColor: foundation_color,
minWidth: 50,
},
se_thr_width: {
minWidth: 42
},
four_width: {
minWidth: 28
},
top_inner_act: {
borderBottomWidth: 2,
borderBottomColor: promary_color
},
top_tit: {
paddingTop: 16,
paddingBottom: 12,
color: second_text_color,
// fontSize: third_text_size
fontSize: 14
},
top_tit_act: {
color: first_text_color,
fontWeight: 'bold'
},
edit_cont: {
// height: pxHeight(430)
flex: 1
},
edit_scroll_cont: {
height: '100%'
},
edit_list: {},
column_container: {
paddingHorizontal: 14
},
ri_inner: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
paddingVertical: 14,
paddingHorizontal: 8,
backgroundColor: foundation_color,
marginBottom: 14,
borderBottomWidth: 1,
borderBottomColor: '#F9F9F9'
},
oth_img_box: {
borderColor: '#ccc',
borderWidth: 1,
borderRadius: 50,
width: pxSize(50),
height: pxSize(50),
justifyContent: 'center',
alignItems: 'center'
},
oth_img: {
width: '90%',
height: '90%'
},
ri_text_box: {},
ri_te_tit: {
fontSize: second_text_size,
color: first_text_color,
// fontWeight: 'bold',
fontFamily: font_family_medium
},
thr_ot: {
// fontWeight: 'normal',
// color: first_text_color
},
ri_te_ot: {
fontSize: 14,
color: third_text_color,
fontFamily: font_family_light
},
ri_num_box: {
flexDirection: 'row',
alignItems: 'center'
},
thr_num_btn: {
width: pxSize(24),
height: pxSize(24)
},
thr_btn_left: {
marginRight: 4
},
thr_btn_right: {
marginLeft: 4
},
thr_num_icon: {
width: '100%',
height: '100%'
},
btn_inner: {},
thr_num: {
minWidth: pxSize(20),
textAlign: 'center'
},
sub_box: {
width: Width(),
backgroundColor: dis_sub_color,
flexDirection: 'row',
shadowColor: '#E5E5E5',
shadowOffset: {
width: 0,
height: -1
},
shadowOpacity: .3,
shadowRadius: 2,
elevation: 3
},
sub_btn_left: {
width: '50%',
backgroundColor: '#EEECEC'
},
sub_btn_tit: {
fontSize: 18
},
sub_btn_left_text: {
color: third_text_color
},
sub_btn_rig: {
width: '50%',
backgroundColor: promary_color
},
sub_btn_rig_text: {},
})
export default ProductModel;
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
Modal,
TouchableOpacity,
Image,
SafeAreaView
} from 'react-native';
import {
Width,
pxHeight,
first_text_size,
pxSize,
safe_view,
icon_style,
font_family_medium
} from '../../base/BaseStyle';
class ShowModel extends Component {
constructor(props) {
super(props);
this.state = {
isVisible: false
}
}
componentWillReceiveProps(nextProps) {
if (this.state.isVisible != nextProps.show) {
this.setState({
isVisible: nextProps.show
});
}
}
closeModal() {
this.setState({
isVisible: false
})
this.props.closeModal(false)
}
renderDialog() {
let { title, children } = this.props
console.warn(title, children)
return (
<View style={styles.opt_area}>
<View style={styles.modal_style}>
<View style={styles.modal_head}>
<Text style={styles.modal_tit}>{title}</Text>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.closeModal()}
style={styles.head_tou_clo}
>
<Image style={icon_style} source={require('../../images/close_icon.png')}></Image>
</TouchableOpacity>
</View>
<View style={styles.model_cont}>
{ children }
</View>
</View>
</View>
)
}
render() {
return (
<View style={styles.dia_container}>
<Modal
transparent={true}
visible={this.state.isVisible}
animationType={'fade'}
onRequestClose={() => this.closeModal()}>
<SafeAreaView style={safe_view}>
<TouchableOpacity style={styles.container} activeOpacity={1}
// onPress={() => this.closeModal()}
>
{this.renderDialog()}
</TouchableOpacity>
</SafeAreaView>
</Modal>
</View>
);
}
}
const styles = StyleSheet.create({
dia_container: {
flex: 1
},
container: {
flex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.1)'
},
opt_area: {
flex: 1,
// flexDirection: 'column',
justifyContent: 'center',
position: 'relative'
},
modal_style: {
position: "absolute",
left: 0,
top: '26%',
width: Width() - 40,
flex: 1,
flexDirection: "column",
backgroundColor: '#ffffff',
// borderTopLeftRadius: 20,
// borderTopRightRadius: 20,
minHeight: pxHeight(380),
borderRadius: 20,
marginHorizontal: 20,
paddingHorizontal: 20,
paddingTop: 20,
paddingBottom: 30
},
modal_head: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'flex-end'
},
modal_tit: {
fontSize: first_text_size,
fontFamily: font_family_medium
},
head_tou_clo: {
width: pxSize(28),
height: pxSize(28)
},
// clo_icon: {
// width: '100%',
// height: '100%'
// },
model_cont: {
paddingTop: 20
},
})
export default ShowModel;
\ No newline at end of file
import React, {Component} from 'react'
import {Platform, StatusBar, View} from 'react-native'
import {isIphoneX} from '../../utils/Utils'
import {connect} from "react-redux";
const iosStatusBarHeight = 20;
const iosStatusBarXHeight = 44;
const PropTypes = require('prop-types');
class StatusBarView extends Component {
static propsTypes = {
backgroundColor: PropTypes.string,
isReactStackNavigator: PropTypes.boolean,
barStyle: PropTypes.string
}
static defaultProps = {
isReactStackNavigator: false,
barStyle: 'dark-content'
}
render() {
let height = 0
if (Platform.OS == 'ios') {
if (this.props.isReactStackNavigator) {
height = isIphoneX() ? iosStatusBarXHeight : iosStatusBarHeight
}
}
return (
<View style={{
height : height,
backgroundColor: this.props.backgroundColor
}}>
<StatusBar
barStyle = {this.props.barStyle}
backgroundColor={this.props.backgroundColor}
/>
</View>
)
}
}
const mapStateToProps = (state) => ({
})
const mapDispatchToProps = (dispatch) => ({
})
export default connect(mapStateToProps, mapDispatchToProps)(StatusBarView)
\ No newline at end of file
import React, { Component } from 'react';
import {
SafeAreaView,
StyleSheet,
View,
Text,
Image,
TouchableOpacity,
Clipboard
} from 'react-native';
import { connect } from 'react-redux';
import HeadBackItem from './HeadBackItem';
import {
promary_color,
second_text_color,
first_text_color,
pxSize,
title_text_color,
safe_view,
font_family_medium,
font_family_regular
} from '../../base/BaseStyle';
import StatusBarView from './StatusBarView';
class SubSuccPage extends Component {
constructor(props) {
super(props);
this.state = {
orderVal: '20200318121230'
}
}
componentDidMount() {
let {orderNumber} = this.props.navigation.state.params
if(orderNumber) {
this.setState({
orderVal: orderNumber+''
})
}
}
async handleSubmit() {
console.warn('复制订单号并返回主页')
let { orderVal } = this.state
console.log('---orderNumber---', orderVal, typeof orderVal)
Clipboard.setString(orderVal)
// 获取复制的值
let str = await Clipboard.getString()
console.warn(str)
// 返回首页
let { navigation } = this.props
setTimeout(() => {
navigation.navigate('HomePage')
}, 500)
}
render() {
let {navigation} = this.props
let {title } = navigation.state.params
let { state } = this
return (
<View style={styles.succ_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<View style={styles.succ_inner}>
<View style={styles.img_box}>
<Image source={require('../../images/cor_green.png')} style={styles.img_icon}/>
</View>
<Text style={styles.succ_title}>{'提交成功'}</Text>
<Text style={styles.succ_text}>{'订单号:'} { state.orderVal }</Text>
<TouchableOpacity
activeOpacity={.9}
style={styles.succ_btn}
onPress={() => this.handleSubmit()}
>
<Text style={styles.btn_text}>{'复制订单号并返回主页'}</Text>
</TouchableOpacity>
</View>
</SafeAreaView>
</View>
);
}
}
const styles = StyleSheet.create({
succ_container: {
flex: 1
},
succ_inner: {
justifyContent: 'center',
alignItems: 'center',
paddingTop: '26%'
},
img_box: {
width: pxSize(80),
height: pxSize(80)
},
img_icon: {
width: '100%',
height: '100%'
},
succ_title: {
fontSize: 17,
fontFamily: font_family_medium,
// fontWeight: 'bold',
color: first_text_color,
paddingTop: 8,
paddingBottom: 20
},
succ_text: {
fontSize: 14,
color: second_text_color,
paddingBottom: 30,
fontFamily: font_family_regular
},
succ_btn: {
backgroundColor: promary_color,
width: pxSize(330),
borderRadius: 30,
height: 48,
display: 'flex',
justifyContent: 'center',
alignItems: 'center'
},
btn_text: {
color: title_text_color,
fontSize: 16,
fontFamily: font_family_regular
}
})
export default SubSuccPage;
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
SafeAreaView,
ScrollView,
Image,
TouchableOpacity,
TextInput
} from 'react-native';
import {
home_background_color,
promary_color,
safe_view,
icon_style,
placehold_text_color,
second_text_size,
first_text_color,
font_family_regular,
Width,
foundation_color,
pxSize,
second_text_color,
pxHeight,
title_text_color
} from '../../base/BaseStyle';
import StatusBarView from '../common/StatusBarView';
import HeadBackItem from '../common/HeadBackItem';
import {
FooterBtnStyle,
ImageTextStyle,
CellTextStyle,
AsteriskTextStyle,
TitleTextStyle,
ContInputTextStyle,
ContTextStyle
} from '../common/CellTextStyle';
import { connect } from 'react-redux';
import { isEmpty } from '../../utils/Utils';
import DateModel from '../common/DateModel';
import DialogModel from '../common/DialogModel';
class EquipConsuPage extends Component {
constructor(props) {
super(props);
this.state = {
canSubFlag: false, // 生成订单按钮样式改变
listOptionData: [ // 备注以上的元素
{
"id": "0",
title: '销售员',
name: '蔡妍',
value: 'caiyan',
isPicker: false,
select: false,
isEditable: false // 不可编辑
},
{
"id": "1",
title: '组织',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "2",
title: '手术医院',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "3",
title: '订单信息',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "4",
title: '消耗时间',
name: '请选择',
value: '',
dateValue: new Date(),
isPicker: true,
select: false,
showDatePicker: true
},
{
"id": "5",
title: '患者姓名',
value: '',
isPicker: false,
select: false
},
{
"id": "6",
title: '性别', // 选择
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "7",
title: '年龄', // 输入
value: '',
isPicker: false,
select: false
},
{
"id": "8",
title: '床位',
value: '',
isPicker: false,
select: false
},
{
"id": "9",
title: '病历号',
value: '',
isPicker: false,
select: false
},
{
"id": "10",
title: '是否结单',
value: '',
isPicker: false, // 单选
select: false
},
{
"id": "11",
title: '备注',
value: '',
isPicker: false,
select: false,
isRemark: true // 备注
},
{
"id": "12",
title: '耗材明细', // 跳转
btnTit: '+添加消耗明细',
value: '',
isPicker: false,
select: false,
isJumpSubPage: true, // 跳转子页
isShowSub: true, // 是否展示子项
subOption: [
{
title: '人工髋关节假体-JS-HB ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
},{
title: '人工髋关节假体-JS-22 ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
},{
title: '人工髋关节假体-JS-33 ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
},{
title: '人工髋关节假体-JS-44 ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
},{
title: '人工髋关节假体-JS-5 ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
}
]
},
{
"id": "13",
title: '添加图片',
value: '',
isPicker: false,
select: false,
isAddImage: true // 添加图片
}
],
submitOption: { // 提交的信息
// seller_code: '', // 用户名username
// org_code: '', // 组织
// customer_code: '', // 手术医院
// bill_to_site_code: '', // 收单地点
// ship_to_site_code: '', // 收货地点
// doctor_name: '', // 主治医生
// // surgery_name: '', // 手术名称
// surgery_date: '', // 手术时间
// // surgery_type_code: '', // 手术类型
// template_collect_number: '', // 配台模版
// order_type_code: '', // 订单类型
// surgery_desc: '', // 备注信息
// voice_url: '', // 录音地址
// order_currency: 'CNY',
// Caller: 'dingding',
// force_balance_check_flag: 'Y', // 检查缺失物料
},
currentItem: {
name: '请选择',
value: '-1'
},
localOtherObj: { // 恢复原状态
name: '请选择',
value: ''
},
currentTitle: '组织', // 当前点击项
showTypePop: false, // 选择器弹窗
isSubLoding: false, // 加载中弹窗
lodingTitle: '加载中',
listCurrentOption: [ // 当前选择器数据
{
name: '男',
value: 'boy'
},
{
name: '女',
value: 'girl'
}
],
dateModelPop: false, // 日期选择器
}
}
componentDidMount() {
this.getSellerName()
}
// 赋值销售员
getSellerName() {
let {state, props} = this
// console.log('---userInfo',props.userInfo)
if(state.listOptionData[0].name !== props.userInfo.person_name) {
this.setState({
listOptionData: state.listOptionData.map((item) => {
if(item.title === '销售员') {
item.name = props.userInfo.person_name
item.value = props.userInfo.user_name
}
return item
})
})
}
}
// 选择器弹窗回调函数
handleCallBack(item, itemTitle) {
console.warn(item, 'item--选择器弹窗回调函数----')
console.warn('item-itemTitle-----',itemTitle)
}
// 关闭弹窗
handleCloseModal(show) {
this.setState({
showTypePop: show
})
}
// 组织 点击
handleOrganizationCheck() {
console.warn('组织------check')
// let { state, props } = this
// this.setState({
// currentTitle: '组织',
// currentItem: {
// name: state.listOptionData[1].name,
// value: state.listOptionData[1].value
// }
// }, () => {
// let params = {
// access_token: props.token
// }
// props.requestQuickOrganizations(params)
// })
}
// 手术医院 点击
handleCustomerCheck() {
console.warn('手术医院------check')
// let { state, props } = this
// let self = this
// if(this.judgeOrgIsNull()) {
// self.setState({
// currentTitle: '手术医院',
// currentItem: {
// name: state.listOptionData[2].name,
// value: state.listOptionData[2].value
// }
// }, () => {
// // 在此修改接口
// self.getCustomerData()
// })
// }
}
// 耗材明细 隐藏子项
handleDetailBtmCheck() {
let {listOptionData} = this.state
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(index == 12) {
item.isShowSub = false
}
return item
})
})
}
// 耗材明细 显示子项
handleDetailRigCheck() {
let {listOptionData} = this.state
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(index == 12) {
item.isShowSub = true
}
return item
})
})
}
// 耗材明细 点击
handleConsumDetailCheck() {
console.warn('耗材明细------check')
// this.props.navigation.navigate('TransSearchPage', {
// title: '器械消耗 - 添加明细'
// })
}
// 添加图片 点击
handleAddPicCheck() {
console.warn('添加图片------check')
}
// 生成订单 点击
handleSubmit() {
console.warn('生成订单------check')
}
// 返回备注以上的元素
renderListItem() {
let { listOptionData, dateModelPop } = this.state
let {userInfo:{ person_name }} = this.props
if(!isEmpty(person_name)) {
// this.setState({
// listOptionData: listOptionData.map(item => {
// if(item.title === '销售员') {
// item.name = person_name
// item.value = person_name
// }
// return item
// })
// })
}
return(
<View style={styles.list_cont}>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={1}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'销售员'}</TitleTextStyle>
<ContInputTextStyle editable={false} defaultValue={listOptionData[0].value}></ContInputTextStyle>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleOrganizationCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'组织'}</TitleTextStyle>
<ContTextStyle>{listOptionData[1].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleCustomerCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'手术医院'}</TitleTextStyle>
<ContTextStyle>{listOptionData[2].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
// onPress={() => this.handleOrderInfo()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'订单信息'}</TitleTextStyle>
<ContTextStyle>{listOptionData[3].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
// onPress={() => this.handleConsumDateCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'消耗时间'}</TitleTextStyle>
<ContTextStyle>{listOptionData[4].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
<DateModel
date={listOptionData[4].dateValue}
// closeModal={(show) => this.closeDateModal(show)}
show={dateModelPop}
// callback={(date) => this.dateModalCallback(date)}
/>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle style={styles.cell_title}>{'患者姓名'}</TitleTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入`}
// onChangeText={(text) => this.handlePatNameInput(text)}
/>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
// onPress={() => this.handleGenderCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'性别'}</TitleTextStyle>
<ContTextStyle>{listOptionData[6].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle style={styles.cell_title}>{'年龄'}</TitleTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入`}
// onChangeText={(text) => this.handleAgeInput(text)}
/>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle style={styles.cell_title}>{'床位'}</TitleTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入`}
// onChangeText={(text) => this.handleBedInput(text)}
/>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle style={styles.cell_title}>{'病历号'}</TitleTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入`}
// onChangeText={(text) => this.handleRecordNumInput(text)}
/>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
// onPress={() => this.handleBillCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'是否结单'}</TitleTextStyle>
<View style={styles.btn_radio_box}>
<TouchableOpacity
activeOpacity={.8}
style={styles.btn_yes}
onPress={() => console.log('是')}
>
<View style={styles.radio_icon}>
<Image style={icon_style} source={require('../../images/radio_yes.png')} />
</View>
<Text style={styles.radio_txt}></Text>
</TouchableOpacity>
<TouchableOpacity
activeOpacity={.8}
style={styles.btn_no}
onPress={() => console.log('否')}
>
<View style={styles.radio_icon}>
<Image style={icon_style} source={require('../../images/radio_no.png')} />
</View>
<Text style={styles.radio_txt}></Text>
</TouchableOpacity>
</View>
{/* <ContInputTextStyle
style={styles.cell_input}
placeholder={`是 否`}
// onChangeText={(text) => this.handleDoctorCheck(text)}
/> */}
</CellTextStyle>
</TouchableOpacity>
</View>
{ this.renderPickerModel() }
</View>
)
}
// 返回右侧箭头
renderRightArrowItem() {
return (
<ImageTextStyle>
<Image source={require('../../images/arr_rig.png')} style={icon_style}/>
</ImageTextStyle>
)
}
// 返回选择器
renderPickerModel() {
let {
listCurrentOption,
currentItem,
currentTitle,
showTypePop,
} = this.state
// console.warn('弹窗-----,', listCurrentOption)
return (
<SafeAreaView style={styles.item_container}>
<DialogModel
entityList={listCurrentOption}
// callback={(item, itemTitle) => this.handleCallBack(item, itemTitle)}
show={showTypePop}
itemValue={currentItem.value}
itemTitle={currentTitle}
// closeModal={(show) => this.handleCloseModal(show)}
/>
</SafeAreaView>
)
}
// 返回备注元素
renderRemarksItem() {
let { state } = this
return (
<CellTextStyle style={styles.remark_item}>
<View style={styles.rema_box}>
<Text style={styles.rema_tit}>备注</Text>
<View style = {styles.rema_Input_outer} >
<TouchableOpacity activeOpacity = {1} style = {styles.rema_Input_inner} onPress = {() => this.TextInput.focus()} >
<TextInput
placeholder = {'请输入备注信息'}
placeholderTextColor = {placehold_text_color}
underlineColorAndroid = {'transparent'}
multiline = {true}
ref = {textInput => this.TextInput = textInput}
numberOfLines = {8}
style={styles.rema_Input}
maxLength={140}
// onChangeText={(text) => this.handleRemarkInput(text)}
defaultValue={state.listOptionData[10].value}
/>
</TouchableOpacity>
</View>
</View>
</CellTextStyle>
)
}
// 返回耗材明细
renderConsumablesDetailsItem() {
let { state } = this
return (
<CellTextStyle style={styles.consu_detail}>
<View style={styles.detail_inner}>
<Text style={styles.detail_tit}>耗材明细</Text>
{
state.listOptionData[12].subOption.length ?
<View
// activeOpacity={1}
style={styles.detail_sub_cont}>
<View style={styles.detail_sub_tit}>
<Text style={styles.detail_tit_text}>
耗材({state.listOptionData[12].subOption.length}
</Text>
{
state.listOptionData[12].isShowSub ?
<TouchableOpacity
activeOpacity={.8}
style={styles.detail_icon}
onPress={() => this.handleDetailBtmCheck()}
>
<Image style={[icon_style, styles.detail_top_icon]} source={require('../../images/arr_btm.png')} />
</TouchableOpacity> :
<TouchableOpacity
activeOpacity={.8}
style={[styles.detail_icon, styles.detail_icon_rig]}
onPress={() => this.handleDetailRigCheck()}
>
<Image style={[icon_style, styles.detail_top_icon]} source={require('../../images/arr_rig.png')} />
</TouchableOpacity>
}
</View>
{
state.listOptionData[12].isShowSub ?
<View style={styles.detail_sub_inner}>
<ScrollView
style={styles.detail_scroll}
onPress={() => {console.log('--触碰---')}}
onScrollBeginDrag={() => {console.log('--滚动---')}}
// showsVerticalScrollIndicator={false}
>
{
state.listOptionData[12].subOption.map((item, index) => {
return this.renderConDeSubItem(item, index)
})
}
</ScrollView>
</View> : null
}
</View> : null
}
<View style={styles.detail_footer}>
<TouchableOpacity
activeOpacity={.8}
style={styles.detail_btn_box}
onPress = {() => this.handleConsumDetailCheck()}
>
<Text style={styles.detail_btn}>{state.listOptionData[12].btnTit}</Text>
</TouchableOpacity>
</View>
</View>
</CellTextStyle>
)
}
// 返回耗材明细子项
renderConDeSubItem(item, index) {
return(
<View style={styles.con_de_sub}>
<Text style={styles.de_sub_tit}>
{index+1}{ item.title }
</Text>
<Text style={styles.de_tip}>
{ item.orderNumber }
</Text>
</View>
)
}
// 返回添加图片
renderAddPicturesItem() {
let { state } = this
return (
<CellTextStyle style={styles.consu_addpic}>
<View style={styles.addpic_inner}>
<Text style={styles.addpic_tit}>添加图片</Text>
<View style={styles.addpic_cont}>
<TouchableOpacity
activeOpacity={.8}
style={styles.addpic_img_btn}
// onPress={() => this.handleAddPicCheck()}
>
<Image style={icon_style} source={require('../../images/add_icon_large.png')} />
</TouchableOpacity>
{/* <TouchableOpacity
activeOpacity={.8}
style={styles.addpic_img_btn}>
<Image style={icon_style} source={require('../../images/add_icon_large.png')} />
</TouchableOpacity> */}
</View>
</View>
</CellTextStyle>
)
}
// 返回正在加载中
renderLodingItem() {
// let { lodingTitle, isSubLoding } = this.state
// return(
// <LodingModel title={lodingTitle} show={isSubLoding} style_back={styles.loding_back} />
// )
}
render() {
let {canSubFlag} = this.state
let {navigation} = this.props
let {title} = navigation.state.params
return (
<View style={styles.equip_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<ScrollView
style={styles.equip_main}
showsVerticalScrollIndicator={false}
>
<Text>'器械消耗'</Text>
{this.renderListItem()}
{this.renderRemarksItem()}
{this.renderConsumablesDetailsItem()}
{this.renderAddPicturesItem()}
</ScrollView>
</SafeAreaView>
<FooterBtnStyle
style={canSubFlag ? styles.sub_btn_pro : ''}
activeOpacity={canSubFlag ? .8 : 1}
title={'生成订单'}
textStyle= {styles.sub_btn}
onPress={() => this.handleSubmit()}
/>
</View>
);
}
}
const styles = StyleSheet.create({
equip_container : {
flex: 1,
backgroundColor: home_background_color
},
equip_main : {
padding: 14
},
btn_radio_box: {
flexDirection: 'row',
justifyContent: 'flex-end',
alignItems: 'center',
flex: 1,
paddingRight: 20
},
btn_yes: {
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
paddingRight: 16
},
btn_no: {
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center'
},
radio_icon: {
width: pxSize(22),
height: pxSize(22),
marginRight: 4
},
radio_txt: {
color: first_text_color,
fontSize: 16,
fontFamily: font_family_regular
},
cell_title: {
width: 120
},
cell_input: {
textAlign: 'left'
},
remark_item: {
minHeight: 80,
height: 'auto'
},
rema_box: {
paddingVertical: 16
},
rema_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
// fontWeight: 'bold'
},
rema_Input_outer: {
height: 120,
alignItems: 'center',
// paddingHorizontal: 15,
paddingBottom: 0
},
rema_Input_inner: {
paddingTop: 10,
height: 105,
width: Width() - 38,
// borderWidth: 1,
// borderColor: '#eeeeee'
},
rema_Input: {
paddingVertical: 0,
maxHeight: 105,
fontSize: second_text_size,
textAlign:'left',
textAlignVertical:'top',
alignSelf:'flex-start',
justifyContent:'flex-start',
alignItems:'flex-start',
fontFamily: font_family_regular
},
consu_detail: {
backgroundColor: home_background_color,
// backgroundColor: '#ccc',
paddingHorizontal: 0,
minHeight: 80,
height: 'auto',
alignItems: 'flex-start'
},
detail_inner: {
flex: 1
},
detail_tit: {
fontSize: second_text_size,
color: '#A3A3A3',
fontFamily: font_family_regular
},
detail_sub_cont: {
backgroundColor: foundation_color,
padding: 20,
marginTop: 10
},
detail_footer: {
paddingHorizontal: 16
},
detail_sub_tit: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center'
},
detail_tit_text: {
color: '#000',
fontSize: 16,
fontFamily: font_family_regular
},
detail_icon: {
width: pxSize(20),
height: pxSize(20)
},
detail_icon_rig: {
width: pxSize(18),
height: pxSize(18)
},
detail_top_icon: {},
detail_sub_inner: {
marginTop: 10,
maxHeight: pxSize(160),
// flex: 1
},
detail_scroll: {
// flex: 1
// height: 100
},
con_de_sub: {
marginBottom: 10
},
de_sub_tit: {
color: second_text_color
},
de_tip: {
color: second_text_color
},
consu_addpic: {
backgroundColor: home_background_color,
paddingHorizontal: 0,
minHeight: pxHeight(320),
height: 'auto',
alignItems: 'flex-start',
marginBottom: 34
},
addpic_inner: {
flex: 1
},
addpic_tit: {
fontSize: second_text_size,
color: '#A3A3A3',
fontFamily: font_family_regular
},
addpic_cont: {
backgroundColor: foundation_color,
padding: 20,
marginTop: 10,
flexDirection: 'row',
flex: 1
},
addpic_img_btn: {
width: pxSize(68),
height: pxSize(68),
marginRight: 20
},
detail_btn_box: {
backgroundColor: promary_color,
width: '100%',
height: pxSize(46),
borderRadius: 5,
marginTop: 10
},
detail_btn: {
color: title_text_color,
textAlign: 'center',
fontSize: second_text_size,
lineHeight: 40
},
list_cont: {
flex: 1
},
item_container: {
flex: 1
},
sub_btn_pro: {
backgroundColor: promary_color
},
sub_btn: {},
loding_back: {
backgroundColor: 'rgba(0, 0, 0, 0)'
}
})
const mapStateToProps = (state) => {
return {
userInfo: state.login.userInfo,
token: state.login.token,
loginState: state.login.loginState,
}
}
const mapDispatchToProps = (dispatch) => {
return {
// requestOrganizations: (token) => {
// dispatch(requestOrganizations(token))
// }
}
}
export default connect(mapStateToProps, mapDispatchToProps)(EquipConsuPage);
\ No newline at end of file
import React, { Component } from 'react';
import {
StyleSheet,
View,
Text,
Image,
SafeAreaView,
TouchableOpacity
} from 'react-native';
import {connect} from "react-redux";
import {
foundation_color,
promary_text_color,
second_text_size,
home_background_color,
pxSize,
promary_color,
safe_view,
font_family_regular
} from '../../base/BaseStyle';
import { exitLoginStatus } from '../../action/LoginAction';
import HeadBackItem from '../common/HeadBackItem';
import StatusBarView from '../common/StatusBarView';
class HomePage extends Component {
constructor(props) {
super(props)
this.state = {
showList: [
{
icon: require('../../images/quick_order.png'),
title: '快速下单',
page: 'QuickOrderPage',
},
{
icon: require('../../images/self_order.png'),
title: '自助下单',
page: 'SelfOrderPage',
},
{
icon: require('../../images/trans_order.png'),
title: '转单',
page: 'TransOrderPage',
},
{
icon: require('../../images/equip_consu.png'),
title: '器械消耗',
page: 'EquipConsuPage',
},
{
icon: require('../../images/return_login.png'),
title: '返回登录页',
page: 'LoginPage',
}
]
}
}
// componentWillReceiveProps(nextProps) {
// console.warn('home---------!!!!',nextProps)
// if(this.props.loginState != nextProps.loginState) {
// switch(nextProps.loginState) {
// case LOGIN_NO:
// console.warn('home-------LOGIN_NO---',nextProps.loginState)
// break
// default:
// break;
// }
// }
// }
jumpToSubpage(index) {
// console.warn('跳转')
// console.warn(index)
let {page, title} = this.state.showList[index]
if('LoginPage' === page) {
// console.warn('返回!')
// console.warn(this.props)
this.props.exitLoginStatus()
}
this.props.navigation.navigate(page, {title})
}
render() {
let {navigation} = this.props
return (
<View style={styles.home_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={'骨科智慧仓'} navigation={navigation} />
<View style={styles.home_cont}>
{
this.state.showList.map((item, index) =>
<TouchableOpacity
activeOpacity={.8}
style={[styles.home_list, (index%2 !== 0) && styles.home_list_even]}
onPress={() => this.jumpToSubpage(index)}>
<View style={styles.list_item}>
<View style={styles.img_box}>
<Image source={item.icon} style={styles.list_img}/>
</View>
<Text style={styles.list_tit}>{item.title}</Text>
</View>
</TouchableOpacity>
)
}
</View>
</SafeAreaView>
</View>
);
}
}
const styles = StyleSheet.create({
home_container: {
flex: 1,
// width: Width(),
// height: Height(),
// flexDirection: 'row',
// flexWrap: 'wrap',
backgroundColor: home_background_color
},
home_cont: {
// flex: 1,
flexDirection: 'row',
flexWrap: 'wrap',
marginTop: '8%',
marginLeft: '10%',
justifyContent: 'flex-start',
// backgroundColor: home_background_color
},
home_list: {
// width: '40%',
width: pxSize(150),
height: pxSize(150),
backgroundColor: foundation_color,
marginBottom: '6%',
// paddingTop: '8%',
// paddingBottom: '6%',
justifyContent: 'center',
alignItems: 'center',
borderRadius: 4
},
home_list_even: {
marginLeft: '8%'
},
list_item: {
width: '100%',
justifyContent: 'center',
alignItems: 'center'
},
img_box: {
// width: '28%',
width: pxSize(46),
marginBottom: 6
},
list_img: {
resizeMode: 'contain',
width: '100%'
},
list_tit: {
fontSize: second_text_size,
color: promary_text_color,
lineHeight: second_text_size + 12,
fontFamily: font_family_regular
}
})
const mapStateToProps = (state) => ({
loginState:state.login.loginState
})
const mapDispatchToProps = (dispatch) => ({
exitLoginStatus: () => {
dispatch(exitLoginStatus())
}
})
export default connect(mapStateToProps, mapDispatchToProps)(HomePage)
\ No newline at end of file
import React, {Component} from 'react';
import {
View,
Text,
SafeAreaView,
StyleSheet,
ImageBackground,
Image,
TextInput,
TouchableOpacity
} from 'react-native';
import {connect} from "react-redux";
import {
Width,
Height,
btn_sub_color,
promary_text_color,
title_text_color,
first_text_size,
second_text_size,
font_family_semibold,
third_text_size,
pxSize,
placehold_text_color,
font_family_regular,
safe_view
} from '../../base/BaseStyle';
import {requestLogin, autoLogin} from '../../action/LoginAction';
import {show, isEmpty} from '../../utils/Utils';
import {LOGIN_DOING,LOGIN_SUCCESS,LOGIN_FAILURE,LOGIN_NO} from '../../base/ActionTypes';
import StatusBarView from '../common/StatusBarView';
import LodingModel from '../common/LodingModel';
class LoginPage extends Component{
constructor(props) {
super(props)
this.state = {
username: '',
password: '',
subTit: '登录',
subTitList: ['登录', '登录中...'],
isSubLoding: false
}
}
componentDidMount() {
// this.subAutoLogin()
}
componentWillReceiveProps(nextProps) {
// console.warn('this---',this.props.loginState)
// console.warn('next-----',nextProps.loginState)
if(this.props.loginState != nextProps.loginState) {
// console.warn('next-----',nextProps.loginState)
// console.warn('this---',this.props.loginState)
switch(nextProps.loginState) {
case LOGIN_DOING:
this.changeSubTit(true);
break;
case LOGIN_FAILURE:
this.changeSubTit();
break;
case LOGIN_NO:
// console.warn('LOGIN_NO---',LOGIN_NO,this.props)
this.changeSubTit();
this.setState({
password: ''
})
break
case LOGIN_SUCCESS:
this.changeSubTit();
this.enterHomePage();
break;
default:
break;
}
}
}
// 登录中 || 登录成功/失败
changeSubTit(loading) {
let { subTitList } = this.state
if (loading) {
this.setState({
isSubLoding: true,
subTit: subTitList[1]
})
} else {
this.setState({
isSubLoding: false,
subTit: subTitList[0]
})
}
}
// 登录
submitLogin() {
// // 临时
// this.enterHomePage()
let {username, password, isSubLoding} = this.state
if (!isSubLoding) {
if (isEmpty(username)) {
show('请输入用户名')
return
}
if(isEmpty(password)) {
show('请输入密码')
return
}
let params = {
data:{
grant_type: "PASSWORD",
user_name: username,
user_password: password
}
}
this.props.requestLogin(params)
}
}
// 自动登录
subAutoLogin() {
let {username, password, autoLogin} = this.props
this.setState({
username,
password
})
if (isEmpty(username)) {
return
}
if(isEmpty(password)) {
return
}
let params = {
data:{
grant_type: "PASSWORD",
user_name: username,
user_password: password
}
}
autoLogin(params)
}
// 用户名改变
handleUsername(val) {
this.setState({
username: val
})
}
// 密码改变
handlePassword(val) {
this.setState({
password: val
})
}
// 进入首页
enterHomePage() {
this.props.navigation.navigate('HomePage')
}
render() {
let {username, password, isSubLoding, subTit} = this.state
return (
<View style={styles.login_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={"#2499F9"}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<ImageBackground source={require('../../images/login_bg.png')} style={styles.login_bg}>
<View style={styles.login_inner}>
<View style={styles.login_head}>
<Text style={styles.head_tit}>骨科智慧仓</Text>
<View style={styles.head_line}></View>
</View>
<View style={[styles.login_content]}>
<View style={styles.cont_head}>
<Text style={styles.cont_head_txt}>账号登录</Text>
</View>
<View style={styles.cont_main}>
<View style={styles.form_row}>
<TextInput
autoCapitalize='none'
placeholder="请输入您的用户名"
placeholderTextColor={placehold_text_color}
returnKeyType="next"
style={styles.row_input}
defaultValue={username}
clearButtonMode="while-editing"
onChangeText={(text) => this.handleUsername(text)}
/>
</View>
<View style={styles.form_row}>
<TextInput
autoCapitalize='none'
placeholder="请输入您的密码"
placeholderTextColor={placehold_text_color}
secureTextEntry={true}
returnKeyType="done"
style={styles.row_input}
defaultValue={password}
onChangeText={(text) => this.handlePassword(text)}
/>
</View>
</View>
<View style={styles.cont_footer}>
<TouchableOpacity
style={[styles.btn_footer, isSubLoding ? styles.btn_dis_footer : '']}
onPress={() => this.submitLogin()}
activeOpacity={ isSubLoding ? 1 : .8}>
<Text style={styles.btn_text}>{ subTit }</Text>
</TouchableOpacity>
</View>
</View>
<View style={styles.login_footer}>
<View style={styles.fo_box}>
<Image source={require('../../images/logo_foo.png')} style={styles.footer_img} />
</View>
</View>
<LodingModel title={subTit} show={isSubLoding} />
</View>
</ImageBackground>
</SafeAreaView>
</View>
)
}
}
const styles = StyleSheet.create({
login_container: {
flex: 1
},
login_bg: {
flex: 1,
// alignSelf: 'stretch',
// width: null,
// height: null,
// zIndex: -1,
// position: 'absolute',
// top: 0,
// left: 0,
// right: 0
},
login_inner: {
// flex: 1,
// position: 'relative',
// alignSelf: 'stretch',
width: Width(),
height: Height(),
paddingLeft: pxSize(33),
paddingRight: pxSize(33)
// height: null
},
login_head: {
// flex: 1,
// height: pxHeight(264),
height: '22%',
display: 'flex',
flexDirection: 'column',
justifyContent: 'flex-end',
marginBottom: 20
},
head_tit: {
color: title_text_color,
fontSize: first_text_size,
fontFamily: font_family_semibold
},
head_line: {
borderBottomColor: title_text_color,
borderBottomWidth: 2,
width: 30,
height: 14
},
login_content: {
backgroundColor: '#FFF',
borderRadius: 10,
// height: '49%',
height: pxSize(390),
width: pxSize(348),
paddingHorizontal: '8%',
paddingVertical: '12%'
},
cont_head: {
marginBottom: '12%'
},
cont_head_txt: {
color: promary_text_color,
fontSize: second_text_size,
fontFamily: font_family_semibold,
fontWeight: 'bold'
},
cont_main: {},
form_row: {
width: '100%',
height: 38,
lineHeight: 38,
backgroundColor: '#EFEFEF',
marginBottom: '8%',
borderRadius: 20,
paddingLeft: 10
},
input_plholdco: {
color: '#919191'
},
row_input: {
fontSize: third_text_size,
height: 38,
fontFamily: font_family_regular
// lineHeight: 22,
},
cont_footer: {
// borderRadius: 50
justifyContent: 'center',
flex: 1
},
btn_footer: {
width: '100%',
height: 38,
backgroundColor: btn_sub_color,
borderRadius: 20,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
shadowColor: btn_sub_color,
shadowOffset: {
width: 1,
height: 2
},
shadowOpacity: 1,
elevation: 2,
alignItems: 'center',
borderWidth: 0
},
btn_dis_footer: {
backgroundColor: 'rgba(40, 158, 251, 0.95)',
shadowColor: 'rgba(40, 158, 251, 0.95)'
},
btn_text: {
color: title_text_color,
fontSize: second_text_size
},
login_footer: {
// height: '20%',
// height: pxHeight(220),
flex: 1,
justifyContent: 'flex-start',
alignItems: 'center'
},
fo_box: {
// width: '30%',
// height: '30%'
width: pxSize(110),
height: pxSize(30),
marginTop: '18%'
},
footer_img: {
// flex: 1
resizeMode: 'contain',
width: '100%',
height: '100%'
}
})
const mapStateToProps = (state) => ({
token:state.login.token,
userInfo:state.login.userInfo,
loginState:state.login.loginState,
username:state.login.username,
password:state.login.password
})
const mapDispatchToProps = (dispatch) => ({
requestLogin: (data) => {
dispatch(requestLogin(data))
},
autoLogin: (data) => {
dispatch(autoLogin(data))
}
})
export default connect(mapStateToProps, mapDispatchToProps)(LoginPage)
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
SafeAreaView,
ScrollView,
TouchableOpacity,
Image,
TextInput
} from 'react-native';
import {
home_background_color,
promary_color,
safe_view,
icon_style,
font_family_regular,
second_text_size,
first_text_color,
Width,
placehold_text_color,
pxSize,
title_text_color,
third_text_size,
foundation_color
} from '../../base/BaseStyle';
import StatusBarView from '../common/StatusBarView';
import HeadBackItem from '../common/HeadBackItem';
import {
AsteriskTextStyle,
TitleTextStyle,
ContTextStyle,
ImageTextStyle,
CellTextStyle,
ContInputTextStyle,
FooterBtnStyle
} from '../common/CellTextStyle';
import { connect } from 'react-redux';
import { show, isEmpty, dedupQuoteArray, formatStrForDate } from '../../utils/Utils';
import { AudioRecorder, AudioUtils } from 'react-native-audio';
import Sound from 'react-native-sound';
import DateModel from '../common/DateModel';
import DialogModel from '../common/DialogModel';
import LodingModel from '../common/LodingModel';
import NotEnoughModel from '../common/NotEnoughModel';
import {
requestQuickOrganizations,
requestQuickSurgeryHospital,
requestQuickOrderType,
requestQuickTemplateCollect,
requestQuickAudio,
requestQuickSumbit,
uploadAttachment
} from '../../action/QuickAction';
import {
QUICK_ORDER_LIST_DOING,
QUICK_ORDER_LIST_SUCCESS,
QUICK_ORDER_LIST_FAILURE,
LOGIN_NO,
QUICK_SUBMIT_DOING,
QUICK_SUBMIT_SUCCESS,
QUICK_SUBMIT_FAILURE
} from '../../base/ActionTypes';
import ImagePicker from 'react-native-image-picker';
class EquipConsuPage extends Component {
constructor(props) {
super(props);
this.state = {
canSubFlag: false, // 生成订单按钮样式改变
listOptionData: [ // 备注以上的元素
{
"id": "0",
title: '销售员',
name: '蔡妍',
value: 'caiyan',
isPicker: false,
select: false,
isEditable: false // 不可编辑
},
{
"id": "1",
title: '组织',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "2",
title: '手术医院',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "3",
title: '收单地点',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "4",
title: '收货地点',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "5",
title: '主治医生',
name: '请选择',
value: '',
isPicker: true,
select: false,
showInput: false,
inputValue: ''
},
{
"id": "6",
title: '手术类型',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "7",
title: '配台模版',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "8",
title: '手术类时间',
name: '请选择',
value: '',
dateValue: new Date(),
isPicker: true,
select: false,
showDatePicker: true
},
{
"id": "9",
title: '订单类型',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "10",
title: '备注',
value: '',
isPicker: false,
select: false,
isRemark: true // 备注
},
{
"id": "11",
title: '还有什么要安排的,可录音备注哟!',
value: '',
isPicker: false,
select: false,
isRecode: true // 录音
}
],
submitOption: { // 提交的信息
seller_code: '', // 用户名username
org_code: '', // 组织
customer_code: '', // 手术医院
bill_to_site_code: '', // 收单地点
ship_to_site_code: '', // 收货地点
doctor_name: '', // 主治医生
// surgery_name: '', // 手术名称
surgery_date: '', // 手术时间
// surgery_type_code: '', // 手术类型
template_collect_number: '', // 配台模版
order_type_code: '', // 订单类型
surgery_desc: '', // 备注信息
voice_url: '', // 录音地址
order_currency: 'CNY',
Caller: 'dingding',
force_balance_check_flag: 'Y', // 检查缺失物料
},
currentItem: {
name: '请选择',
value: ''
},
localOtherObj: { // 恢复原状态
name: '请选择',
value: ''
},
currentTitle: '组织', // 当前点击项
showTypePop: false, // 选择器弹窗
isSubLoding: false, // 加载中弹窗
lodingTitle: '加载中',
listCurrentOption: [ // 当前选择器数据
// {
// name: '男',
// value: 'boy'
// },
// {
// name: '女',
// value: 'girl'
// },
// {
// name: '其他',
// value: 'other'
// }
],
dateModelPop: false, // 日期选择器
hasPermission: undefined, //录音 授权状态
// audioPath: AudioUtils.DocumentDirectoryPath + `/quickAudio${Math.floor(Math.random() * (1000))+1}.aac`, // 文件路径
audioPath: AudioUtils.DocumentDirectoryPath + `/quickAudio${Math.floor(Math.random() * (1000))+1}.ogg`, // 文件路径
recording: false, //是否录音
pause: false, //录音是否暂停
stop: false, //录音是否停止
currentTime: 0, //录音时长
localCustomersOption: [], // 当前医院信息:手术医院、收单地点、收货地点、主治医生
surgeryTypeOption: [
{
name:'创伤',
value:'创伤'
},{
name:'关节',
value:'关节'
},
{
name:'脊柱',
value:'脊柱'
},
{
name:'运动医学',
value:'运动医学'
}
],
// localTemplateOption: [], // 当前配台模版需要的信息(需要同步到备注)
showNotEnogPop: false, // 库存不足弹窗
notEnoughList:[], // 库存不足数据
}
}
componentDidMount() {
this.getSellerName()
this.getAudioAuthorize()
}
// 测试 -- 拍照上传
addPhotoAction(){
// const {headerData,itemData} = this.props.navigation.state.params;
// const {photos} = this.state;
const options = {
title: '选择图片',
cancelButtonTitle: '取消',
takePhotoButtonTitle: '拍照',
chooseFromLibraryButtonTitle: '相册',
cameraType: 'back',
mediaType: 'photo',
videoQuality: 'high',
durationLimit: 10,
maxWidth: 720,
maxHeight: 1280,
aspectX: 2,
aspectY: 1,
quality: 1,
angle: 0,
allowsEditing: false,
noData: false,
storageOptions: {
skipBackup: true,
path: 'images'
}
};
ImagePicker.showImagePicker(options,(res) => {
if (res.didCancel) {
console.log('User cancelled photo picker');
}
else if (res.error) {
console.log('ImagePicker Error: ', res.error);
if(res.error.indexOf('Camera permissions not granted') > -1){
Alert.alert(('提示信息', 'APP需要使用相机,请打开相机权限允许APP使用'), [{
text: '设置',
onPress: () => {
Linking.openURL('app-settings:')
.catch(err => console.log('error', err))
}
},{
text: '取消'
}])
}
if(res.error.indexOf('Photo library permissions not granted') > -1){
Alert.alert('提示信息', 'APP需要使用相册,请打开相册权限允许APP使用', [{
text: '设置',
onPress: () => {
Linking.openURL('app-settings:')
.catch(err => console.log('error', err))
}
},{
text: '取消'
}]);
}
}
else if (res.customButton) {
console.log('User tapped custom button: ', res.customButton);
} else {
show('上传中...')
let source; //保存选中的图片
if (Platform.OS === 'android') {
source = res.uri;
} else {
source = res.uri.replace('file://','');
}
// let date = itemData.receipt_date;
// if(date && date.length > 0){
// date = date.replace('T',' ')
// }
// let watermark = itemData.receipt_number + ' ' + date + ' ' + this.props.userInfo.person_name + ' ' + itemData.inv_name + ' ' + itemData.party_name
const formData = new FormData();
let file = {uri: source, type: 'multipart/form-data', name: res.fileName};
formData.append('file',file);
formData.append('destination','ALL');
formData.append('attachment_name',res.fileName);
formData.append('source_header_table','rcv_receipt_header');
// formData.append('source_header_number',headerData.receipt_number);
formData.append('source_line_table','rcv_receipt_line');
console.log('formData112===',formData)
// formData.append('source_line_number',itemData.source_line_number);
// formData.append('watermark',watermark);
//上传附近接口 destination: 'ALL',attachment_name:res.fileName, 'source_header_table':'rcv_receipt_header'
//uploadAttachment(this.props.token,{file: file,destination: 'ALL',attachment_name:res.fileName, 'source_header_table':'rcv_receipt_header' })
uploadAttachment(this.props.token, formData)
.then((response)=>{
if (response.error_code === 0) {
show('上传成功');
// photos.push(source);
// this.setState({photos});
}else if(response.error_code === 41006){
show('登录过期,请重新登录');
// this.props.exitLoginStatus()
} else {
show(response.error_msg)
}
})
}
})
}
// 赋值销售员
getSellerName() {
let {state, props} = this
// console.log('---userInfo',props.userInfo)
if(state.listOptionData[0].name !== props.userInfo.person_name) {
this.setState({
listOptionData: state.listOptionData.map((item) => {
if(item.title === '销售员') {
item.name = props.userInfo.person_name
item.value = props.userInfo.user_name
}
return item
})
})
}
}
// 请求授权
getAudioAuthorize() {
AudioRecorder.requestAuthorization()
.then(isAuthor => {
console.warn('是否授权: ' + isAuthor)
if(!isAuthor) {
return alert('请前往设置开启录音权限')
}
this.setState({hasPermission: isAuthor})
this.prepareRecordingPath(this.state.audioPath);
// 录音进展
AudioRecorder.onProgress = (data) => {
this.setState({
currentTime: Math.ceil(data.currentTime)
});
};
// 完成录音
AudioRecorder.onFinished = (data) => {
// data 返回需要上传到后台的录音数据
console.warn(this.state.currentTime)
console.log('录音完毕hello:------------------',data)
};
})
}
/**
* AudioRecorder.prepareRecordingAtPath(path,option)
* 录制路径
* path 路径
* option 参数
*/
prepareRecordingPath = (path) => {
const option = {
SampleRate: 44100.0, //采样率
Channels: 2, //通道
AudioQuality: 'High', //音质
AudioEncoding: 'ogg', //音频编码 aac
OutputFormat: 'mpeg_4', //输出格式
MeteringEnabled: false, //是否计量
MeasurementMode: false, //测量模式
AudioEncodingBitRate: 32000, //音频编码比特率
IncludeBase64: true, //是否是base64格式
AudioSource: 0, //音频源
}
AudioRecorder.prepareRecordingAtPath(path,option)
}
// 开始录音
_record = async () => {
console.warn('录音开始=====')
show('录音开始')
if(!this.state.hasPermission) {
return alert('没有授权')
}
if(this.state.recording) {
return alert('正在录音中...')
}
if(this.state.stop) {
// 初始化录音
this.prepareRecordingPath(this.state.audioPath)
}
this.setState({recording: true,pause: false})
try {
await AudioRecorder.startRecording()
} catch (err) {
console.log(err)
}
}
// 暂停录音
_pause = async () => {
if(!this.state.recording) {
return alert('当前未录音')
}
try {
await AudioRecorder.pauseRecording()
this.setState({pause: true, recording: false})
} catch (err) {
console.log(err)
}
}
// 恢复录音
_resume = async () => {
if(!this.state.pause) {
return alert('录音未暂停')
}
try {
await AudioRecorder.resumeRecording();
this.setState({pause: false, recording: true})
} catch (err) {
console.log(err)
}
}
// 停止录音
_stop = async () => {
console.warn('停止录音====')
show('录音结束')
console.warn('停止录音',this.state.currentTime)
try {
await AudioRecorder.stopRecording();
this.setState({stop: true, recording: false, paused: false});
} catch (error) {
console.error(error);
}
}
// 播放录音
_play = async () => {
let self = this
self.whoosh = new Sound(this.state.audioPath, '', (err) => {
if(err) {
show('加载音频失败')
return console.warn(err)
}
self.whoosh.play(success => {
if(success) {
console.warn('success - 播放成功')
}else {
console.warn('fail - 播放失败')
show('播放失败')
}
})
})
}
// 停止播放录音 -- 安卓不能停止、ios可以
_stopPlay = async () => {
console.warn('tingzhi bofang')
let self = this
self.whoosh.stop(() => {
console.warn('success - 停止成功')
})
}
// 删除录音
_del = async () => {
// 初始化录音
this.prepareRecordingPath(this.state.audioPath)
this.setState({
currentTime: 0,
stop: false
})
}
componentWillReceiveProps(nextProps) {
let { quick_list_status, loginState, navigation, submit_quick_order_status} = this.props
let self = this
if(quick_list_status != nextProps.quick_list_status) {
// console.warn('-222------', nextProps.quick_list_status)
// console.warn('--222---quick_list_status--', quick_list_status)
switch (nextProps.quick_list_status) {
case QUICK_ORDER_LIST_DOING:
this.changeSubLoding(true)
break;
case QUICK_ORDER_LIST_SUCCESS:
self.changeSubLoding(false)
setTimeout(() => {
self.changeCurrentOption()
}, 500)
break;
case QUICK_ORDER_LIST_FAILURE:
this.changeSubLoding(false)
break;
default:
break;
}
}
// console.log('-----nextProps.loginState----', nextProps.loginState, loginState)
if(loginState != nextProps.loginState) {
switch(nextProps.loginState) {
case LOGIN_NO:
navigation.navigate('LoginPage')
break;
default:
break;
}
}
if(submit_quick_order_status != nextProps.submit_quick_order_status) {
// console.warn('-submit_quick_order_status------', nextProps.submit_quick_order_status)
// console.warn('--222---submit_quick_order_status--', submit_quick_order_status)
switch (nextProps.submit_quick_order_status) {
case QUICK_SUBMIT_DOING:
this.changeSubLoding(true, '提交中')
break;
case QUICK_SUBMIT_SUCCESS:
self.changeSubLoding(false, '提交中')
setTimeout(() => {
self.processReturnData()
}, 500)
break;
case QUICK_SUBMIT_FAILURE:
this.changeSubLoding(false, '提交中')
break;
default:
break;
}
}
}
// 修改正在加载
changeSubLoding(loading, loadTit) {
this.setState({
isSubLoding: loading || false,
lodingTitle: loadTit || '加载中'
})
}
// 清空当前项以下的值
clearInitNameAndValue(curIndex) {
let { listOptionData, localOtherObj } = this.state
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(index > curIndex && index < 11 ) {
item.name = localOtherObj.name
item.value = localOtherObj.value
}
return item
})
})
}
// 判断是否都有值,修改提交按钮的颜色
changeCanSub(isSubCheck) {
let { listOptionData } = this.state
let tempStatus = false
let tempTit = ''
for(let chIndex in listOptionData) {
if(chIndex > 0 && chIndex < 10
&& chIndex != 6 && chIndex != 8
&& !listOptionData[chIndex].value
&& listOptionData[chIndex].name !== '其他') {
// console.log('chIndex-----',chIndex, chIndex !== 6, typeof chIndex, listOptionData[chIndex].title)
// 不是主治医生
tempTit = listOptionData[chIndex].title
tempStatus = true
break
}
}
// console.log('tempStatus====',tempStatus)
this.setState({
canSubFlag: !tempStatus
})
if(isSubCheck && tempStatus) {
show(`${tempTit}未选择,不能提交`)
}
}
// 选择器弹窗回调函数
handleCallBack(item, itemTitle) {
// console.warn(item, 'item------')
// console.warn('item-itemTitle-----',itemTitle)
let { listOptionData, localOtherObj} = this.state
let self = this
this.setState({
currentItem: item,
})
this.setState({
listOptionData: listOptionData.map((chItem, index) => {
if(chItem.title === itemTitle) {
// console.warn('---hhh-----', item)
chItem.name = item.name
chItem.value = item.value
if(itemTitle === '组织') {
self.clearInitNameAndValue(1)
}
if(itemTitle === '手术医院') {
self.clearInitNameAndValue(2)
}
if (itemTitle === '主治医生') {
if(item.name === '其他') {
chItem.showInput = true
} else {
chItem.showInput = false
chItem.inputValue = ''
}
self.clearInitNameAndValue(5)
}
if(itemTitle === '手术类型') {
self.clearInitNameAndValue(6)
}
if (itemTitle === '配台模版') {
// localTemplateOption
listOptionData[10].value = item.desc
}
}
return chItem
})
}, () => {
self.changeCanSub()
})
// console.warn('listOptionData[2]-----',this.state.listOptionData[2])
}
// 关闭弹窗
handleCloseModal(show) {
this.setState({
showTypePop: show
})
}
// 修改当前选择器数据
changeCurrentOption() {
let { listOptionData, currentTitle, localCustomersOption } = this.state
let { quickOrderOption } = this.props
console.log('当前:--quickOrderOption---', quickOrderOption)
let tempOption = []
if(quickOrderOption.length === 0) {
show(`当前${currentTitle}为空`)
return
}
if (currentTitle === '组织') {
tempOption = this.changeNameAndValue(quickOrderOption, 'org_name', 'org_code')
} else if (currentTitle === '手术医院') {
this.setState({
localCustomersOption: quickOrderOption
})
let currentArr = []
if( quickOrderOption.length ) {
let obj = {}
quickOrderOption.forEach((item, index) => {
if(!obj.customer_code) {
obj.customer_code = item.customer_code
obj.customer_name = item.customer_name
currentArr.push(obj)
} else if(obj.customer_code && item.customer_code !== obj.customer_code) {
obj.customer_code = item.customer_code
obj.customer_name = item.customer_name
currentArr.push(obj)
}
})
}
// console.log('---currentArr----', currentArr)
tempOption = this.changeNameAndValue(currentArr, 'customer_name', 'customer_code')
} else if (currentTitle === '配台模版') {
// this.setState({
// localTemplateOption: quickOrderOption
// })
let resultArr = []
quickOrderOption.forEach(item => {
let obj = {}
let tempName = item.template_name
if(item.doctor_name) {
tempName += `——${item.doctor_name}`
}
obj.name = tempName,
obj.value = item.template_number,
obj.desc = item.template_desc
resultArr.push(obj)
})
tempOption = [...resultArr]
// tempOption = this.changeNameAndValue(quickOrderOption, 'template_name', 'template_number')
} else if (currentTitle === '订单类型') {
tempOption = this.changeNameAndValue(quickOrderOption, 'value_name', 'value_code')
}
this.setState({
showTypePop: true,
listCurrentOption: [...tempOption]
})
}
// 修改选择器为属性 name 和 value
changeNameAndValue(data, nameType, valueType) {
let result = []
data.forEach(item => {
let obj = {}
obj.name = item[nameType],
obj.value = item[valueType]
result.push(obj)
})
return result
}
// 组织 点击
handleOrganizationCheck() {
// console.warn('组织------check')
let { state, props } = this
this.setState({
currentTitle: '组织',
currentItem: {
name: state.listOptionData[1].name,
value: state.listOptionData[1].value
}
}, () => {
let params = {
access_token: props.token
}
props.requestQuickOrganizations(params)
})
}
// 手术医院 点击
handleCustomerCheck() {
// console.warn('手术医院------check')
let { state, props } = this
let self = this
if(this.judgeOrgIsNull()) {
self.setState({
currentTitle: '手术医院',
currentItem: {
name: state.listOptionData[2].name,
value: state.listOptionData[2].value
}
}, () => {
// 在此修改接口
self.getCustomerData()
})
}
}
// 获取手术医院
getCustomerData() {
let { state, props } = this
let params = {
access_token: props.token,
org_code: state.listOptionData[1].value,
seller_code: props.userInfo.user_name
}
// console.log('-----params---', params)
props.requestQuickSurgeryHospital(params)
}
// 收单地点 点击
handleBillCheck() {
// console.warn('收单地点------check')
let { localCustomersOption, listOptionData } = this.state
let self = this
if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
self.setState({
currentTitle: '收单地点',
currentItem: {
name: listOptionData[3].name,
value: listOptionData[3].value
}
}, () => {
let tempOption = []
if( localCustomersOption.length ) {
localCustomersOption.forEach((item, index) => {
if(item.customer_code === listOptionData[2].value) {
// 保证是当前手术医院下的地点
let obj = {}
obj.value = item.bill_to_site_code
obj.name = item.bill_to_site_name
tempOption.push(obj)
}
})
}
tempOption = dedupQuoteArray(tempOption, 'name')
// console.log('---tempOption========?????-', tempOption)
self.setState({
showTypePop: true,
listCurrentOption: [...tempOption]
})
})
}
}
// 收货地点 点击
handleShipCheck() {
// console.warn('收货地点------check')
let { localCustomersOption, listOptionData } = this.state
let self = this
if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
self.setState({
currentTitle: '收货地点',
currentItem: {
name: listOptionData[4].name,
value: listOptionData[4].value
}
}, () => {
let tempOption = []
if( localCustomersOption.length ) {
localCustomersOption.forEach((item, index) => {
if(item.customer_code === listOptionData[2].value) {
// 保证是当前手术医院下的地点
let obj = {}
obj.value = item.ship_to_site_code
obj.name = item.ship_to_site_name
tempOption.push(obj)
}
})
}
tempOption = dedupQuoteArray(tempOption, 'name')
// console.log('---tempOption========?????-', tempOption)
self.setState({
showTypePop: true,
listCurrentOption: [...tempOption]
})
})
}
}
// 主治医生 点击/输入
handleDoctorCheck(text) {
// console.warn('主治医生------check', text)
let { localCustomersOption, listOptionData } = this.state
let self = this
if(text) {
// 输入
self.setState({
listOptionData: listOptionData.map(item => {
if(item.title === '主治医生') {
item.inputValue = text
}
return item
})
})
} else if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
// 点击
self.setState({
currentTitle: '主治医生',
currentItem: {
name: listOptionData[5].name,
value: listOptionData[5].value
}
}, () => {
let tempOption = []
if( localCustomersOption.length ) {
localCustomersOption.forEach((item, index) => {
if(item.customer_code === listOptionData[2].value) {
// 保证是当前手术医院下的医生
let obj = {}
obj.value = item.customer_doctor
obj.name = item.customer_doctor
// console.log('tempOption!!!+=========', tempOption)
tempOption.push(obj)
}
})
}
let othObj = {
name: '其他',
value: '-1'
}
tempOption.push(othObj)
tempOption = dedupQuoteArray(tempOption, 'name')
// console.log('---tempOption========?????-', tempOption)
self.setState({
showTypePop: true,
listCurrentOption: [...tempOption]
})
})
}
}
// 手术类型 点击
handleSurTypeCheck() {
// console.warn('手术类型------check')
let { listOptionData, surgeryTypeOption } = this.state
let self = this
if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
self.setState({
currentTitle: '手术类型',
currentItem: {
name: listOptionData[6].name,
value: listOptionData[6].value
}
}, () => {
self.setState({
showTypePop: true,
listCurrentOption: [...surgeryTypeOption]
})
})
}
}
// 配台模版 点击
handleMatchTempCheck() {
// console.warn('配台模版------check')
let { state, props } = this
if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
this.setState({
currentTitle: '配台模版',
currentItem: {
name: state.listOptionData[7].name,
value: state.listOptionData[7].value
}
}, () => {
// 在此修改接口
let tempDoctorName = ''
if(state.listOptionData[5].name !== '其他') {
tempDoctorName = state.listOptionData[5].value
}
let params = {
access_token: props.token,
org_code: state.listOptionData[1].value,
seller_code: props.userInfo.user_name,
customer_code: state.listOptionData[2].value,
surgery_type: state.listOptionData[6].value,
doctor_name: tempDoctorName
}
// console.log('-----params---', params)
props.requestQuickTemplateCollect(params)
})
}
}
// 手术类时间 点击 2020-04-23 17:41
handleSurDateCheck() {
// console.warn('手术类时间 点击 ===')
let { listOptionData } = this.state
let date = listOptionData[8].value
if(date) {
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(item.title === '手术类时间') {
item.dateValue = formatStrForDate(date)
}
return item
})
})
// console.warn('!date----', listOptionData[8])
}
this.closeDateModal(true)
}
// 关闭日期选择器
closeDateModal(show) {
this.setState({
dateModelPop: show
})
}
// 修改当前日期数据
dateModalCallback(date) {
// console.warn('callback',date)
let { listOptionData } = this.state
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(item.title === '手术类时间') {
item.name = date
item.value = date
item.dateValue = formatStrForDate(date)
}
return item
})
})
// console.warn('--手术类时间---', listOptionData[8])
}
// 订单类型 点击
handleOrderCheck() {
// console.warn('订单类型------check')
let { state, props } = this
if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
this.setState({
currentTitle: '订单类型',
currentItem: {
name: state.listOptionData[9].name,
value: state.listOptionData[9].value
}
}, () => {
// 在此修改接口
let params = {
access_token: props.token,
value_set_code:'SUR_ORDER_TYPE'
}
// console.log('-----params---', params)
props.requestQuickOrderType(params)
})
}
}
// 备注 输入
handleRemarkInput(text) {
// console.warn('备注---',text)
let { listOptionData } = this.state
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(item.title === '备注') {
item.value = text
}
return item
})
})
}
// 生成订单 点击
handleSubmit() {
this.changeCanSub(true)
let { state, props } = this
// // 测试 -- 录音
// let params = {
// access_token: props.token,
// path: state.audioPath
// }
// console.log('---handleSubmit--',params)
// props.requestQuickAudio(params)
// // // 测试 -- 图片上传
// // this.addPhotoAction()
console.log('提交======》', state.canSubFlag)
if(state.canSubFlag) {
// console.warn(state.listOptionData)
let tempSubOption = state.submitOption
tempSubOption.seller_code = state.listOptionData[0].value
tempSubOption.org_code = state.listOptionData[1].value
tempSubOption.customer_code = state.listOptionData[2].value
tempSubOption.bill_to_site_code = state.listOptionData[3].value
tempSubOption.ship_to_site_code = state.listOptionData[4].value
if(state.listOptionData[5].name === '其他') {
tempSubOption.doctor_name = state.listOptionData[5].inputValue
} else {
tempSubOption.doctor_name = state.listOptionData[5].value
}
tempSubOption.template_collect_number = state.listOptionData[7].value
tempSubOption.surgery_date = state.listOptionData[8].value
tempSubOption.order_type_code = state.listOptionData[9].value
tempSubOption.surgery_desc = state.listOptionData[10].value
tempSubOption.voice_url = state.listOptionData[11].value
console.log('tempSubOption-----', tempSubOption)
let params = {
access_token: props.token,
data: { ...tempSubOption }
}
props.requestQuickSumbit(params)
}
}
// 判断组织是否为空
judgeOrgIsNull() {
let { listOptionData } = this.state
let orgVal = listOptionData[1].value
if(!orgVal) {
show('请先选择组织')
return false
} else {
return true
}
}
// 判断手术医院是否为空
judgeCustomerIsNull() {
let { listOptionData } = this.state
let orgVal = listOptionData[2].value
if(!orgVal) {
show('请先选择手术医院')
return false
} else {
return true
}
}
// 处理提交后返回的数据
processReturnData() {
let { quickOrderOption } = this.props
console.log('submit --- !!!! --- 当前:--quickOrderOption---', quickOrderOption)
if(quickOrderOption.create_success) {
if(quickOrderOption.create_success == 'N') {
// 打开库存不足弹窗
this.setState({
notEnoughList: quickOrderOption.not_enough_items_list,
showNotEnogPop: true
})
} else if(quickOrderOption.create_success == 'Y') {
// 打开下单成功页面
let { state: { params: { title } } } = this.props.navigation
this.props.navigation.navigate('SubSuccPage', {
title: `${title} - 下单成功`,
orderNumber: quickOrderOption.survey_collect_number
})
}
}
}
// 库存不足弹窗回调 -- 确定
handleNotEnoughCallBack() {
// console.log('callback----heihei: 点击确定!!!')
// 再次调用提交并修改 force_balance_check_flag
let { submitOption } = this.state
let self = this
this.setState({
submitOption: {
...submitOption,
force_balance_check_flag: 'N'
}
}, () => {
// console.log('hhh--',this.state.submitOption )
self.handleSubmit()
})
}
// 库存不足弹窗关闭
handleNotEnoughCloseModal(show) {
// console.log('closeModal----heihei:', show)
this.setState({
showNotEnogPop: show
})
}
// 返回备注以上的元素
renderListItem() {
let { listOptionData, dateModelPop } = this.state
return(
<View style={styles.list_cont}>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={1}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'销售员'}</TitleTextStyle>
<ContInputTextStyle editable={false} defaultValue={listOptionData[0].name}></ContInputTextStyle>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleOrganizationCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'组织'}</TitleTextStyle>
<ContTextStyle>{listOptionData[1].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleCustomerCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'手术医院'}</TitleTextStyle>
<ContTextStyle>{listOptionData[2].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleBillCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'收单地点'}</TitleTextStyle>
<ContTextStyle>{listOptionData[3].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleShipCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'收货地点'}</TitleTextStyle>
<ContTextStyle>{listOptionData[4].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleDoctorCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'主治医生'}</TitleTextStyle>
<ContTextStyle>{listOptionData[5].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
{
listOptionData[5].showInput ?
<CellTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入主治医生`}
onChangeText={(text) => this.handleDoctorCheck(text)}
></ContInputTextStyle>
</CellTextStyle> : null
}
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleSurTypeCheck()}
>
<CellTextStyle>
<TitleTextStyle>{'手术类型'}</TitleTextStyle>
<ContTextStyle>{listOptionData[6].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleMatchTempCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'配台模版'}</TitleTextStyle>
<ContTextStyle>{listOptionData[7].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleSurDateCheck()}
>
<CellTextStyle>
<TitleTextStyle>{'手术类时间'}</TitleTextStyle>
<ContTextStyle>{listOptionData[8].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
<DateModel
date={listOptionData[8].dateValue}
closeModal={(show) => this.closeDateModal(show)}
show={dateModelPop}
callback={(date) => this.dateModalCallback(date)}
/>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleOrderCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'订单类型'}</TitleTextStyle>
<ContTextStyle>{listOptionData[9].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
{ this.renderPickerModel() }
</View>
)
}
// 返回右侧箭头
renderRightArrowItem() {
return (
<ImageTextStyle>
<Image source={require('../../images/arr_rig.png')} style={icon_style}/>
</ImageTextStyle>
)
}
// 返回选择器弹窗
renderPickerModel() {
let {
listCurrentOption,
currentItem,
currentTitle,
showTypePop,
} = this.state
// console.warn('弹窗-----,', listCurrentOption)
return (
<SafeAreaView style={styles.item_container}>
<DialogModel
entityList={listCurrentOption}
callback={(item, itemTitle) => this.handleCallBack(item, itemTitle)}
show={showTypePop}
itemValue={currentItem.value}
itemTitle={currentTitle}
closeModal={(show) => this.handleCloseModal(show)}
/>
</SafeAreaView>
)
}
// 返回备注元素
renderRemarksItem() {
let { state } = this
return (
<CellTextStyle style={styles.remark_item}>
<View style={styles.rema_box}>
<Text style={styles.rema_tit}>备注</Text>
<View style = {styles.rema_Input_outer} >
<TouchableOpacity activeOpacity = {1} style = {styles.rema_Input_inner} onPress = {() => this.TextInput.focus()} >
<TextInput
placeholder = {'请输入备注信息'}
placeholderTextColor = {placehold_text_color}
underlineColorAndroid = {'transparent'}
multiline = {true}
ref = {textInput => this.TextInput = textInput}
numberOfLines = {8}
style={styles.rema_Input}
maxLength={140}
onChangeText={(text) => this.handleRemarkInput(text)}
defaultValue={state.listOptionData[10].value}
/>
</TouchableOpacity>
</View>
</View>
</CellTextStyle>
)
}
// 返回录音元素
renderRecordingItem() {
let { recording, pause, stop, currentTime } = this.state
return (
<CellTextStyle style={styles.reco_item}>
<View style={styles.reco_btn_cont}>
<Text style={styles.reco_btn_tit}>还有什么要安排的,可录音备注哟!</Text>
{
!stop ?
<View style={styles.reco_btn_inner}>
<TouchableOpacity
activeOpacity = {.8}
style={styles.reco_btn_box}
onLongPress={this._record}
onPressOut={this._stop}
>
<View style={styles.reco_img_box}>
<Image source={require('../../images/record_icon.png')} style={icon_style}/>
</View>
<Text style={styles.reco_btn_text}>长按录音</Text>
</TouchableOpacity>
{/* <Text style={styles.reco_text} onPress={this._record}> Record(开始录音) </Text>
<Text style={styles.reco_text} onPress={this._pause}> Pause(暂停录音) </Text>
<Text style={styles.reco_text} onPress={this._resume}> Resume(恢复录音) </Text>
<Text style={styles.reco_text} onPress={this._stop}> Stop(停止录音) </Text>
<Text style={styles.reco_text} onPress={this._play}> Play(播放录音) </Text>
<Text style={styles.reco_text} onPress={this._del}> Del(删除录音) </Text>
<Text style={styles.reco_text}>
{
recording ? '正在录音' :
pause ? '已暂停' : '未开始'
}
</Text>
<Text style={styles.reco_text}>时长: {currentTime}</Text> */}
</View>
: <View style={styles.reco_play_box}>
<View style={styles.play_tit}>
<Text style={styles.play_text}>时长: {currentTime} </Text>
<Text style={styles.play_text}>正在播放</Text>
</View>
<View style={styles.play_btn}>
<TouchableOpacity
activeOpacity = {.8}
style={[styles.reco_list_box, styles.reco_del_btn]}
onPress={this._del}
>
<Text style={[styles.reco_text, styles.reco_del_tit]}> 删除 </Text>
</TouchableOpacity>
<TouchableOpacity
activeOpacity = {.8}
style={[styles.reco_list_box, styles.reco_play_btn]}
onPress={this._play}
>
<Text style={[styles.reco_text, styles.reco_play_tit]}> 播放({currentTime}‘‘) </Text>
</TouchableOpacity>
{/* <TouchableOpacity
activeOpacity = {.8}
style={styles.reco_list_box}
onPress={this._stopPlay}
>
<Text style={styles.reco_text}> 停止 </Text>
</TouchableOpacity> */}
</View>
</View>
}
</View>
</CellTextStyle>
)
}
// 返回正在加载中
renderLodingItem() {
let { lodingTitle, isSubLoding } = this.state
return(
<LodingModel title={lodingTitle} show={isSubLoding} style_back={styles.loding_back} />
)
}
// 返回库存不足弹窗
renderNotEnoughModel() {
let {
notEnoughList,
showNotEnogPop
} = this.state
return (
<SafeAreaView style={styles.item_container}>
<NotEnoughModel
notEnoughList={notEnoughList}
callback={() => this.handleNotEnoughCallBack()}
show={showNotEnogPop}
closeModal={(show) => this.handleNotEnoughCloseModal(show)}
/>
</SafeAreaView>
)
}
render() {
let {canSubFlag} = this.state
let {navigation} = this.props
let {title} = navigation.state.params
return (
<View style={styles.quick_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<ScrollView
style={styles.quick_main}
showsVerticalScrollIndicator={false}
>
{this.renderListItem()}
{this.renderRemarksItem()}
{this.renderRecordingItem()}
</ScrollView>
<FooterBtnStyle
style={canSubFlag ? styles.sub_btn_pro : ''}
activeOpacity={canSubFlag ? .8 : 1}
title={'生成订单'}
textStyle= {styles.sub_btn}
onPress={() => this.handleSubmit()}
/>
{ this.renderLodingItem() }
{ this.renderNotEnoughModel() }
</SafeAreaView>
</View>
);
}
}
const styles = StyleSheet.create({
quick_container : {
flex: 1,
backgroundColor: home_background_color
},
quick_main : {
padding: 14
},
remark_item: {
minHeight: 80,
height: 'auto'
},
rema_box: {
paddingVertical: 16
},
rema_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
// fontWeight: 'bold'
},
rema_Input_outer: {
height: 120,
alignItems: 'center',
// paddingHorizontal: 15,
paddingBottom: 0
},
rema_Input_inner: {
paddingTop: 10,
height: 105,
width: Width() - 38,
// borderWidth: 1,
// borderColor: '#eeeeee'
},
rema_Input: {
paddingVertical: 0,
maxHeight: 105,
fontSize: second_text_size,
textAlign:'left',
textAlignVertical:'top',
alignSelf:'flex-start',
justifyContent:'flex-start',
alignItems:'flex-start',
fontFamily: font_family_regular
},
list_cont: {
flex: 1
},
item_container: {
flex: 1
},
reco_item: {
height: 160,
// height: 340,
marginBottom: 42
},
reco_btn_cont: {
paddingVertical: 20
},
reco_btn_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
reco_btn_inner: {
flex: 1,
width: Width() - 38,
// justifyContent: 'flex-end',
alignItems: 'center',
paddingTop: 30
},
reco_btn_box: {
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 50,
width: pxSize(152)
},
reco_img_box: {
width: pxSize(20),
height: pxSize(22)
},
// reco_img: {
// width: '100%',
// height: '100%'
// },
reco_text: {
fontSize: 14,
marginVertical: 10
},
reco_btn_text: {
fontSize: second_text_size,
color: first_text_color,
marginLeft: 6,
fontFamily: font_family_regular
},
reco_play_box: {
flex: 1,
width: Width() - 68,
// justifyContent: 'flex-end',
// alignItems: 'center'
},
play_tit:{
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
height: 60
},
play_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
play_btn:{
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
// height: 80
},
reco_list_box:{
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 34,
width: pxSize(100)
},
reco_del_btn: {
backgroundColor: promary_color,
height: 20,
borderRadius: 5,
width: pxSize(60)
},
reco_play_btn: {
width: pxSize(200),
borderRadius: 5,
height: 34,
borderColor: '#DFDFDF',
borderWidth: 1,
backgroundColor: foundation_color
},
reco_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
reco_del_tit: {
color: title_text_color,
fontSize: third_text_size
},
reco_play_tit: {},
sub_btn_pro: {
backgroundColor: promary_color
},
sub_btn: {},
cell_input: {
textAlign: 'left'
},
loding_back: {
backgroundColor: 'rgba(0, 0, 0, 0)'
}
})
const mapStateToProps = (state) => {
return {
userInfo: state.login.userInfo,
token: state.login.token,
loginState: state.login.loginState,
quick_list_status: state.quick.quick_list_status,
submit_quick_order_status: state.quick.submit_quick_order_status,
quickOrderOption: state.quick.quickOrderOption
}
}
const mapDispatchToProps = (dispatch) => {
return {
requestQuickOrganizations: (params) => {
dispatch(requestQuickOrganizations(params))
},
requestQuickSurgeryHospital: (params) => {
dispatch(requestQuickSurgeryHospital(params))
},
requestQuickOrderType: (params) => {
dispatch(requestQuickOrderType(params))
},
requestQuickTemplateCollect: (params) => {
dispatch(requestQuickTemplateCollect(params))
},
requestQuickAudio: (params) => {
dispatch(requestQuickAudio(params))
},
requestQuickSumbit: (params) => {
dispatch(requestQuickSumbit(params))
}
}
}
export default connect(mapStateToProps, mapDispatchToProps)(EquipConsuPage);
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
SafeAreaView,
StyleSheet,
TouchableOpacity,
Image,
ScrollView,
TextInput,
FlatList
} from 'react-native';
import {connect} from 'react-redux';
import {
second_text_size,
home_background_color,
dis_sub_color,
placehold_text_color,
Width,
first_text_color,
pxSize,
promary_color,
safe_view,
icon_style,
font_family_regular
} from '../../base/BaseStyle';
import {
AsteriskTextStyle,
TitleTextStyle,
ContTextStyle,
ImageTextStyle,
CellTextStyle,
ContInputTextStyle,
FooterBtnStyle
} from '../common/CellTextStyle';
import ItemCellModel from '../common/ItemCellModel';
import tagData from './module/listTagData';
import { show, isEmpty, formatStrForDate, changeDateFormat } from '../../utils/Utils';
import HeadBackItem from '../common/HeadBackItem';
import StatusBarView from '../common/StatusBarView';
import { requestOrganizations } from '../../action/SelfAction';
import { SELF_ORDER_LIST_DOING, SELF_ORDER_LIST_SUCCESS, SELF_ORDER_LIST_FAILURE } from '../../base/ActionTypes';
import DialogModel from '../common/DialogModel';
import LodingModel from '../common/LodingModel';
import DateModel from '../common/DateModel';
import DatePicker from 'react-native-date-picker';
import { AudioRecorder, AudioUtils } from 'react-native-audio';
import Sound from 'react-native-sound';
class SelfOrderPage extends Component {
constructor(props) {
super(props);
this.state = {
canSubFlag: true, // 生成订单按钮样式改变
listOptionData: [ // 备注以上的元素
{
"id": "0",
title: '销售员',
name: '蔡妍',
value: '蔡妍',
isPicker: false,
select: false,
isEditable: false // 不可编辑
},
{
"id": "1",
title: '组织',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "2",
title: '手术医院',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "3",
title: '收单地点',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "4",
title: '收货地点',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "5",
title: '主治医生',
name: '请选择',
value: '',
isPicker: true,
select: false,
showInput: false,
inputValue: ''
},
{
"id": "6",
title: '手术名称',
value: '',
isPicker: false,
select: false
},
{
"id": "7",
title: '手术类时间',
name: '请选择',
value: '',
dateValue: new Date(),
isPicker: true,
select: false,
showDatePicker: true
},
{
"id": "8",
title: '手术类型',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "9",
title: '订单类型',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "10",
title: '选择产品',
name: '请选择',
value: '',
isPicker: true,
select: false,
showItemPage: true // 展示子页
},
{
"id": "11",
title: '备注',
value: '',
isPicker: false,
select: false,
isRemark: true // 备注
},
{
"id": "12",
title: '还有什么要安排的,可录音备注哟!',
value: '',
isPicker: false,
select: false,
isRecode: true // 录音
}
],
submitOption: { // 提交的信息
seller_code: '', // 用户名username
org_code: '', // 组织
customer_code: '', // 手术医院
bill_to_site_code: '', // 收单地点
ship_to_site_code: '', // 收货地点
doctor_name: '', // 主治医生
surgery_name: '', // 手术名称
surgery_date: '', // 手术时间
surgery_type_code: '', // 手术类型
order_type_code: '', // 订单类型
surgery_desc: '', // 备注信息
file_path: '', // 录音地址
},
currentItem: {
name: '请选择',
value: '-1'
},
currentTitle: '组织', // 当前点击项
showTypePop: false, // 选择器弹窗
isSubLoding: false, // 加载中弹窗
lodingTitle: '加载中',
listCurrentOption: [ // 当前选择器数据
{
name: '男',
value: 'boy'
},
{
name: '女',
value: 'girl'
},
{
name: '其他',
value: 'other'
},
{
name: '其他1',
value: 'other1'
},
{
name: '其他2',
value: 'other2'
},
{
name: '其他3',
value: 'other3'
},
{
name: '其他4',
value: 'other4'
},
{
name: '其他5',
value: 'other5'
},
{
name: '其他6',
value: 'other6'
}
],
dateModelPop: false, // 日期选择器
hasPermission: undefined, //录音 授权状态
audioPath: AudioUtils.DocumentDirectoryPath + '/selfAudio.aac', // 文件路径
recording: false, //是否录音
pause: false, //录音是否暂停
stop: false, //录音是否停止
currentTime: 0, //录音时长
}
}
componentDidMount() {
// 请求授权
AudioRecorder.requestAuthorization()
.then(isAuthor => {
console.warn('是否授权: ' + isAuthor)
if(!isAuthor) {
return alert('请前往设置开启录音权限')
}
this.setState({hasPermission: isAuthor})
this.prepareRecordingPath(this.state.audioPath);
// 录音进展
AudioRecorder.onProgress = (data) => {
this.setState({currentTime: Math.floor(data.currentTime)});
};
// 完成录音
AudioRecorder.onFinished = (data) => {
// data 返回需要上传到后台的录音数据
console.warn(this.state.currentTime)
console.warn(data)
};
})
}
/**
* AudioRecorder.prepareRecordingAtPath(path,option)
* 录制路径
* path 路径
* option 参数
*/
prepareRecordingPath = (path) => {
const option = {
SampleRate: 44100.0, //采样率
Channels: 2, //通道
AudioQuality: 'High', //音质
AudioEncoding: 'aac', //音频编码
OutputFormat: 'mpeg_4', //输出格式
MeteringEnabled: false, //是否计量
MeasurementMode: false, //测量模式
AudioEncodingBitRate: 32000, //音频编码比特率
IncludeBase64: true, //是否是base64格式
AudioSource: 0, //音频源
}
AudioRecorder.prepareRecordingAtPath(path,option)
}
// 开始录音
_record = async () => {
console.warn('changan')
show('录音开始')
if(!this.state.hasPermission) {
return alert('没有授权')
}
if(this.state.recording) {
return alert('正在录音中...')
}
if(this.state.stop) {
// 初始化录音
this.prepareRecordingPath(this.state.audioPath)
}
this.setState({recording: true,pause: false})
try {
await AudioRecorder.startRecording()
} catch (err) {
console.log(err)
}
}
// 暂停录音
_pause = async () => {
if(!this.state.recording) {
return alert('当前未录音')
}
try {
await AudioRecorder.pauseRecording()
this.setState({pause: true, recording: false})
} catch (err) {
console.log(err)
}
}
// 恢复录音
_resume = async () => {
if(!this.state.pause) {
return alert('录音未暂停')
}
try {
await AudioRecorder.resumeRecording();
this.setState({pause: false, recording: true})
} catch (err) {
console.log(err)
}
}
// 停止录音
_stop = async () => {
console.warn('tanqi')
show('录音结束')
console.warn('停止录音',this.state.currentTime)
try {
await AudioRecorder.stopRecording();
this.setState({stop: true, recording: false, paused: false});
} catch (error) {
console.error(error);
}
}
// 播放录音
_play = async () => {
let self = this
self.whoosh = new Sound(this.state.audioPath, '', (err) => {
if(err) {
show('加载音频失败')
return console.warn(err)
}
self.whoosh.play(success => {
if(success) {
console.warn('success - 播放成功')
}else {
console.warn('fail - 播放失败')
show('播放失败')
}
})
})
}
// 停止播放录音 -- 安卓不能停止、ios可以
_stopPlay = async () => {
console.warn('tingzhi bofang')
let self = this
self.whoosh.stop(() => {
console.warn('success - 停止成功')
})
}
// 删除录音
_del = async () => {
// 初始化录音
this.prepareRecordingPath(this.state.audioPath)
this.setState({
currentTime: 0,
stop: false
})
}
// static getDerivedStateFromProps(newProps, prevState) {
// console.log('--prevState-----', newProps.selfOrderOption)
// console.log('--prevState-----', newProps.self_list_status)
// console.log('-prevState------', prevState.self_list_status)
// }
// componentDidUpdate(prevProps, prevState) {
// console.log('--componentDidUpdate-----', prevProps.selfOrderOption)
// console.log('--componentDidUpdate-----', prevProps.self_list_status)
// console.log('this.props-------', this.props.self_list_status)
// console.log('-componentDidUpdate------', prevState.self_list_status)
// }
componentWillReceiveProps(nextProps) {
let { self_list_status} = this.props
let self = this
if(self_list_status != nextProps.self_list_status) {
// console.warn('-222------', nextProps.self_list_status)
// console.warn('--222---self_list_status--', self_list_status)
switch (nextProps.self_list_status) {
case SELF_ORDER_LIST_DOING:
this.changeSubLoding(true)
break;
case SELF_ORDER_LIST_SUCCESS:
self.changeSubLoding()
setTimeout(() => {
self.changeCurrentOption()
}, 500)
break;
case SELF_ORDER_LIST_FAILURE:
this.changeSubLoding()
break;
}
}
}
// 修改正在加载
changeSubLoding(loading) {
this.setState({
isSubLoding: loading || false
})
}
// 选择器弹窗回调函数
handleCallBack(item, itemTitle) {
// console.warn(item, 'item------')
// console.warn('item-itemTitle-----',itemTitle)
let { listOptionData } = this.state
this.setState({
currentItem: item,
})
// if(itemTitle === '组织' || itemTitle === '手术医院') {
this.setState({
listOptionData: listOptionData.map((chItem, index) => {
if(chItem.title === itemTitle) {
console.warn('---hhh-----', item)
chItem.name = item.name
chItem.value = item.value
if (itemTitle === '主治医生' && item.name === '其他') {
chItem.showInput = true
}
}
return chItem
})
})
// }
// console.warn('listOptionData[2]-----',this.state.listOptionData[2])
}
// 关闭弹窗
handleCloseModal(show) {
this.setState({
showTypePop: show
})
}
// 修改当前选择器数据
changeCurrentOption() {
let { listOptionData, currentTitle } = this.state
let { selfOrderOption } = this.props
console.warn('当前:--selfOrderOption---', selfOrderOption)
let tempOption = []
if (currentTitle === '组织') {
tempOption = this.changeNameAndValue(selfOrderOption, 'org_name', 'org_code')
} else if (currentTitle === '手术医院') {
tempOption =[
{
customer_name: '医院-4',
customer_code: 'customer_4'
},
{
customer_name: '医院-5',
customer_code: 'customer_5'
},
{
customer_name: '医院-6',
customer_code: 'customer_6'
}
]
tempOption = this.changeNameAndValue(tempOption, 'customer_name', 'customer_code')
} else if (currentTitle === '收单地点') {
tempOption =[
{
bill_to_site_name: '收单地点-4',
bill_to_site_code: 'bill_4'
},
{
bill_to_site_name: '收单地点-5',
bill_to_site_code: 'bill_5'
},
{
bill_to_site_name: '收单地点-6',
bill_to_site_code: 'bill_6'
}
]
tempOption = this.changeNameAndValue(tempOption, 'bill_to_site_name', 'bill_to_site_code')
} else if (currentTitle === '收货地点') {
tempOption =[
{
ship_to_site_name: '收货地点-4',
ship_to_site_code: 'ship_4'
},
{
ship_to_site_name: '收货地点-5',
ship_to_site_code: 'ship_5'
},
{
ship_to_site_name: '收货地点-6',
ship_to_site_code: 'ship_6'
}
]
tempOption = this.changeNameAndValue(tempOption, 'ship_to_site_name', 'ship_to_site_code')
} else if (currentTitle === '主治医生') {
tempOption =[
{
doctor_name: '主治医生-4',
doctor_code: 'doctor_4'
},
{
doctor_name: '主治医生-5',
doctor_code: 'doctor_5'
},
{
doctor_name: '主治医生-6',
doctor_code: 'doctor_6'
}
]
tempOption.push({
doctor_name: '其他',
doctor_code: '-1'
})
tempOption = this.changeNameAndValue(tempOption, 'doctor_name', 'doctor_code')
} else if (currentTitle === '手术类型') {
tempOption =[
{
surgery_type_name: '手术类型-4',
surgery_type_code: 'surgery_4'
},
{
surgery_type_name: '手术类型-5',
surgery_type_code: 'surgery_5'
},
{
surgery_type_name: '手术类型-6',
surgery_type_code: 'surgery_6'
}
]
tempOption = this.changeNameAndValue(tempOption, 'surgery_type_name', 'surgery_type_code')
} else if (currentTitle === '订单类型') {
tempOption =[
{
order_type_name: '订单类型-4',
order_type_code: 'order_4'
},
{
order_type_name: '订单类型-5',
order_type_code: 'order_5'
},
{
order_type_name: '订单类型-6',
order_type_code: 'order_6'
}
]
tempOption = this.changeNameAndValue(tempOption, 'order_type_name', 'order_type_code')
}
this.setState({
showTypePop: true,
listCurrentOption: [...tempOption]
})
}
// 修改选择器为属性 name 和 value
changeNameAndValue(data, nameType, valueType) {
let result = []
data.forEach(item => {
let obj = {}
obj.name = item[nameType],
obj.value = item[valueType]
result.push(obj)
})
return result
}
// 组织 点击
handleOrganizationCheck() {
let { listOptionData } = this.state
let { token, requestOrganizations } = this.props
console.warn('组织------check', token, requestOrganizations)
let self = this
this.setState({
currentTitle: '组织',
currentItem: {
name: listOptionData[1].name,
value: listOptionData[1].value
}
}, () => {
requestOrganizations(token)
})
// this.setState({
// isSubLoding: true
// }, () => {
// setTimeout(() => {
// self.setState({
// currentTitle: '组织',
// showTypePop: true,
// currentItem: {
// name: listOptionData[1].name,
// value: listOptionData[1].value
// },
// listCurrentOption: [
// {
// name: '男',
// value: 'boy'
// },
// {
// name: '女',
// value: 'girl'
// },
// {
// name: '其他',
// value: 'other'
// }
// ],
// isSubLoding: false
// })
// }, 2000)
// })
}
// 手术医院 点击
handleCustomerCheck() {
let { listOptionData } = this.state
let { token, requestOrganizations } = this.props
console.warn('手术医院------check', token, requestOrganizations)
let self = this
this.setState({
currentTitle: '手术医院',
currentItem: {
name: listOptionData[2].name,
value: listOptionData[2].value
}
}, () => {
// 在此修改接口
requestOrganizations(token)
})
}
// 收单地点 点击
handleBillCheck() {
let { listOptionData } = this.state
let { token, requestOrganizations } = this.props
console.warn('收单地点------check', token, requestOrganizations)
let self = this
this.setState({
currentTitle: '收单地点',
currentItem: {
name: listOptionData[3].name,
value: listOptionData[3].value
}
}, () => {
// 在此修改接口
requestOrganizations(token)
})
}
// 收货地点 点击
handleShipCheck() {
let { listOptionData } = this.state
let { token, requestOrganizations } = this.props
console.warn('收货地点------check', token, requestOrganizations)
let self = this
this.setState({
currentTitle: '收货地点',
currentItem: {
name: listOptionData[4].name,
value: listOptionData[4].value
}
}, () => {
// 在此修改接口
requestOrganizations(token)
})
}
// 主治医生 点击/输入
handleDoctorCheck(text) {
let { listOptionData } = this.state
let { token, requestOrganizations } = this.props
console.warn('主治医生------check', token, requestOrganizations)
let self = this
if(text) {
// 输入
this.setState({
listOptionData: listOptionData.map(item => {
if(item.title === '主治医生') {
item.inputValue = text
}
return item
})
})
} else {
// 点击
this.setState({
currentTitle: '主治医生',
currentItem: {
name: listOptionData[5].name,
value: listOptionData[5].value
}
}, () => {
// 在此修改接口
requestOrganizations(token)
})
}
console.warn('主治医生------check',listOptionData[5])
}
// 手术名称 输入
handleSurNameInput(text) {
console.warn('手术名称---',text)
let { listOptionData } = this.state
this.setState({
listOptionData: listOptionData.map(item => {
if(item.title === '手术名称') {
item.value = text
}
return item
})
})
// console.warn('手术名称---',listOptionData[6])
}
// 手术类时间 点击 2020-04-23 17:41
handleSurDateCheck() {
console.warn('手术类时间 点击 ===')
let { listOptionData } = this.state
let date = listOptionData[7].value
if(date) {
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(item.title === '手术类时间') {
item.dateValue = formatStrForDate(date)
}
return item
})
})
// console.warn('!date----', listOptionData[7])
}
this.closeDateModal(true)
}
// 关闭日期选择器
closeDateModal(show) {
this.setState({
dateModelPop: show
})
}
// 修改当前日期数据
dateModalCallback(date) {
console.warn('callback',date)
let { listOptionData } = this.state
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(item.title === '手术类时间') {
item.name = date
item.value = date
item.dateValue = formatStrForDate(date)
}
return item
})
})
// console.warn('-----', listOptionData[7])
}
// 手术类型 点击
handleSurTypeCheck() {
let { listOptionData } = this.state
let { token, requestOrganizations } = this.props
console.warn('手术类型------check', token, requestOrganizations)
let self = this
this.setState({
currentTitle: '手术类型',
currentItem: {
name: listOptionData[8].name,
value: listOptionData[8].value
}
}, () => {
// 在此修改接口
requestOrganizations(token)
})
}
// 订单类型 点击
handleOrderCheck() {
let { listOptionData } = this.state
let { token, requestOrganizations } = this.props
console.warn('订单类型------check', token, requestOrganizations)
let self = this
this.setState({
currentTitle: '订单类型',
currentItem: {
name: listOptionData[9].name,
value: listOptionData[9].value
}
}, () => {
// 在此修改接口
requestOrganizations(token)
})
}
// 选择产品 点击跳转
handleProductCheck() {
this.props.navigation.navigate('ChooseProductPage', {title: `自助下单 - 选择产品`})
}
// 备注 输入
handleRemarkInput(text) {
console.warn('备注---',text)
let { listOptionData } = this.state
this.setState({
listOptionData: listOptionData.map(item => {
if(item.title === '备注') {
item.value = text
}
return item
})
})
console.warn('备注---',listOptionData[11])
}
// 录音 长按
handleRecordLongCheck() {
console.warn('changan')
show('录音开始')
// this._record()
}
// 录音结束
handleRecordPressOut() {
console.warn('tanqi')
show('录音结束')
// this._stop
}
// 生成订单 点击
handleSubmit() {
console.warn('生成订单', this.props.navigation)
let { navigation } = this.props
let { state: { params: { title } } } = navigation
navigation.navigate('SubSuccessPage', { title: `${title} - 下单成功` })
}
// 返回备注以上的元素
renderListItem() {
// console.warn('!!===',tagData)
// console.warn('!!===',this.props.userInfo.person_name)
let { listOptionData, dateModelPop } = this.state
let {userInfo:{ person_name }, navigation} = this.props
if(!isEmpty(person_name)) {
tagData[0].value = person_name
// this.setState({
// listOptionData: listOptionData.map(item => {
// if(item.title === '销售员') {
// item.name = person_name
// item.value = person_name
// }
// return item
// })
// })
}
return(
<View style={styles.list_cont}>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={1}
// onPress={() => this.handleOpenDialog()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'销售员'}</TitleTextStyle>
<ContInputTextStyle editable={false} defaultValue={listOptionData[0].value}></ContInputTextStyle>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleOrganizationCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'组织'}</TitleTextStyle>
<ContTextStyle>{listOptionData[1].name} -- {listOptionData[1].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleCustomerCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'手术医院'}</TitleTextStyle>
<ContTextStyle>{listOptionData[2].name} -- {listOptionData[2].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleBillCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'收单地点'}</TitleTextStyle>
<ContTextStyle>{listOptionData[3].name} -- {listOptionData[3].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleShipCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'收货地点'}</TitleTextStyle>
<ContTextStyle>{listOptionData[4].name} -- {listOptionData[4].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleDoctorCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'主治医生'}</TitleTextStyle>
<ContTextStyle>{listOptionData[5].name} -- {listOptionData[5].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
{
listOptionData[5].showInput ?
<CellTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入主治医生`}
onChangeText={(text) => this.handleDoctorCheck(text)}
></ContInputTextStyle>
</CellTextStyle> : null
}
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={1}
// onPress={() => this.handleSurNameInput()}
>
<CellTextStyle>
<TitleTextStyle>{'手术名称'}</TitleTextStyle>
<ContInputTextStyle
placeholder={'请输入'}
defaultValue={listOptionData[6].value}
onChangeText={(text) => this.handleSurNameInput(text)}
></ContInputTextStyle>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleSurDateCheck()}
>
<CellTextStyle>
<TitleTextStyle>{'手术类时间'}</TitleTextStyle>
<ContTextStyle>{listOptionData[7].name} -- {listOptionData[7].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
<DateModel
date={listOptionData[7].dateValue}
closeModal={(show) => this.closeDateModal(show)}
show={dateModelPop}
callback={(date) => this.dateModalCallback(date)}
/>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleSurTypeCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'手术类型'}</TitleTextStyle>
<ContTextStyle>{listOptionData[8].name} -- {listOptionData[8].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleOrderCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'订单类型'}</TitleTextStyle>
<ContTextStyle>{listOptionData[9].name} -- {listOptionData[9].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleProductCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'选择产品'}</TitleTextStyle>
<ContTextStyle>{listOptionData[10].name} -- {listOptionData[10].value}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
{ this.renderPickerModel() }
{/* {
tagData.map((item, index) => {
return <ItemCellModel item={item} navigation={navigation}></ItemCellModel>
})
} */}
</View>
)
}
// 返回右侧箭头
renderRightArrowItem() {
return (
<ImageTextStyle>
<Image source={require('../../images/arr_rig.png')} style={icon_style}/>
</ImageTextStyle>
)
}
// 返回选择器弹窗
renderPickerModel() {
let { listCurrentOption,
currentItem,
currentTitle,
showTypePop,
} = this.state
// console.warn('弹窗-----,', listCurrentOption)
return (
<SafeAreaView style={styles.item_container}>
<DialogModel
// entityList={typeArr}
// callback={(i) => {
// this.setState({
// type: i,
// typeName: typeArr[i],
// })
// }}
// itemIndex={this.state.type}
entityList={listCurrentOption}
callback={(item, itemTitle) => this.handleCallBack(item, itemTitle)}
show={showTypePop}
itemValue={currentItem.value}
itemTitle={currentTitle}
closeModal={(show) => this.handleCloseModal(show)}
/>
</SafeAreaView>
)
}
// 返回备注元素
renderRemarksItem() {
return (
<CellTextStyle style={styles.remark_item}>
<View style={styles.rema_box}>
<Text style={styles.rema_tit}>备注</Text>
<View style = {styles.rema_Input_outer} >
<TouchableOpacity activeOpacity = {1} style = {styles.rema_Input_inner} onPress = {() => this.TextInput.focus()} >
<TextInput
placeholder = {'请输入备注信息'}
placeholderTextColor = {placehold_text_color}
underlineColorAndroid = {'transparent'}
multiline = {true}
ref = {textInput => this.TextInput = textInput}
numberOfLines = {8}
style={styles.rema_Input}
maxLength={140}
onChangeText={(text) => this.handleRemarkInput(text)}
/>
</TouchableOpacity>
</View>
</View>
</CellTextStyle>
)
}
// 返回录音元素
renderRecordingItem() {
let { recording, pause, stop, currentTime } = this.state
return (
<CellTextStyle style={styles.reco_item}>
<View style={styles.reco_btn_cont}>
<Text style={styles.reco_btn_tit}>还有什么要安排的,可录音备注哟!</Text>
{
!stop ?
<View style={styles.reco_btn_inner}>
<TouchableOpacity
activeOpacity = {.8}
style={styles.reco_btn_box}
onLongPress={this._record}
onPressOut={this._stop}
>
<View style={styles.reco_img_box}>
<Image source={require('../../images/record_icon.png')} style={icon_style}/>
</View>
<Text style={styles.reco_btn_text}>长按录音</Text>
</TouchableOpacity>
{/* <Text style={styles.reco_text} onPress={this._record}> Record(开始录音) </Text>
<Text style={styles.reco_text} onPress={this._pause}> Pause(暂停录音) </Text>
<Text style={styles.reco_text} onPress={this._resume}> Resume(恢复录音) </Text>
<Text style={styles.reco_text} onPress={this._stop}> Stop(停止录音) </Text>
<Text style={styles.reco_text} onPress={this._play}> Play(播放录音) </Text>
<Text style={styles.reco_text} onPress={this._del}> Del(删除录音) </Text>
<Text style={styles.reco_text}>
{
recording ? '正在录音' :
pause ? '已暂停' : '未开始'
}
</Text>
<Text style={styles.reco_text}>时长: {currentTime}</Text> */}
</View>
: <View style={styles.reco_play_box}>
<View style={styles.play_tit}>
<Text style={styles.play_text}>时长: {currentTime} </Text>
<Text style={styles.play_text}>正在播放</Text>
</View>
<View style={styles.play_btn}>
<TouchableOpacity
activeOpacity = {.8}
style={styles.reco_list_box}
onPress={this._play}
>
<Text style={styles.reco_text}> 播放 </Text>
</TouchableOpacity>
{/* <TouchableOpacity
activeOpacity = {.8}
style={styles.reco_list_box}
onPress={this._stopPlay}
>
<Text style={styles.reco_text}> 停止 </Text>
</TouchableOpacity> */}
<TouchableOpacity
activeOpacity = {.8}
style={styles.reco_list_box}
onPress={this._del}
>
<Text style={styles.reco_text}> 删除 </Text>
</TouchableOpacity>
</View>
</View>
}
</View>
</CellTextStyle>
)
}
// 返回正在加载中
renderLodingItem() {
let { lodingTitle, isSubLoding } = this.state
return(
<LodingModel title={lodingTitle} show={isSubLoding} style_back={styles.loding_back} />
)
}
render() {
let {canSubFlag} = this.state
// console.warn(this.props)
let {navigation} = this.props
let {title} = navigation.state.params
return (
<View style={styles.self_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<ScrollView
style={styles.self_main}
showsVerticalScrollIndicator={false}
>
{this.renderListItem()}
{this.renderRemarksItem()}
{this.renderRecordingItem()}
</ScrollView>
<FooterBtnStyle
style={canSubFlag ? styles.sub_btn_pro : ''}
activeOpacity={canSubFlag ? .8 : 1}
title={'生成订单'}
textStyle= {styles.sub_btn}
onPress={() => this.handleSubmit()}
/>
{ this.renderLodingItem() }
</SafeAreaView>
</View>
);
}
}
const styles = StyleSheet.create({
self_container : {
flex: 1,
backgroundColor: home_background_color
},
self_main : {
padding: 14
},
remark_item: {
minHeight: 80,
height: 'auto'
},
rema_box: {
paddingVertical: 16
},
rema_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
// fontWeight: 'bold'
},
rema_Input_outer: {
height: 120,
alignItems: 'center',
// paddingHorizontal: 15,
paddingBottom: 0
},
rema_Input_inner: {
paddingTop: 10,
height: 105,
width: Width() - 38,
// borderWidth: 1,
// borderColor: '#eeeeee'
},
rema_Input: {
paddingVertical: 0,
maxHeight: 105,
fontSize: second_text_size,
textAlign:'left',
textAlignVertical:'top',
alignSelf:'flex-start',
justifyContent:'flex-start',
alignItems:'flex-start',
fontFamily: font_family_regular
},
reco_item: {
height: 160,
// height: 340,
marginBottom: 42
},
reco_btn_cont: {
paddingVertical: 20
},
reco_btn_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
reco_btn_inner: {
flex: 1,
width: Width() - 38,
// justifyContent: 'flex-end',
alignItems: 'center',
paddingTop: 30
},
reco_btn_box: {
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 50,
width: pxSize(152)
},
reco_img_box: {
width: pxSize(20),
height: pxSize(22)
},
// reco_img: {
// width: '100%',
// height: '100%'
// },
reco_text: {
fontSize: 14,
marginVertical: 10
},
reco_btn_text: {
fontSize: second_text_size,
color: first_text_color,
marginLeft: 6,
fontFamily: font_family_regular
},
reco_play_box: {
flex: 1,
width: Width() - 68,
// justifyContent: 'flex-end',
// alignItems: 'center'
},
play_tit:{
flexDirection: 'row',
justifyContent: 'space-around',
alignItems: 'center',
height: 60
},
play_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
play_btn:{
flexDirection: 'row',
justifyContent: 'space-around',
alignItems: 'center',
// height: 80
},
reco_list_box:{
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 34,
width: pxSize(100)
},
reco_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
sub_btn_box: {
backgroundColor: dis_sub_color,
height: 52,
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
},
sub_btn_pro: {
backgroundColor: promary_color
},
sub_btn: {
// color: title_text_color,
// fontSize: second_text_size
},
list_cont: {
flex: 1
},
item_container: {
flex: 1
},
cell_input: {
textAlign: 'left'
},
loding_back: {
backgroundColor: 'rgba(0, 0, 0, 0)'
}
})
const mapStateToProps = (state) => {
return {
userInfo: state.login.userInfo,
token: state.login.token,
self_list_status: state.selfOrder.self_list_status,
selfOrderOption: state.selfOrder.selfOrderOption
}
}
const mapDispatchToProps = (dispatch) => {
return {
requestOrganizations: (token) => {
dispatch(requestOrganizations(token))
}
}
}
export default connect(mapStateToProps, mapDispatchToProps)(SelfOrderPage);
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
TextInput,
ScrollView,
SafeAreaView
} from 'react-native';
import {connect} from 'react-redux';
import {
foundation_color,
second_text_size,
home_background_color,
dis_sub_color,
Width,
third_text_size,
first_text_color,
pxSize,
promary_color,
second_text_color,
third_text_color,
first_text_size,
safe_view,
font_family_semibold,
font_family_regular,
icon_style
} from '../../../base/BaseStyle';
import HeadBackItem from '../../common/HeadBackItem';
import { FooterBtnStyle } from '../../common/CellTextStyle';
import ProductRightStyle from './ProductRightStyle';
import ProductModel from '../../common/ProductModel';
import StatusBarView from '../../common/StatusBarView';
// import ScrollableTabView, { ScrollableTabBar } from 'react-native-scrollable-tab-view';
// import TopTabBar from './customTabbar/TopTabBar';
// import LeftTabBar from './customTabbar/LeftTabBar';
// import { leftOptionList } from './mock'
class ChooseProductPage extends Component {
constructor(props) {
super(props);
this.state = {
searchValue: '',
topActiveIndex: 0,
topProcOptionList: [
{
title: '嘉思特',
iconImg: require('../../../images/cp_test_1.png')
},
{
title: '嘉思特22',
iconImg: require('../../../images/cp_test_1.png')
},
{
title: '嘉思特33',
iconImg: require('../../../images/cp_test_1.png')
},
{
title: '嘉思特44',
iconImg: require('../../../images/cp_test_1.png')
},
{
title: '嘉思特55',
iconImg: require('../../../images/cp_test_1.png')
},
{
title: '嘉思特66',
iconImg: require('../../../images/cp_test_1.png')
},
{
title: '嘉思特77',
iconImg: require('../../../images/cp_test_1.png')
},
{
title: '嘉思特88',
iconImg: require('../../../images/cp_test_1.png')
}
],
leftActiveIndex: 0,
stencilData: [],
leftOptionList: [
{
title: '手术模版',
iconImg: require('../../../images/surg_temp.png'),
stencilData: [{
"id": "0",
title: '髋关节手术001--------',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "1",
title: '髋关节手术002',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "2",
title: '髋关节手术003',
tip1: '描述信息',
tip2: '描述信息',
select: true
},
{
"id": "3",
title: '髋关节手术004',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "4",
title: '髋关节手术005',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "5",
title: '髋关节手术006',
tip1: '描述信息',
tip2: '描述信息',
select: false
}
], // 模版数据
},
{
title: '螺钉盒',
iconImg: require('../../../images/screw_box.png'),
stencilData: [{
"id": "0",
title: '髋关节手术001--ldh',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "1",
title: '髋关节手术002',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "2",
title: '髋关节手术003',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "3",
title: '髋关节手术004',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "4",
title: '髋关节手术005',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "5",
title: '髋关节手术006',
tip1: '描述信息',
tip2: '描述信息',
select: false
}
], // 模版数据
},
{
title: '器械包',
iconImg: require('../../../images/equip_bag.png'),
stencilData: [{
"id": "0",
title: '髋关节手术001----qxb',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "1",
title: '髋关节手术002',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "2",
title: '髋关节手术003',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "3",
title: '髋关节手术004',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "4",
title: '髋关节手术005',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "5",
title: '髋关节手术006',
tip1: '描述信息',
tip2: '描述信息',
select: false
}
], // 模版数据
},
{
title: '辅助工具',
iconImg: require('../../../images/auxili_tool.png'),
stencilData: [{
"id": "0",
title: '髋关节手术001------fzgj',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "1",
title: '髋关节手术002',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "2",
title: '髋关节手术003',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "3",
title: '髋关节手术004',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "4",
title: '髋关节手术005',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "5",
title: '髋关节手术006',
tip1: '描述信息',
tip2: '描述信息',
select: false
}
], // 模版数据
},
{
title: '人工髋关节假体'
},
{
title: '膝关节假体备份'
},
{
title: '骨小梁髋关节假体'
},
{
title: '骨小梁髋关节假体22'
},
{
title: '骨小梁髋关节假体33'
},
{
title: '骨小梁髋关节假体44'
},
{
title: '骨小梁髋关节假体55'
},
], // 左侧数据 - 二级菜单
defaultThridShow: false, // 默认人体髋关节-小类不显示
selectShowPopup: false, // 共计已选弹窗
}
}
componentDidMount() {
// this.setState({
// leftOptionList: leftOptionList
// })
}
// 顶部产品点击
handleTopNav(item, index) {
console.warn('top产品--',item, index)
// let {topActiveIndex} = this.state
this.setState({
topActiveIndex: index
})
}
// 左侧标题点击
handleLeftNav(item, index) {
console.warn('手术模版--', index, item)
let {leftOptionList} = this.state
this.setState({
leftActiveIndex: index,
stencilData: leftOptionList[index].stencilData
})
}
// 修改
handleChangeThrShow (show) {
this.setState({
defaultThridShow: show
})
}
// 共计已选弹窗
handleCloseSelectModal(show) {
this.setState({
selectShowPopup: show
})
}
// 点击共计已选
handleSubSelected(show) {
console.warn('共计已选:666')
this.handleCloseSelectModal(!show)
}
// 点击选好了
handleSubmit(show) {
console.warn('选好了', this.props.navigation.navigate)
this.handleCloseSelectModal(false)
console.warn('携带数据,返回到自助下单')
}
// 返回搜索元素
renderSearchItem() {
return (
<View style={styles.ser_cont}>
<TextInput
placeholder={'请输入搜索关键词'}
style={styles.ser_text_input}
defaultValue={this.state.searchValue}
/>
<View style={styles.ser_img_box}>
<Image source={require('../../../images/search_icon.png')} style={styles.ser_img}/>
</View>
</View>
)
}
// 返回顶部产品元素
renderTopProItem() {
let {leftOptionList, topProcOptionList, topActiveIndex} = this.state
return (
<View style={styles.top_box}>
<ScrollView
style={styles.top_scroll_cont}
horizontal={true}
showsHorizontalScrollIndicator={false}
>
{
topProcOptionList.map((item, index) =>
<TouchableOpacity
activeOpacity={.8}
style={styles.top_touch_cont}
onPress={() => this.handleTopNav(item, index)}
>
<View style={[styles.top_inner, index == topActiveIndex ? styles.top_inner_act : '']}>
<View style={styles.top_img_box}>
<Image source={item.iconImg} style={icon_style}/>
</View>
<Text style={[styles.top_tit, index == topActiveIndex ? styles.top_tit_act : '']}>{item.title}</Text>
</View>
</TouchableOpacity>
)
}
</ScrollView>
</View>
)
}
// 返回底部左侧元素
renderContLeftItem() {
let {leftActiveIndex, leftOptionList} = this.state
// let {leftActiveIndex} = this.state
return (
<View style={styles.cont_left_box}>
<ScrollView
style={styles.cont_left_scroll_cont}
showsVerticalScrollIndicator={false}
>
{
leftOptionList.map((item, index) =>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleLeftNav(item, index)}
>
<View style={[styles.cont_left_inner, index == leftActiveIndex ? styles.cont_left_inner_act : '']}>
{
item.iconImg ?
<View style={styles.cont_left_img_box}>
<Image source={item.iconImg} style={icon_style}/>
</View> : null
}
<Text style={[
styles.cont_left_tit,
index == leftActiveIndex ? styles.cont_left_tit_act : '',
item.iconImg ? '' : styles.cont_left_noicon]}
>
{item.title}
</Text>
</View>
</TouchableOpacity>
)
}
</ScrollView>
</View>
)
}
// 返回底部主要元素
renderContItem() {
let { leftActiveIndex, defaultThridShow, stencilData } = this.state
return (
<View style={styles.cont_bom_box}>
{ this.renderContLeftItem() }
{/* { this.renderContRightItem() } */}
<ProductRightStyle
navigation={this.props.navigation}
// isStencilItem={true}
superIndex={leftActiveIndex}
defaultThridShow={defaultThridShow}
changeThrShow={(defaultThridShow) => this.handleChangeThrShow(defaultThridShow)}
superStencilData={stencilData}
/>
</View>
)
}
// 返回底部按钮
renderFooterBtnItem() {
let { selectShowPopup } = this.state
return (
<View style={styles.sub_box}>
<FooterBtnStyle
style={styles.sub_btn_left}
activeOpacity={.8}
title={'共计已选:666'}
textStyle= {[styles.sub_btn_tit, styles.sub_btn_left_text]}
onPress={() => this.handleSubSelected(selectShowPopup)}
/>
<FooterBtnStyle
style={styles.sub_btn_rig}
activeOpacity={.8}
title={'选好了'}
textStyle= {[styles.sub_btn_tit, styles.sub_btn_rig_text]}
onPress={() => this.handleSubmit(selectShowPopup)}
/>
<ProductModel
show={ selectShowPopup }
closeModal={(show) => this.handleCloseSelectModal(show)}
closeSelected={(show) => this.handleSubSelected(show)}
closeSubmit={(show) => this.handleSubmit(show)}
/>
</View>
)
}
render() {
let {navigation} = this.props
let {title} = navigation.state.params
// console.warn('zzxd----', navigation)
return (
<View style={styles.choo_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<View style={styles.choo_main}>
{this.renderSearchItem()}
{this.renderTopProItem()}
{this.renderContItem()}
</View>
{this.renderFooterBtnItem()}
</SafeAreaView>
</View>
);
}
}
const styles = StyleSheet.create({
choo_container: {
flex: 1,
backgroundColor: home_background_color
},
choo_main: {
// position: 'relative',
// height: Height(),
// width: Width()
flex: 1
},
ser_cont: {
width: Width(),
backgroundColor: foundation_color,
position: 'relative',
height: 60,
justifyContent: 'center',
paddingHorizontal: 16
},
ser_img_box: {
position: 'absolute',
left: 22,
top: 18,
width: pxSize(24),
height: pxSize(24)
},
ser_img: {
width: '100%',
height: '100%'
},
ser_text_input: {
backgroundColor: '#F5F5F5',
height: 38,
paddingLeft: 30,
borderRadius: 10,
fontSize: second_text_size,
fontFamily: font_family_regular
},
top_box: {
width: Width(),
height: 89,
backgroundColor: foundation_color,
paddingHorizontal: 20,
paddingTop: 12,
borderBottomColor: '#F4F4F4',
borderBottomWidth: 1
},
top_scroll_cont: {},
top_touch_cont: {},
top_inner: {
justifyContent: 'center',
alignItems: 'center',
marginRight: 14,
borderBottomWidth: 4,
borderBottomColor: foundation_color,
minWidth: 60
},
top_inner_act: {
borderBottomWidth: 2,
borderBottomColor: promary_color
},
top_img_box: {
width: pxSize(36),
height: pxSize(36)
},
// top_img: {
// width: '100%',
// height: '100%'
// },
top_tit: {
paddingTop: 10,
paddingBottom: 14,
color: second_text_color,
fontSize: third_text_size,
fontFamily: font_family_regular
},
top_tit_act: {
color: first_text_color,
// fontWeight: 'bold',
fontSize: 14,
fontFamily: font_family_semibold
},
cont_bom_box: {
position: 'relative',
flex: 1
// height: Height() - 266
// height: Height() - 266
// height: pxHeight(510)
},
cont_left_box: {
backgroundColor: '#F5F5F5',
width: 80,
height: '100%',
justifyContent: 'center',
alignItems: 'center'
},
cont_left_scroll_cont: {
width: '100%'
},
cont_left_inner: {
flexDirection: 'row',
height: 52,
justifyContent: 'flex-start',
alignItems: 'center'
},
cont_left_inner_act: {
backgroundColor: foundation_color
},
cont_left_img_box: {
width: pxSize(14),
height: pxSize(14),
marginRight: 4,
marginLeft: 6
},
cont_left_img: {
width: '100%',
height: '100%'
},
cont_left_tit: {
color: second_text_color,
fontSize: third_text_size,
fontFamily: font_family_regular
},
cont_left_noicon: {
textAlign: 'center',
paddingHorizontal: 10
},
cont_left_tit_act: {
color: first_text_color,
fontWeight: 'bold'
},
cont_right_box: {
position: 'absolute',
left: 80,
width: Width() - 80,
backgroundColor: foundation_color,
height: '100%',
paddingHorizontal: 20
},
cont_right_scroll_cont: {},
cont_right_list: {},
ri_container: {
borderBottomColor: '#F9F9F9',
borderBottomWidth: 2,
// backgroundColor: '#ccc'
},
ri_tou_box: {
paddingVertical: 14
},
ri_inner: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center'
},
ri_text_box: {},
ri_te_tit: {
fontSize: first_text_size,
color: first_text_color,
fontWeight: 'bold',
fontFamily: 'PingFangSC-Medium'
},
ri_te_ot: {
fontSize: second_text_size,
color: third_text_color
},
ri_img_box: {},
ri_img_check: {},
sub_box: {
width: Width(),
backgroundColor: dis_sub_color,
flexDirection: 'row'
},
sub_btn_left: {
width: '50%',
backgroundColor: '#EEECEC'
},
sub_btn_tit: {
fontSize: 18
},
sub_btn_left_text: {
color: third_text_color
},
sub_btn_rig: {
width: '50%',
backgroundColor: promary_color
},
sub_btn_rig_text: {},
// scroll_text_cont: {
// fontSize: 30,
// marginLeft: 80,
// height: 80,
// color: '#333',
// backgroundColor: '#FF0000',
// width: '100%'
// },
// card: {
// borderWidth: 1,
// backgroundColor: '#fff',
// borderColor: 'rgba(0,0,0,0.1)',
// margin: 5,
// height: 150,
// padding: 15,
// shadowColor: '#ccc',
// shadowOffset: { width: 2, height: 2, },
// shadowOpacity: 0.5,
// shadowRadius: 3,
// }
})
export default ChooseProductPage;
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
SafeAreaView,
TouchableOpacity,
ScrollView,
FlatList,
Image
} from 'react-native';
import {connect} from 'react-redux';
import HeadBackItem from '../../common/HeadBackItem';
import {
home_background_color,
foundation_color,
promary_color,
second_text_color,
third_text_color,
first_text_color,
second_text_size,
Width,
pxSize,
safe_view,
font_family_semibold,
font_family_light
} from '../../../base/BaseStyle';
import {
FooterBtnStyle
} from '../../common/CellTextStyle';
import StatusBarView from '../../common/StatusBarView';
class EditStencilPage extends Component {
constructor(props) {
super(props);
this.state = {
topProcOptionList: [
{
title: '编辑产品'
},
{
title: '螺钉盒'
},
{
title: '器械包'
},
{
title: '工具'
}
],
topActiveIndex: 0,
contOptionData: [ // 底部产品内容
{
"id": "0",
title: '规格:JS-CGO PE 10',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 20,
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "1",
title: '规格:JS-CGO PE 10 11',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "2",
title: '规格:JS-CGO PE 10 22',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "3",
title: '规格:JS-CGO PE 10 33',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "4",
title: '规格:JS-CGO PE 10 44',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "5",
title: '规格:JS-CGO PE 10 55',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "6",
title: '规格:JS-CGO PE 10 55',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "7",
title: '规格:JS-CGO PE 10 55',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "8",
title: '规格:JS-CGO PE 10 888',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
imgIcon: require('../../../images/model_test.png'),
select: false
}
]
}
}
/**
* 点击当前产品加减
* @param {object} item 当前小类数据
* @param {number} index 当前角标
* @param {boolean} isPlus 默认减法 false,加法 true,
*/
handelCalculationList(item, index, isPlus) {
let { contOptionData } = this.state
let { value } = contOptionData[index]
if(isPlus) {
contOptionData[index].value += 1
} else if(!isPlus && value > 0) {
contOptionData[index].value -= 1
}
this.setState({
contOptionData
})
}
// 点击顶部菜单
handleTopNav(item, index) {
this.setState({
topActiveIndex: index
})
}
// 返回顶部编辑选项
renderTopProItem() {
let { topProcOptionList, topActiveIndex } = this.state
return (
<View style={styles.top_box}>
<ScrollView
style={styles.top_scroll_cont}
horizontal={true}
showsHorizontalScrollIndicator={false}
>
{
topProcOptionList.map((item, index) =>
<TouchableOpacity
activeOpacity={.8}
style={styles.top_touch_cont}
onPress={() => this.handleTopNav(item, index)}
>
<View style={[
styles.top_inner,
(index == 1 || index == 2) ? styles.se_thr_width : '',
index == 3 ? styles.four_width : '',
index == topActiveIndex ? styles.top_inner_act : ''
]}>
<Text style={[styles.top_tit, index == topActiveIndex ? styles.top_tit_act : '']}>
{item.title}
</Text>
</View>
</TouchableOpacity>
)
}
</ScrollView>
</View>
)
}
// 返回底部主要元素
renderContItem() {
return(
<View style={styles.edit_cont}>
<ScrollView
style={styles.edit_scroll_cont}
showsVerticalScrollIndicator={false}
>
<FlatList
style={styles.edit_list}
keyExtractor={item => item.id}
data={this.state.contOptionData}
extraData={this.state}
renderItem={ ({item, index}) => this.renderContColumnItem(item, index) }
/>
</ScrollView>
</View>
)
}
// 返回每一列元素
renderContColumnItem(item, index) {
return (
<SafeAreaView style={styles.column_container}>
<View style={styles.ri_inner}>
<View style={styles.oth_img_box}>
<Image style={styles.oth_img} source={item.imgIcon}/>
</View>
<View style={styles.ri_text_box}>
<Text style={styles.ri_te_tit}>
{ item.title }
</Text>
<Text style={[styles.ri_te_ot, styles.thr_ot]}>{item.tip1}</Text>
<Text style={styles.ri_te_ot}>{item.tip2}</Text>
</View>
<View style={styles.ri_num_box}>
<TouchableOpacity
activeOpacity={.9}
style={styles.btn_inner}
onPress={() => this.handelCalculationList(item, index)}
>
<View style={[styles.thr_num_btn, styles.thr_btn_left]}>
<Image source={require('../../../images/less_icon.png')} style={styles.thr_num_icon}></Image>
</View>
</TouchableOpacity>
<Text style={styles.thr_num}>{ item.value }</Text>
<TouchableOpacity
activeOpacity={.9}
style={styles.btn_inner}
onPress={() => this.handelCalculationList(item, index, true)}
>
<View style={[styles.thr_num_btn, styles.thr_btn_right]}>
<Image source={require('../../../images/plur_icon.png')} style={styles.thr_num_icon}></Image>
</View>
</TouchableOpacity>
</View>
</View>
</SafeAreaView>
)
}
render() {
let {navigation} = this.props
let {title} = navigation.state.params
return (
<View style={styles.edit_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<View style={styles.edit_main}>
{this.renderTopProItem()}
{this.renderContItem()}
</View>
<FooterBtnStyle
style={styles.sub_btn_pro}
activeOpacity={.8}
title={'编辑完成'}
textStyle= {styles.sub_btn}
onPress={() => console.warn('编辑完成')}
/>
</SafeAreaView>
</View>
);
}
}
const styles = StyleSheet.create({
edit_container: {
flex: 1,
backgroundColor: home_background_color,
padding: 0,
margin: 0
},
edit_main: {
flex: 1
},
top_box: {
width: Width(),
paddingHorizontal: 20,
paddingTop: 12,
// backgroundColor: foundation_color,
// borderBottomColor: '#F4F4F4',
// borderBottomWidth: 1
},
top_scroll_cont: {},
top_touch_cont: {},
top_inner: {
justifyContent: 'center',
alignItems: 'center',
marginRight: 14,
borderBottomWidth: 2,
borderBottomColor: home_background_color,
minWidth: 50,
},
se_thr_width: {
minWidth: 42
},
four_width: {
minWidth: 28
},
top_inner_act: {
borderBottomWidth: 2,
borderBottomColor: promary_color
},
top_tit: {
paddingTop: 10,
paddingBottom: 12,
color: second_text_color,
// fontSize: third_text_size
fontSize: 14
},
top_tit_act: {
color: first_text_color,
fontWeight: 'bold'
},
edit_cont: {
marginTop: 14,
flex: 1
// height: Height() - 187
},
edit_list: {},
column_container: {
paddingHorizontal: 20
},
ri_inner: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
paddingVertical: 14,
paddingHorizontal: 8,
backgroundColor: foundation_color,
marginBottom: 14
},
oth_img_box: {
borderColor: '#ccc',
borderWidth: 1,
borderRadius: 50,
width: pxSize(50),
height: pxSize(50),
justifyContent: 'center',
alignItems: 'center'
},
oth_img: {
width: '90%',
height: '90%'
},
ri_text_box: {},
ri_te_tit: {
fontSize: second_text_size,
color: first_text_color,
// fontWeight: 'bold',
fontFamily: font_family_semibold
},
thr_ot: {
// fontWeight: 'normal',
// color: first_text_color
},
ri_te_ot: {
fontSize: 14,
color: third_text_color,
fontFamily: font_family_light
},
ri_num_box: {
flexDirection: 'row',
alignItems: 'center'
},
thr_num_btn: {
width: pxSize(24),
height: pxSize(24)
},
thr_btn_left: {
marginRight: 4
},
thr_btn_right: {
marginLeft: 4
},
thr_num_icon: {
width: '100%',
height: '100%'
},
btn_inner: {},
thr_num: {
minWidth: pxSize(20),
textAlign: 'center'
},
sub_btn_pro: {
backgroundColor: promary_color
},
})
export default EditStencilPage;
\ No newline at end of file
import React , { Component } from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
ScrollView,
FlatList,
SafeAreaView
} from 'react-native';
import {
first_text_color,
third_text_color,
foundation_color,
second_text_size,
Width,
second_text_color,
pxSize,
font_family_medium,
font_family_light,
font_family_regular,
icon_style
} from '../../../base/BaseStyle';
import ShowModel from '../../common/ShowModel';
// export function ProductRightStyle({isStencilItem, isBoxBagToolItem, isOtherItem, ...props}) {
// return (
// <View style={{position: 'absolute', left: 80}} {...props}>
// <Text>右侧</Text>
// </View>
// )
// }
// export function ProductRightStyle({isStencilItem, isBoxBagToolItem, isOtherItem, ...props}) {
class ProductRightStyle extends Component {
constructor (props) {
super(props)
this.state = {
// stencilData : [{
// "id": "0",
// title: '髋关节手术001',
// tip1: '描述信息',
// tip2: '描述信息',
// select: false
// },
// {
// "id": "1",
// title: '髋关节手术002',
// tip1: '描述信息',
// tip2: '描述信息',
// select: false
// },
// {
// "id": "2",
// title: '髋关节手术003',
// tip1: '描述信息',
// tip2: '描述信息',
// select: true
// },
// {
// "id": "3",
// title: '髋关节手术004',
// tip1: '描述信息',
// tip2: '描述信息',
// select: false
// },
// {
// "id": "4",
// title: '髋关节手术005',
// tip1: '描述信息',
// tip2: '描述信息',
// select: false
// },
// {
// "id": "5",
// title: '髋关节手术006',
// tip1: '描述信息',
// tip2: '描述信息',
// select: false
// }
// ], // 模版数据
stencilData: this.props.superStencilData, // 模版数据
selectItem : [], // 当前选中模版
toolShowPopup: false, // 螺钉盒等三个弹窗显示
otherListData : [{ // 人工髋关节假体等数据 -- 大类
"id": "0",
title: '中置器(PE)',
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "1",
title: '内衬Harmony 28/10°OD(P 2',
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "2",
title: '内衬Harmony 28/10°OD(P',
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "3",
title: '中置器(PE)4',
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "4",
title: '中置器(PE)5',
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "5",
title: '中置器(PE)6',
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "6",
title: '中置器(PE)7',
imgIcon: require('../../../images/model_test.png'),
select: false
},
{
"id": "7",
title: '中置器(PE)8',
imgIcon: require('../../../images/model_test.png'),
select: false
}
],
thridOptionData: [ // 人工髋关节假体等数据 -- 小类
{
"id": "0",
title: '规格:JS-CGO PE 10',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 20,
select: false
},
{
"id": "1",
title: '规格:JS-CGO PE 10 11',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
select: false
},
{
"id": "2",
title: '规格:JS-CGO PE 10 22',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
select: false
},
{
"id": "3",
title: '规格:JS-CGO PE 10 33',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
select: false
},
{
"id": "4",
title: '规格:JS-CGO PE 10 44',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
select: false
},
{
"id": "5",
title: '规格:JS-CGO PE 10 55',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
select: false
}
],
thridIsVisible: false, // 小类展示
}
}
componentWillReceiveProps(nextProps) {
if (this.state.thridIsVisible != nextProps.defaultThridShow) {
this.setState({thridIsVisible: nextProps.defaultThridShow});
}
if (this.state.stencilData != nextProps.superStencilData) {
this.setState({stencilData: nextProps.superStencilData});
}
}
// 点击模版选中
handleItemStencil(item, index) {
console.warn('xuanze', index, item)
let { stencilData, selectItem } = this.state
let { select, id } = item
console.warn(selectItem)
console.warn(selectItem, stencilData[id])
if (select) {
// 前一次是true,当前变成未选中
selectItem.splice(selectItem.findIndex(function (x) {
return x === id;
}), 1);
} else {
selectItem.push(id);
// 跳转到新页面
// console.warn('-----navigation', this.props.navigation.navigate)
// this.props.navigation.navigate('EditStencilPage')
}
console.warn(select, stencilData[id].select)
stencilData[id].select = !select;
this.setState({ stencilData })
this.handleRIghtStencil()
}
handleRIghtStencil() {
// console.warn(`选中了${JSON.stringify(this.state.selectItem)}`)
}
// 跳转到编辑模版
enterEditStencilPage(item, index) {
let { superIndex } = this.props
console.warn('dianji---跳转', superIndex, index, item)
if(superIndex == 0) {
this.props.navigation.navigate('EditStencilPage', {title: '选择产品 - 编辑模版'})
} else if ( superIndex > 0 && superIndex < 4) {
this.handleIsShowDialog()
} else {
this.changeThrShow(true)
}
}
// 关闭当前弹窗
handleCloseModal(show) {
this.setState({
toolShowPopup: show
})
}
// 螺钉盒、器械包、辅助工具 弹窗显示
handleIsShowDialog() {
this.setState({
toolShowPopup: !this.state.toolShowPopup
})
}
// 修改当前小类是否展示
changeThrShow(show) {
this.setState({
thridIsVisible: show
})
// this.props.changeThrShow(show) ============????
}
/**
* 点击当前小类加减
* @param {object} item 当前小类数据
* @param {number} index 当前角标
* @param {boolean} isPlus 默认减法 false,加法 true,
*/
handelCalculationThr(item, index, isPlus) {
let { thridOptionData } = this.state
let { value } = thridOptionData[index]
if(isPlus) {
thridOptionData[index].value += 1
} else if(!isPlus && value > 0) {
thridOptionData[index].value -= 1
}
this.setState({
thridOptionData
})
}
// 返回模版每一列
renderStencilItem(item, index) {
let { toolShowPopup } = this.state
return (
<SafeAreaView style={styles.ri_container}>
<View style={styles.ri_inner}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.enterEditStencilPage(item, index)}
style={styles.ri_tou_box}
>
<View style={styles.ri_text_box}>
<Text style={styles.ri_te_tit}>
{item.select ? (item.title+"--选中") : (item.title+"--未选中")}
</Text>
<Text style={styles.ri_te_ot}>{item.tip1}</Text>
<Text style={styles.ri_te_ot}>{item.tip2}</Text>
</View>
</TouchableOpacity>
<View style={styles.ri_img_box}>
<TouchableOpacity
activeOpacity={.9}
onPress={() => this.handleItemStencil(item, index)}
>
{item.select ?
<Image
source={require('../../../images/cor_blue.png')}
style={icon_style}/>
:
<Image
source={require('../../../images/frame_icon.png')}
style={icon_style}/>
}
</TouchableOpacity>
</View>
</View>
<ShowModel
title={'通用螺钉盒'}
show={ toolShowPopup }
closeModal={(show) => this.handleCloseModal(show)}
>
<View style={styles.model_cont}>
<View style={styles.model_cont_inner}>
<Text style={styles.mo_cont_title}>螺钉数量统计信息如下:</Text>
<Text style={styles.mo_cont_tip}>HB6.5()区:6</Text>
<Text style={styles.mo_cont_tip}>HB6.5()区:6</Text>
<Text style={styles.mo_cont_tip}>HB6.5()区:6</Text>
</View>
<View style={styles.mo_img_box}>
<Image style={styles.mo_img} source={require('../../../images/model_test.png')}></Image>
</View>
</View>
</ShowModel>
</SafeAreaView>
)
}
// 返回模版元素
renderStencilStyle() {
return(
<View style={styles.stencil_cont}>
<FlatList
style={styles.cont_right_list}
keyExtractor={item => item.id}
data={this.state.stencilData}
extraData={this.state}
// data={stencilData}
// extraData={this.state}
renderItem={({item, index}) => this.renderStencilItem(item, index)}
/>
{/* {
[1,2,3,4,5,6].map((item, index) =>
<Text>髋关节手术001</Text>
)
} */}
{/* <ScrollableTabView
style={{ marginTop: 20 }}
initialPage={0}
renderTabBar={() => <ScrollableTabBar />}
onChangeTab={(obj) => console.warn(Object.keys(obj),obj.i)}
initialPage={0}
tabBarUnderlineStyle={{backgroundColor: promary_color}}
tabBarActiveTextColor={first_text_color}
tabBarInactiveTextColor={second_text_color}
tabBarTextStyle={styles.top_tit}
>
<Text tabLabel='Tab #1' style={styles.scroll_text_cont}>My</Text>
<Text tabLabel='Tab #2 word word'>favorite</Text>
<Text tabLabel='Tab #3 word word word'>project</Text>
<Text tabLabel='Tab #4 word word word word'>favorite</Text>
<Text tabLabel='Tab #5'>project</Text>
</ScrollableTabView> */}
</View>
)
}
// 返回模版等四个以外的每一列 -- 小类
renderThridItem(item, index) {
return (
<SafeAreaView style={styles.thr_container}>
<View style={[styles.ri_inner, styles.thr_inner]}>
<View style={styles.ri_text_box}>
<Text style={styles.thr_ot}>
{ item.title }
</Text>
<Text style={[styles.ri_te_ot, styles.thr_ot]}>{item.tip1}</Text>
<Text style={styles.ri_te_ot}>{item.tip2}</Text>
</View>
<View style={styles.ri_num_box}>
<TouchableOpacity
activeOpacity={.9}
style={styles.btn_inner}
onPress={() => this.handelCalculationThr(item, index)}
>
{/* <View style={[styles.thr_num_btn]}> */}
<View style={[styles.thr_num_btn, styles.thr_btn_left]}>
{/* <Text style={[styles.thr_num_icon, styles.thr_icon_left]}>{'-'}</Text> */}
<Image source={require('../../../images/less_icon.png')} style={styles.thr_num_icon}></Image>
</View>
</TouchableOpacity>
<Text style={styles.thr_num}>{ item.value }</Text>
<TouchableOpacity
activeOpacity={.9}
style={styles.btn_inner}
onPress={() => this.handelCalculationThr(item, index, true)}
>
{/* <View style={[styles.thr_num_btn]}> */}
<View style={[styles.thr_num_btn, styles.thr_btn_right]}>
{/* <Text style={[styles.thr_num_icon, styles.thr_icon_right]}>{'+'}</Text> */}
<Image source={require('../../../images/plur_icon.png')} style={styles.thr_num_icon}></Image>
</View>
</TouchableOpacity>
</View>
</View>
</SafeAreaView>
)
}
// 返回模版等四个以外的动态元素 -- 小类
renderThridStyle() {
return(
<View style={styles.stencil_cont}>
{/* <TouchableOpacity
activeOpacity={.8}
style={styles.thr_head_inner}
onPress={() => this.changeThrShow(false)}
>
<View style={styles.thr_head_back}>
<View style={styles.thr_icon_box}>
<Image source={require('../../../images/arr_left.png')} style={styles.thr_icon}></Image>
</View>
<Text style={styles.thr_head_tit}>{ '测试标题' }</Text>
</View>
</TouchableOpacity> */}
<FlatList
style={styles.cont_thr_list}
keyExtractor={item => item.id}
data={this.state.thridOptionData}
extraData={this.state}
renderItem={({item, index}) => this.renderThridItem(item, index)}
/>
</View>
)
}
// 返回模版等四个以外的每一列 -- 大类
renderOtherListItem(item, index) {
return (
<SafeAreaView style={styles.oth_container}>
<View style={styles.oth_inner}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.enterEditStencilPage(item, index)}
style={styles.oth_box}
>
<View style={styles.oth_box_item}>
<View style={styles.oth_img_box}>
<Image style={styles.oth_img} source={item.imgIcon}/>
</View>
<Text style={styles.oth_tit}>{item.title}</Text>
</View>
</TouchableOpacity>
</View>
</SafeAreaView>
)
}
// 返回模版等四个以外的动态元素
renderOtherStyle() {
return(
<View style={styles.stencil_cont}>
<FlatList
style={styles.cont_other_list}
keyExtractor={item => item.id}
data={this.state.otherListData}
extraData={this.state}
renderItem={({item, index}) => this.renderOtherListItem(item, index)}
/>
</View>
)
}
// 返回右侧元素
renderRightCurrentStyle() {
let { superIndex } = this.props
let { thridIsVisible } = this.state
if(superIndex >= 0 && superIndex < 4) {
return this.renderStencilStyle()
} else {
if (!thridIsVisible) {
return this.renderOtherStyle()
} else {
return this.renderThridStyle()
}
}
}
// 返回右侧三级标题
renderThrHeadStyle() {
let { thridIsVisible } = this.state
if (thridIsVisible) {
return (
<TouchableOpacity
activeOpacity={.8}
style={styles.thr_head_inner}
onPress={() => this.changeThrShow(false)}
>
<View style={styles.thr_head_back}>
<View style={styles.thr_icon_box}>
<Image source={require('../../../images/arr_left.png')} style={styles.thr_icon}></Image>
</View>
<Text style={styles.thr_head_tit}>{ '测试标题' }</Text>
</View>
</TouchableOpacity>
)
}
}
render() {
let { stencilData } = this.state
return (
<View style={styles.cont_right_box}>
{ this.renderThrHeadStyle() }
<ScrollView
style={styles.cont_right_scroll_cont}
showsVerticalScrollIndicator={false}
>
{ this.renderRightCurrentStyle() }
</ScrollView>
</View>
)
}
}
const styles = StyleSheet.create({
cont_right_box: {
position: 'absolute',
left: 80,
top: 0,
width: Width() - 80,
backgroundColor: foundation_color,
height: '100%',
paddingHorizontal: 20
},
cont_right_scroll_cont: {},
cont_right_list: {},
ri_container: {
borderBottomColor: '#F9F9F9',
borderBottomWidth: 2,
// backgroundColor: '#ccc'
},
ri_tou_box: {},
ri_inner: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
paddingVertical: 14
},
ri_text_box: {},
ri_te_tit: {
fontSize: 18,
color: first_text_color,
// fontWeight: 'bold',
fontFamily: font_family_medium
},
ri_te_ot: {
fontSize: 14,
color: third_text_color,
fontFamily: font_family_light
},
ri_img_box: {
width: 18,
height: 18
},
// ri_img_check: {
// width: '100%',
// height: '100%'
// },
model_cont: {},
model_cont_inner: {
marginBottom: 48
},
mo_cont_title: {
color: first_text_color,
// fontWeight: 'bold',
fontSize: 14,
lineHeight: 24,
fontFamily: font_family_medium
},
mo_cont_tip: {
color: second_text_color,
fontSize: 14,
lineHeight: 24,
fontFamily: font_family_regular
},
mo_img_box: {
flex: 1,
borderWidth: 1,
borderColor: '#E1E1E1',
justifyContent: 'center',
alignItems: 'center',
height: pxSize(120)
},
mo_img: {
width: pxSize(100),
height: '100%'
},
// other right
cont_other_list: {
paddingTop: 14
},
oth_container: {
flex: 1,
marginBottom: 14
},
oth_inner: {},
oth_box: {},
oth_box_item: {
flexDirection: 'row',
justifyContent: 'flex-start',
alignItems: 'center'
},
oth_img_box: {
borderColor: '#ccc',
borderWidth: 1,
borderRadius: 50,
width: pxSize(50),
height: pxSize(50),
justifyContent: 'center',
alignItems: 'center'
},
oth_img: {
width: '90%',
height: '90%'
},
oth_tit: {
textAlign: 'left',
paddingLeft: 10,
fontSize: second_text_size,
fontFamily: font_family_regular
},
stencil_cont: {},
thr_head_inner: {},
thr_head_back: {
flexDirection: 'row',
paddingVertical: 16,
alignItems: 'center'
},
thr_icon_box: {
width: pxSize(16),
height: pxSize(20)
},
thr_icon: {
width: '100%',
height: '100%'
},
thr_head_tit: {
color: third_text_color,
paddingLeft: 10,
fontSize: second_text_size,
fontFamily: font_family_regular
},
cont_thr_list: {},
thr_container: {},
thr_inner: {
paddingVertical: 0,
paddingBottom: 26
},
thr_ot: {
// fontWeight: 'normal',
fontFamily: font_family_regular,
fontSize: second_text_size,
color: first_text_color
},
ri_num_box: {
flexDirection: 'row',
alignItems: 'center'
},
thr_num_btn: {
width: pxSize(24),
height: pxSize(24),
// justifyContent: 'center',
// alignItems: 'center',
// borderRadius: 50,
// borderWidth: 1
},
thr_btn_left: {
// borderColor: '#E6E6E6'
marginRight: 4
},
thr_btn_right: {
// borderColor: foundation_color,
// backgroundColor: promary_color
marginLeft: 4
},
thr_num_icon: {
// fontSize: 16
width: '100%',
height: '100%'
},
thr_icon_left: {
// color: third_text_color
},
thr_icon_right: {
// color: title_text_color
},
btn_inner: {},
thr_num: {
minWidth: pxSize(20),
textAlign: 'center'
},
})
export default ProductRightStyle;
\ No newline at end of file
import React, { Component } from 'react';
import {
SafeAreaView,
StyleSheet,
View,
Text,
Image,
TouchableOpacity
} from 'react-native';
import { connect } from 'react-redux';
import HeadBackItem from '../../common/HeadBackItem';
import {
promary_color,
second_text_color,
first_text_color,
pxSize,
title_text_color,
safe_view,
font_family_medium,
font_family_regular
} from '../../../base/BaseStyle';
import StatusBarView from '../../common/StatusBarView';
class SubSuccessPage extends Component {
constructor(props) {
super(props);
this.state = { }
}
handleSubmit() {
console.warn('复制订单号并返回主页')
}
render() {
let {navigation} = this.props
let {title} = navigation.state.params
return (
<View style={styles.succ_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<View style={styles.succ_inner}>
<View style={styles.img_box}>
<Image source={require('../../../images/cor_green.png')} style={styles.img_icon}/>
</View>
<Text style={styles.succ_title}>{'提交成功'}</Text>
<Text style={styles.succ_text}>{'订单号:20200318121230'}</Text>
<TouchableOpacity
activeOpacity={.9}
style={styles.succ_btn}
onPress={() => this.handleSubmit()}
>
<Text style={styles.btn_text}>{'复制订单号并返回主页'}</Text>
</TouchableOpacity>
</View>
</SafeAreaView>
</View>
);
}
}
const styles = StyleSheet.create({
succ_container: {
flex: 1
},
succ_inner: {
justifyContent: 'center',
alignItems: 'center',
paddingTop: '26%'
},
img_box: {
width: pxSize(80),
height: pxSize(80)
},
img_icon: {
width: '100%',
height: '100%'
},
succ_title: {
fontSize: 17,
fontFamily: font_family_medium,
// fontWeight: 'bold',
color: first_text_color,
paddingTop: 8,
paddingBottom: 20
},
succ_text: {
fontSize: 14,
color: second_text_color,
paddingBottom: 30,
fontFamily: font_family_regular
},
succ_btn: {
backgroundColor: promary_color,
width: pxSize(330),
borderRadius: 30,
height: 48,
display: 'flex',
justifyContent: 'center',
alignItems: 'center'
},
btn_text: {
color: title_text_color,
fontSize: 16,
fontFamily: font_family_regular
}
})
export default SubSuccessPage;
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
ScrollView
} from 'react-native';
import {
first_text_color,
third_text_size,
second_text_color,
pxSize,
foundation_color,
promary_color
} from '../../../../base/BaseStyle';
class TopTabBar extends Component {
constructor(props) {
super(props);
this.state = {
}
}
// 返回自定义 bar 元素
renderTabOption(barItem, index) {
// ScrollableTabView默认传递的属性值,即跳转方法
// console.warn('top_tab_----', this.props)
// console.warn('barItem, index----', barItem, index)
let {activeTab, tabNames, goToPage, imgTabArr, textStyle, activeTextColor} = this.props
console.warn(activeTab, index, 'hh')
return (
<TouchableOpacity
activeOpacity={.8}
key={barItem}
onPress={() => goToPage(index)}
style={[styles.bar_box, activeTab == index ? styles.bar_box_act : '']}
>
<View style={styles.img_box}>
<Image source={imgTabArr[index]} style={styles.img_inner}/>
</View>
<Text style={[textStyle, activeTab == index ? activeTextColor : '']}>{barItem}</Text>
</TouchableOpacity>
)
}
render() {
let {style, tabs} = this.props
console.warn('hhhhh', tabs)
console.warn(this.props)
return (
<View style={[styles.bar_cont, style]}>
<ScrollView
style={styles.top_scroll_cont}
horizontal={true}
showsHorizontalScrollIndicator={false}
>
{
this.props.tabs.map((tab, index) => this.renderTabOption(tab, index))
}
</ScrollView>
</View>
);
}
}
const styles = StyleSheet.create({
bar_cont: {
backgroundColor: foundation_color,
borderBottomColor: '#F4F4F4',
borderBottomWidth: 1,
flexDirection: 'row',
height: 76,
paddingHorizontal: 20
},
top_scroll_cont: {
},
tab: {
},
bar_box: {
flex: 1,
alignItems: 'center',
justifyContent: 'flex-start',
// paddingBottom: 10,
borderBottomWidth: 2,
borderBottomColor: foundation_color,
width: 58,
marginRight: 8
},
bar_box_act: {
borderBottomWidth: 2,
borderBottomColor: promary_color
},
img_box: {
width: pxSize(30),
height: pxSize(30)
},
img_inner: {
width: '100%',
height: '100%'
},
tit_text: {
paddingTop: 10,
paddingBottom: 16,
color: second_text_color,
fontSize: third_text_size
},
tit_text_act: {
color: first_text_color,
fontWeight: 'bold'
}
})
export default TopTabBar;
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
ScrollView
} from 'react-native';
import {
first_text_color,
third_text_size,
second_text_color,
pxSize,
foundation_color,
promary_color
} from '../../../../base/BaseStyle';
class TopTabBar extends Component {
constructor(props) {
super(props);
this.state = {
}
}
// 返回自定义 bar 元素
renderTabOption(barItem, index) {
// ScrollableTabView默认传递的属性值,即跳转方法
// console.warn('top_tab_----', this.props)
// console.warn('barItem, index----', barItem, index)
let {activeTab, tabNames, goToPage, imgTabArr, textStyle, activeTextColor} = this.props
// console.warn(activeTab, index, 'hh')
return (
<TouchableOpacity
activeOpacity={.8}
key={barItem}
onPress={() => goToPage(index)}
style={[styles.bar_box, activeTab == index ? styles.bar_box_act : '']}
>
<View style={styles.img_box}>
<Image source={imgTabArr[index]} style={styles.img_inner}/>
</View>
<Text style={[textStyle, activeTab == index ? activeTextColor : '']}>{barItem}</Text>
</TouchableOpacity>
)
}
render() {
let {style, tabs} = this.props
// console.warn('hhhhh', tabs)
// console.warn(this.props)
return (
<View style={[styles.bar_cont, style]}>
<ScrollView
style={styles.top_scroll_cont}
horizontal={true}
showsHorizontalScrollIndicator={false}
>
{
this.props.tabs.map((tab, index) => this.renderTabOption(tab, index))
}
</ScrollView>
</View>
);
}
}
const styles = StyleSheet.create({
bar_cont: {
backgroundColor: foundation_color,
borderBottomColor: '#F4F4F4',
borderBottomWidth: 1,
flexDirection: 'row',
height: 76,
paddingHorizontal: 20
},
top_scroll_cont: {
},
tab: {
},
bar_box: {
flex: 1,
alignItems: 'center',
justifyContent: 'flex-start',
// paddingBottom: 10,
borderBottomWidth: 2,
borderBottomColor: foundation_color,
width: 58,
marginRight: 8
},
bar_box_act: {
borderBottomWidth: 2,
borderBottomColor: promary_color
},
img_box: {
width: pxSize(30),
height: pxSize(30)
},
img_inner: {
width: '100%',
height: '100%'
},
tit_text: {
paddingTop: 10,
paddingBottom: 16,
color: second_text_color,
fontSize: third_text_size
},
tit_text_act: {
color: first_text_color,
fontWeight: 'bold'
}
})
export default TopTabBar;
\ No newline at end of file
export default [
{
isRequest: true,
title: '销售员',
value: '易凯源',
isPicker: false,
isEditText: true
},
{
isRequest: true,
title: '组织',
value: '请选择',
isPicker: true
},
{
isRequest: true,
title: '手术医院',
value: '请选择',
isPicker: true
},
{
isRequest: true,
title: '收单地点',
value: '请选择',
isPicker: true
},
{
isRequest: true,
title: '收货地点',
value: '请选择',
isPicker: true
},
{
isRequest: false,
title: '主治医生',
value: '请选择',
isPicker: true,
showInput: true
},
{
isRequest: false,
title: '手术名称',
value: '请输入',
isPicker: false
},
{
isRequest: false,
title: '手术类时间',
value: '请选择',
isPicker: true,
showDatePicker: true
},
{
isRequest: true,
title: '手术类型',
value: '请选择',
isPicker: true
},
{
isRequest: true,
title: '订单类型',
value: '请选择',
isPicker: true
},
{
isRequest: true,
title: '选择产品',
value: '请选择',
isPicker: true,
showItemPage: true
}
]
\ No newline at end of file
export const leftOptionList = [
{
title: '手术模版',
iconImg: require('../../../images/surg_temp.png'),
stencilData: [{
"id": "0",
title: '髋关节手术001',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "1",
title: '髋关节手术002',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "2",
title: '髋关节手术003',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "3",
title: '髋关节手术004',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "4",
title: '髋关节手术005',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "5",
title: '髋关节手术006',
tip1: '描述信息',
tip2: '描述信息',
select: false
}
], // 模版数据
},
{
title: '螺钉盒',
iconImg: require('../../../images/screw_box.png'),
stencilData: [{
"id": "0",
title: '髋关节手术001--ldh',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "1",
title: '髋关节手术002',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "2",
title: '髋关节手术003',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "3",
title: '髋关节手术004',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "4",
title: '髋关节手术005',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "5",
title: '髋关节手术006',
tip1: '描述信息',
tip2: '描述信息',
select: false
}
], // 模版数据
},
{
title: '器械包',
iconImg: require('../../../images/equip_bag.png'),
stencilData: [{
"id": "0",
title: '髋关节手术001----qxb',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "1",
title: '髋关节手术002',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "2",
title: '髋关节手术003',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "3",
title: '髋关节手术004',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "4",
title: '髋关节手术005',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "5",
title: '髋关节手术006',
tip1: '描述信息',
tip2: '描述信息',
select: false
}
], // 模版数据
},
{
title: '辅助工具',
iconImg: require('../../../images/auxili_tool.png'),
stencilData: [{
"id": "0",
title: '髋关节手术001------fzgj',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "1",
title: '髋关节手术002',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "2",
title: '髋关节手术003',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "3",
title: '髋关节手术004',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "4",
title: '髋关节手术005',
tip1: '描述信息',
tip2: '描述信息',
select: false
},
{
"id": "5",
title: '髋关节手术006',
tip1: '描述信息',
tip2: '描述信息',
select: false
}
], // 模版数据
},
{
title: '人工髋关节假体'
},
{
title: '膝关节假体备份'
},
{
title: '骨小梁髋关节假体'
},
{
title: '骨小梁髋关节假体22'
},
{
title: '骨小梁髋关节假体33'
},
{
title: '骨小梁髋关节假体44'
},
{
title: '骨小梁髋关节假体55'
},
] // 左侧数据 - 二级菜单
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
SafeAreaView,
ScrollView,
TouchableOpacity,
Image,
TextInput
} from 'react-native';
import {
home_background_color,
promary_color,
safe_view,
icon_style,
second_text_size,
font_family_regular,
first_text_color,
Width,
placehold_text_color,
pxSize,
foundation_color,
third_text_size,
title_text_color,
second_text_color,
pxHeight
} from '../../base/BaseStyle';
import StatusBarView from '../common/StatusBarView';
import HeadBackItem from '../common/HeadBackItem';
import {
FooterBtnStyle,
CellTextStyle,
AsteriskTextStyle,
TitleTextStyle,
ContInputTextStyle,
ImageTextStyle,
ContTextStyle
} from '../common/CellTextStyle';
import { connect } from 'react-redux';
import { AudioRecorder, AudioUtils } from 'react-native-audio';
import Sound from 'react-native-sound';
import DialogModel from '../common/DialogModel';
class EquipConsuPage extends Component {
constructor(props) {
super(props);
this.state = {
canSubFlag: false, // 生成订单按钮样式改变
listOptionData: [ // 备注以上的元素
{
"id": "0",
title: '销售员',
name: '蔡妍',
value: 'caiyan',
isPicker: false,
select: false,
isEditable: false // 不可编辑
},
{
"id": "1",
title: '组织',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "2",
title: '手术医院',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "3",
title: '目标订单信息',
name: '请选择',
value: '',
isPicker: true,
select: false
},
{
"id": "4",
title: '备注',
value: '',
isPicker: false,
select: false,
isRemark: true // 备注
},
{
"id": "5",
title: '还有什么要安排的,可录音备注哟!',
value: '',
isPicker: false,
select: false,
isRecode: true // 录音
},
{
"id": "6",
title: '耗材明细',
btnTit: '+添加转单申请明细',
value: '',
isPicker: false,
select: false,
isJumpSubPage: true, // 跳转子页
isShowSub: true, // 是否展示子项
subOption: [{
title: '人工髋关节假体-JS-HB ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
},{
title: '人工髋关节假体-JS-22 ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
},{
title: '人工髋关节假体-JS-33 ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
},{
title: '人工髋关节假体-JS-44 ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
},{
title: '人工髋关节假体-JS-5 ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
}]
},
{
"id": "7",
title: '添加照片',
value: '',
isPicker: false,
select: false,
isAddImage: true // 添加图片
}
],
submitOption: { // 提交的信息
// seller_code: '', // 用户名username
// org_code: '', // 组织
// customer_code: '', // 手术医院
// bill_to_site_code: '', // 收单地点
// ship_to_site_code: '', // 收货地点
// doctor_name: '', // 主治医生
// // surgery_name: '', // 手术名称
// surgery_date: '', // 手术时间
// // surgery_type_code: '', // 手术类型
// template_collect_number: '', // 配台模版
// order_type_code: '', // 订单类型
// surgery_desc: '', // 备注信息
// voice_url: '', // 录音地址
// order_currency: 'CNY',
// Caller: 'dingding',
// force_balance_check_flag: 'Y', // 检查缺失物料
},
currentItem: {
name: '请选择',
value: ''
},
localOtherObj: { // 恢复原状态
name: '请选择',
value: ''
},
currentTitle: '组织', // 当前点击项
showTypePop: false, // 选择器弹窗
isSubLoding: false, // 加载中弹窗
lodingTitle: '加载中',
listCurrentOption: [ // 当前选择器数据
{
name: '男',
value: 'boy'
},
{
name: '女',
value: 'girl'
},
{
name: '其他',
value: 'other'
}
],
hasPermission: undefined, //录音 授权状态
// audioPath: AudioUtils.DocumentDirectoryPath + `/quickAudio${Math.floor(Math.random() * (1000))+1}.aac`, // 文件路径
audioPath: AudioUtils.DocumentDirectoryPath + `/quickAudio${Math.floor(Math.random() * (1000))+1}.ogg`, // 文件路径
recording: false, //是否录音
pause: false, //录音是否暂停
stop: false, //录音是否停止
currentTime: 0, //录音时长
// localCustomersOption: [], // 当前医院信息:手术医院、收单地点、收货地点、主治医生
}
}
componentDidMount() {
this.getSellerName()
}
// 赋值销售员
getSellerName() {
let {state, props} = this
// console.log('---userInfo',props.userInfo)
if(state.listOptionData[0].name !== props.userInfo.person_name) {
this.setState({
listOptionData: state.listOptionData.map((item) => {
if(item.title === '销售员') {
item.name = props.userInfo.person_name
item.value = props.userInfo.user_name
}
return item
})
})
}
}
// 选择器弹窗回调函数
handleCallBack(item, itemTitle) {
console.warn(item, 'item--选择器弹窗回调函数----')
console.warn('item-itemTitle-----',itemTitle)
}
// 关闭弹窗
handleCloseModal(show) {
this.setState({
showTypePop: show
})
}
// 组织 点击
handleOrganizationCheck() {
console.warn('组织------check')
// let { state, props } = this
// this.setState({
// currentTitle: '组织',
// currentItem: {
// name: state.listOptionData[1].name,
// value: state.listOptionData[1].value
// }
// }, () => {
// let params = {
// access_token: props.token
// }
// props.requestQuickOrganizations(params)
// })
}
// 手术医院 点击
handleCustomerCheck() {
console.warn('手术医院------check')
// let { state, props } = this
// let self = this
// if(this.judgeOrgIsNull()) {
// self.setState({
// currentTitle: '手术医院',
// currentItem: {
// name: state.listOptionData[2].name,
// value: state.listOptionData[2].value
// }
// }, () => {
// // 在此修改接口
// self.getCustomerData()
// })
// }
}
// 目标订单信息 点击
handleTargetOrderCheck() {
console.warn('目标订单信息------check')
}
// 耗材明细 隐藏子项
handleDetailBtmCheck() {
let {listOptionData} = this.state
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(index == 6) {
item.isShowSub = false
}
return item
})
})
}
// 耗材明细 显示子项
handleDetailRigCheck() {
let {listOptionData} = this.state
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(index == 6) {
item.isShowSub = true
}
return item
})
})
}
// 耗材明细 点击
handleConsumDetailCheck() {
console.warn('耗材明细------check')
this.props.navigation.navigate('TransSearchPage', {
title: '耗材明细 - 转单查询'
})
}
// 添加图片 点击
handleAddPicCheck() {
console.warn('添加图片------check')
}
// 生成订单 点击
handleSubmit() {
console.warn('生成订单------check')
}
// 返回备注以上的元素
renderListItem() {
let { listOptionData } = this.state
return(
<View style={styles.list_cont}>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={1}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'销售员'}</TitleTextStyle>
<ContInputTextStyle editable={false} defaultValue={listOptionData[0].name}></ContInputTextStyle>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleOrganizationCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'组织'}</TitleTextStyle>
<ContTextStyle>{listOptionData[1].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleCustomerCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'手术医院'}</TitleTextStyle>
<ContTextStyle>{listOptionData[2].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleTargetOrderCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'目标订单信息'}</TitleTextStyle>
<ContTextStyle>{listOptionData[3].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
{/* { this.renderPickerModel() } */}
</View>
)
}
// 返回右侧箭头
renderRightArrowItem() {
return (
<ImageTextStyle>
<Image source={require('../../images/arr_rig.png')} style={icon_style}/>
</ImageTextStyle>
)
}
// 返回选择器弹窗
renderPickerModel() {
let {
listCurrentOption,
currentItem,
currentTitle,
showTypePop,
} = this.state
console.warn('弹窗-----,', listCurrentOption)
return (
<SafeAreaView style={styles.item_container}>
<DialogModel
entityList={listCurrentOption}
callback={(item, itemTitle) => this.handleCallBack(item, itemTitle)}
show={showTypePop}
itemValue={currentItem.value}
itemTitle={currentTitle}
closeModal={(show) => this.handleCloseModal(show)}
/>
</SafeAreaView>
)
}
// 返回备注元素
renderRemarksItem() {
let { state } = this
return (
<CellTextStyle style={styles.remark_item}>
<View style={styles.rema_box}>
<Text style={styles.rema_tit}>备注</Text>
<View style = {styles.rema_Input_outer} >
<TouchableOpacity activeOpacity = {1} style = {styles.rema_Input_inner} onPress = {() => this.TextInput.focus()} >
<TextInput
placeholder = {'请输入备注信息'}
placeholderTextColor = {placehold_text_color}
underlineColorAndroid = {'transparent'}
multiline = {true}
ref = {textInput => this.TextInput = textInput}
numberOfLines = {8}
style={styles.rema_Input}
maxLength={140}
onChangeText={(text) => this.handleRemarkInput(text)}
defaultValue={state.listOptionData[4].value}
/>
</TouchableOpacity>
</View>
</View>
</CellTextStyle>
)
}
// 返回录音元素
renderRecordingItem() {
let { recording, pause, stop, currentTime } = this.state
return (
<CellTextStyle style={styles.reco_item}>
<View style={styles.reco_btn_cont}>
<Text style={styles.reco_btn_tit}>还有什么要安排的,可录音备注哟!</Text>
{
!stop ?
<View style={styles.reco_btn_inner}>
<TouchableOpacity
activeOpacity = {.8}
style={styles.reco_btn_box}
onLongPress={this._record}
onPressOut={this._stop}
>
<View style={styles.reco_img_box}>
<Image source={require('../../images/record_icon.png')} style={icon_style}/>
</View>
<Text style={styles.reco_btn_text}>长按录音</Text>
</TouchableOpacity>
{/* <Text style={styles.reco_text} onPress={this._record}> Record(开始录音) </Text>
<Text style={styles.reco_text} onPress={this._pause}> Pause(暂停录音) </Text>
<Text style={styles.reco_text} onPress={this._resume}> Resume(恢复录音) </Text>
<Text style={styles.reco_text} onPress={this._stop}> Stop(停止录音) </Text>
<Text style={styles.reco_text} onPress={this._play}> Play(播放录音) </Text>
<Text style={styles.reco_text} onPress={this._del}> Del(删除录音) </Text>
<Text style={styles.reco_text}>
{
recording ? '正在录音' :
pause ? '已暂停' : '未开始'
}
</Text>
<Text style={styles.reco_text}>时长: {currentTime}</Text> */}
</View>
: <View style={styles.reco_play_box}>
<View style={styles.play_tit}>
<Text style={styles.play_text}>时长: {currentTime} </Text>
<Text style={styles.play_text}>正在播放</Text>
</View>
<View style={styles.play_btn}>
<TouchableOpacity
activeOpacity = {.8}
style={[styles.reco_list_box, styles.reco_del_btn]}
onPress={this._del}
>
<Text style={[styles.reco_text, styles.reco_del_tit]}> 删除 </Text>
</TouchableOpacity>
<TouchableOpacity
activeOpacity = {.8}
style={[styles.reco_list_box, styles.reco_play_btn]}
onPress={this._play}
>
<Text style={[styles.reco_text, styles.reco_play_tit]}> 播放({currentTime}‘‘) </Text>
</TouchableOpacity>
{/* <TouchableOpacity
activeOpacity = {.8}
style={styles.reco_list_box}
onPress={this._stopPlay}
>
<Text style={styles.reco_text}> 停止 </Text>
</TouchableOpacity> */}
</View>
</View>
}
</View>
</CellTextStyle>
)
}
// 返回耗材明细
renderConsumablesDetailsItem() {
let { state } = this
return (
<CellTextStyle style={styles.consu_detail}>
<View style={styles.detail_inner}>
<Text style={styles.detail_tit}>耗材明细</Text>
{
state.listOptionData[6].subOption.length ?
<View
// activeOpacity={1}
style={styles.detail_sub_cont}>
<View style={styles.detail_sub_tit}>
<Text style={styles.detail_tit_text}>
耗材({state.listOptionData[6].subOption.length}
</Text>
{
state.listOptionData[6].isShowSub ?
<TouchableOpacity
activeOpacity={.8}
style={styles.detail_icon}
onPress={() => this.handleDetailBtmCheck()}
>
<Image style={[icon_style, styles.detail_top_icon]} source={require('../../images/arr_btm.png')} />
</TouchableOpacity> :
<TouchableOpacity
activeOpacity={.8}
style={[styles.detail_icon, styles.detail_icon_rig]}
onPress={() => this.handleDetailRigCheck()}
>
<Image style={[icon_style, styles.detail_top_icon]} source={require('../../images/arr_rig.png')} />
</TouchableOpacity>
}
</View>
{
state.listOptionData[6].isShowSub ?
<View style={styles.detail_sub_inner}>
<ScrollView
style={styles.detail_scroll}
onPress={() => {console.log('--触碰---')}}
onScrollBeginDrag={() => {console.log('--滚动---')}}
// showsVerticalScrollIndicator={false}
>
{
state.listOptionData[6].subOption.map((item, index) => {
return this.renderConDeSubItem(item, index)
})
}
</ScrollView>
</View> : null
}
</View> : null
}
<View style={styles.detail_footer}>
<TouchableOpacity
activeOpacity={.8}
style={styles.detail_btn_box}
onPress = {() => this.handleConsumDetailCheck()}
>
<Text style={styles.detail_btn}>{state.listOptionData[6].btnTit}</Text>
</TouchableOpacity>
</View>
</View>
</CellTextStyle>
)
}
// 返回耗材明细子项
renderConDeSubItem(item, index) {
return(
<View style={styles.con_de_sub}>
<Text style={styles.de_sub_tit}>
{index+1}{ item.title }
</Text>
<Text style={styles.de_tip}>
{ item.orderNumber }
</Text>
</View>
)
}
// 返回添加图片
renderAddPicturesItem() {
let { state } = this
return (
<CellTextStyle style={styles.consu_addpic}>
<View style={styles.addpic_inner}>
<Text style={styles.addpic_tit}>添加图片</Text>
<View style={styles.addpic_cont}>
<TouchableOpacity
activeOpacity={.8}
style={styles.addpic_img_btn}
onPress={() => this.handleAddPicCheck()}
>
<Image style={icon_style} source={require('../../images/add_icon_large.png')} />
</TouchableOpacity>
{/* <TouchableOpacity
activeOpacity={.8}
style={styles.addpic_img_btn}>
<Image style={icon_style} source={require('../../images/add_icon_large.png')} />
</TouchableOpacity> */}
</View>
</View>
</CellTextStyle>
)
}
// 返回正在加载中
renderLodingItem() {
// let { lodingTitle, isSubLoding } = this.state
// return(
// <LodingModel title={lodingTitle} show={isSubLoding} style_back={styles.loding_back} />
// )
}
render() {
let {canSubFlag} = this.state
let {navigation} = this.props
let {title} = navigation.state.params
return (
<View style={styles.trans_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<ScrollView
style={styles.trans_main}
showsVerticalScrollIndicator={false}
>
{this.renderListItem()}
{this.renderRemarksItem()}
{this.renderRecordingItem()}
{this.renderConsumablesDetailsItem()}
{this.renderAddPicturesItem()}
</ScrollView>
</SafeAreaView>
<FooterBtnStyle
style={canSubFlag ? styles.sub_btn_pro : ''}
activeOpacity={canSubFlag ? .8 : 1}
title={'生成订单'}
textStyle= {styles.sub_btn}
onPress={() => this.handleSubmit()}
/>
{/* { this.renderLodingItem() } */}
</View>
);
}
}
const styles = StyleSheet.create({
trans_container : {
flex: 1,
backgroundColor: home_background_color
},
trans_main : {
padding: 14
},
remark_item: {
minHeight: 80,
height: 'auto'
},
rema_box: {
paddingVertical: 16
},
rema_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
// fontWeight: 'bold'
},
rema_Input_outer: {
height: 120,
alignItems: 'center',
// paddingHorizontal: 15,
paddingBottom: 0
},
rema_Input_inner: {
paddingTop: 10,
height: 105,
width: Width() - 38,
// borderWidth: 1,
// borderColor: '#eeeeee'
},
rema_Input: {
paddingVertical: 0,
maxHeight: 105,
fontSize: second_text_size,
textAlign:'left',
textAlignVertical:'top',
alignSelf:'flex-start',
justifyContent:'flex-start',
alignItems:'flex-start',
fontFamily: font_family_regular
},
list_cont: {
flex: 1
},
item_container: {
flex: 1
},
reco_item: {
height: 160,
// height: 340,
// marginBottom: 42
},
reco_btn_cont: {
paddingVertical: 20
},
reco_btn_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
reco_btn_inner: {
flex: 1,
width: Width() - 38,
// justifyContent: 'flex-end',
alignItems: 'center',
paddingTop: 30
},
reco_btn_box: {
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 50,
width: pxSize(152)
},
reco_img_box: {
width: pxSize(20),
height: pxSize(22)
},
// reco_img: {
// width: '100%',
// height: '100%'
// },
reco_text: {
fontSize: 14,
marginVertical: 10
},
reco_btn_text: {
fontSize: second_text_size,
color: first_text_color,
marginLeft: 6,
fontFamily: font_family_regular
},
reco_play_box: {
flex: 1,
width: Width() - 68,
// justifyContent: 'flex-end',
// alignItems: 'center'
},
play_tit:{
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
height: 60
},
play_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
play_btn:{
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
// height: 80
},
reco_list_box:{
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 34,
width: pxSize(100)
},
reco_del_btn: {
backgroundColor: promary_color,
height: 20,
borderRadius: 5,
width: pxSize(60)
},
reco_play_btn: {
width: pxSize(200),
borderRadius: 5,
height: 34,
borderColor: '#DFDFDF',
borderWidth: 1,
backgroundColor: foundation_color
},
reco_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
reco_del_tit: {
color: title_text_color,
fontSize: third_text_size
},
reco_play_tit: {},
consu_detail: {
backgroundColor: home_background_color,
// backgroundColor: '#ccc',
paddingHorizontal: 0,
minHeight: 80,
height: 'auto',
alignItems: 'flex-start'
},
detail_inner: {
flex: 1
},
detail_tit: {
fontSize: second_text_size,
color: '#A3A3A3',
fontFamily: font_family_regular
},
detail_sub_cont: {
backgroundColor: foundation_color,
padding: 20,
marginTop: 10
},
detail_footer: {
paddingHorizontal: 16
},
detail_sub_tit: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center'
},
detail_tit_text: {
color: '#000',
fontSize: 16,
fontFamily: font_family_regular
},
detail_icon: {
width: pxSize(20),
height: pxSize(20)
},
detail_icon_rig: {
width: pxSize(18),
height: pxSize(18)
},
detail_top_icon: {},
detail_sub_inner: {
marginTop: 10,
maxHeight: pxSize(160),
// flex: 1
},
detail_scroll: {
// flex: 1
// height: 100
},
con_de_sub: {
marginBottom: 10
},
de_sub_tit: {
color: second_text_color
},
de_tip: {
color: second_text_color
},
consu_addpic: {
backgroundColor: home_background_color,
paddingHorizontal: 0,
minHeight: pxHeight(320),
height: 'auto',
alignItems: 'flex-start',
marginBottom: 34
},
addpic_inner: {
flex: 1
},
addpic_tit: {
fontSize: second_text_size,
color: '#A3A3A3',
fontFamily: font_family_regular
},
addpic_cont: {
backgroundColor: foundation_color,
padding: 20,
marginTop: 10,
flexDirection: 'row',
flex: 1
},
addpic_img_btn: {
width: pxSize(68),
height: pxSize(68),
marginRight: 20
},
detail_btn_box: {
backgroundColor: promary_color,
width: '100%',
height: pxSize(46),
borderRadius: 5,
marginTop: 10
},
detail_btn: {
color: title_text_color,
textAlign: 'center',
fontSize: second_text_size,
lineHeight: 40
},
sub_btn_pro: {
backgroundColor: promary_color
},
sub_btn: {},
loding_back: {
backgroundColor: 'rgba(0, 0, 0, 0)'
}
})
const mapStateToProps = (state) => {
return {
userInfo: state.login.userInfo,
token: state.login.token,
loginState: state.login.loginState,
}
}
const mapDispatchToProps = (dispatch) => {
return {
// requestQuickOrganizations: (params) => {
// dispatch(requestQuickOrganizations(params))
// },
}
}
export default connect(mapStateToProps, mapDispatchToProps)(EquipConsuPage);
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
StyleSheet,
SafeAreaView,
TouchableOpacity,
Text,
Image
} from 'react-native';
import {
home_background_color,
promary_color,
safe_view,
pxHeight,
title_text_color,
second_text_color,
icon_style,
pxSize,
foundation_color,
second_text_size,
font_family_regular,
first_text_color,
promary_text_color
} from '../../../base/BaseStyle';
import StatusBarView from '../../common/StatusBarView';
import {
FooterBtnStyle,
CellTextStyle,
TitleTextStyle,
ContInputTextStyle
} from '../../common/CellTextStyle';
import { ScrollView } from 'react-native-gesture-handler';
import HeadBackItem from '../../common/HeadBackItem';
class TransSearchPage extends Component {
constructor(props) {
super(props);
this.state = { }
}
// 返回顶部查询
renderTopProItem() {
return(
<View style={styles.list_cont}>
<Text style={styles.search_top_tip}>查询条件,至少输入一个条件</Text>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={1}
>
<CellTextStyle style={styles.cell_box}>
<TitleTextStyle style={styles.cell_title}>{'序列号'}</TitleTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={'不支持模糊查询'}
defaultValue={''}
onChangeText={(text) => console.log('序列号=====', text)}
/>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={1}
>
<CellTextStyle style={styles.cell_box}>
<TitleTextStyle style={styles.cell_title}>{'来源借货订单号'}</TitleTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={'不支持模糊查询'}
defaultValue={''}
onChangeText={(text) => console.log('来源借货订单号=====', text)}
/>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={1}
>
<CellTextStyle style={styles.cell_box}>
<TitleTextStyle style={styles.cell_title}>{'物料名称'}</TitleTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={'不支持模糊查询'}
defaultValue={''}
onChangeText={(text) => console.log('物料名称=====', text)}
/>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={1}
>
<CellTextStyle style={styles.cell_box}>
<TitleTextStyle style={styles.cell_title}>{'手术名称'}</TitleTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={'不支持模糊查询'}
defaultValue={''}
onChangeText={(text) => console.log('手术名称=====', text)}
/>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={[styles.item_container, styles.item_btn_cont]}>
<TouchableOpacity
activeOpacity={.8}
style={styles.search_btn_box}
onPress={() => console.log('查询')}
>
<Text style={styles.search_btn}>查询</Text>
</TouchableOpacity>
</View>
</View>
)
}
// 返回主要查询内容
renderContItem() {
return(
<View style={styles.search_cont}>
<View style={styles.search_cont_inner}>
<Text style={styles.cont_tit}>
当前查询(5)数据
</Text>
<TouchableOpacity
activeOpacity={.8}
style={styles.tit_btn_box}
onPress={() => console.log('全选,取消全选')}
>
<Text style={styles.tit_btn}>全选</Text>
</TouchableOpacity>
</View>
<View style={styles.cont_list}>
<View style={styles.cont_list_item}>
<View style={styles.list_left}>
<TouchableOpacity
activeOpacity={.8}
style={styles.btn_single_box}
onPress={() => console.log('单选!!!')}
>
<Image style={icon_style} source={require('../../../images/add_icon.png')}/>
</TouchableOpacity>
</View>
<View style={styles.list_right}>
<Text style={styles.right_top_tit}>
人工髋关节假体-JS-HB ||| T人工髋关节假体-JS
</Text>
<Text style={styles.right_tip}>
SC20200506000006, SC20200506000006
</Text>
</View>
</View>
<View style={styles.cont_list_item}>
<View style={styles.list_left}>
<TouchableOpacity
activeOpacity={.8}
style={styles.btn_single_box}
onPress={() => console.log('单选!!!')}
>
<Image style={icon_style} source={require('../../../images/add_icon.png')}/>
</TouchableOpacity>
</View>
<View style={styles.list_right}>
<Text style={styles.right_top_tit}>
人工髋关节假体-JS-HB ||| T人工髋关节假体-JS
</Text>
<Text style={styles.right_tip}>
SC20200506000006, SC20200506000006
</Text>
</View>
</View>
<View style={styles.cont_list_item}>
<View style={styles.list_left}>
<TouchableOpacity
activeOpacity={.8}
style={styles.btn_single_box}
onPress={() => console.log('单选!!!')}
>
<Image style={icon_style} source={require('../../../images/add_icon.png')}/>
</TouchableOpacity>
</View>
<View style={styles.list_right}>
<Text style={styles.right_top_tit}>
人工髋关节假体-JS-HB ||| T人工髋关节假体-JS
</Text>
<Text style={styles.right_tip}>
SC20200506000006, SC20200506000006
</Text>
</View>
</View>
<View style={styles.cont_list_item}>
<View style={styles.list_left}>
<TouchableOpacity
activeOpacity={.8}
style={styles.btn_single_box}
onPress={() => console.log('单选!!!')}
>
<Image style={icon_style} source={require('../../../images/add_icon.png')}/>
</TouchableOpacity>
</View>
<View style={styles.list_right}>
<Text style={styles.right_top_tit}>
人工髋关节假体-JS-HB ||| T人工髋关节假体-JS
</Text>
<Text style={styles.right_tip}>
SC20200506000006, SC20200506000006
</Text>
</View>
</View>
</View>
</View>
)
}
render() {
let {navigation} = this.props
let {title} = navigation.state.params
return (
<View style={styles.search_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<View style={styles.search_main}>
<ScrollView style={styles.search_scroll}>
{this.renderTopProItem()}
{this.renderContItem()}
</ScrollView>
</View>
<FooterBtnStyle
style={styles.sub_btn_pro}
activeOpacity={.8}
title={'确定'}
textStyle= {styles.sub_btn}
onPress={() => console.warn('确定')}
/>
</SafeAreaView>
</View>
);
}
}
const styles = StyleSheet.create({
search_container: {
flex: 1,
backgroundColor: home_background_color,
padding: 0,
margin: 0
},
search_main: {
flex: 1
},
search_scroll: {
paddingTop: 16,
paddingHorizontal: 16
},
list_cont: {
flex: 1,
// alignItems: 'center'
},
item_container: {
flex: 1
},
item_btn_cont: {
alignItems: 'center',
justifyContent: 'center'
},
search_top_tip: {
fontSize: 14,
color: second_text_color,
marginBottom: 10
},
cell_box: {
height: 46,
marginBottom: 10
},
cell_title: {
width: 120
},
cell_input: {
textAlign: 'left'
},
search_btn_box: {
backgroundColor: promary_color,
height: 46,
width: '90%',
borderRadius: 5
},
search_btn: {
color: title_text_color,
lineHeight: 44,
textAlign: 'center',
fontSize: 16
},
search_cont:{
backgroundColor: foundation_color,
padding: 16,
marginTop: 20
},
search_cont_inner:{
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center'
},
cont_tit:{
fontSize: second_text_size,
fontFamily: font_family_regular,
color: promary_text_color
},
tit_btn_box:{
backgroundColor: promary_color,
height: 24,
borderRadius: 5,
width: 52
},
tit_btn:{
color: title_text_color,
lineHeight: 22,
textAlign: 'center',
fontSize: 14
},
cont_list:{},
cont_list_item:{
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center'
},
list_left:{},
btn_single_box:{
width: pxSize(30),
height: pxSize(30)
},
list_right:{
paddingLeft: 10,
paddingRight: 20
},
right_top_tit:{},
right_tip:{},
sub_btn_pro: {
backgroundColor: promary_color
},
})
export default TransSearchPage;
\ No newline at end of file
import {BaseUrl, BaseUrlOther, VERSION} from '../base/BaseConstants';
// const fetch = require("node-fetch");
//post方式请求
export const PostRequest = (url, paramsObject) => {
const opts = {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
timeout: 20000 //20s超时
};
if(paramsObject) {
opts.body = JSON.stringify(paramsObject)
}
return fetch(BaseUrl + VERSION + url, opts)
.then(response => response.json())
.then(data => data)
.catch(error => {
return {error_code: -3, error_msg:'请求异常,请重试'}
})
}
//get方式请求
export const GetRequest = (url) => {
const opts = {
method: 'GET',
headers: {
'Content-Type': 'application/json'
},
timeout: 20000 //20s超时
};
let endBashUrl = BaseUrl
if(!url.includes('/authorized_inventory/search')) {
endBashUrl = BaseUrlOther
}
let allUrl = endBashUrl + VERSION + url
// console.warn('---allUrl--=================--', allUrl)
// return fetch(BaseUrl + VERSION + url, opts)
return fetch(allUrl, opts)
.then(response => response.json())
.then(data => data)
.catch(error => {
return {error_code: -3, error_msg:'请求异常,请重试'}
})
};
//上传
export const UploadRequest = (url,datas) => {
const opts = {
method: 'POST',
body: datas,
// headers: {
// 'Content-Type': 'multipart/form-data'
// },
timeout: 20000 //20s超时
};
return fetch(`${BaseUrl}${VERSION}${url}`, opts)
.then(response => response.json())
.then(data => data)
.catch(error => {
console.log('error--------------------',error, Object.keys(error))
return {error_code: -3, error_msg:'请求异常,请重试'}
})
};
\ No newline at end of file
import storage from 'redux-persist/es/storage';
import {persistReducer} from 'redux-persist';
import login from './module/login';
import quick from './module/quick';
import selfOrder from './module/selfOrder';
const loginConfig = {
key: 'login',
storage,
debug: false,
blackList: []
}
const selfConfig = {
key: 'selfOrder',
storage,
debug: false,
blackList: []
}
const quickConfig = {
key: 'quick',
storage,
debug: false,
blackList: []
}
const rootReducer = {
login: persistReducer(loginConfig,login),
selfOrder: persistReducer(selfConfig,selfOrder),
quick: persistReducer(quickConfig,quick),
}
export default rootReducer;
\ No newline at end of file
import {
LOGIN_NO,
LOGIN_DOING,
LOGIN_SUCCESS,
LOGIN_FAILURE,
EXIT_LOGIN,
AUTO_LOGIN_SUCCESS,
AUTO_LOGIN_FAILURE
} from '../../base/ActionTypes';
// 登录状态
const defaultState = {
loginState:LOGIN_NO, // 登录状态
userInfo:{}, // 保存用户信息
token:null,
username:'',
password:''
}
export default login = (state = defaultState, action) => {
switch (action.type) {
case LOGIN_DOING:
return Object.assign({}, state, {
loginState: LOGIN_DOING
});
case LOGIN_SUCCESS:
return Object.assign({}, state, {
loginState:LOGIN_SUCCESS,
userInfo:action.rawData,
token:action.rawData.access_token,
username:action.username,
password:action.password
});
case LOGIN_FAILURE:
return Object.assign({}, state, {
loginState:LOGIN_FAILURE
});
case EXIT_LOGIN:
return Object.assign({}, state,{
token: null,
loginState:LOGIN_NO,
userInfo:{},
password: ''
});
case AUTO_LOGIN_SUCCESS:
return Object.assign({}, state, {
loginState: LOGIN_SUCCESS,
userInfo: action.rawData,
token: action.rawData.access_token
});
case AUTO_LOGIN_FAILURE:
return Object.assign({}, state, {
loginState: LOGIN_FAILURE
});
default: // need this for default case
return state
}
}
\ No newline at end of file
import {
QUICK_ORDER_LIST_NO,
QUICK_ORDER_LIST_DOING,
QUICK_ORDER_LIST_SUCCESS,
QUICK_ORDER_LIST_FAILURE,
QUICK_SUBMIT_NO,
QUICK_SUBMIT_DOING,
QUICK_SUBMIT_SUCCESS,
QUICK_SUBMIT_FAILURE
} from '../../base/ActionTypes';
// 快速下单状态
const defaultState = {
quick_list_status: QUICK_ORDER_LIST_NO, // 获取数据状态
submit_quick_order_status: QUICK_SUBMIT_NO, // 提交订单状态
quickOrderOption: {} // 当前临时存储数据
}
export default quick = (state = defaultState, action) => {
switch (action.type) {
case QUICK_ORDER_LIST_DOING:
return Object.assign({}, state, {
quick_list_status: QUICK_ORDER_LIST_DOING
});
case QUICK_ORDER_LIST_SUCCESS:
return Object.assign({}, state, {
quick_list_status: QUICK_ORDER_LIST_SUCCESS,
quickOrderOption: action.rawData
})
case QUICK_ORDER_LIST_FAILURE:
return Object.assign({}, state, {
quick_list_status: QUICK_ORDER_LIST_FAILURE
})
case QUICK_SUBMIT_DOING:
return Object.assign({}, state, {
submit_quick_order_status: QUICK_SUBMIT_DOING
});
case QUICK_SUBMIT_SUCCESS:
return Object.assign({}, state, {
submit_quick_order_status: QUICK_SUBMIT_SUCCESS,
quickOrderOption: action.rawData
// quickOrderOption: {} // 清空当前临时数据
})
case QUICK_SUBMIT_FAILURE:
return Object.assign({}, state, {
submit_quick_order_status: QUICK_SUBMIT_FAILURE
})
default:
return state;
}
}
\ No newline at end of file
import {
SELF_ORDER_LIST_NO,
SELF_ORDER_LIST_DOING,
SELF_ORDER_LIST_SUCCESS,
SELF_ORDER_LIST_FAILURE,
SELF_SUBMIT_NO,
SELF_SUBMIT_DOING,
SELF_SUBMIT_SUCCESS,
SELF_SUBMIT_FAILURE
} from '../../base/ActionTypes';
// 自助下单状态
const defaultState = {
self_list_status: SELF_ORDER_LIST_NO, // 获取数据状态
submit_self_order_status: SELF_SUBMIT_NO, // 提交订单状态
selfOrderOption: {} // 当前临时存储数据
}
export default selfOrder = (state = defaultState, action) => {
switch (action.type) {
case SELF_ORDER_LIST_DOING:
return Object.assign({}, state, {
self_list_status: SELF_ORDER_LIST_DOING
});
case SELF_ORDER_LIST_SUCCESS:
return Object.assign({}, state, {
self_list_status: SELF_ORDER_LIST_SUCCESS,
selfOrderOption: action.rawData
})
case SELF_ORDER_LIST_FAILURE:
return Object.assign({}, state, {
self_list_status: SELF_ORDER_LIST_FAILURE
})
case SELF_SUBMIT_DOING:
return Object.assign({}, state, {
submit_self_order_status: SELF_SUBMIT_DOING
});
case SELF_SUBMIT_SUCCESS:
return Object.assign({}, state, {
submit_self_order_status: SELF_SUBMIT_SUCCESS,
selfOrderOption: {} // 清空当前临时数据
})
case SELF_SUBMIT_FAILURE:
return Object.assign({}, state, {
submit_self_order_status: SELF_SUBMIT_FAILURE
})
default:
return state;
}
}
\ No newline at end of file
import {createStore, applyMiddleware, compose} from 'redux';
import thunkMiddleware from 'redux-thunk';
import rootReducer from '../reducers';
import {persistStore,persistCombineReducers} from 'redux-persist';
import reconciler from 'redux-persist/lib/stateReconciler/autoMergeLevel2';
import storage from 'redux-persist/es/storage';
const config = {
key: 'root',
storage,
stateReconciler: reconciler,
debug: false
}
const middleWares = [
thunkMiddleware
];
const reducers = persistCombineReducers(config,rootReducer);
const enhances = [applyMiddleware(...middleWares)];
export default function configureStore(initialState) {
const store = createStore(reducers,initialState,compose(...enhances));
persistStore(store); //暂时磁盘保存数据
return store
}
import Toast from 'react-native-root-toast';
import {Dimensions, Platform,PixelRatio} from "react-native";
export const show = (data) => {
if(data != null) {
Toast.show(data, {
duration: Toast.durations.LONG,
position: Toast.positions.CENTER,
shadow: true,
hideOnPress: true,
delay: 0,
visible: true,
backgroundColor: '#222',
textColor: '#fff'
})
}
}
// 判断属性是否为空
export const isEmpty = (data) => {
let flag = false
if(!data || data == '') {
flag = true
}
return flag
}
const X_WIDTH = 375;
const X_HEIGHT = 812;
const XS_MAX_WIDTH = 414;
const XS_MAX_HEIGHT = 896;
const screenW = Dimensions.get('window').width;
const screenH = Dimensions.get('window').height;
//判断是否iPhone x
export const isIphoneX = () => {
return (
Platform.OS === 'ios' &&
((screenH === X_HEIGHT && screenW === X_WIDTH) ||
(screenH === XS_MAX_HEIGHT && screenW === XS_MAX_WIDTH))
)
};
// 修改日期格式 2020-04-23 17:41 yyyy-MM-ddThh:mm:ss
export const changeDateFormat = (time, format) => {
if( time === '' || !time ){ return }
let _time = new Date(time);
let date = {
"M+": _time.getMonth() + 1,
"d+": _time.getDate(),
"h+": _time.getHours(),
"m+": _time.getMinutes(),
"s+": _time.getSeconds(),
"q+": Math.floor((_time.getMonth() + 3) / 3),
"S+": _time.getMilliseconds()
};
if (/(y+)/i.test(format)) {
format = format.replace(RegExp.$1, (_time.getFullYear() + '').substr(4 - RegExp.$1.length));
}
for (let k in date) {
if (new RegExp("(" + k + ")").test(format)) {
format = format.replace(RegExp.$1, RegExp.$1.length == 1
? date[k] : ("00" + date[k]).substr(("" + date[k]).length));
}
}
return format;
}
// 格式化 2020-04-23 17:41 为日期
export const formatStrForDate = (str) => {
console.warn('str---', str)
if(str === '' || !str) {
return
}
let date
let tempArr = str.split('-')
let endArr = tempArr[2].split(' ')
let hsArr = endArr[1].split(':')
let dateObj = {
'year': tempArr[0],
'month': tempArr[1] - 1,
'day': endArr[0],
'hour': hsArr[0],
'minute': hsArr[1]
}
date = new Date(dateObj['year'], dateObj['month'], dateObj['day'], dateObj['hour'], dateObj['minute'])
console.warn('----date---', date)
return date
}
/**
* 拼接get请求url与参数
* @param {String} url 接口地址
* @param {Object} params 请求参数
*/
export const getUrlParams = (url, params) => {
let paramsArray = [];
// params = {
// access_token : 'token1313i12213',
// org_code: 'A02',
// eller_code : 'shi.ming'
// }
Object.keys(params).forEach(
key => paramsArray.push(`${key}=${params[key]}`)
)
if (url.search(/\?/) === -1) {
url += `?${paramsArray.join('&')}`
} else {
url += `&${paramsArray.join('&')}`
}
return url;
}
/**
* 去重引用类型数组
* @param {Array} arr 原数组
* @param {String} typeName 去重的唯一字段
*/
export const dedupQuoteArray = (arr, typeName) => {
let result = [], tmp = {}
if( arr.length ) {
result = arr.reduce(function(init, item) {
tmp[item[typeName]] ? '' : ( tmp[item[typeName]] = true && init.push(item) )
return init
}, [])
}
return result;
}
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
};
/**
* @format
*/
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
AppRegistry.registerComponent(appName, () => App);
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>NSAppTransportSecurity</key>
<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; };
00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; };
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; };
00E356F31AD99517003FC87E /* PDA_RFIDTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* PDA_RFIDTests.m */; };
11D1A2F320CAFA9E000508D9 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; };
139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; };
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; };
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; };
2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; };
2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; };
2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; };
2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; };
2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; };
2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; };
2DCD954D1E0B4F2C00145EB5 /* PDA_RFIDTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* PDA_RFIDTests.m */; };
2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
3E028CD25A564E67B3B55F24 /* libRNDatePicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 67399C8EA78C4BEDA847DDEF /* libRNDatePicker.a */; };
65BEABC78CB1435295C21F02 /* libRNGestureHandler.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 730265197E5E42D1A14A4717 /* libRNGestureHandler.a */; };
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
88CAEBA54E5746A78BA79551 /* libRNSound.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 121F5A6F6E4F4207B3CA5455 /* libRNSound.a */; };
ACF1FB18A05A4930BA1A46F2 /* libRNImagePicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 069FBE1A106F49F0B345CCD9 /* libRNImagePicker.a */; };
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
D98312E504E2439AAA109AE3 /* libRNGestureHandler-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE2C89BB3C244312ABEAEFC1 /* libRNGestureHandler-tvOS.a */; };
ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED297162215061F000B7C4FE /* JavaScriptCore.framework */; };
ED2971652150620600B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED2971642150620600B7C4FE /* JavaScriptCore.framework */; };
F9EB748DC391465A81C62C1C /* libRNAudio.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D8D7DE661B94B83AA9AF4C6 /* libRNAudio.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 134814201AA4EA6300B7C361;
remoteInfo = RCTActionSheet;
};
00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 134814201AA4EA6300B7C361;
remoteInfo = RCTGeolocation;
};
00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 58B5115D1A9E6B3D00147676;
remoteInfo = RCTImage;
};
00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 58B511DB1A9E6C8500147676;
remoteInfo = RCTNetwork;
};
00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 832C81801AAF6DEF007FA2F7;
remoteInfo = RCTVibration;
};
00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
remoteInfo = PDA_RFID;
};
139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 134814201AA4EA6300B7C361;
remoteInfo = RCTSettings;
};
139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3C86DF461ADF2C930047B81A;
remoteInfo = RCTWebSocket;
};
146834031AC3E56700842450 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
remoteInfo = React;
};
2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7;
remoteInfo = "PDA_RFID-tvOS";
};
2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = ADD01A681E09402E00F6D226;
remoteInfo = "RCTBlob-tvOS";
};
2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3DBE0D001F3B181A0099AA32;
remoteInfo = fishhook;
};
2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32;
remoteInfo = "fishhook-tvOS";
};
2DF0FFDE2056DD460020B375 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = EBF21BDC1FC498900052F4D5;
remoteInfo = jsinspector;
};
2DF0FFE02056DD460020B375 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = EBF21BFA1FC4989A0052F4D5;
remoteInfo = "jsinspector-tvOS";
};
2DF0FFE22056DD460020B375 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 139D7ECE1E25DB7D00323FB7;
remoteInfo = "third-party";
};
2DF0FFE42056DD460020B375 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D383D3C1EBD27B6005632C8;
remoteInfo = "third-party-tvOS";
};
2DF0FFE62056DD460020B375 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 139D7E881E25C6D100323FB7;
remoteInfo = "double-conversion";
};
2DF0FFE82056DD460020B375 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D383D621EBD27B9005632C8;
remoteInfo = "double-conversion-tvOS";
};
3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A283A1D9B042B00D4039D;
remoteInfo = "RCTImage-tvOS";
};
3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28471D9B043800D4039D;
remoteInfo = "RCTLinking-tvOS";
};
3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28541D9B044C00D4039D;
remoteInfo = "RCTNetwork-tvOS";
};
3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28611D9B046600D4039D;
remoteInfo = "RCTSettings-tvOS";
};
3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A287B1D9B048500D4039D;
remoteInfo = "RCTText-tvOS";
};
3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28881D9B049200D4039D;
remoteInfo = "RCTWebSocket-tvOS";
};
3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28131D9B038B00D4039D;
remoteInfo = "React-tvOS";
};
3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3C059A1DE3340900C268FA;
remoteInfo = yoga;
};
3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3C06751DE3340C00C268FA;
remoteInfo = "yoga-tvOS";
};
3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4;
remoteInfo = cxxreact;
};
3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4;
remoteInfo = "cxxreact-tvOS";
};
5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 134814201AA4EA6300B7C361;
remoteInfo = RCTAnimation;
};
5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28201D9B03D100D4039D;
remoteInfo = "RCTAnimation-tvOS";
};
78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 134814201AA4EA6300B7C361;
remoteInfo = RCTLinking;
};
832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 58B5119B1A9E6C1200147676;
remoteInfo = RCTText;
};
ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 358F4ED71D1E81A9004DF814;
remoteInfo = RCTBlob;
};
EC51DE3322AF890D00C955B3 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = EDEBC6D6214B3E7000DD5AC8;
remoteInfo = jsi;
};
EC51DE3522AF890D00C955B3 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = EDEBC73B214B45A300DD5AC8;
remoteInfo = jsiexecutor;
};
EC51DE3722AF890D00C955B3 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = ED296FB6214C9A0900B7C4FE;
remoteInfo = "jsi-tvOS";
};
EC51DE3922AF890D00C955B3 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = ED296FEE214C9CF800B7C4FE;
remoteInfo = "jsiexecutor-tvOS";
};
EC51DEA122AFB35000C955B3 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = A7AFC4F5B1A545C49C8944D9 /* RNGestureHandler.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 134814201AA4EA6300B7C361;
remoteInfo = RNGestureHandler;
};
EC51DEA322AFB35000C955B3 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = A7AFC4F5B1A545C49C8944D9 /* RNGestureHandler.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = B5C32A36220C603B000FFB8D;
remoteInfo = "RNGestureHandler-tvOS";
};
EC915165246E8EE60033C1FB /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 62133341ABB249C2ADB4C6FE /* RNImagePicker.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 014A3B5C1C6CF33500B6D375;
remoteInfo = RNImagePicker;
};
EC915168246E8EE60033C1FB /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 29DB9EF482CF4FD09F4707E5 /* RNSound.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 19825A1E1BD4A89800EE0337;
remoteInfo = RNSound;
};
EC91516D246E8EE70033C1FB /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 10F45BF7CF554DA3854C4EA4 /* RNAudio.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 42F559BA1CFC90C400DC3F84;
remoteInfo = RNAudio;
};
EC915172246E8EE70033C1FB /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 66EC9019452D4DE4B8BF088F /* RNDatePicker.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = DA5891D81BA9A9FC002B4DB2;
remoteInfo = RNDatePicker;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = "<group>"; };
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = "<group>"; };
00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = "<group>"; };
00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = "<group>"; };
00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = "<group>"; };
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = "<group>"; };
00E356EE1AD99517003FC87E /* PDA_RFIDTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PDA_RFIDTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* PDA_RFIDTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PDA_RFIDTests.m; sourceTree = "<group>"; };
069FBE1A106F49F0B345CCD9 /* libRNImagePicker.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNImagePicker.a; sourceTree = "<group>"; };
10F45BF7CF554DA3854C4EA4 /* RNAudio.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNAudio.xcodeproj; path = "../node_modules/react-native-audio/ios/RNAudio.xcodeproj"; sourceTree = "<group>"; };
121F5A6F6E4F4207B3CA5455 /* libRNSound.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNSound.a; sourceTree = "<group>"; };
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; };
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* PDA_RFID.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PDA_RFID.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = PDA_RFID/AppDelegate.h; sourceTree = "<group>"; };
13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = PDA_RFID/AppDelegate.m; sourceTree = "<group>"; };
13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = PDA_RFID/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = PDA_RFID/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = PDA_RFID/main.m; sourceTree = "<group>"; };
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
29DB9EF482CF4FD09F4707E5 /* RNSound.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNSound.xcodeproj; path = "../node_modules/react-native-sound/RNSound.xcodeproj"; sourceTree = "<group>"; };
2D02E47B1E0B4A5D006451C7 /* PDA_RFID-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "PDA_RFID-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
2D02E4901E0B4A5D006451C7 /* PDA_RFID-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "PDA_RFID-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
3D8D7DE661B94B83AA9AF4C6 /* libRNAudio.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNAudio.a; sourceTree = "<group>"; };
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
62133341ABB249C2ADB4C6FE /* RNImagePicker.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNImagePicker.xcodeproj; path = "../node_modules/react-native-image-picker/ios/RNImagePicker.xcodeproj"; sourceTree = "<group>"; };
66EC9019452D4DE4B8BF088F /* RNDatePicker.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNDatePicker.xcodeproj; path = "../node_modules/react-native-date-picker/ios/RNDatePicker.xcodeproj"; sourceTree = "<group>"; };
67399C8EA78C4BEDA847DDEF /* libRNDatePicker.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNDatePicker.a; sourceTree = "<group>"; };
730265197E5E42D1A14A4717 /* libRNGestureHandler.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNGestureHandler.a; sourceTree = "<group>"; };
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
A7AFC4F5B1A545C49C8944D9 /* RNGestureHandler.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNGestureHandler.xcodeproj; path = "../node_modules/react-native-gesture-handler/ios/RNGestureHandler.xcodeproj"; sourceTree = "<group>"; };
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
BE2C89BB3C244312ABEAEFC1 /* libRNGestureHandler-tvOS.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = "libRNGestureHandler-tvOS.a"; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
00E356EB1AD99517003FC87E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */,
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */,
11D1A2F320CAFA9E000508D9 /* libRCTAnimation.a in Frameworks */,
146834051AC3E58100842450 /* libReact.a in Frameworks */,
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */,
133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */,
00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */,
139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */,
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
65BEABC78CB1435295C21F02 /* libRNGestureHandler.a in Frameworks */,
ACF1FB18A05A4930BA1A46F2 /* libRNImagePicker.a in Frameworks */,
F9EB748DC391465A81C62C1C /* libRNAudio.a in Frameworks */,
88CAEBA54E5746A78BA79551 /* libRNSound.a in Frameworks */,
3E028CD25A564E67B3B55F24 /* libRNDatePicker.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2D02E4781E0B4A5D006451C7 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
ED2971652150620600B7C4FE /* JavaScriptCore.framework in Frameworks */,
2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */,
2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */,
2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */,
2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */,
2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */,
2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */,
2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */,
2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */,
D98312E504E2439AAA109AE3 /* libRNGestureHandler-tvOS.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2D02E48D1E0B4A5D006451C7 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
00C302A81ABCB8CE00DB3ED1 /* Products */ = {
isa = PBXGroup;
children = (
00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */,
);
name = Products;
sourceTree = "<group>";
};
00C302B61ABCB90400DB3ED1 /* Products */ = {
isa = PBXGroup;
children = (
00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */,
);
name = Products;
sourceTree = "<group>";
};
00C302BC1ABCB91800DB3ED1 /* Products */ = {
isa = PBXGroup;
children = (
00C302C01ABCB91800DB3ED1 /* libRCTImage.a */,
3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
};
00C302D41ABCB9D200DB3ED1 /* Products */ = {
isa = PBXGroup;
children = (
00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */,
3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
};
00C302E01ABCB9EE00DB3ED1 /* Products */ = {
isa = PBXGroup;
children = (
00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */,
);
name = Products;
sourceTree = "<group>";
};
00E356EF1AD99517003FC87E /* PDA_RFIDTests */ = {
isa = PBXGroup;
children = (
00E356F21AD99517003FC87E /* PDA_RFIDTests.m */,
00E356F01AD99517003FC87E /* Supporting Files */,
);
path = PDA_RFIDTests;
sourceTree = "<group>";
};
00E356F01AD99517003FC87E /* Supporting Files */ = {
isa = PBXGroup;
children = (
00E356F11AD99517003FC87E /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
139105B71AF99BAD00B5F7CC /* Products */ = {
isa = PBXGroup;
children = (
139105C11AF99BAD00B5F7CC /* libRCTSettings.a */,
3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
};
139FDEE71B06529A00C62182 /* Products */ = {
isa = PBXGroup;
children = (
139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */,
2D16E6841FA4F8DC00B85C8A /* libfishhook.a */,
2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
};
13B07FAE1A68108700A75B9A /* PDA_RFID */ = {
isa = PBXGroup;
children = (
008F07F21AC5B25A0029DE68 /* main.jsbundle */,
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
13B07FB01A68108700A75B9A /* AppDelegate.m */,
13B07FB51A68108700A75B9A /* Images.xcassets */,
13B07FB61A68108700A75B9A /* Info.plist */,
13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
13B07FB71A68108700A75B9A /* main.m */,
);
name = PDA_RFID;
sourceTree = "<group>";
};
146834001AC3E56700842450 /* Products */ = {
isa = PBXGroup;
children = (
146834041AC3E56700842450 /* libReact.a */,
3DAD3EA31DF850E9000B6D8A /* libReact.a */,
3DAD3EA51DF850E9000B6D8A /* libyoga.a */,
3DAD3EA71DF850E9000B6D8A /* libyoga.a */,
3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */,
3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */,
2DF0FFDF2056DD460020B375 /* libjsinspector.a */,
2DF0FFE12056DD460020B375 /* libjsinspector-tvOS.a */,
2DF0FFE32056DD460020B375 /* libthird-party.a */,
2DF0FFE52056DD460020B375 /* libthird-party.a */,
2DF0FFE72056DD460020B375 /* libdouble-conversion.a */,
2DF0FFE92056DD460020B375 /* libdouble-conversion.a */,
EC51DE3422AF890D00C955B3 /* libjsi.a */,
EC51DE3622AF890D00C955B3 /* libjsiexecutor.a */,
EC51DE3822AF890D00C955B3 /* libjsi-tvOS.a */,
EC51DE3A22AF890D00C955B3 /* libjsiexecutor-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
};
2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
isa = PBXGroup;
children = (
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
2D16E6891FA4F8E400B85C8A /* libReact.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
5E91572E1DD0AC6500FF2AA8 /* Products */ = {
isa = PBXGroup;
children = (
5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */,
5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */,
);
name = Products;
sourceTree = "<group>";
};
78C398B11ACF4ADC00677621 /* Products */ = {
isa = PBXGroup;
children = (
78C398B91ACF4ADC00677621 /* libRCTLinking.a */,
3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
};
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
isa = PBXGroup;
children = (
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */,
146833FF1AC3E56700842450 /* React.xcodeproj */,
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */,
00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */,
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */,
00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */,
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */,
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
A7AFC4F5B1A545C49C8944D9 /* RNGestureHandler.xcodeproj */,
62133341ABB249C2ADB4C6FE /* RNImagePicker.xcodeproj */,
10F45BF7CF554DA3854C4EA4 /* RNAudio.xcodeproj */,
29DB9EF482CF4FD09F4707E5 /* RNSound.xcodeproj */,
66EC9019452D4DE4B8BF088F /* RNDatePicker.xcodeproj */,
);
name = Libraries;
sourceTree = "<group>";
};
832341B11AAA6A8300B99B32 /* Products */ = {
isa = PBXGroup;
children = (
832341B51AAA6A8300B99B32 /* libRCTText.a */,
3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
};
83CBB9F61A601CBA00E9B192 = {
isa = PBXGroup;
children = (
13B07FAE1A68108700A75B9A /* PDA_RFID */,
832341AE1AAA6A7D00B99B32 /* Libraries */,
00E356EF1AD99517003FC87E /* PDA_RFIDTests */,
83CBBA001A601CBA00E9B192 /* Products */,
2D16E6871FA4F8E400B85C8A /* Frameworks */,
EC51DE7722AFB34F00C955B3 /* Recovered References */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
usesTabs = 0;
};
83CBBA001A601CBA00E9B192 /* Products */ = {
isa = PBXGroup;
children = (
13B07F961A680F5B00A75B9A /* PDA_RFID.app */,
00E356EE1AD99517003FC87E /* PDA_RFIDTests.xctest */,
2D02E47B1E0B4A5D006451C7 /* PDA_RFID-tvOS.app */,
2D02E4901E0B4A5D006451C7 /* PDA_RFID-tvOSTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
ADBDB9201DFEBF0600ED6528 /* Products */ = {
isa = PBXGroup;
children = (
ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */,
2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
};
EC51DE7722AFB34F00C955B3 /* Recovered References */ = {
isa = PBXGroup;
children = (
730265197E5E42D1A14A4717 /* libRNGestureHandler.a */,
BE2C89BB3C244312ABEAEFC1 /* libRNGestureHandler-tvOS.a */,
069FBE1A106F49F0B345CCD9 /* libRNImagePicker.a */,
3D8D7DE661B94B83AA9AF4C6 /* libRNAudio.a */,
121F5A6F6E4F4207B3CA5455 /* libRNSound.a */,
67399C8EA78C4BEDA847DDEF /* libRNDatePicker.a */,
);
name = "Recovered References";
sourceTree = "<group>";
};
EC51DE9D22AFB35000C955B3 /* Products */ = {
isa = PBXGroup;
children = (
EC51DEA222AFB35000C955B3 /* libRNGestureHandler.a */,
EC51DEA422AFB35000C955B3 /* libRNGestureHandler-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
};
EC915160246E8EE60033C1FB /* Products */ = {
isa = PBXGroup;
children = (
EC915169246E8EE60033C1FB /* libRNSound.a */,
);
name = Products;
sourceTree = "<group>";
};
EC915162246E8EE60033C1FB /* Products */ = {
isa = PBXGroup;
children = (
EC915166246E8EE60033C1FB /* libRNImagePicker.a */,
);
name = Products;
sourceTree = "<group>";
};
EC91516A246E8EE70033C1FB /* Products */ = {
isa = PBXGroup;
children = (
EC91516E246E8EE70033C1FB /* libRNAudio.a */,
);
name = Products;
sourceTree = "<group>";
};
EC91516F246E8EE70033C1FB /* Products */ = {
isa = PBXGroup;
children = (
EC915173246E8EE70033C1FB /* libRNDatePicker.a */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
00E356ED1AD99517003FC87E /* PDA_RFIDTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "PDA_RFIDTests" */;
buildPhases = (
00E356EA1AD99517003FC87E /* Sources */,
00E356EB1AD99517003FC87E /* Frameworks */,
00E356EC1AD99517003FC87E /* Resources */,
);
buildRules = (
);
dependencies = (
00E356F51AD99517003FC87E /* PBXTargetDependency */,
);
name = PDA_RFIDTests;
productName = PDA_RFIDTests;
productReference = 00E356EE1AD99517003FC87E /* PDA_RFIDTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
13B07F861A680F5B00A75B9A /* PDA_RFID */ = {
isa = PBXNativeTarget;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "PDA_RFID" */;
buildPhases = (
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
);
buildRules = (
);
dependencies = (
);
name = PDA_RFID;
productName = "Hello World";
productReference = 13B07F961A680F5B00A75B9A /* PDA_RFID.app */;
productType = "com.apple.product-type.application";
};
2D02E47A1E0B4A5D006451C7 /* PDA_RFID-tvOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "PDA_RFID-tvOS" */;
buildPhases = (
2D02E4771E0B4A5D006451C7 /* Sources */,
2D02E4781E0B4A5D006451C7 /* Frameworks */,
2D02E4791E0B4A5D006451C7 /* Resources */,
2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */,
);
buildRules = (
);
dependencies = (
);
name = "PDA_RFID-tvOS";
productName = "PDA_RFID-tvOS";
productReference = 2D02E47B1E0B4A5D006451C7 /* PDA_RFID-tvOS.app */;
productType = "com.apple.product-type.application";
};
2D02E48F1E0B4A5D006451C7 /* PDA_RFID-tvOSTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "PDA_RFID-tvOSTests" */;
buildPhases = (
2D02E48C1E0B4A5D006451C7 /* Sources */,
2D02E48D1E0B4A5D006451C7 /* Frameworks */,
2D02E48E1E0B4A5D006451C7 /* Resources */,
);
buildRules = (
);
dependencies = (
2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */,
);
name = "PDA_RFID-tvOSTests";
productName = "PDA_RFID-tvOSTests";
productReference = 2D02E4901E0B4A5D006451C7 /* PDA_RFID-tvOSTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
83CBB9F71A601CBA00E9B192 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 940;
ORGANIZATIONNAME = Facebook;
TargetAttributes = {
00E356ED1AD99517003FC87E = {
CreatedOnToolsVersion = 6.2;
DevelopmentTeam = CSFK8Z6S48;
TestTargetID = 13B07F861A680F5B00A75B9A;
};
13B07F861A680F5B00A75B9A = {
DevelopmentTeam = CSFK8Z6S48;
};
2D02E47A1E0B4A5D006451C7 = {
CreatedOnToolsVersion = 8.2.1;
ProvisioningStyle = Automatic;
};
2D02E48F1E0B4A5D006451C7 = {
CreatedOnToolsVersion = 8.2.1;
ProvisioningStyle = Automatic;
TestTargetID = 2D02E47A1E0B4A5D006451C7;
};
};
};
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "PDA_RFID" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 83CBB9F61A601CBA00E9B192;
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
},
{
ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */;
ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
},
{
ProductGroup = ADBDB9201DFEBF0600ED6528 /* Products */;
ProjectRef = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
},
{
ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
},
{
ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */;
ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
},
{
ProductGroup = 78C398B11ACF4ADC00677621 /* Products */;
ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
},
{
ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */;
ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
},
{
ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */;
ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
},
{
ProductGroup = 832341B11AAA6A8300B99B32 /* Products */;
ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
},
{
ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */;
ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
},
{
ProductGroup = 139FDEE71B06529A00C62182 /* Products */;
ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
},
{
ProductGroup = 146834001AC3E56700842450 /* Products */;
ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
},
{
ProductGroup = EC91516A246E8EE70033C1FB /* Products */;
ProjectRef = 10F45BF7CF554DA3854C4EA4 /* RNAudio.xcodeproj */;
},
{
ProductGroup = EC91516F246E8EE70033C1FB /* Products */;
ProjectRef = 66EC9019452D4DE4B8BF088F /* RNDatePicker.xcodeproj */;
},
{
ProductGroup = EC51DE9D22AFB35000C955B3 /* Products */;
ProjectRef = A7AFC4F5B1A545C49C8944D9 /* RNGestureHandler.xcodeproj */;
},
{
ProductGroup = EC915162246E8EE60033C1FB /* Products */;
ProjectRef = 62133341ABB249C2ADB4C6FE /* RNImagePicker.xcodeproj */;
},
{
ProductGroup = EC915160246E8EE60033C1FB /* Products */;
ProjectRef = 29DB9EF482CF4FD09F4707E5 /* RNSound.xcodeproj */;
},
);
projectRoot = "";
targets = (
13B07F861A680F5B00A75B9A /* PDA_RFID */,
00E356ED1AD99517003FC87E /* PDA_RFIDTests */,
2D02E47A1E0B4A5D006451C7 /* PDA_RFID-tvOS */,
2D02E48F1E0B4A5D006451C7 /* PDA_RFID-tvOSTests */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTActionSheet.a;
remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTGeolocation.a;
remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTImage.a;
remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTNetwork.a;
remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTVibration.a;
remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTSettings.a;
remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTWebSocket.a;
remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
146834041AC3E56700842450 /* libReact.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libReact.a;
remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTBlob-tvOS.a";
remoteRef = 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2D16E6841FA4F8DC00B85C8A /* libfishhook.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libfishhook.a;
remoteRef = 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libfishhook-tvOS.a";
remoteRef = 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2DF0FFDF2056DD460020B375 /* libjsinspector.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libjsinspector.a;
remoteRef = 2DF0FFDE2056DD460020B375 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2DF0FFE12056DD460020B375 /* libjsinspector-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libjsinspector-tvOS.a";
remoteRef = 2DF0FFE02056DD460020B375 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2DF0FFE32056DD460020B375 /* libthird-party.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libthird-party.a";
remoteRef = 2DF0FFE22056DD460020B375 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2DF0FFE52056DD460020B375 /* libthird-party.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libthird-party.a";
remoteRef = 2DF0FFE42056DD460020B375 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2DF0FFE72056DD460020B375 /* libdouble-conversion.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libdouble-conversion.a";
remoteRef = 2DF0FFE62056DD460020B375 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2DF0FFE92056DD460020B375 /* libdouble-conversion.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libdouble-conversion.a";
remoteRef = 2DF0FFE82056DD460020B375 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTImage-tvOS.a";
remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTLinking-tvOS.a";
remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTNetwork-tvOS.a";
remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTSettings-tvOS.a";
remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTText-tvOS.a";
remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRCTWebSocket-tvOS.a";
remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3EA31DF850E9000B6D8A /* libReact.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libReact.a;
remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libyoga.a;
remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libyoga.a;
remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libcxxreact.a;
remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libcxxreact.a;
remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTAnimation.a;
remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTAnimation.a;
remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTLinking.a;
remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
832341B51AAA6A8300B99B32 /* libRCTText.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTText.a;
remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTBlob.a;
remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
EC51DE3422AF890D00C955B3 /* libjsi.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libjsi.a;
remoteRef = EC51DE3322AF890D00C955B3 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
EC51DE3622AF890D00C955B3 /* libjsiexecutor.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libjsiexecutor.a;
remoteRef = EC51DE3522AF890D00C955B3 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
EC51DE3822AF890D00C955B3 /* libjsi-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libjsi-tvOS.a";
remoteRef = EC51DE3722AF890D00C955B3 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
EC51DE3A22AF890D00C955B3 /* libjsiexecutor-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libjsiexecutor-tvOS.a";
remoteRef = EC51DE3922AF890D00C955B3 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
EC51DEA222AFB35000C955B3 /* libRNGestureHandler.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRNGestureHandler.a;
remoteRef = EC51DEA122AFB35000C955B3 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
EC51DEA422AFB35000C955B3 /* libRNGestureHandler-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libRNGestureHandler-tvOS.a";
remoteRef = EC51DEA322AFB35000C955B3 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
EC915166246E8EE60033C1FB /* libRNImagePicker.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRNImagePicker.a;
remoteRef = EC915165246E8EE60033C1FB /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
EC915169246E8EE60033C1FB /* libRNSound.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRNSound.a;
remoteRef = EC915168246E8EE60033C1FB /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
EC91516E246E8EE70033C1FB /* libRNAudio.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRNAudio.a;
remoteRef = EC91516D246E8EE70033C1FB /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
EC915173246E8EE70033C1FB /* libRNDatePicker.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRNDatePicker.a;
remoteRef = EC915172246E8EE70033C1FB /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
00E356EC1AD99517003FC87E /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
13B07F8E1A680F5B00A75B9A /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2D02E4791E0B4A5D006451C7 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2D02E48E1E0B4A5D006451C7 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Bundle React Native code and images";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
};
2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Bundle React Native Code And Images";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
00E356EA1AD99517003FC87E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
00E356F31AD99517003FC87E /* PDA_RFIDTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
13B07F871A680F5B00A75B9A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
13B07FC11A68108700A75B9A /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2D02E4771E0B4A5D006451C7 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */,
2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2D02E48C1E0B4A5D006451C7 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2DCD954D1E0B4F2C00145EB5 /* PDA_RFIDTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 13B07F861A680F5B00A75B9A /* PDA_RFID */;
targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
};
2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 2D02E47A1E0B4A5D006451C7 /* PDA_RFID-tvOS */;
targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
isa = PBXVariantGroup;
children = (
13B07FB21A68108700A75B9A /* Base */,
);
name = LaunchScreen.xib;
path = PDA_RFID;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
00E356F61AD99517003FC87E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
DEVELOPMENT_TEAM = CSFK8Z6S48;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
"$(SRCROOT)/../node_modules/react-native-audio/ios",
"$(SRCROOT)/../node_modules/react-native-sound/RNSound",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
INFOPLIST_FILE = PDA_RFIDTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PDA_RFID.app/PDA_RFID";
};
name = Debug;
};
00E356F71AD99517003FC87E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
COPY_PHASE_STRIP = NO;
DEVELOPMENT_TEAM = CSFK8Z6S48;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
"$(SRCROOT)/../node_modules/react-native-audio/ios",
"$(SRCROOT)/../node_modules/react-native-sound/RNSound",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
INFOPLIST_FILE = PDA_RFIDTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PDA_RFID.app/PDA_RFID";
};
name = Release;
};
13B07F941A680F5B00A75B9A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = CSFK8Z6S48;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
"$(SRCROOT)/../node_modules/react-native-audio/ios",
"$(SRCROOT)/../node_modules/react-native-sound/RNSound",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
INFOPLIST_FILE = PDA_RFID/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = PDA_RFID;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
13B07F951A680F5B00A75B9A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = CSFK8Z6S48;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
"$(SRCROOT)/../node_modules/react-native-audio/ios",
"$(SRCROOT)/../node_modules/react-native-sound/RNSound",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
INFOPLIST_FILE = PDA_RFID/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = PDA_RFID;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
2D02E4971E0B4A5E006451C7 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
"$(SRCROOT)/../node_modules/react-native-audio/ios",
"$(SRCROOT)/../node_modules/react-native-sound/RNSound",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
INFOPLIST_FILE = "PDA_RFID-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.PDA_RFID-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.2;
};
name = Debug;
};
2D02E4981E0B4A5E006451C7 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_NO_COMMON_BLOCKS = YES;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
"$(SRCROOT)/../node_modules/react-native-audio/ios",
"$(SRCROOT)/../node_modules/react-native-sound/RNSound",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
INFOPLIST_FILE = "PDA_RFID-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.PDA_RFID-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.2;
};
name = Release;
};
2D02E4991E0B4A5E006451C7 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
"$(SRCROOT)/../node_modules/react-native-audio/ios",
"$(SRCROOT)/../node_modules/react-native-sound/RNSound",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
INFOPLIST_FILE = "PDA_RFID-tvOSTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.PDA_RFID-tvOSTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PDA_RFID-tvOS.app/PDA_RFID-tvOS";
TVOS_DEPLOYMENT_TARGET = 10.1;
};
name = Debug;
};
2D02E49A1E0B4A5E006451C7 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_NO_COMMON_BLOCKS = YES;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
"$(SRCROOT)/../node_modules/react-native-audio/ios",
"$(SRCROOT)/../node_modules/react-native-sound/RNSound",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
INFOPLIST_FILE = "PDA_RFID-tvOSTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.PDA_RFID-tvOSTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PDA_RFID-tvOS.app/PDA_RFID-tvOS";
TVOS_DEPLOYMENT_TARGET = 10.1;
};
name = Release;
};
83CBBA201A601CBA00E9B192 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
};
83CBBA211A601CBA00E9B192 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "PDA_RFIDTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
00E356F61AD99517003FC87E /* Debug */,
00E356F71AD99517003FC87E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "PDA_RFID" */ = {
isa = XCConfigurationList;
buildConfigurations = (
13B07F941A680F5B00A75B9A /* Debug */,
13B07F951A680F5B00A75B9A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "PDA_RFID-tvOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
2D02E4971E0B4A5E006451C7 /* Debug */,
2D02E4981E0B4A5E006451C7 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "PDA_RFID-tvOSTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
2D02E4991E0B4A5E006451C7 /* Debug */,
2D02E49A1E0B4A5E006451C7 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "PDA_RFID" */ = {
isa = XCConfigurationList;
buildConfigurations = (
83CBBA201A601CBA00E9B192 /* Debug */,
83CBBA211A601CBA00E9B192 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
}
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0940"
version = "1.3">
<BuildAction
parallelizeBuildables = "NO"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D2A28121D9B038B00D4039D"
BuildableName = "libReact.a"
BlueprintName = "React-tvOS"
ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "PDA_RFID-tvOS.app"
BlueprintName = "PDA_RFID-tvOS"
ReferencedContainer = "container:PDA_RFID.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
BuildableName = "PDA_RFID-tvOSTests.xctest"
BlueprintName = "PDA_RFID-tvOSTests"
ReferencedContainer = "container:PDA_RFID.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
BuildableName = "PDA_RFID-tvOSTests.xctest"
BlueprintName = "PDA_RFID-tvOSTests"
ReferencedContainer = "container:PDA_RFID.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "PDA_RFID-tvOS.app"
BlueprintName = "PDA_RFID-tvOS"
ReferencedContainer = "container:PDA_RFID.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "PDA_RFID-tvOS.app"
BlueprintName = "PDA_RFID-tvOS"
ReferencedContainer = "container:PDA_RFID.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "PDA_RFID-tvOS.app"
BlueprintName = "PDA_RFID-tvOS"
ReferencedContainer = "container:PDA_RFID.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0940"
version = "1.3">
<BuildAction
parallelizeBuildables = "NO"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
BuildableName = "libReact.a"
BlueprintName = "React"
ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "PDA_RFID.app"
BlueprintName = "PDA_RFID"
ReferencedContainer = "container:PDA_RFID.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "PDA_RFIDTests.xctest"
BlueprintName = "PDA_RFIDTests"
ReferencedContainer = "container:PDA_RFID.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "PDA_RFIDTests.xctest"
BlueprintName = "PDA_RFIDTests"
ReferencedContainer = "container:PDA_RFID.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "PDA_RFID.app"
BlueprintName = "PDA_RFID"
ReferencedContainer = "container:PDA_RFID.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "PDA_RFID.app"
BlueprintName = "PDA_RFID"
ReferencedContainer = "container:PDA_RFID.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "PDA_RFID.app"
BlueprintName = "PDA_RFID"
ReferencedContainer = "container:PDA_RFID.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
@property (nonatomic, strong) UIWindow *window;
@end
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import "AppDelegate.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"PDA_RFID"
initialProperties:nil];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
return YES;
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}
@end
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7702" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="PDA_RFID" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
</view>
</objects>
</document>
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>$(PRODUCT_NAME) would like to save photos to your photo gallery</string>
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) would like to use your camera</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>$(PRODUCT_NAME) would like access to your photo gallery</string>
<key>NSMicrophoneUsageDescription</key>
<string>$(PRODUCT_NAME) would like to use your microphone (for videos)</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>PDA_RFID</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
</dict>
</plist>
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import <React/RCTLog.h>
#import <React/RCTRootView.h>
#define TIMEOUT_SECONDS 600
#define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
@interface PDA_RFIDTests : XCTestCase
@end
@implementation PDA_RFIDTests
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
{
if (test(view)) {
return YES;
}
for (UIView *subview in [view subviews]) {
if ([self findSubviewInView:subview matching:test]) {
return YES;
}
}
return NO;
}
- (void)testRendersWelcomeScreen
{
UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
BOOL foundElement = NO;
__block NSString *redboxError = nil;
RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
if (level >= RCTLogLevelError) {
redboxError = message;
}
});
while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
[[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
[[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
return YES;
}
return NO;
}];
}
RCTSetLogFunction(RCTDefaultLogFunction);
XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
}
@end
/**
* Metro configuration for React Native
* https://github.com/facebook/react-native
*
* @format
*/
module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
},
};
{
"name": "BoneHouse_Business_APP",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.8.3",
"react-native": "0.59.9",
"react-native-audio": "4.3.0",
"react-native-date-picker": "2.7.9",
"react-native-gesture-handler": "1.3.0",
"react-native-image-picker": "0.27.0",
"react-native-root-toast": "3.1.1",
"react-native-sound": "0.11.0",
"react-navigation": "3.11.0",
"react-redux": "7.1.0",
"redux": "4.0.1",
"redux-persist": "5.10.0",
"redux-thunk": "2.3.0"
},
"devDependencies": {
"@babel/core": "^7.4.5",
"@babel/runtime": "^7.4.5",
"babel-jest": "^24.8.0",
"jest": "^24.8.0",
"metro-react-native-babel-preset": "^0.54.1",
"react-test-renderer": "16.8.3"
},
"jest": {
"preset": "react-native"
}
}
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 sign in to comment