Commit ea37a4c6 by Denglingling

对接部分自助下单已有接口,选择产品相关交互调整

parent 12a55f69
...@@ -18,7 +18,7 @@ export function requestQuickOrganizations(params) { ...@@ -18,7 +18,7 @@ export function requestQuickOrganizations(params) {
let {global_domain_config} = getState().login let {global_domain_config} = getState().login
GetRequest(global_domain_config, getUrlParams('/authorized_inventory/search', params)) GetRequest(global_domain_config, getUrlParams('/authorized_inventory/search', params))
.then(res => { .then(res => {
console.log('res=====', Object.keys(res), res); console.log('获取组织 res=====', res);
if(res.error_code == 0) { if(res.error_code == 0) {
let { data: { organizations } } = res let { data: { organizations } } = res
dispatch(requestListDataSuccess(organizations)); dispatch(requestListDataSuccess(organizations));
...@@ -32,7 +32,7 @@ export function requestQuickOrganizations(params) { ...@@ -32,7 +32,7 @@ export function requestQuickOrganizations(params) {
} }
}) })
.catch(err => { .catch(err => {
console.log('------err--====organizations----', Object.keys(err), err) console.log('------err--获取组织----', Object.keys(err), err)
show(err.error); show(err.error);
dispatch(requestListDataFail()); dispatch(requestListDataFail());
}) })
...@@ -46,6 +46,7 @@ export function requestQuickSurgeryHospital(params) { ...@@ -46,6 +46,7 @@ export function requestQuickSurgeryHospital(params) {
let {global_domain_config} = getState().login let {global_domain_config} = getState().login
GetRequest(global_domain_config, getUrlParams('/sale/seller_customer/search', params)) GetRequest(global_domain_config, getUrlParams('/sale/seller_customer/search', params))
.then(res => { .then(res => {
console.log('获取客户名称 res=====', res);
if(res.error_code == 0) { if(res.error_code == 0) {
let { data: { customers } } = res let { data: { customers } } = res
dispatch(requestListDataSuccess(customers)); dispatch(requestListDataSuccess(customers));
...@@ -59,7 +60,7 @@ export function requestQuickSurgeryHospital(params) { ...@@ -59,7 +60,7 @@ export function requestQuickSurgeryHospital(params) {
} }
}) })
.catch(err => { .catch(err => {
console.log('------err--====requestQuickSurgeryHospital----', Object.keys(err), err) console.log('------err--====获取客户名称----', Object.keys(err), err)
show(err.error); show(err.error);
dispatch(requestListDataFail()); dispatch(requestListDataFail());
}) })
...@@ -77,6 +78,7 @@ export function requestQuickOrderType(params) { ...@@ -77,6 +78,7 @@ export function requestQuickOrderType(params) {
let {global_domain_config} = getState().login let {global_domain_config} = getState().login
GetRequest(global_domain_config, getUrlParams('/system/value_set/search', params)) GetRequest(global_domain_config, getUrlParams('/system/value_set/search', params))
.then(res => { .then(res => {
console.log('获取订单类型 res=====', res);
if(res.error_code == 0) { if(res.error_code == 0) {
let { data: { sys_values } } = res let { data: { sys_values } } = res
dispatch(requestListDataSuccess(sys_values)); dispatch(requestListDataSuccess(sys_values));
...@@ -90,7 +92,7 @@ export function requestQuickOrderType(params) { ...@@ -90,7 +92,7 @@ export function requestQuickOrderType(params) {
} }
}) })
.catch(err => { .catch(err => {
console.log('------err--====requestQuickSurgeryHospital----', Object.keys(err), err) console.log('------err--====获取订单类型----', Object.keys(err), err)
show(err.error); show(err.error);
dispatch(requestListDataFail()); dispatch(requestListDataFail());
}) })
...@@ -104,7 +106,7 @@ export function requestQuickTemplateCollect(params) { ...@@ -104,7 +106,7 @@ export function requestQuickTemplateCollect(params) {
let {global_domain_config} = getState().login let {global_domain_config} = getState().login
GetRequest(global_domain_config, getUrlParams('/surgery/template_header/search', params)) GetRequest(global_domain_config, getUrlParams('/surgery/template_header/search', params))
.then(res => { .then(res => {
console.log('res==>', res) console.log('获取配台模板 res=====', res);
if(res.error_code == 0) { if(res.error_code == 0) {
let { data: { surgery_template_headers } } = res let { data: { surgery_template_headers } } = res
dispatch(requestListDataSuccess(surgery_template_headers)); dispatch(requestListDataSuccess(surgery_template_headers));
...@@ -118,7 +120,7 @@ export function requestQuickTemplateCollect(params) { ...@@ -118,7 +120,7 @@ export function requestQuickTemplateCollect(params) {
} }
}) })
.catch(err => { .catch(err => {
console.log('------err--====requestQuickTemplateCollect----', Object.keys(err), err) console.log('------err--====获取配台模板----', Object.keys(err), err)
show(err.error); show(err.error);
dispatch(requestListDataFail()); dispatch(requestListDataFail());
}) })
...@@ -132,6 +134,7 @@ export function requestQuickSurgeryType(params) { ...@@ -132,6 +134,7 @@ export function requestQuickSurgeryType(params) {
let {global_domain_config} = getState().login let {global_domain_config} = getState().login
GetRequest(global_domain_config, getUrlParams('/system/value_set/search', params)) GetRequest(global_domain_config, getUrlParams('/system/value_set/search', params))
.then(res => { .then(res => {
console.log('获取手术类型 res=====', res);
if(res.error_code == 0) { if(res.error_code == 0) {
let typeOption = [] let typeOption = []
let { data: { value_set_code, sys_values } } = res let { data: { value_set_code, sys_values } } = res
...@@ -149,7 +152,7 @@ export function requestQuickSurgeryType(params) { ...@@ -149,7 +152,7 @@ export function requestQuickSurgeryType(params) {
} }
}) })
.catch(err => { .catch(err => {
console.log('------err--====requestQuickSurgeryType----', Object.keys(err), err) console.log('------err--====获取手术类型----', Object.keys(err), err)
show(err.error); show(err.error);
dispatch(requestListDataFail()); dispatch(requestListDataFail());
}) })
...@@ -193,6 +196,7 @@ export function requestQuickSumbit({access_token, ...params}) { ...@@ -193,6 +196,7 @@ export function requestQuickSumbit({access_token, ...params}) {
let {global_domain_config} = getState().login let {global_domain_config} = getState().login
PostRequest(global_domain_config, getUrlParams('/surgery/collect_order/via_data/create', {access_token: access_token}), params) PostRequest(global_domain_config, getUrlParams('/surgery/collect_order/via_data/create', {access_token: access_token}), params)
.then(res => { .then(res => {
console.log('提交数据 res=====', res);
if(res.error_code == 0) { if(res.error_code == 0) {
let { data } = res let { data } = res
dispatch(requestSubmitSuccess(data)); dispatch(requestSubmitSuccess(data));
...@@ -206,7 +210,7 @@ export function requestQuickSumbit({access_token, ...params}) { ...@@ -206,7 +210,7 @@ export function requestQuickSumbit({access_token, ...params}) {
} }
}) })
.catch(err => { .catch(err => {
console.log('------err--====requestQuickSumbit----', Object.keys(err), err) console.log('------err--====提交数据----', Object.keys(err), err)
show(err.error); show(err.error);
dispatch(requestSubmitFail()); dispatch(requestSubmitFail());
}) })
......
import { PostRequest, GetRequest } from '../network/RequestUtils'; import { PostRequest, GetRequest, UploadRequest } from '../network/RequestUtils';
import { show } from '../utils/Utils'; import { show, getUrlParams} from '../utils/Utils';
import { exitLoginStatus } from './LoginAction'; import { exitLoginStatus } from './LoginAction';
import { import {
SELF_ORDER_LIST_DOING, SELF_ORDER_LIST_DOING,
SELF_ORDER_LIST_SUCCESS, SELF_ORDER_LIST_SUCCESS,
SELF_ORDER_LIST_FAILURE, SELF_ORDER_LIST_FAILURE,
SELF_SUBMIT_DOING,
SELF_SUBMIT_SUCCESS,
SELF_SUBMIT_FAILURE,
SELF_INIT_DATA SELF_INIT_DATA
} from '../base/ActionTypes'; } from '../base/ActionTypes';
// 获取组织 // 获取组织 params={access_token:''}
// export const requestOrganizations = async (params) => { export function requestSelfOrganizations(params) {
// return await GetRequest(`/api/latest/authorized_inventory/search?access_token=${params.access_token}`)
// }
export function requestOrganizations(access_token) {
return (dispatch, getState) => { return (dispatch, getState) => {
// console.warn('----requestOrganizations') dispatch(requestListDataing());
dispatch(requestOrganizationsing());
let {global_domain_config} = getState().login let {global_domain_config} = getState().login
GetRequest(global_domain_config, `/authorized_inventory/search?access_token=${access_token}`) GetRequest(global_domain_config, getUrlParams('/authorized_inventory/search', params))
.then(res => { .then(res => {
// console.warn('res=====', Object.keys(res)); console.log('获取组织 res=====', res);
if(res.error_code == 0) { if(res.error_code == 0) {
// console.warn('res====organizations=', res.data.organizations);
let { data: { organizations } } = res let { data: { organizations } } = res
dispatch(requestOrganizationsSuccess(organizations)); dispatch(requestListDataSuccess(organizations));
} else if(res.error_code === 41006) { } else if(res.error_code === 41006) {
show('登录过期,请重新登录'); show('登录过期,请重新登录');
dispatch(exitLoginStatus()); dispatch(exitLoginStatus());
} else { } else {
show(res.error_msg); show(res.error_msg);
dispatch(requestOrganizationsFail()); dispatch(requestListDataFail());
} }
}) })
.catch(err => { .catch(err => {
console.log('------err--获取组织----', Object.keys(err), err)
show(err.error); show(err.error);
dispatch(requestOrganizationsFail()); dispatch(requestListDataFail());
}) })
} }
} }
function requestOrganizationsing() {
// 获取客户名称 params={access_token:'', org_code:'', seller_code:''}
export function requestSelfSurgeryHospital(params) {
return (dispatch, getState) => {
dispatch(requestListDataing());
let {global_domain_config} = getState().login
GetRequest(global_domain_config, getUrlParams('/sale/seller_customer/search', params))
.then(res => {
console.log('获取客户名称 res=====', res);
if(res.error_code == 0) {
let { data: { customers } } = res
dispatch(requestListDataSuccess(customers));
} else if(res.error_code === 41006) {
show('登录过期,请重新登录');
dispatch(exitLoginStatus());
} else {
let error_msg = res.error_msg || res.message
show(error_msg);
dispatch(requestListDataFail());
}
})
.catch(err => {
console.log('------err--====获取客户名称----', Object.keys(err), err)
show(err.error);
dispatch(requestListDataFail());
})
}
}
export const reqSelfSurgeryHospital = async (global_domain_config, params) => {
return await GetRequest(global_domain_config, getUrlParams('/sale/seller_customer/search', params))
}
// 获取订单类型 params={access_token:'', value_set_code:'SUR_ORDER_TYPE'}
export function requestSelfOrderType(params) {
return (dispatch, getState) => {
dispatch(requestListDataing());
let {global_domain_config} = getState().login
GetRequest(global_domain_config, getUrlParams('/system/value_set/search', params))
.then(res => {
console.log('获取订单类型 res=====', res);
if(res.error_code == 0) {
let { data: { sys_values } } = res
dispatch(requestListDataSuccess(sys_values));
} else if(res.error_code === 41006) {
show('登录过期,请重新登录');
dispatch(exitLoginStatus());
} else {
let error_msg = res.error_msg || res.message
show(error_msg);
dispatch(requestListDataFail());
}
})
.catch(err => {
console.log('------err--====获取订单类型----', Object.keys(err), err)
show(err.error);
dispatch(requestListDataFail());
})
}
}
// 获取配台模板 params={access_token:'', org_code:'', seller_code: 'shi.ming', customer_code: '', surgery_type: '', doctor_name: ''}
export function requestSelfTemplateCollect(params) {
return (dispatch, getState) => {
dispatch(requestListDataing());
let {global_domain_config} = getState().login
GetRequest(global_domain_config, getUrlParams('/surgery/template_header/search', params))
.then(res => {
console.log('获取配台模板 res=====', res);
if(res.error_code == 0) {
let { data: { surgery_template_headers } } = res
dispatch(requestListDataSuccess(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(requestListDataFail());
}
})
.catch(err => {
console.log('------err--====获取配台模板----', Object.keys(err), err)
show(err.error);
dispatch(requestListDataFail());
})
}
}
// 获取手术类型 params={access_token:'', value_set_code:'ORTHOPEDICS_PRODUCT_CLASS'}
export function requestSelfSurgeryType(params) {
return (dispatch, getState) => {
dispatch(requestListDataing());
let {global_domain_config} = getState().login
GetRequest(global_domain_config, getUrlParams('/system/value_set/search', params))
.then(res => {
console.log('获取手术类型 res=====', res);
if(res.error_code == 0) {
let typeOption = []
let { data: { value_set_code, sys_values } } = res
if(value_set_code === 'ORTHOPEDICS_PRODUCT_CLASS' && sys_values && sys_values.length) {
typeOption = sys_values
}
dispatch(requestListDataSuccess(typeOption));
} else if(res.error_code === 41006) {
show('登录过期,请重新登录');
dispatch(exitLoginStatus());
} else {
let error_msg = res.error_msg || res.message
show(error_msg);
dispatch(requestListDataFail());
}
})
.catch(err => {
console.log('------err--====获取手术类型----', Object.keys(err), err)
show(err.error);
dispatch(requestListDataFail());
})
}
}
function requestListDataing() {
return { return {
type: SELF_ORDER_LIST_DOING type: SELF_ORDER_LIST_DOING
} }
} }
function requestOrganizationsSuccess(data) { function requestListDataSuccess(data) {
return { return {
type: SELF_ORDER_LIST_SUCCESS, type: SELF_ORDER_LIST_SUCCESS,
rawData: data rawData: data
} }
} }
function requestOrganizationsFail() { function requestListDataFail() {
return { return {
type: SELF_ORDER_LIST_FAILURE type: SELF_ORDER_LIST_FAILURE
} }
} }
// 上传语音
export const requestSelfAudio = async (global_domain_config, params) => {
let { access_token, path } = params
let formData = new FormData()
let soundPath = `file://${path}`
let fileName = path.substring(path.lastIndexOf('/') + 1, path.length)
let file = { uri: soundPath, type: "multipart/form-data", name: fileName}
formData.append('file', file)
return await UploadRequest(global_domain_config, getUrlParams('/dingding/upload_media', { access_token }), formData)
}
// 提交数据
export function requestSelfSumbit({access_token, ...params}) {
return (dispatch, getState) => {
dispatch(requestSubmiting());
let {global_domain_config} = getState().login
PostRequest(global_domain_config, getUrlParams('/surgery/collect_order/via_data/create', {access_token: access_token}), params)
.then(res => {
console.log('提交数据 res=====', res);
if(res.error_code == 0) {
let { data } = res
dispatch(requestSubmitSuccess(data));
} else if(res.error_code === 41006) {
show('登录过期,请重新登录');
dispatch(exitLoginStatus());
} else {
let error_msg = res.error_msg || res.message
show(error_msg);
dispatch(requestSubmitFail());
}
})
.catch(err => {
console.log('------err--====提交数据----', Object.keys(err), err)
show(err.error);
dispatch(requestSubmitFail());
})
}
}
function requestSubmiting() {
return {
type: SELF_SUBMIT_DOING
}
}
function requestSubmitSuccess(data) {
return {
type: SELF_SUBMIT_SUCCESS,
rawData: data
}
}
function requestSubmitFail() {
return {
type: SELF_SUBMIT_FAILURE
}
}
// 初始化数据
export function setSelfInitData() {
return {
type: SELF_INIT_DATA
}
}
\ No newline at end of file
...@@ -59,8 +59,6 @@ class ProductModel extends Component { ...@@ -59,8 +59,6 @@ class ProductModel extends Component {
topProcOptionList: [], topProcOptionList: [],
topActiveIndex: 0, topActiveIndex: 0,
orginOptionList: [], // 原始数据 orginOptionList: [], // 原始数据
// SELECTED_QUQNTITY: 'selectedQuantity', // 中类数量
// SELECTED_DATA_ARR: 'selectedDataArr', // 中类已选元素
} }
} }
...@@ -79,7 +77,6 @@ class ProductModel extends Component { ...@@ -79,7 +77,6 @@ class ProductModel extends Component {
} }
if(nextProps.modelOption) { if(nextProps.modelOption) {
that.setState({ that.setState({
// topProcOptionList: nextProps.modelOption,
orginOptionList: nextProps.modelOption orginOptionList: nextProps.modelOption
},() => { },() => {
that.getTopOptions() that.getTopOptions()
...@@ -91,7 +88,6 @@ class ProductModel extends Component { ...@@ -91,7 +88,6 @@ class ProductModel extends Component {
getTopOptions(){ getTopOptions(){
let {orginOptionList} = this.state let {orginOptionList} = this.state
let otherArr = [] let otherArr = []
// let otherChildData = []
let otherChildObj = { let otherChildObj = {
title: '单选耗材', title: '单选耗材',
[SELECTED_QUQNTITY]: 0, [SELECTED_QUQNTITY]: 0,
...@@ -112,7 +108,7 @@ class ProductModel extends Component { ...@@ -112,7 +108,7 @@ class ProductModel extends Component {
} }
}) })
otherArr.push(otherChildObj) otherArr.push(otherChildObj)
console.log('修改后的已选数据====', otherArr) // console.log('修改后的已选数据====', otherArr)
this.setState({ this.setState({
topProcOptionList: otherArr topProcOptionList: otherArr
}) })
...@@ -121,137 +117,120 @@ class ProductModel extends Component { ...@@ -121,137 +117,120 @@ class ProductModel extends Component {
// 恢复其他所有数据 // 恢复其他所有数据
setTopOrginTopData(curOptions){ setTopOrginTopData(curOptions){
let {orginOptionList} = this.state let {orginOptionList} = this.state
// console.log('回调之前的==原始已选数据==', orginOptionList)
console.log('回调之前的==原始已选数据==', orginOptionList) // console.log('回调之前的===当前修改后的已选数据==', curOptions)
console.log('回调之前的===当前修改后的已选数据==', curOptions)
orginOptionList.map(function(orgItem, orgIndex) { orginOptionList.map(function(orgItem, orgIndex) {
if(orgIndex < 4){ if(orgIndex < 4){
orgItem = curOptions[orgIndex] orgItem = curOptions[orgIndex]
} }
}) })
// console.log('当前修改后的原始数据==', orginOptionList)
console.log('当前修改后的原始数据==', orginOptionList)
this.props.modelCallBack(orginOptionList) // 调用 this.props.modelCallBack(orginOptionList) // 调用
} }
// 恢复已选数据 // 恢复已选数据
setTopOrginTopData_old(curOptions){ setTopOrginTopData_old(curOptions){
let {orginOptionList} = this.state // let {orginOptionList} = this.state
console.log('回调之前的==原始已选数据==', orginOptionList) // console.log('回调之前的==原始已选数据==', orginOptionList)
console.log('回调之前的===当前修改后的已选数据==', curOptions) // console.log('回调之前的===当前修改后的已选数据==', curOptions)
// orginOptionList.map(function(orgItem, orgIndex) {
orginOptionList.map(function(orgItem, orgIndex) { // if(orgIndex < 4){
if(orgIndex < 4){ // orgItem = curOptions[orgIndex]
orgItem = curOptions[orgIndex] // }else {
}else { // if(orgItem[SELECTED_DATA_ARR] && orgItem[SELECTED_DATA_ARR].length > 0
if(orgItem[SELECTED_DATA_ARR] && orgItem[SELECTED_DATA_ARR].length > 0 // && curOptions[SELECTED_DATA_ARR] && curOptions[SELECTED_DATA_ARR].length > 0){
&& curOptions[SELECTED_DATA_ARR] && curOptions[SELECTED_DATA_ARR].length > 0){
// let delArr = []
let delArr = [] // orgItem[SELECTED_DATA_ARR].map(function(seIt, seInd) {
orgItem[SELECTED_DATA_ARR].map(function(seIt, seInd) { // console.log('标题====', curSeChild['superTit'], seIt[CHILD_DATA_NAME][0]['superTit'])
console.log('标题====', curSeChild['superTit'], seIt[CHILD_DATA_NAME][0]['superTit']) // let orgCurChild = seIt[CHILD_DATA_NAME][0]
let orgCurChild = seIt[CHILD_DATA_NAME][0]
// curOptions[SELECTED_DATA_ARR].forEach(function(curSeItem, curSeInd){
curOptions[SELECTED_DATA_ARR].forEach(function(curSeItem, curSeInd){ // let curSeChild = curSeItem[CHILD_DATA_NAME][0]
let curSeChild = curSeItem[CHILD_DATA_NAME][0] // if(curSeChild && orgCurChild && curSeChild['superTit'] === orgCurChild['superTit'] && curSeChild['id'] === orgCurChild['id']
if(curSeChild && orgCurChild && curSeChild['superTit'] === orgCurChild['superTit'] && curSeChild['id'] === orgCurChild['id'] // && curSeChild['superIndex'] === orgCurChild['superIndex'] && curSeChild['curTitle'] === orgCurChild['curTitle']){
&& curSeChild['superIndex'] === orgCurChild['superIndex'] && curSeChild['curTitle'] === orgCurChild['curTitle']){ // // seIt[CHILD_DATA_NAME][0]['lineOptions'] = curSeChild['lineOptions']
// seIt[CHILD_DATA_NAME][0]['lineOptions'] = curSeChild['lineOptions'] // seIt = curSeChild
seIt = curSeChild // }
} // })
}) // // 是否在已选存在
// 是否在已选存在 // let isExitArr = curOptions[SELECTED_DATA_ARR].filter(item => {
let isExitArr = curOptions[SELECTED_DATA_ARR].filter(item => { // let curSeChild = curSeItem[CHILD_DATA_NAME][0]
let curSeChild = curSeItem[CHILD_DATA_NAME][0] // return curSeChild && orgCurChild && curSeChild['superTit'] === orgCurChild['superTit'] && curSeChild['id'] === orgCurChild['id']
return curSeChild && orgCurChild && curSeChild['superTit'] === orgCurChild['superTit'] && curSeChild['id'] === orgCurChild['id'] // && curSeChild['superIndex'] === orgCurChild['superIndex'] && curSeChild['curTitle'] === orgCurChild['curTitle']
&& curSeChild['superIndex'] === orgCurChild['superIndex'] && curSeChild['curTitle'] === orgCurChild['curTitle'] // })
}) // if(isExitArr.length > 0){
if(isExitArr.length > 0){ // // 存在,并且数量不为空
// 存在,并且数量不为空 // }else {
}else { // // 不存在,即数量为空
// 不存在,即数量为空 // delArr.push(seInd)
delArr.push(seInd) // // 清空之前的
// 清空之前的 // }
} // })
})
if(delArr.length){ // if(delArr.length){
for(let i=delArr.length-1; i>=0; i--){ // for(let i=delArr.length-1; i>=0; i--){
let seDelChild = orgItem[SELECTED_DATA_ARR][i][CHILD_DATA_NAME][0] // let seDelChild = orgItem[SELECTED_DATA_ARR][i][CHILD_DATA_NAME][0]
if(orgItem[DEFAULT_SECOND_DATA] && orgItem[DEFAULT_SECOND_DATA].length > 0 && seDelChild){ // if(orgItem[DEFAULT_SECOND_DATA] && orgItem[DEFAULT_SECOND_DATA].length > 0 && seDelChild){
// for(let deIt of orgItem[DEFAULT_SECOND_DATA]){ // // for(let deIt of orgItem[DEFAULT_SECOND_DATA]){
// let deItChild = deIt[CHILD_DATA_NAME][0] // // let deItChild = deIt[CHILD_DATA_NAME][0]
// if(deItChild && seDelChild && deItChild['superTit'] === seDelChild['superTit'] && deItChild['id'] === seDelChild['id'] // // if(deItChild && seDelChild && deItChild['superTit'] === seDelChild['superTit'] && deItChild['id'] === seDelChild['id']
// && deItChild['index'] === seDelChild['index']){ // // && deItChild['index'] === seDelChild['index']){
// deIt[DEFAULT_QUANTITY] = 0
// delete deIt[CHILD_DATA_NAME]
// } // // deIt[DEFAULT_QUANTITY] = 0
// } // // delete deIt[CHILD_DATA_NAME]
orgItem[DEFAULT_SECOND_DATA].forEach(function(deIt) { // // }
let deItChild = deIt[CHILD_DATA_NAME][0] // // }
if(deItChild && seDelChild && deItChild['superTit'] === seDelChild['superTit'] && deItChild['id'] === seDelChild['id']
&& deItChild['index'] === seDelChild['index']){
deIt[DEFAULT_QUANTITY] = 0 // orgItem[DEFAULT_SECOND_DATA].forEach(function(deIt) {
delete deIt[CHILD_DATA_NAME] // let deItChild = deIt[CHILD_DATA_NAME][0]
// if(deItChild && seDelChild && deItChild['superTit'] === seDelChild['superTit'] && deItChild['id'] === seDelChild['id']
// && deItChild['index'] === seDelChild['index']){
} // deIt[DEFAULT_QUANTITY] = 0
}) // delete deIt[CHILD_DATA_NAME]
}
// }
orgItem[SELECTED_DATA_ARR].splice(i, 1) // })
} // }
}
}else {
// 清空所有已选
orgItem[SELECTED_DATA_ARR] = []
orgItem[DEFAULT_QUANTITY] = 0
if(orgItem[DEFAULT_SECOND_DATA] && orgItem[DEFAULT_SECOND_DATA].length > 0){
orgItem[DEFAULT_SECOND_DATA].forEach(function(deIt) {
deIt[DEFAULT_QUANTITY] = 0
// deIt[CHILD_DATA_NAME] = []
delete deIt[CHILD_DATA_NAME]
})
}
}
}
})
console.log('修改后的原始数据========>', orginOptionList)
// this.props.modelCallBack(orginOptionList) // 调用
// orgItem[SELECTED_DATA_ARR].splice(i, 1)
// }
// }
// }else {
// // 清空所有已选
// orgItem[SELECTED_DATA_ARR] = []
// orgItem[DEFAULT_QUANTITY] = 0
// if(orgItem[DEFAULT_SECOND_DATA] && orgItem[DEFAULT_SECOND_DATA].length > 0){
// orgItem[DEFAULT_SECOND_DATA].forEach(function(deIt) {
// deIt[DEFAULT_QUANTITY] = 0
// // deIt[CHILD_DATA_NAME] = []
// delete deIt[CHILD_DATA_NAME]
// })
// }
// }
// }
// })
// console.log('修改后的原始数据========>', orginOptionList)
// // this.props.modelCallBack(orginOptionList) // 调用
} }
// 共计已选 点击 // 共计已选 点击
handleCloseSelected() { handleCloseSelected() {
console.log('共计已选:666--model') console.log('已选:handleCloseSelected')
this.closeModal() this.closeModal()
// // this.props.closeSelected(false)
// this.props.closeModal(false)
} }
// 选好了 点击 // 选好了 点击
handleCloseSubmit() { handleCloseSubmit() {
console.log('选好了--model') console.log('选好了--handleCloseSubmit')
this.closeModal() this.closeModal()
this.props.closeSubmit() this.props.closeSubmit()
} }
...@@ -265,77 +244,36 @@ class ProductModel extends Component { ...@@ -265,77 +244,36 @@ class ProductModel extends Component {
// 清空图标回调 // 清空图标回调
handleClearBack(item, index){ handleClearBack(item, index){
console.log('清空图标回调---', item, index) // console.log('清空图标回调---', item, index)
let {orginOptionList, topProcOptionList, topActiveIndex} = this.state let {orginOptionList, topProcOptionList, topActiveIndex} = this.state
// console.log('原始已选数据==--===--', orginOptionList)
// console.log('当前已选数据==----', topProcOptionList, topActiveIndex)
console.log('原始已选数据==--===--', orginOptionList)
console.log('当前已选数据==----', topProcOptionList, topActiveIndex)
// topProcOptionList
// 单选耗材当前清空项 // 单选耗材当前清空项
let deleOpts = cloneObject(topProcOptionList[topActiveIndex][SELECTED_DATA_ARR][index]) let deleOpts = cloneObject(topProcOptionList[topActiveIndex][SELECTED_DATA_ARR][index])
let allCountQuantity = 0 // 初始化 let allCountQuantity = 0 // 初始化
orginOptionList.forEach(function(orgOpts, orgInd) { orginOptionList.forEach(function(orgOpts, orgInd) {
if(orgInd >= 4){ if(orgInd >= 4){
// console.log('orgOpts[SELECTED_DATA_ARR]---', orgOpts[SELECTED_DATA_ARR], SELECTED_DATA_ARR)
// if(orgOpts[SELECTED_DATA_ARR] && orgOpts[SELECTED_DATA_ARR].length > 0){
// let deIndex = 0
// let deFlag = false
// orgOpts[SELECTED_DATA_ARR].forEach(function(selDa, selInde){
// if(selDa[CHILD_DATA_NAME] && deleOpts[CHILD_DATA_NAME]){
// let curLine = selDa[CHILD_DATA_NAME][0]
// console.log('curLine---', curLine)
// let deLi = deleOpts[CHILD_DATA_NAME][0]
// console.log('deLi---', deLi)
// if(curLine && deLi && curLine['superTit'] === deLi['superTit'] && curLine['id'] === deLi['id']
// && curLine['superIndex'] === deLi['superIndex']){
// console.log('---删除=!!!====-', curLine, deLi)
// deFlag = true
// deIndex = localInd
// // selDa[DEFAULT_QUANTITY] = 0
// // delete selDa[CHILD_DATA_NAME]
// }
// }
// })
// if(deFlag){
// console.log('---删除=====-', deFlag, deIndex)
// orgOpts[SELECTED_DATA_ARR].splice(deIndex, 1)
// }
// }
if(orgOpts[DEFAULT_SECOND_DATA] && orgOpts[DEFAULT_SECOND_DATA].length > 0){ if(orgOpts[DEFAULT_SECOND_DATA] && orgOpts[DEFAULT_SECOND_DATA].length > 0){
orgOpts[DEFAULT_SECOND_DATA].forEach(function(localDa, localInd) { orgOpts[DEFAULT_SECOND_DATA].forEach(function(localDa, localInd) {
// console.log('localDa--CHILD_DATA_NAME-', localDa, CHILD_DATA_NAME) // console.log('localDa--CHILD_DATA_NAME-', localDa, CHILD_DATA_NAME)
if(localDa[CHILD_DATA_NAME] && deleOpts[CHILD_DATA_NAME]){ if(localDa[CHILD_DATA_NAME] && deleOpts[CHILD_DATA_NAME]){
let curLine = localDa[CHILD_DATA_NAME][0] let curLine = localDa[CHILD_DATA_NAME][0]
// console.log('curLine---', curLine, deleOpts) // console.log('curLine---', curLine, deleOpts)
let deLi = deleOpts[CHILD_DATA_NAME][0] let deLi = deleOpts[CHILD_DATA_NAME][0]
// console.log('deLi--', deLi)
if(curLine && deLi && curLine['superTit'] === deLi['superTit'] && curLine['id'] === deLi['id'] if(curLine && deLi && curLine['superTit'] === deLi['superTit'] && curLine['id'] === deLi['id']
&& curLine['superIndex'] === deLi['superIndex'] && curLine['curTitle'] === deLi['curTitle']){ && curLine['superIndex'] === deLi['superIndex'] && curLine['curTitle'] === deLi['curTitle']){
// deIndex = localInd
localDa[DEFAULT_QUANTITY] = 0 localDa[DEFAULT_QUANTITY] = 0
delete localDa[CHILD_DATA_NAME] delete localDa[CHILD_DATA_NAME]
} }
} }
}) })
} }
if(orgOpts[SELECTED_DATA_ARR] && orgOpts[SELECTED_DATA_ARR].length > 0){ if(orgOpts[SELECTED_DATA_ARR] && orgOpts[SELECTED_DATA_ARR].length > 0){
let delArr = [] let delArr = []
orgOpts[SELECTED_DATA_ARR].map((deIt, deIndex) => { orgOpts[SELECTED_DATA_ARR].map((deIt, deIndex) => {
...@@ -343,20 +281,15 @@ class ProductModel extends Component { ...@@ -343,20 +281,15 @@ class ProductModel extends Component {
delArr.push(deIndex) delArr.push(deIndex)
} }
}) })
console.log('delArr----', delArr) // console.log('delArr----', delArr)
for(let i=delArr.length-1; i>=0; i--){ for(let i=delArr.length-1; i>=0; i--){
// console.log('orgOpts--!!--', i, delArr[i],orgOpts[SELECTED_DATA_ARR])
console.log('orgOpts--!!--', i, delArr[i],orgOpts[SELECTED_DATA_ARR])
orgOpts[SELECTED_DATA_ARR].splice(delArr[i], 1); orgOpts[SELECTED_DATA_ARR].splice(delArr[i], 1);
} }
// console.log('orgOpts----', orgOpts[SELECTED_DATA_ARR])
console.log('orgOpts----', orgOpts[SELECTED_DATA_ARR])
} }
// 初始化 // 初始化
orgOpts[SELECTED_QUQNTITY] = 0 orgOpts[SELECTED_QUQNTITY] = 0
if(orgOpts[SELECTED_DATA_ARR].length > 0){ if(orgOpts[SELECTED_DATA_ARR].length > 0){
orgOpts[SELECTED_DATA_ARR].map(itDa => { orgOpts[SELECTED_DATA_ARR].map(itDa => {
if(!itDa[DEFAULT_QUANTITY]){ if(!itDa[DEFAULT_QUANTITY]){
...@@ -365,8 +298,38 @@ class ProductModel extends Component { ...@@ -365,8 +298,38 @@ class ProductModel extends Component {
orgOpts[SELECTED_QUQNTITY] += Number(itDa[DEFAULT_QUANTITY]) orgOpts[SELECTED_QUQNTITY] += Number(itDa[DEFAULT_QUANTITY])
}) })
} }
// else {
// orgOpts[SELECTED_QUQNTITY] = 0 // console.log('orgOpts[SELECTED_DATA_ARR]---', orgOpts[SELECTED_DATA_ARR], SELECTED_DATA_ARR)
// if(orgOpts[SELECTED_DATA_ARR] && orgOpts[SELECTED_DATA_ARR].length > 0){
// let deIndex = 0
// let deFlag = false
// orgOpts[SELECTED_DATA_ARR].forEach(function(selDa, selInde){
// if(selDa[CHILD_DATA_NAME] && deleOpts[CHILD_DATA_NAME]){
// let curLine = selDa[CHILD_DATA_NAME][0]
// console.log('curLine---', curLine)
// let deLi = deleOpts[CHILD_DATA_NAME][0]
// console.log('deLi---', deLi)
// if(curLine && deLi && curLine['superTit'] === deLi['superTit'] && curLine['id'] === deLi['id']
// && curLine['superIndex'] === deLi['superIndex']){
// console.log('---删除=!!!====-', curLine, deLi)
// deFlag = true
// deIndex = localInd
// // selDa[DEFAULT_QUANTITY] = 0
// // delete selDa[CHILD_DATA_NAME]
// }
// }
// })
// if(deFlag){
// console.log('---删除=====-', deFlag, deIndex)
// orgOpts[SELECTED_DATA_ARR].splice(deIndex, 1)
// }
// } // }
} }
...@@ -379,37 +342,23 @@ class ProductModel extends Component { ...@@ -379,37 +342,23 @@ class ProductModel extends Component {
}) })
console.log('修改后的已选=======---', topProcOptionList) // console.log('修改后的已选=======---', topProcOptionList)
console.log('修改后的数量---', allCountQuantity) // console.log('修改后的数量---', allCountQuantity)
console.log('修改后端所有数据---', orginOptionList) // console.log('修改后端所有数据---', orginOptionList)
this.props.modelCallBack(orginOptionList) // 调用 this.props.modelCallBack(orginOptionList)
if(allCountQuantity === 0){ if(allCountQuantity === 0){
this.closeModal() this.closeModal()
} }
} }
// 修改列表计算后数据 // 修改列表计算后数据
handleCalCallBack(item, index, SUB_LINE_NAME){ handleCalCallBack(item, index){
// console.log('回调=====', item, index)
console.log('回调=====', item, index, SUB_LINE_NAME)
let {topProcOptionList, topActiveIndex} = this.state let {topProcOptionList, topActiveIndex} = this.state
let defauIndex = index let defauIndex = index
// SUB_LINE_NAME = 'childrenLineData' // 测试 item.superIndex
SUB_LINE_NAME = 'childrenLineData' // 测试 item.superIndex
// if(SUB_LINE_NAME){
// defauIndex = item.superIndex
// }
defauIndex = item.superIndex defauIndex = item.superIndex
// console.log('--当前已选数据 ===',topProcOptionList, topActiveIndex) // console.log('--当前已选数据 ===',topProcOptionList, topActiveIndex)
if(SELECTED_DATA_ARR && topProcOptionList[topActiveIndex][SELECTED_DATA_ARR]) { if(SELECTED_DATA_ARR && topProcOptionList[topActiveIndex][SELECTED_DATA_ARR]) {
...@@ -446,7 +395,7 @@ class ProductModel extends Component { ...@@ -446,7 +395,7 @@ class ProductModel extends Component {
}) })
// 已选数量赋值之前默认数据 // 已选数量赋值之前默认数据
let curObj = listItem[SELECTED_DATA_ARR][defauIndex] let curObj = listItem[SELECTED_DATA_ARR][defauIndex]
console.log('curObj----', curObj) // console.log('curObj----', curObj)
if(listIndex < 4){ if(listIndex < 4){
if(curObj.id){ if(curObj.id){
...@@ -464,90 +413,12 @@ class ProductModel extends Component { ...@@ -464,90 +413,12 @@ class ProductModel extends Component {
} }
allCountQuantity += listItem[SELECTED_QUQNTITY] allCountQuantity += listItem[SELECTED_QUQNTITY]
}) })
// 恢复之后再调用 // 恢复之后再调用
this.setTopOrginTopData(topProcOptionList) this.setTopOrginTopData(topProcOptionList)
// this.props.modelCallBack(topProcOptionList)
if(allCountQuantity === 0){ if(allCountQuantity === 0){
this.closeModal() this.closeModal()
} }
} }
// if(SELECTED_DATA_ARR && topProcOptionList[topActiveIndex][SELECTED_DATA_ARR]) {
// topProcOptionList.map(function(listItem, listIndex) {
// if(listIndex === topActiveIndex){
// if(SUB_LINE_NAME){
// listItem[SELECTED_DATA_ARR][item.superIndex][SUB_LINE_NAME].forEach(function(chIt) {
// if(_.isEqual(chIt, item)){
// chIt = item
// }
// })
// }else {
// // listItem[SELECTED_DATA_ARR][index] = item
// listItem[SELECTED_DATA_ARR][defauIndex] = item
// }
// // 本地测试 id为唯一值
// // let curObj = listItem[SELECTED_DATA_ARR][index]
// let curObj = listItem[SELECTED_DATA_ARR][defauIndex]
// if(curObj.id){
// listItem[DEFAULT_SECOND_DATA].forEach(function(deIt) {
// if(deIt.id === curObj.id){
// deIt = curObj
// }
// })
// }
// }
// })
// // console.log('---item[DEFAULT_QUANTITY] ', item[DEFAULT_QUANTITY], index)
// if(item[DEFAULT_QUANTITY] === 0) {
// topProcOptionList[topActiveIndex][SELECTED_DATA_ARR].splice(index, 1)
// // console.log('topProcOptionList[topActiveIndex][SELECTED_DATA_ARR]---', topProcOptionList[topActiveIndex][SELECTED_DATA_ARR])
// }
// // 修改左侧分类汇总
// // 本地测试
// let curCalField = 'quantity'
// let allCountQuantity = 0 // 初始化
// if(topProcOptionList[topActiveIndex][SELECTED_DATA_ARR].length > 0) {
// topProcOptionList[topActiveIndex][SELECTED_QUQNTITY] = 0
// topProcOptionList[topActiveIndex][SELECTED_DATA_ARR].map((selItem) => {
// if(!selItem[curCalField]){
// selItem[curCalField] = 0
// }
// topProcOptionList[topActiveIndex][SELECTED_QUQNTITY] += Number(selItem[curCalField])
// })
// } else{
// topProcOptionList[topActiveIndex][SELECTED_QUQNTITY] = 0
// }
// topProcOptionList.map(proItem => {
// if(!proItem[SELECTED_QUQNTITY]){
// proItem[SELECTED_QUQNTITY] = 0
// }
// allCountQuantity += proItem[SELECTED_QUQNTITY]
// })
// // 回调函数
// // console.log('---计算后 ', topProcOptionList, allCountQuantity)
// this.props.modelCallBack(topProcOptionList)
// if(allCountQuantity === 0){
// this.closeModal()
// }
// }
} }
// 点击顶部菜单 // 点击顶部菜单
...@@ -559,8 +430,8 @@ class ProductModel extends Component { ...@@ -559,8 +430,8 @@ class ProductModel extends Component {
// 清空 // 清空
handleClearRubbish() { handleClearRubbish() {
let {topProcOptionList, orginOptionList} = this.state let {orginOptionList} = this.state
console.log('清空======', orginOptionList) // console.log('清空======', orginOptionList)
orginOptionList.map(function(listItem) { orginOptionList.map(function(listItem) {
listItem[SELECTED_QUQNTITY] = 0 listItem[SELECTED_QUQNTITY] = 0
listItem[SELECTED_DATA_ARR] = [] listItem[SELECTED_DATA_ARR] = []
...@@ -569,33 +440,10 @@ class ProductModel extends Component { ...@@ -569,33 +440,10 @@ class ProductModel extends Component {
deIt[CHILD_DATA_NAME] = [] deIt[CHILD_DATA_NAME] = []
}) })
}) })
// 回调函数 // 回调函数
console.log('---清空之后===== ', orginOptionList) // console.log('---清空之后===== ', orginOptionList)
// this.setTopOrginTopData(topProcOptionList)
this.props.modelCallBack(orginOptionList) this.props.modelCallBack(orginOptionList)
this.closeModal() this.closeModal()
// let {topProcOptionList} = this.state
// // 本地测试
// let curCalField = 'quantity'
// topProcOptionList.map(function(listItem) {
// listItem[SELECTED_QUQNTITY] = 0
// listItem[SELECTED_DATA_ARR] = []
// listItem[DEFAULT_SECOND_DATA].forEach(function(deIt) {
// deIt[curCalField] = 0
// })
// })
// // 回调函数
// // console.log('---清空之后===== ', topProcOptionList)
// this.props.modelCallBack(topProcOptionList)
// this.closeModal()
} }
// 返回清空 // 返回清空
...@@ -620,7 +468,6 @@ class ProductModel extends Component { ...@@ -620,7 +468,6 @@ class ProductModel extends Component {
renderTopProItem() { renderTopProItem() {
let { topProcOptionList, topActiveIndex } = this.state let { topProcOptionList, topActiveIndex } = this.state
return ( return (
<ChooseCardList <ChooseCardList
cardStyleBox={styles.top_box} cardStyleBox={styles.top_box}
cardStyleScroll={styles.top_scroll_cont} cardStyleScroll={styles.top_scroll_cont}
...@@ -644,33 +491,19 @@ class ProductModel extends Component { ...@@ -644,33 +491,19 @@ class ProductModel extends Component {
// 返回底部主要元素 // 返回底部主要元素
renderContItem() { renderContItem() {
let {topProcOptionList, topActiveIndex} = this.state let {topProcOptionList, topActiveIndex} = this.state
// let curData = topProcOptionList[topActiveIndex]
// console.log('curData---', topProcOptionList, topActiveIndex)
// // 本地测试数据
// let localBottomContData = []
// if(curData && curData.localBottomContData) {
// localBottomContData = curData.localBottomContData
// }
let curData = topProcOptionList[topActiveIndex] let curData = topProcOptionList[topActiveIndex]
// console.log('已选展示信息 === curData---', topProcOptionList, topActiveIndex, curData) // console.log('已选展示信息 === curData---', topProcOptionList, topActiveIndex, curData)
let localBottomContData = [] let localBottomContData = []
if(curData && curData[SELECTED_DATA_ARR]){ if(curData && curData[SELECTED_DATA_ARR]){
// localBottomContData = curData[SELECTED_DATA_ARR] // localBottomContData = curData[SELECTED_DATA_ARR]
curData[SELECTED_DATA_ARR].forEach(function(sedItem) { curData[SELECTED_DATA_ARR].forEach(function(sedItem) {
if(sedItem[CHILD_DATA_NAME]){ if(sedItem[CHILD_DATA_NAME]){
localBottomContData.push(...sedItem[CHILD_DATA_NAME]) localBottomContData.push(...sedItem[CHILD_DATA_NAME])
} }
}) })
} }
// console.log('已选当前模块数据---',curData,topActiveIndex)
console.log('已选当前模块数据---',curData,topActiveIndex) // console.log('已选展示信息---',localBottomContData)
console.log('已选展示信息---',localBottomContData)
return( return(
<View style={styles.edit_cont}> <View style={styles.edit_cont}>
<ScrollView <ScrollView
...@@ -713,21 +546,6 @@ class ProductModel extends Component { ...@@ -713,21 +546,6 @@ class ProductModel extends Component {
listCardActIndex={topActiveIndex} listCardActIndex={topActiveIndex}
clearCallBack={(item, index) => this.handleClearBack(item, index)} clearCallBack={(item, index) => this.handleClearBack(item, index)}
/> />
{/* <PicTitDetaiCalcu
listItem={item}
listIndex={index}
calField={DEFAULT_QUANTITY}
subCalCallBack={(item,index) => this.handleCalCallBack(item,index)}
titText={'title'}
listImgIcon={'imgIcon'}
listPicType={'SQUARE'}
listStyleImg={styles.list_icon}
listStyleTit={styles.list_tit}
// listShowChildNum={CHILD_DATA_NAME}
/> */}
</TouchableOpacity> </TouchableOpacity>
) )
} }
...@@ -735,7 +553,6 @@ class ProductModel extends Component { ...@@ -735,7 +553,6 @@ class ProductModel extends Component {
// 返回底部按钮 // 返回底部按钮
renderFooterBtnItem() { renderFooterBtnItem() {
let {topProcOptionList} = this.state let {topProcOptionList} = this.state
let allCountQuantity = 0 let allCountQuantity = 0
topProcOptionList.map(proItem => { topProcOptionList.map(proItem => {
if(!proItem[SELECTED_QUQNTITY]){ if(!proItem[SELECTED_QUQNTITY]){
...@@ -743,7 +560,6 @@ class ProductModel extends Component { ...@@ -743,7 +560,6 @@ class ProductModel extends Component {
} }
allCountQuantity += proItem[SELECTED_QUQNTITY] allCountQuantity += proItem[SELECTED_QUQNTITY]
}) })
return ( return (
<View style={list_common_item.sub_box}> <View style={list_common_item.sub_box}>
<View style={list_common_item.sub_two_btn}> <View style={list_common_item.sub_two_btn}>
...@@ -774,7 +590,6 @@ class ProductModel extends Component { ...@@ -774,7 +590,6 @@ class ProductModel extends Component {
{this.renderRubbish()} {this.renderRubbish()}
{this.renderTopProItem()} {this.renderTopProItem()}
{this.renderContItem()} {this.renderContItem()}
{/* {this.renderFooterBtnItem()} */}
</View> </View>
{this.renderFooterBtnItem()} {this.renderFooterBtnItem()}
</View> </View>
...@@ -782,8 +597,7 @@ class ProductModel extends Component { ...@@ -782,8 +597,7 @@ class ProductModel extends Component {
) )
} }
render() { render() {
// console.log('已选----', this.state.isVisible)
return ( return (
<View style={styles.dia_container}> <View style={styles.dia_container}>
<Modal <Modal
...@@ -832,21 +646,6 @@ const styles = StyleSheet.create({ ...@@ -832,21 +646,6 @@ const styles = StyleSheet.create({
// maxHeight: pxHeight(580), // maxHeight: pxHeight(580),
// minHeight: pxHeight(360) // minHeight: pxHeight(360)
}, },
// 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: { scro_box: {
flex: 1 flex: 1
}, },
...@@ -995,34 +794,6 @@ const styles = StyleSheet.create({ ...@@ -995,34 +794,6 @@ const styles = StyleSheet.create({
fontFamily: font_family_light, fontFamily: font_family_light,
paddingLeft: 4 paddingLeft: 4
} }
// 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; export default ProductModel;
\ No newline at end of file
import React, { Component } from 'react';
import { StyleSheet, Image, TouchableOpacity, View, Modal, ActivityIndicator, Text, SafeAreaView } from 'react-native';
import { font_family_medium, Height, icon_style, pxSize, second_text_size, Width } from '../../../base/BaseStyle';
import { AsteriskTextStyle, CellTextStyle, ContInputTextStyle, ContTextStyle, ImageTextStyle, TitleTextStyle } from '../CellTextStyle';
import DialogModel from '../DialogModel';
const PropTypes = require('prop-types');
/**
* 页面组件,可含选择器
*/
class PageListArrow extends Component {
static propTypres = {
listActOpa: PropTypes.number,
listCallBack: PropTypes.func, // 点击后的回调函数
listHasAster: PropTypes.bool, // 是否必填
listEditAble: PropTypes.bool,
listDefaValue: PropTypes.string,
listItem: PropTypes.object,
listTitle: PropTypes.string,
listName: PropTypes.string,
listHasArrow: PropTypes.bool,
}
constructor(props) {
super(props);
this.state = {
listCurrentOption: [],
currentItem: {
name: '请选择',
value: ''
},
currentTitle: '组织', // 当前点击项
showTypePop: false, // 选择器弹窗
}
}
// 返回选择器弹窗
renderPickerModel() {
let { listCurrentOption, currentItem, currentTitle, showTypePop } = this.state
return (
<SafeAreaView style={styles.item_container}>
<DialogModel
ref={'pickerModel'}
entityList={listCurrentOption}
callback={(item, itemTitle) => this.handleCallBack(item, itemTitle)}
show={showTypePop}
itemValue={currentItem.value}
itemTitle={currentTitle}
closeModal={(show) => this.handleCloseModal(show)}
/>
</SafeAreaView>
)
}
render() {
let {listActOpa, listCallBack, listHasAster, listEditAble, listDefaValue, listItem, listTitle, listHasArrow} = this.props
return (
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={listActOpa}
onPress={() => listCallBack()}
>
<CellTextStyle>
{ listHasAster ? <AsteriskTextStyle>*</AsteriskTextStyle> : null }
<TitleTextStyle>{listItem[listTitle]}</TitleTextStyle>
{ listEditAble ? <ContInputTextStyle editable={listEditAble} defaultValue={listItem[listDefaValue]} />
: <ContTextStyle>{listItem[listName]}</ContTextStyle>
}
{ listHasArrow ? <ImageTextStyle> <Image source={require('../../images/arr_rig.png')} style={icon_style}/>
</ImageTextStyle> : null}
</CellTextStyle>
</TouchableOpacity>
{ this.renderPickerModel() }
</View>
);
}
}
const styles = StyleSheet.create({
item_container: {
flex: 1
}
})
export default PageListArrow;
\ No newline at end of file
import React, { Component } from 'react'; import React, { Component } from 'react';
import { StyleSheet, Image, Text, TouchableOpacity, View } from 'react-native'; import { StyleSheet, Image, Text, TouchableOpacity, View } from 'react-native';
import { first_text_color, font_family_light, font_family_medium, font_family_regular, font_family_semibold, home_background_color, icon_style, promary_text_color, pxSize, second_text_size, third_text_color, third_text_size } from '../../../base/BaseStyle'; import { first_text_color, font_family_light, font_family_medium, font_family_regular, font_family_semibold, home_background_color, icon_style, promary_text_color, pxSize, second_text_size, third_text_color, third_text_size } from '../../../base/BaseStyle';
import PictureZoom from '../../common/listDataComponent/PictureZoom';
const PropTypes = require('prop-types'); const PropTypes = require('prop-types');
class PicTitDetaiCalcu extends Component { class PicTitDetaiCalcu extends Component {
...@@ -93,7 +94,7 @@ class PicTitDetaiCalcu extends Component { ...@@ -93,7 +94,7 @@ class PicTitDetaiCalcu extends Component {
calIcon = require('../../../images/plur_big_act.png') calIcon = require('../../../images/plur_big_act.png')
} }
console.log('每一列----',showClearIcon, listCardActIndex, showClearIndex, (showClearIcon && listIndex === showClearIndex)) console.log('每一列----',listItem[listImgIcon], listItem[listImgIcon] instanceof Array)
return ( return (
...@@ -148,9 +149,18 @@ class PicTitDetaiCalcu extends Component { ...@@ -148,9 +149,18 @@ class PicTitDetaiCalcu extends Component {
<View style={[styles.ri_inner, listStyleBox]}> <View style={[styles.ri_inner, listStyleBox]}>
{ listImgIcon ? {/* { listImgIcon ?
<View style={[styles.oth_img_box, styles[picOthStyle], listStyleImg]}> <View style={[styles.oth_img_box, styles[picOthStyle], listStyleImg]}>
<Image style={icon_style} source={listItem.imgIcon}/> <Image style={icon_style} source={listItem[listImgIcon]}/>
</View> : null } */}
{ (listImgIcon && listItem[listImgIcon] instanceof Array) ?
<PictureZoom
listImageIndex={0}
listImageUrls={listItem[listImgIcon]}
listStyleImage={[styles.oth_img_box, styles[picOthStyle], listStyleImg]}
listPicType={listPicType}
/>: listImgIcon ? <View style={[styles.oth_img_box, styles[picOthStyle], listStyleImg]}>
<Image style={icon_style} source={listItem[listImgIcon]}/>
</View> : null } </View> : null }
<View style={styles.ri_text_box}> <View style={styles.ri_text_box}>
<TouchableOpacity <TouchableOpacity
...@@ -161,10 +171,10 @@ class PicTitDetaiCalcu extends Component { ...@@ -161,10 +171,10 @@ class PicTitDetaiCalcu extends Component {
<Text numberOfLines={1} style={[styles.thr_ot, listStyleTit]}> <Text numberOfLines={1} style={[styles.thr_ot, listStyleTit]}>
{ listItem[titText] } { listItem[titText] }
</Text> </Text>
{ listItem[tipTextStr] ? <Text numberOfLines={1} style={[styles.ri_te_ot, styles.te_ot_str, listStyleTip]}>{listItem[tipTextStr]}</Text> : null }
{ listItem[tipTextOne] ? <Text numberOfLines={1} style={[styles.ri_te_ot, listStyleTip]}>{listItem[tipTextOne]}</Text> : null }
{ listItem[tipTextTwo] ? <Text numberOfLines={1} style={[styles.ri_te_ot, listStyleTip]}>{listItem[tipTextTwo]}</Text> : null }
</TouchableOpacity> </TouchableOpacity>
{ listItem[tipTextStr] ? <Text numberOfLines={1} style={[styles.ri_te_ot, styles.te_ot_str, listStyleTip]}>{listItem[tipTextStr]}</Text> : null }
{ listItem[tipTextOne] ? <Text numberOfLines={1} style={[styles.ri_te_ot, listStyleTip]}>{listItem[tipTextOne]}</Text> : null }
{ listItem[tipTextTwo] ? <Text numberOfLines={1} style={[styles.ri_te_ot, listStyleTip]}>{listItem[tipTextTwo]}</Text> : null }
</View> </View>
{ {
(showClearIcon && listCardActIndex === showClearIndex) ? (showClearIcon && listCardActIndex === showClearIndex) ?
......
...@@ -8,7 +8,11 @@ import { ...@@ -8,7 +8,11 @@ import {
Image, Image,
ScrollView, ScrollView,
TextInput, TextInput,
FlatList FlatList,
Alert,
Linking,
NativeModules,
Platform
} from 'react-native'; } from 'react-native';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import { import {
...@@ -34,19 +38,38 @@ import { ...@@ -34,19 +38,38 @@ import {
ContInputTextStyle, ContInputTextStyle,
FooterBtnStyle FooterBtnStyle
} from '../common/CellTextStyle'; } from '../common/CellTextStyle';
import ItemCellModel from '../common/ItemCellModel'; import { show, isEmpty, formatStrForDate, cloneObject, dedupQuoteArray, changeDateFormat } from '../../utils/Utils';
import tagData from './module/mock/listTagData';
import { show, isEmpty, formatStrForDate, changeDateFormat } from '../../utils/Utils';
import HeadBackItem from '../common/HeadBackItem'; import HeadBackItem from '../common/HeadBackItem';
import StatusBarView from '../common/StatusBarView'; 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 DialogModel from '../common/DialogModel';
import LodingModel from '../common/LodingModel'; import LodingModel from '../common/LodingModel';
import DateModel from '../common/DateModel'; import DateModel from '../common/DateModel';
import DatePicker from 'react-native-date-picker'; import DatePicker from 'react-native-date-picker';
import { AudioRecorder, AudioUtils } from 'react-native-audio'; import { AudioRecorder, AudioUtils } from 'react-native-audio';
import Sound from 'react-native-sound'; import Sound from 'react-native-sound';
import {
requestSelfOrganizations,
requestSelfSurgeryHospital,
requestSelfOrderType,
requestSelfTemplateCollect,
requestSelfAudio,
requestSelfSumbit,
setSelfInitData,
reqSelfSurgeryHospital,
requestListDataSuccess,
requestSelfSurgeryType
} from '../../action/SelfAction';
import { exitLoginStatus } from '../../action/LoginAction';
import {
SELF_ORDER_LIST_DOING,
SELF_ORDER_LIST_SUCCESS,
SELF_ORDER_LIST_FAILURE,
LOGIN_NO,
SELF_SUBMIT_DOING,
SELF_SUBMIT_SUCCESS,
SELF_SUBMIT_FAILURE
} from '../../base/ActionTypes';
import tagData from './module/mock/listTagData';
class SelfOrderPage extends Component { class SelfOrderPage extends Component {
constructor(props) { constructor(props) {
...@@ -57,60 +80,45 @@ class SelfOrderPage extends Component { ...@@ -57,60 +80,45 @@ class SelfOrderPage extends Component {
{ {
"id": "0", "id": "0",
title: '销售员', title: '销售员',
name: '蔡妍', name: '',
value: '蔡妍', value: ''
isPicker: false,
select: false,
isEditable: false // 不可编辑
}, },
{ {
"id": "1", "id": "1",
title: '组织', title: '组织',
name: '请选择', name: '请选择',
value: '', value: ''
isPicker: true,
select: false
}, },
{ {
"id": "2", "id": "2",
title: '客户名称', title: '客户名称',
name: '请选择', name: '请选择',
value: '', value: ''
isPicker: true,
select: false
}, },
{ {
"id": "3", "id": "3",
title: '收单地点', title: '收单地点',
name: '请选择', name: '请选择',
value: '', value: ''
isPicker: true,
select: false
}, },
{ {
"id": "4", "id": "4",
title: '收货地点', title: '收货地点',
name: '请选择', name: '请选择',
value: '', value: ''
isPicker: true,
select: false
}, },
{ {
"id": "5", "id": "5",
title: '主治医生', title: '主治医生',
name: '请选择', name: '请选择',
value: '', value: '',
isPicker: true,
select: false,
showInput: false, showInput: false,
inputValue: '' inputValue: ''
}, },
{ {
"id": "6", "id": "6",
title: '手术名称', title: '手术名称',
value: '', value: ''
isPicker: false,
select: false
}, },
{ {
"id": "7", "id": "7",
...@@ -118,8 +126,6 @@ class SelfOrderPage extends Component { ...@@ -118,8 +126,6 @@ class SelfOrderPage extends Component {
name: '请选择', name: '请选择',
value: '', value: '',
dateValue: new Date(), dateValue: new Date(),
isPicker: true,
select: false,
showDatePicker: true showDatePicker: true
}, },
{ {
...@@ -127,43 +133,33 @@ class SelfOrderPage extends Component { ...@@ -127,43 +133,33 @@ class SelfOrderPage extends Component {
title: '手术类型', title: '手术类型',
name: '请选择', name: '请选择',
value: '', value: '',
isPicker: true,
select: false
}, },
{ {
"id": "9", "id": "9",
title: '订单类型', title: '订单类型',
name: '请选择', name: '请选择',
value: '', value: ''
isPicker: true,
select: false
}, },
{ {
"id": "10", "id": "10",
title: '选择产品', title: '选择产品',
name: '请选择', name: '请选择',
value: '', value: ''
isPicker: true,
select: false,
showItemPage: true // 展示子页
}, },
{ {
"id": "11", "id": "11",
title: '备注', title: '备注',
value: '', value: '',
isPicker: false,
select: false,
isRemark: true // 备注 isRemark: true // 备注
}, },
{ {
"id": "12", "id": "12",
title: '还有什么要安排的,可录音备注哟!', title: '还有什么要安排的,可录音备注哟!',
value: '', value: '',
isPicker: false,
select: false,
isRecode: true // 录音 isRecode: true // 录音
} }
], ],
subInitListOption: [], // 提交成功后,初始化当前数据
submitOption: { // 提交的信息 submitOption: { // 提交的信息
seller_code: '', // 用户名username seller_code: '', // 用户名username
org_code: '', // 组织 org_code: '', // 组织
...@@ -182,6 +178,10 @@ class SelfOrderPage extends Component { ...@@ -182,6 +178,10 @@ class SelfOrderPage extends Component {
name: '请选择', name: '请选择',
value: '-1' value: '-1'
}, },
localOtherObj: { // 恢复原状态
name: '请选择',
value: ''
},
currentTitle: '组织', // 当前点击项 currentTitle: '组织', // 当前点击项
showTypePop: false, // 选择器弹窗 showTypePop: false, // 选择器弹窗
isSubLoding: false, // 加载中弹窗 isSubLoding: false, // 加载中弹窗
...@@ -190,71 +190,103 @@ class SelfOrderPage extends Component { ...@@ -190,71 +190,103 @@ class SelfOrderPage extends Component {
{ {
name: '男', name: '男',
value: 'boy' 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, // 日期选择器 dateModelPop: false, // 日期选择器
hasPermission: undefined, //录音 授权状态 hasPermission: undefined, //录音 授权状态
audioPath: AudioUtils.DocumentDirectoryPath + '/selfAudio.aac', // 文件路径 audioPath: AudioUtils.DocumentDirectoryPath + `/self_audio_${new Date().getTime()}.aac`, // 文件路径
recording: false, //是否录音 recording: false, //是否录音
pause: false, //录音是否暂停 pause: false, //录音是否暂停
stop: false, //录音是否停止 stop: false, //录音是否停止
currentTime: 0, //录音时长 currentTime: 0, //录音时长
localCustomersOption: [], // 当前医院信息:客户名称、收单地点、收货地点、主治医生
} }
} }
componentDidMount() { componentDidMount() {
// 请求授权
this.getSellerName()
this.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.floor(data.currentTime)});
// };
// // 完成录音
// AudioRecorder.onFinished = (data) => {
// // data 返回需要上传到后台的录音数据
// console.warn(this.state.currentTime)
// console.warn(data)
// };
// })
}
// 赋值销售员 初始化数据
getSellerName() {
let { state, props } = this
let { listOptionData } = this.state
this.setState({
subInitListOption: cloneObject(listOptionData) // 存储初始化数据,提交成功后赋此值
})
if(state.listOptionData[0].name !== props.userInfo.person_name) {
listOptionData[0].name = props.userInfo.person_name
listOptionData[0].value = props.userInfo.user_name
this.setState({
listOptionData,
subInitListOption: cloneObject(listOptionData)
})
}
}
// 请求授权
getAudioAuthorize() {
AudioRecorder.requestAuthorization() AudioRecorder.requestAuthorization()
.then(isAuthor => { .then(isAuthor => {
console.warn('是否授权: ' + isAuthor) console.log('是否授权: ' + isAuthor)
if(!isAuthor) { if(!isAuthor) {
return alert('请前往设置开启录音权限') // return alert('APP需要使用录音,请打开录音权限允许APP使用')
return Alert.alert('提示信息', 'APP需要使用录音,请打开录音权限允许APP使用', [{
text: '设置',
onPress: () => {
if(Platform.OS == 'ios') {
Linking.openURL('app-settings:')
.catch(err => console.log('error', err))
} else if(Platform.OS == 'android') {
NativeModules.OpenSettings.openNetworkSettings(data => {
console.log('call back data', data)
}).catch(err => console.log('android---', err))
}
}
}, {
text: '取消',
}])
} }
this.setState({hasPermission: isAuthor}) this.setState({hasPermission: isAuthor})
this.prepareRecordingPath(this.state.audioPath); this.prepareRecordingPath(this.state.audioPath);
// 录音进展 // 录音进展
AudioRecorder.onProgress = (data) => { AudioRecorder.onProgress = (data) => {
this.setState({currentTime: Math.floor(data.currentTime)}); this.setState({
currentTime: Math.ceil(data.currentTime)
});
}; };
// 完成录音 // 完成录音
AudioRecorder.onFinished = (data) => { AudioRecorder.onFinished = (data) => {
// data 返回需要上传到后台的录音数据 // data 录音数据
console.warn(this.state.currentTime) console.log(this.state.currentTime)
console.warn(data)
}; };
}) })
} }
/** /**
...@@ -281,96 +313,153 @@ class SelfOrderPage extends Component { ...@@ -281,96 +313,153 @@ class SelfOrderPage extends Component {
// 开始录音 // 开始录音
_record = async () => { _record = async () => {
console.warn('changan') console.warn('开始录音==')
show('录音开始') // 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)
// }
if(!this.state.hasPermission) { if(!this.state.hasPermission) {
return alert('没有授权') return Alert.alert('提示信息', 'APP需要使用录音,请打开录音权限允许APP使用', [{
} text: '设置',
if(this.state.recording) { onPress: () => {
return alert('正在录音中...') if(Platform.OS == 'ios') {
Linking.openURL('app-settings:')
.catch(err => console.log('error', err))
} else if(Platform.OS == 'android') {
NativeModules.OpenSettings.openNetworkSettings(data => {
console.log('call back data', data)
}).catch(err => console.log('android---', err))
}
}
}, {
text: '取消',
}])
// return
} }
show('录音开始')
if(this.state.stop) { if(this.state.stop) {
// 初始化录音 // 初始化录音
this.prepareRecordingPath(this.state.audioPath) this.prepareRecordingPath(this.state.audioPath)
} }
this.setState({recording: true,pause: false})
try { try {
await AudioRecorder.startRecording() await AudioRecorder.startRecording()
} catch (err) { } catch (err) {
console.log(err) console.error(err)
} }
} }
// 暂停录音 // 暂停录音
_pause = async () => { // _pause = async () => {
if(!this.state.recording) { // if(!this.state.recording) {
return alert('当前未录音') // return alert('当前未录音')
} // }
try { // try {
await AudioRecorder.pauseRecording() // await AudioRecorder.pauseRecording()
this.setState({pause: true, recording: false}) // this.setState({pause: true, recording: false})
} catch (err) { // } catch (err) {
console.log(err) // console.log(err)
} // }
} // }
// 恢复录音 // 恢复录音
_resume = async () => { // _resume = async () => {
if(!this.state.pause) { // if(!this.state.pause) {
return alert('录音未暂停') // return alert('录音未暂停')
} // }
try { // try {
await AudioRecorder.resumeRecording(); // await AudioRecorder.resumeRecording();
this.setState({pause: false, recording: true}) // this.setState({pause: false, recording: true})
} catch (err) { // } catch (err) {
console.log(err) // console.log(err)
} // }
} // }
// 停止录音 // 停止录音
_stop = async () => { _stop = async () => {
console.warn('tanqi') console.log('----停止录音---', this.state.hasPermission)
if(!this.state.hasPermission) {
return
// return alert('没有授权')
}
show('录音结束') show('录音结束')
console.warn('停止录音',this.state.currentTime)
try { try {
await AudioRecorder.stopRecording(); await AudioRecorder.stopRecording();
this.setState({stop: true, recording: false, paused: false}); this.setState({ stop: true });
} catch (error) { } catch (error) {
console.error(error); console.log('stop record--error->', error);
} }
// 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 () => { _play = async () => {
let self = this let self = this
show('正在播放')
self.whoosh = new Sound(this.state.audioPath, '', (err) => { self.whoosh = new Sound(this.state.audioPath, '', (err) => {
if(err) { if(err) {
show('加载音频失败') show('加载音频失败')
return console.warn(err) return console.log('加载音频失败-->',err)
} }
self.whoosh.play(success => { self.whoosh.play(success => {
if(success) { if(success) {
console.warn('success - 播放成功') show('播放完毕')
}else { }else {
console.warn('fail - 播放失败')
show('播放失败') show('播放失败')
console.log('fail - 播放失败')
} }
}) })
}) })
// 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可以 // 停止播放录音 -- 安卓不能停止、ios可以
_stopPlay = async () => { // _stopPlay = async () => {
console.warn('tingzhi bofang') // console.warn('tingzhi bofang')
let self = this // let self = this
self.whoosh.stop(() => { // self.whoosh.stop(() => {
console.warn('success - 停止成功') // console.warn('success - 停止成功')
}) // })
} // }
// 删除录音 // 删除录音
_del = async () => { _del = async () => {
...@@ -401,61 +490,179 @@ class SelfOrderPage extends Component { ...@@ -401,61 +490,179 @@ class SelfOrderPage extends Component {
// } // }
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
let { self_list_status} = this.props let { self_list_status, loginState, navigation, submit_self_order_status} = this.props
let self = this let self = this
if(self_list_status != nextProps.self_list_status) { 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) { switch (nextProps.self_list_status) {
case SELF_ORDER_LIST_DOING: case SELF_ORDER_LIST_DOING:
this.changeSubLoding(true) this.changeSubLoding(true)
break; break;
case SELF_ORDER_LIST_SUCCESS: case SELF_ORDER_LIST_SUCCESS:
self.changeSubLoding() self.setState({
setTimeout(() => { isSubLoding: false,
lodingTitle: '加载中'
},() => {
self.changeCurrentOption() self.changeCurrentOption()
}, 500) })
break; break;
case SELF_ORDER_LIST_FAILURE: case SELF_ORDER_LIST_FAILURE:
this.changeSubLoding() this.changeSubLoding(false)
break;
default:
break;
}
}
if(loginState != nextProps.loginState) {
switch(nextProps.loginState) {
case LOGIN_NO:
navigation.navigate('LoginPage')
break;
default:
break;
}
}
if(submit_self_order_status != nextProps.submit_self_order_status) {
switch (nextProps.submit_self_order_status) {
case SELF_SUBMIT_DOING:
this.changeSubLoding(true, '提交中')
break;
case SELF_SUBMIT_SUCCESS:
self.setState({
isSubLoding: false,
lodingTitle: '提交中'
},() => {
self.processReturnData()
})
break;
case SELF_SUBMIT_FAILURE:
this.changeSubLoding(false, '提交中')
break;
default:
break; break;
} }
} }
// 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) { changeSubLoding(loading, loadTit) {
this.setState({
isSubLoding: loading || false,
lodingTitle: loadTit || '加载中'
})
}
// 清空当前项以下的值
clearInitNameAndValue(curIndex) {
let { listOptionData, localOtherObj } = this.state
let that = this
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(index > curIndex && index < 12 ) {
item.name = localOtherObj.name
item.value = localOtherObj.value
// if(listOptionData[1].value && item.title == '客户名称') {
// that.organizationGetCustomerData()
// }
// if(listOptionData[2].value && item.title == '收单地点') {
// that.customerGetBill()
// }
// if(listOptionData[2].value && item.title == '收货地点') {
// that.customerGetShip()
// }
// if(item.title == '主治医生') {
// item.showInput = false,
// item.inputValue = ''
// }
}
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 !== '其他') {
// // 不是主治医生
// tempTit = listOptionData[chIndex].title
// tempStatus = true
// break
// }
}
this.setState({ this.setState({
isSubLoding: loading || false canSubFlag: !tempStatus
}) })
if(isSubCheck && tempStatus) {
show(`${tempTit}未选择,不能提交`)
}
} }
// 选择器弹窗回调函数 // 选择器弹窗回调函数
handleCallBack(item, itemTitle) { handleCallBack(item, itemTitle) {
// console.warn(item, 'item------') // console.warn('选择器弹窗回调函数-----',itemTitle)
// console.warn('item-itemTitle-----',itemTitle) let { listOptionData} = this.state
let { listOptionData } = this.state let self = this
listOptionData.map(function(chItem, index){
if(chItem.title === itemTitle) {
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 === '手术模板') {
// listOptionData[10].value = item.desc
// }
}
})
this.setState({ this.setState({
currentItem: item, currentItem: item,
listOptionData: listOptionData
},() => {
self.changeCanSub()
}) })
// 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])
} }
// 关闭弹窗 // 关闭弹窗
...@@ -467,117 +674,181 @@ class SelfOrderPage extends Component { ...@@ -467,117 +674,181 @@ class SelfOrderPage extends Component {
// 修改当前选择器数据 // 修改当前选择器数据
changeCurrentOption() { changeCurrentOption() {
let { listOptionData, currentTitle } = this.state let { currentTitle } = this.state
let { selfOrderOption } = this.props let { selfOrderOption } = this.props
console.warn('当前:--selfOrderOption---', selfOrderOption)
let tempOption = [] let tempOption = []
let that = this
if(selfOrderOption.length === 0) {
show(`当前${currentTitle}为空`)
return
}
if (currentTitle === '组织') { if (currentTitle === '组织') {
tempOption = this.changeNameAndValue(selfOrderOption, 'org_name', 'org_code') tempOption = this.changeNameAndValue(selfOrderOption, 'org_name', 'org_code')
} else if (currentTitle === '客户名称') { } else if (currentTitle === '客户名称') {
tempOption =[ this.setState({
{ localCustomersOption: selfOrderOption
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') // 去重医院数据
let filterOpt = dedupQuoteArray(selfOrderOption, 'customer_code')
let currentArr = []
if(filterOpt.length) {
filterOpt.forEach(item => {
let obj = {}
obj.customer_code = item.customer_code
obj.customer_name = item.customer_name
currentArr.push(obj)
})
}
tempOption = this.changeNameAndValue(currentArr, 'customer_name', 'customer_code')
} else if (currentTitle === '手术类型') { } else if (currentTitle === '手术类型') {
tempOption =[ let resultArr = []
{ selfOrderOption.forEach(item => {
surgery_type_name: '手术类型-4', let obj = {}
surgery_type_code: 'surgery_4' obj.name = item.value_name
}, obj.value = item.value_code
{ resultArr.push(obj)
surgery_type_name: '手术类型-5', })
surgery_type_code: 'surgery_5' tempOption = [...resultArr]
}, } else if (currentTitle === '手术模板') {
{ let resultArr = []
surgery_type_name: '手术类型-6', selfOrderOption.forEach(item => {
surgery_type_code: 'surgery_6' let obj = {}
} let tempName = item.template_name
] if(item.doctor_name) {
tempOption = this.changeNameAndValue(tempOption, 'surgery_type_name', 'surgery_type_code') tempName += `——${item.doctor_name}`
} 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'
} }
] obj.name = tempName
tempOption = this.changeNameAndValue(tempOption, 'order_type_name', 'order_type_code') obj.value = item.template_number
obj.desc = item.template_desc
obj.template_pic = item.template_pic
resultArr.push(obj)
})
tempOption = [...resultArr]
} else if (currentTitle === '订单类型') {
tempOption = this.changeNameAndValue(selfOrderOption, 'value_name', 'value_code')
} }
this.setState({ this.setState({
showTypePop: true,
listCurrentOption: [...tempOption] listCurrentOption: [...tempOption]
}, () => {
// 解决 IOS 弹窗显示问题
setTimeout(() => {
that.setState({
showTypePop: true
})
}, 500)
}) })
// 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 // 修改选择器为属性 name 和 value
...@@ -594,138 +865,323 @@ class SelfOrderPage extends Component { ...@@ -594,138 +865,323 @@ class SelfOrderPage extends Component {
// 组织 点击 // 组织 点击
handleOrganizationCheck() { handleOrganizationCheck() {
let { listOptionData } = this.state let { state, props } = this
let { token, requestOrganizations } = this.props
console.warn('组织------check', token, requestOrganizations)
let self = this
this.setState({ this.setState({
currentTitle: '组织', currentTitle: '组织',
currentItem: { currentItem: {
name: listOptionData[1].name, name: state.listOptionData[1].name,
value: listOptionData[1].value value: state.listOptionData[1].value
} }
}, () => { }, () => {
requestOrganizations(token) let params = {
access_token: props.token
}
props.requestSelfOrganizations(params)
}) })
// let { listOptionData } = this.state
// let { token, requestSelfOrganizations } = this.props
// console.warn('组织------check', token, requestSelfOrganizations)
// let self = this
// this.setState({ // this.setState({
// isSubLoding: true // currentTitle: '组织',
// currentItem: {
// name: listOptionData[1].name,
// value: listOptionData[1].value
// }
// }, () => { // }, () => {
// setTimeout(() => { // requestSelfOrganizations(token)
// 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() { handleCustomerCheck() {
let { listOptionData } = this.state let { state, props } = this
let { token, requestOrganizations } = this.props
console.warn('客户名称------check', token, requestOrganizations)
let self = this let self = this
if(this.judgeOrgIsNull()) {
self.setState({
currentTitle: '客户名称',
currentItem: {
name: state.listOptionData[2].name,
value: state.listOptionData[2].value
}
}, () => {
// 在此修改接口
self.getCustomerData()
})
}
// let { listOptionData } = this.state
// let { token, requestSelfOrganizations } = this.props
// console.warn('客户名称------check', token, requestSelfOrganizations)
// let self = this
this.setState({ // this.setState({
currentTitle: '客户名称', // currentTitle: '客户名称',
currentItem: { // currentItem: {
name: listOptionData[2].name, // name: listOptionData[2].name,
value: listOptionData[2].value // value: listOptionData[2].value
// }
// }, () => {
// // 在此修改接口
// requestSelfOrganizations(token)
// })
}
// 获取客户名称
getCustomerData() {
let { state, props } = this
let params = {
access_token: props.token,
org_code: state.listOptionData[1].value,
seller_code: props.userInfo.user_name
}
props.requestSelfSurgeryHospital(params)
}
// 组织选择后,判断当前客户名称是否只有一个
async organizationGetCustomerData() {
let { state, props } = this
let params = {
access_token: props.token,
org_code: state.listOptionData[1].value,
seller_code: props.userInfo.user_name
}
let that = this
let { global_domain_config } = props
let cusResult = await reqSelfSurgeryHospital(global_domain_config, params);
if(cusResult.error_code == 0) {
let { data: { customers } } = cusResult
props.requestListDataSuccess(customers)
let filterOpt = dedupQuoteArray(customers, 'customer_code')
if(filterOpt.length === 0) {
show(`当前客户名称为空`)
return
} }
}, () => { if(filterOpt.length === 1) {
// 在此修改接口 let { listOptionData } = state
requestOrganizations(token) listOptionData[2].name = filterOpt[0].customer_name
}) listOptionData[2].value = filterOpt[0].customer_code
that.setState({
listOptionData,
localCustomersOption: customers
}, () => {
that.customerGetBill()
that.customerGetShip()
})
}
} else if(cusResult.error_code == 41006) {
show('登录过期,请重新登录');
props.exitLoginStatus();
} else {
let error_msg = cusResult.error_msg || cusResult.message
show(error_msg);
}
} }
// 收单地点 点击 // 收单地点 点击
handleBillCheck() { handleBillCheck() {
let { listOptionData } = this.state let { localCustomersOption, listOptionData } = this.state
let { token, requestOrganizations } = this.props
console.warn('收单地点------check', token, requestOrganizations)
let self = this let self = this
this.setState({ if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
currentTitle: '收单地点', self.setState({
currentItem: { currentTitle: '收单地点',
name: listOptionData[3].name, currentItem: {
value: listOptionData[3].value name: listOptionData[3].name,
} value: listOptionData[3].value
}, () => { }
// 在此修改接口 }, () => {
requestOrganizations(token) let tempOption = []
}) if( localCustomersOption.length ) {
localCustomersOption.forEach((item) => {
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')
self.setState({
showTypePop: true,
listCurrentOption: [...tempOption]
})
})
}
// let { listOptionData } = this.state
// let { token, requestSelfOrganizations } = this.props
// console.warn('收单地点------check', token, requestSelfOrganizations)
// let self = this
// this.setState({
// currentTitle: '收单地点',
// currentItem: {
// name: listOptionData[3].name,
// value: listOptionData[3].value
// }
// }, () => {
// // 在此修改接口
// requestSelfOrganizations(token)
// })
}
customerGetBill() {
let { localCustomersOption, listOptionData } = this.state
let that = this
let tempLocalOption = localCustomersOption.filter(item => item.customer_code === listOptionData[2].value)
tempLocalOption = dedupQuoteArray(tempLocalOption, 'bill_to_site_code')
if(tempLocalOption.length === 0) {
show(`当前收单地点为空`)
return
}
if(tempLocalOption.length === 1) {
listOptionData[3].name = tempLocalOption[0].bill_to_site_name
listOptionData[3].value = tempLocalOption[0].bill_to_site_code
that.setState({
listOptionData
})
}
} }
// 收货地点 点击 // 收货地点 点击
handleShipCheck() { handleShipCheck() {
let { listOptionData } = this.state let { localCustomersOption, listOptionData } = this.state
let { token, requestOrganizations } = this.props
console.warn('收货地点------check', token, requestOrganizations)
let self = this let self = this
this.setState({ if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
currentTitle: '收货地点', self.setState({
currentItem: { currentTitle: '收货地点',
name: listOptionData[4].name, currentItem: {
value: listOptionData[4].value name: listOptionData[4].name,
} value: listOptionData[4].value
}, () => { }
// 在此修改接口 }, () => {
requestOrganizations(token) 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')
self.setState({
showTypePop: true,
listCurrentOption: [...tempOption]
})
})
}
// let { listOptionData } = this.state
// let { token, requestSelfOrganizations } = this.props
// console.warn('收货地点------check', token, requestSelfOrganizations)
// let self = this
// this.setState({
// currentTitle: '收货地点',
// currentItem: {
// name: listOptionData[4].name,
// value: listOptionData[4].value
// }
// }, () => {
// // 在此修改接口
// requestSelfOrganizations(token)
// })
}
customerGetShip() {
let { localCustomersOption, listOptionData } = this.state
let that = this
let tempLocalOption = localCustomersOption.filter(item => item.customer_code === listOptionData[2].value)
tempLocalOption = dedupQuoteArray(tempLocalOption, 'ship_to_site_code')
if(tempLocalOption.length === 0) {
show(`当前收货地点为空`)
return
}
if(tempLocalOption.length === 1) {
listOptionData[4].name = tempLocalOption[0].ship_to_site_name
listOptionData[4].value = tempLocalOption[0].ship_to_site_code
that.setState({
listOptionData
})
}
} }
// 主治医生 点击/输入 // 主治医生 点击/输入
handleDoctorCheck(text) { handleDoctorCheck() {
let { listOptionData } = this.state let { localCustomersOption, listOptionData } = this.state
let { token, requestOrganizations } = this.props
console.warn('主治医生------check', token, requestOrganizations)
let self = this let self = this
if(text) { if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
// 输入
this.setState({
listOptionData: listOptionData.map(item => {
if(item.title === '主治医生') {
item.inputValue = text
}
return item
})
})
} else {
// 点击 // 点击
this.setState({ self.setState({
currentTitle: '主治医生', currentTitle: '主治医生',
currentItem: { currentItem: {
name: listOptionData[5].name, name: listOptionData[5].name,
value: listOptionData[5].value value: listOptionData[5].value
} }
}, () => { }, () => {
// 在此修改接口 let tempOption = []
requestOrganizations(token) if( localCustomersOption.length ) {
localCustomersOption.forEach((item) => {
if(item.customer_code === listOptionData[2].value) {
// 保证是当前客户名称下的医生
let obj = {}
obj.value = item.customer_doctor
obj.name = item.customer_doctor
tempOption.push(obj)
}
})
}
let othObj = {
name: '其他',
value: '-1'
}
tempOption.push(othObj)
tempOption = dedupQuoteArray(tempOption, 'name')
self.setState({
showTypePop: true,
listCurrentOption: [...tempOption]
})
}) })
} }
// let { listOptionData } = this.state
// let { token, requestSelfOrganizations } = this.props
// console.warn('主治医生------check', token, requestSelfOrganizations)
// 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
// }
// }, () => {
// // 在此修改接口
// requestSelfOrganizations(token)
// })
// }
console.warn('主治医生------check',listOptionData[5]) // console.warn('主治医生------check',listOptionData[5])
}
// 主治医生 输入
handleDoctorInput(text) {
let { listOptionData } = this.state
this.setState({
listOptionData: listOptionData.map(item => {
if(item.title === '主治医生') {
item.inputValue = text
}
return item
})
})
} }
// 手术名称 输入 // 手术名称 输入
...@@ -789,37 +1245,72 @@ class SelfOrderPage extends Component { ...@@ -789,37 +1245,72 @@ class SelfOrderPage extends Component {
// 手术类型 点击 // 手术类型 点击
handleSurTypeCheck() { handleSurTypeCheck() {
let { listOptionData } = this.state let { listOptionData } = this.state
let { token, requestOrganizations } = this.props let { props } = this
console.warn('手术类型------check', token, requestOrganizations)
let self = this let self = this
this.setState({ if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
currentTitle: '手术类型', self.setState({
currentItem: { currentTitle: '手术类型',
name: listOptionData[8].name, currentItem: {
value: listOptionData[8].value // name: listOptionData[6].name,
} // value: listOptionData[6].value
}, () => { }
// 在此修改接口 }, () => {
requestOrganizations(token) let params = {
}) access_token: props.token,
value_set_code: 'ORTHOPEDICS_PRODUCT_CLASS'
}
props.requestSelfSurgeryType(params)
})
}
// let { listOptionData } = this.state
// let { token, requestSelfOrganizations } = this.props
// console.warn('手术类型------check', token, requestSelfOrganizations)
// let self = this
// this.setState({
// currentTitle: '手术类型',
// currentItem: {
// name: listOptionData[8].name,
// value: listOptionData[8].value
// }
// }, () => {
// // 在此修改接口
// requestSelfOrganizations(token)
// })
} }
// 订单类型 点击 // 订单类型 点击
handleOrderCheck() { handleOrderCheck() {
let { listOptionData } = this.state let { state, props } = this
let { token, requestOrganizations } = this.props if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
console.warn('订单类型------check', token, requestOrganizations) this.setState({
let self = this currentTitle: '订单类型',
this.setState({ currentItem: {
currentTitle: '订单类型', // name: state.listOptionData[9].name,
currentItem: { // value: state.listOptionData[9].value
name: listOptionData[9].name, }
value: listOptionData[9].value }, () => {
} // 在此修改接口
}, () => { let params = {
// 在此修改接口 access_token: props.token,
requestOrganizations(token) value_set_code:'SUR_ORDER_TYPE'
}) }
props.requestSelfOrderType(params)
})
}
// let { listOptionData } = this.state
// let { token, requestSelfOrganizations } = this.props
// console.warn('订单类型------check', token, requestSelfOrganizations)
// let self = this
// this.setState({
// currentTitle: '订单类型',
// currentItem: {
// name: listOptionData[9].name,
// value: listOptionData[9].value
// }
// }, () => {
// // 在此修改接口
// requestSelfOrganizations(token)
// })
} }
// 选择产品 点击跳转 // 选择产品 点击跳转
...@@ -861,10 +1352,160 @@ class SelfOrderPage extends Component { ...@@ -861,10 +1352,160 @@ class SelfOrderPage extends Component {
// 生成订单 点击 // 生成订单 点击
handleSubmit() { handleSubmit() {
console.warn('生成订单', this.props.navigation) console.warn('生成订单', this.props.navigation)
let { navigation } = this.props // this.changeCanSub(true)
let { state: { params: { title } } } = navigation // let { state, props } = this
navigation.navigate('SubSuccessPage', { title: `${title} - 下单成功` }) // let that = this
// // 可提交 并且 不处于正在提交中
// if(state.canSubFlag && !state.isSubLoding) {
// // 先提交录音,再提交接口
// if(state.stop) {
// let params = {
// access_token: props.token,
// path: state.audioPath
// }
// let {global_domain_config} = props
// let audioResult = await requestSelfAudio(global_domain_config, params);
// that.changeSubLoding(true, '上传中')
// if(audioResult.error_code == 0) {
// // 提交订单
// that.setState({
// listOptionData: state.listOptionData.map((item, index) => {
// if(index == 11) {
// item.value = audioResult.data.url
// }
// return item
// })
// }, () => {
// that.changeSubLoding(false)
// that.submitSelfOrder()
// })
// } else if(audioResult.error_code == 41006) {
// that.changeSubLoding(false)
// show('登录过期,请重新登录');
// props.exitLoginStatus();
// } else {
// // that.changeSubLoding(false)
// let error_msg = audioResult.error_msg || audioResult.message
// show(error_msg);
// that.submitSelfOrder()
// }
// } else {
// that.submitSelfOrder()
// }
// }
// // let { navigation } = this.props
// // let { state: { params: { title } } } = navigation
// // navigation.navigate('SubSuccessPage', { title: `${title} - 下单成功` })
}
// 提交订单
submitSelfOrder() {
// let { state, props } = this
// 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
// let params = {
// access_token: props.token,
// data: { ...tempSubOption }
// }
// props.requestSelfSumbit(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 { selfOrderOption } = this.props
let that = this
if(selfOrderOption.create_success) {
if(selfOrderOption.create_success == 'N') {
// // 打开库存不足弹窗
// this.setState({
// not_enough_items_list: selfOrderOption.not_enough_items_list
// },() => {
// // 解决 IOS 弹窗显示问题
// setTimeout(() => {
// that.setState({
// showNotEnogPop: true
// })
// }, 500)
// })
} else if(selfOrderOption.create_success == 'Y') {
// // 打开下单成功页面
// this.clearAllData()
// let { state: { params: { title } } } = this.props.navigation
// this.props.navigation.navigate('SubSuccPage', {
// title: `${title} - 下单成功`,
// orderNumber: selfOrderOption.survey_collect_number
// })
}
}
}
// 清空数据
clearAllData() {
let {props} = this
let {listOptionData, subInitListOption} = this.state
props.setSelfInitData() // 清空缓存数据
listOptionData = cloneObject(subInitListOption) // 清空本地数据
this.setState({
listOptionData,
currentTime: 0, // 清除语音
stop: false
})
}
// // 库存不足弹窗回调 -- 确定
// handleNotEnoughCallBack() {
// let { submitOption } = this.state
// let self = this
// this.setState({
// submitOption: {
// ...submitOption,
// force_balance_check_flag: 'N'
// }
// }, () => {
// self.handleSubmit()
// })
// }
// // 库存不足弹窗关闭
// handleNotEnoughCloseModal(show) {
// this.setState({
// showNotEnogPop: show
// })
// }
// 返回备注以上的元素 // 返回备注以上的元素
renderListItem() { renderListItem() {
...@@ -895,7 +1536,7 @@ class SelfOrderPage extends Component { ...@@ -895,7 +1536,7 @@ class SelfOrderPage extends Component {
<CellTextStyle> <CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle> <AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'销售员'}</TitleTextStyle> <TitleTextStyle>{'销售员'}</TitleTextStyle>
<ContInputTextStyle editable={false} defaultValue={listOptionData[0].value}></ContInputTextStyle> <ContInputTextStyle editable={false} defaultValue={listOptionData[0].name}></ContInputTextStyle>
</CellTextStyle> </CellTextStyle>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
...@@ -907,7 +1548,7 @@ class SelfOrderPage extends Component { ...@@ -907,7 +1548,7 @@ class SelfOrderPage extends Component {
<CellTextStyle> <CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle> <AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'组织'}</TitleTextStyle> <TitleTextStyle>{'组织'}</TitleTextStyle>
<ContTextStyle>{listOptionData[1].name} -- {listOptionData[1].value}</ContTextStyle> <ContTextStyle>{listOptionData[1].name}</ContTextStyle>
{ this.renderRightArrowItem() } { this.renderRightArrowItem() }
</CellTextStyle> </CellTextStyle>
</TouchableOpacity> </TouchableOpacity>
...@@ -920,7 +1561,7 @@ class SelfOrderPage extends Component { ...@@ -920,7 +1561,7 @@ class SelfOrderPage extends Component {
<CellTextStyle> <CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle> <AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'客户名称'}</TitleTextStyle> <TitleTextStyle>{'客户名称'}</TitleTextStyle>
<ContTextStyle>{listOptionData[2].name} -- {listOptionData[2].value}</ContTextStyle> <ContTextStyle>{listOptionData[2].name}</ContTextStyle>
{ this.renderRightArrowItem() } { this.renderRightArrowItem() }
</CellTextStyle> </CellTextStyle>
</TouchableOpacity> </TouchableOpacity>
...@@ -933,7 +1574,7 @@ class SelfOrderPage extends Component { ...@@ -933,7 +1574,7 @@ class SelfOrderPage extends Component {
<CellTextStyle> <CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle> <AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'收单地点'}</TitleTextStyle> <TitleTextStyle>{'收单地点'}</TitleTextStyle>
<ContTextStyle>{listOptionData[3].name} -- {listOptionData[3].value}</ContTextStyle> <ContTextStyle>{listOptionData[3].name}</ContTextStyle>
{ this.renderRightArrowItem() } { this.renderRightArrowItem() }
</CellTextStyle> </CellTextStyle>
</TouchableOpacity> </TouchableOpacity>
...@@ -946,7 +1587,7 @@ class SelfOrderPage extends Component { ...@@ -946,7 +1587,7 @@ class SelfOrderPage extends Component {
<CellTextStyle> <CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle> <AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'收货地点'}</TitleTextStyle> <TitleTextStyle>{'收货地点'}</TitleTextStyle>
<ContTextStyle>{listOptionData[4].name} -- {listOptionData[4].value}</ContTextStyle> <ContTextStyle>{listOptionData[4].name}</ContTextStyle>
{ this.renderRightArrowItem() } { this.renderRightArrowItem() }
</CellTextStyle> </CellTextStyle>
</TouchableOpacity> </TouchableOpacity>
...@@ -959,7 +1600,7 @@ class SelfOrderPage extends Component { ...@@ -959,7 +1600,7 @@ class SelfOrderPage extends Component {
<CellTextStyle> <CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle> <AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'主治医生'}</TitleTextStyle> <TitleTextStyle>{'主治医生'}</TitleTextStyle>
<ContTextStyle>{listOptionData[5].name} -- {listOptionData[5].value}</ContTextStyle> <ContTextStyle>{listOptionData[5].name}</ContTextStyle>
{ this.renderRightArrowItem() } { this.renderRightArrowItem() }
</CellTextStyle> </CellTextStyle>
</TouchableOpacity> </TouchableOpacity>
...@@ -997,7 +1638,7 @@ class SelfOrderPage extends Component { ...@@ -997,7 +1638,7 @@ class SelfOrderPage extends Component {
> >
<CellTextStyle> <CellTextStyle>
<TitleTextStyle>{'手术时间'}</TitleTextStyle> <TitleTextStyle>{'手术时间'}</TitleTextStyle>
<ContTextStyle>{listOptionData[7].name} -- {listOptionData[7].value}</ContTextStyle> <ContTextStyle>{listOptionData[7].name}</ContTextStyle>
{ this.renderRightArrowItem() } { this.renderRightArrowItem() }
</CellTextStyle> </CellTextStyle>
</TouchableOpacity> </TouchableOpacity>
...@@ -1018,7 +1659,7 @@ class SelfOrderPage extends Component { ...@@ -1018,7 +1659,7 @@ class SelfOrderPage extends Component {
<CellTextStyle> <CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle> <AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'手术类型'}</TitleTextStyle> <TitleTextStyle>{'手术类型'}</TitleTextStyle>
<ContTextStyle>{listOptionData[8].name} -- {listOptionData[8].value}</ContTextStyle> <ContTextStyle>{listOptionData[8].name}</ContTextStyle>
{ this.renderRightArrowItem() } { this.renderRightArrowItem() }
</CellTextStyle> </CellTextStyle>
</TouchableOpacity> </TouchableOpacity>
...@@ -1031,7 +1672,7 @@ class SelfOrderPage extends Component { ...@@ -1031,7 +1672,7 @@ class SelfOrderPage extends Component {
<CellTextStyle> <CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle> <AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'订单类型'}</TitleTextStyle> <TitleTextStyle>{'订单类型'}</TitleTextStyle>
<ContTextStyle>{listOptionData[9].name} -- {listOptionData[9].value}</ContTextStyle> <ContTextStyle>{listOptionData[9].name}</ContTextStyle>
{ this.renderRightArrowItem() } { this.renderRightArrowItem() }
</CellTextStyle> </CellTextStyle>
</TouchableOpacity> </TouchableOpacity>
...@@ -1044,7 +1685,7 @@ class SelfOrderPage extends Component { ...@@ -1044,7 +1685,7 @@ class SelfOrderPage extends Component {
<CellTextStyle> <CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle> <AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'选择产品'}</TitleTextStyle> <TitleTextStyle>{'选择产品'}</TitleTextStyle>
<ContTextStyle>{listOptionData[10].name} -- {listOptionData[10].value}</ContTextStyle> <ContTextStyle>{listOptionData[10].name}</ContTextStyle>
{ this.renderRightArrowItem() } { this.renderRightArrowItem() }
</CellTextStyle> </CellTextStyle>
</TouchableOpacity> </TouchableOpacity>
...@@ -1052,11 +1693,6 @@ class SelfOrderPage extends Component { ...@@ -1052,11 +1693,6 @@ class SelfOrderPage extends Component {
{ this.renderPickerModel() } { this.renderPickerModel() }
{/* {
tagData.map((item, index) => {
return <ItemCellModel item={item} navigation={navigation}></ItemCellModel>
})
} */}
</View> </View>
) )
} }
...@@ -1072,13 +1708,7 @@ class SelfOrderPage extends Component { ...@@ -1072,13 +1708,7 @@ class SelfOrderPage extends Component {
// 返回选择器弹窗 // 返回选择器弹窗
renderPickerModel() { renderPickerModel() {
let { listCurrentOption, let { listCurrentOption, currentItem, currentTitle, showTypePop } = this.state
currentItem,
currentTitle,
showTypePop,
} = this.state
// console.warn('弹窗-----,', listCurrentOption)
return ( return (
<SafeAreaView style={styles.item_container}> <SafeAreaView style={styles.item_container}>
...@@ -1091,12 +1721,12 @@ class SelfOrderPage extends Component { ...@@ -1091,12 +1721,12 @@ class SelfOrderPage extends Component {
// }) // })
// }} // }}
// itemIndex={this.state.type} // itemIndex={this.state.type}
entityList={listCurrentOption} entityList={listCurrentOption}
callback={(item, itemTitle) => this.handleCallBack(item, itemTitle)} callback={(item, itemTitle) => this.handleCallBack(item, itemTitle)}
show={showTypePop} show={showTypePop}
itemValue={currentItem.value} itemValue={currentItem.value}
itemTitle={currentTitle} itemTitle={currentTitle}
closeModal={(show) => this.handleCloseModal(show)} closeModal={(show) => this.handleCloseModal(show)}
/> />
</SafeAreaView> </SafeAreaView>
) )
...@@ -1260,136 +1890,6 @@ const styles = StyleSheet.create({ ...@@ -1260,136 +1890,6 @@ const styles = StyleSheet.create({
self_main : { self_main : {
padding: 14 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: { sub_btn_pro: {
backgroundColor: promary_color backgroundColor: promary_color
}, },
...@@ -1412,15 +1912,42 @@ const mapStateToProps = (state) => { ...@@ -1412,15 +1912,42 @@ const mapStateToProps = (state) => {
return { return {
userInfo: state.login.userInfo, userInfo: state.login.userInfo,
token: state.login.token, token: state.login.token,
loginState: state.login.loginState,
self_list_status: state.selfOrder.self_list_status, self_list_status: state.selfOrder.self_list_status,
selfOrderOption: state.selfOrder.selfOrderOption submit_self_order_status: state.selfOrder.submit_self_order_status,
selfOrderOption: state.selfOrder.selfOrderOption,
global_domain_config: state.login.global_domain_config
} }
} }
const mapDispatchToProps = (dispatch) => { const mapDispatchToProps = (dispatch) => {
return { return {
requestOrganizations: (token) => { requestSelfOrganizations: (params) => {
dispatch(requestOrganizations(token)) dispatch(requestSelfOrganizations(params))
},
requestSelfSurgeryHospital: (params) => {
dispatch(requestSelfSurgeryHospital(params))
},
requestSelfOrderType: (params) => {
dispatch(requestSelfOrderType(params))
},
requestSelfTemplateCollect: (params) => {
dispatch(requestSelfTemplateCollect(params))
},
requestSelfSumbit: (params) => {
dispatch(requestSelfSumbit(params))
},
exitLoginStatus: () => {
dispatch(exitLoginStatus())
},
setSelfInitData: () => {
dispatch(setSelfInitData())
},
requestListDataSuccess: (data) => {
dispatch(requestListDataSuccess(data))
},
requestSelfSurgeryType: (params) => {
dispatch(requestSelfSurgeryType(params))
} }
} }
} }
......
...@@ -62,16 +62,12 @@ class ChooseProductPage extends Component { ...@@ -62,16 +62,12 @@ class ChooseProductPage extends Component {
leftOptionList: [], // 左侧分类数据 leftOptionList: [], // 左侧分类数据
defaultThridShow: false, // 默认人体髋关节-小类不显示 defaultThridShow: false, // 默认人体髋关节-小类不显示
selectShowPopup: false, // 共计已选弹窗 selectShowPopup: false, // 共计已选弹窗
// SELECTED_QUQNTITY: 'selectedQuantity', // 中类数量
// SELECTED_DATA_ARR: 'selectedDataArr', // 中类已选元素
// DEFAULT_SECOND_DATA: 'localSecondData', // 中类原本元素
// allCountQuantity: 0
} }
} }
componentDidMount() { componentDidMount() {
// console.log('本地测试数据====localMockData===', localMockData) // console.log('本地测试数据====localMockData===', localMockData)
// 赋值测试数据 // 赋值本地测试数据
this.setState({ this.setState({
topProcOptionList: cloneObject(localMockData.localTopProcOption), topProcOptionList: cloneObject(localMockData.localTopProcOption),
leftOptionList: cloneObject(localMockData.localLeftOption) leftOptionList: cloneObject(localMockData.localLeftOption)
...@@ -93,7 +89,6 @@ class ChooseProductPage extends Component { ...@@ -93,7 +89,6 @@ class ChooseProductPage extends Component {
this.setState({ this.setState({
leftActiveIndex: index, leftActiveIndex: index,
// rightSecondData: leftOptionList[index][DEFAULT_SECOND_DATA] // 本地数据 // rightSecondData: leftOptionList[index][DEFAULT_SECOND_DATA] // 本地数据
// rightSecondData: leftOptionList[index].localSecondData // 本地数据 // rightSecondData: leftOptionList[index].localSecondData // 本地数据
}) })
} }
...@@ -124,23 +119,9 @@ class ChooseProductPage extends Component { ...@@ -124,23 +119,9 @@ class ChooseProductPage extends Component {
leItem[SELECTED_DATA_ARR] = [] leItem[SELECTED_DATA_ARR] = []
} }
if(leIndex === leftActiveIndex) { if(leIndex === leftActiveIndex) {
// console.log('外面 childData----', childData)
if(leItem[DEFAULT_SECOND_DATA].length && leItem[DEFAULT_SECOND_DATA][superIndex] && childData.length){ if(leItem[DEFAULT_SECOND_DATA].length && leItem[DEFAULT_SECOND_DATA][superIndex] && childData.length){
// leItem[DEFAULT_SECOND_DATA][superIndex]
// let superTip = ''
let sumCount = 0 let sumCount = 0
// console.log('childData----', childData)
childData.map((chDa, chInd) => { childData.map((chDa, chInd) => {
// let splitStr = ' / '
// if(chInd === childData.length - 1){
// splitStr = ''
// }
// superTip += `${chDa.title}x${chDa.selectedQuantity}${splitStr}`
if(!chDa[DEFAULT_FIELD]){ if(!chDa[DEFAULT_FIELD]){
chDa[DEFAULT_FIELD] = 0 chDa[DEFAULT_FIELD] = 0
} }
...@@ -159,7 +140,6 @@ class ChooseProductPage extends Component { ...@@ -159,7 +140,6 @@ class ChooseProductPage extends Component {
lineOptions: childData, lineOptions: childData,
[DEFAULT_FIELD]: sumCount [DEFAULT_FIELD]: sumCount
} }
// 初始化 // 初始化
leItem[DEFAULT_SECOND_DATA][superIndex][CHILD_DATA_NAME] = [] leItem[DEFAULT_SECOND_DATA][superIndex][CHILD_DATA_NAME] = []
leItem[DEFAULT_SECOND_DATA][superIndex][CHILD_DATA_NAME].push(curObj) leItem[DEFAULT_SECOND_DATA][superIndex][CHILD_DATA_NAME].push(curObj)
...@@ -167,12 +147,9 @@ class ChooseProductPage extends Component { ...@@ -167,12 +147,9 @@ class ChooseProductPage extends Component {
} }
// 初始化 // 初始化
leItem[SELECTED_QUQNTITY] = 0 leItem[SELECTED_QUQNTITY] = 0
leItem[SELECTED_DATA_ARR] = [] leItem[SELECTED_DATA_ARR] = []
if(leItem[DEFAULT_SECOND_DATA].length){ // 本地测试 localSecondData DEFAULT_SECOND_DATA if(leItem[DEFAULT_SECOND_DATA].length){ // 本地测试 localSecondData DEFAULT_SECOND_DATA
leItem[DEFAULT_SECOND_DATA].forEach(function(chItem) { leItem[DEFAULT_SECOND_DATA].forEach(function(chItem) {
if(chItem[DEFAULT_FIELD] > 0){ if(chItem[DEFAULT_FIELD] > 0){
...@@ -181,19 +158,6 @@ class ChooseProductPage extends Component { ...@@ -181,19 +158,6 @@ class ChooseProductPage extends Component {
} }
}) })
} }
// // 当前选择项
// leItem[SELECTED_QUQNTITY] = count
// if(leItem[DEFAULT_SECOND_DATA].length){ // 本地测试 localSecondData DEFAULT_SECOND_DATA
// leItem[DEFAULT_SECOND_DATA].forEach(function(chItem) {
// if(chItem[coutFieName]){
// leItem[SELECTED_DATA_ARR].push(chItem)
// }
// })
// }
} }
}) })
// console.log('计算三级之后数据---', leftOptionList) // console.log('计算三级之后数据---', leftOptionList)
...@@ -204,9 +168,8 @@ class ChooseProductPage extends Component { ...@@ -204,9 +168,8 @@ class ChooseProductPage extends Component {
// 计算中级数量回调 // 计算中级数量回调
handleChangeCount(count, coutFieName) { handleChangeCount(count, coutFieName) {
let {leftActiveIndex, leftOptionList, defaultThridShow, rightSecondData} = this.state let {leftActiveIndex, leftOptionList, defaultThridShow} = this.state
console.log('计算中级数量回调===', count, leftActiveIndex, defaultThridShow, rightSecondData, coutFieName) // console.log('计算中级数量回调===', count, leftActiveIndex, defaultThridShow, coutFieName)
leftOptionList[leftActiveIndex][SELECTED_QUQNTITY] = 0 leftOptionList[leftActiveIndex][SELECTED_QUQNTITY] = 0
leftOptionList[leftActiveIndex][SELECTED_DATA_ARR] = [] leftOptionList[leftActiveIndex][SELECTED_DATA_ARR] = []
...@@ -347,7 +310,7 @@ class ChooseProductPage extends Component { ...@@ -347,7 +310,7 @@ class ChooseProductPage extends Component {
// 返回右侧二级元素 // 返回右侧二级元素
renderContItem() { renderContItem() {
let { leftOptionList, leftActiveIndex, defaultThridShow, rightSecondData } = this.state let { leftOptionList, leftActiveIndex, defaultThridShow } = this.state
let curRigSecoOption = [] let curRigSecoOption = []
if(leftOptionList[leftActiveIndex]){ if(leftOptionList[leftActiveIndex]){
...@@ -364,7 +327,6 @@ class ChooseProductPage extends Component { ...@@ -364,7 +327,6 @@ class ChooseProductPage extends Component {
superIndex={leftActiveIndex} superIndex={leftActiveIndex}
defaultThridShow={defaultThridShow} defaultThridShow={defaultThridShow}
changeThrShow={(defaultThridShow) => this.handleChangeThrShow(defaultThridShow)} changeThrShow={(defaultThridShow) => this.handleChangeThrShow(defaultThridShow)}
// superStencilData={rightSecondData}
superStencilData={curRigSecoOption} superStencilData={curRigSecoOption}
superCallBack={(count, coutFieName) => this.handleChangeCount(count, coutFieName)} superCallBack={(count, coutFieName) => this.handleChangeCount(count, coutFieName)}
superReduceBack={() => this.handleSubSelected()} superReduceBack={() => this.handleSubSelected()}
...@@ -378,11 +340,8 @@ class ChooseProductPage extends Component { ...@@ -378,11 +340,8 @@ class ChooseProductPage extends Component {
// 返回底部按钮 // 返回底部按钮
renderFooterBtnItem() { renderFooterBtnItem() {
let {selectShowPopup, leftOptionList} = this.state let {selectShowPopup, leftOptionList} = this.state
let allCountQuantity = this.getAllCountQuantity() let allCountQuantity = this.getAllCountQuantity()
// console.log('左侧数据----', leftOptionList)
console.log('左侧数据----', leftOptionList)
return ( return (
<View style={list_common_item.sub_box}> <View style={list_common_item.sub_box}>
<View style={list_common_item.sub_two_btn}> <View style={list_common_item.sub_two_btn}>
...@@ -416,7 +375,6 @@ class ChooseProductPage extends Component { ...@@ -416,7 +375,6 @@ class ChooseProductPage extends Component {
render() { render() {
let {navigation} = this.props let {navigation} = this.props
let {title} = navigation.state.params let {title} = navigation.state.params
// console.warn('zzxd----', navigation)
return ( return (
<View style={styles.choo_container}> <View style={styles.choo_container}>
<StatusBarView <StatusBarView
...@@ -429,9 +387,7 @@ class ChooseProductPage extends Component { ...@@ -429,9 +387,7 @@ class ChooseProductPage extends Component {
<View style={styles.choo_main}> <View style={styles.choo_main}>
{/* {this.renderSearchItem()} */} {/* {this.renderSearchItem()} */}
{this.renderTopProItem()} {this.renderTopProItem()}
{this.renderContItem()} {this.renderContItem()}
</View> </View>
{this.renderFooterBtnItem()} {this.renderFooterBtnItem()}
</SafeAreaView> </SafeAreaView>
...@@ -458,13 +414,13 @@ const styles = StyleSheet.create({ ...@@ -458,13 +414,13 @@ const styles = StyleSheet.create({
borderBottomWidth: 1 borderBottomWidth: 1
}, },
top_scroll_cont: {}, top_scroll_cont: {},
top_touch_cont: {}, // top_touch_cont: {},
top_inner: { top_inner: {
borderBottomColor: foundation_color, borderBottomColor: foundation_color,
minWidth: 60 minWidth: 60
}, },
top_inner_act: {}, top_inner_act: {},
top_img_box: {}, // top_img_box: {},
top_tit: {}, top_tit: {},
top_tit_act: {}, top_tit_act: {},
cont_bom_box: { cont_bom_box: {
......
...@@ -56,7 +56,6 @@ class EditThirdLevelPage extends Component { ...@@ -56,7 +56,6 @@ class EditThirdLevelPage extends Component {
let that = this let that = this
// console.log('本地测试数据====localMockData===', localMockData) // console.log('本地测试数据====localMockData===', localMockData)
// console.log('父组件传递的值==', params) // console.log('父组件传递的值==', params)
// 赋值测试数据 // 赋值测试数据
this.setState({ this.setState({
topProcOptionList: cloneObject(localMockData.localThridOption) topProcOptionList: cloneObject(localMockData.localThridOption)
...@@ -118,11 +117,8 @@ class EditThirdLevelPage extends Component { ...@@ -118,11 +117,8 @@ class EditThirdLevelPage extends Component {
handleSubmit() { handleSubmit() {
let {topProcOptionList} = this.state let {topProcOptionList} = this.state
let {params} = this.props.navigation.state let {params} = this.props.navigation.state
// console.log('编辑完成====>', topProcOptionList, params.superData) // console.log('编辑完成====>', topProcOptionList, params.superData)
// console.log(topProcOptionList[0][DEFAULT_SECOND_DATA][0]) // console.log(topProcOptionList[0][DEFAULT_SECOND_DATA][0])
params.childrenPageCallBack(topProcOptionList, params.superData.superIndex) params.childrenPageCallBack(topProcOptionList, params.superData.superIndex)
this.props.navigation.goBack() this.props.navigation.goBack()
} }
...@@ -154,7 +150,6 @@ class EditThirdLevelPage extends Component { ...@@ -154,7 +150,6 @@ class EditThirdLevelPage extends Component {
// 返回底部主要元素 // 返回底部主要元素
renderContItem() { renderContItem() {
let {topProcOptionList, topActiveIndex} = this.state let {topProcOptionList, topActiveIndex} = this.state
let curData = topProcOptionList[topActiveIndex] let curData = topProcOptionList[topActiveIndex]
// 本地测试数据 // 本地测试数据
let localThridContData = [] let localThridContData = []
...@@ -205,7 +200,8 @@ class EditThirdLevelPage extends Component { ...@@ -205,7 +200,8 @@ class EditThirdLevelPage extends Component {
titText={'title'} titText={'title'}
tipTextStr={'tip1'} tipTextStr={'tip1'}
tipTextOne={'tip2'} tipTextOne={'tip2'}
listImgIcon={'imgIcon'} // listImgIcon={'imgIcon'}
listImgIcon={'imgIconArr'}
listPicType={'ROUND'} listPicType={'ROUND'}
listStyleBox={styles.list_style_box} listStyleBox={styles.list_style_box}
/> />
......
...@@ -50,8 +50,6 @@ class ProductRightStyle extends Component { ...@@ -50,8 +50,6 @@ class ProductRightStyle extends Component {
this.state = { this.state = {
rightSecondData: this.props.superStencilData, // 右侧分类数据-模块、螺钉盒、器械包、赋值工具 rightSecondData: this.props.superStencilData, // 右侧分类数据-模块、螺钉盒、器械包、赋值工具
selectItem : [], // 当前选中模板 -- 之前版本 selectItem : [], // 当前选中模板 -- 之前版本
toolShowPopup: false, // 螺钉盒等三个弹窗显示 -- 之前版本
// singleHeadData: [], // 人工髋关节假体等数据 -- 大类
rowSingleData: [], // 人工髋关节假体等数据 -- 小类 rowSingleData: [], // 人工髋关节假体等数据 -- 小类
thridIsVisible: false, // 小类展示 thridIsVisible: false, // 小类展示
curThridObj: { curThridObj: {
...@@ -62,12 +60,11 @@ class ProductRightStyle extends Component { ...@@ -62,12 +60,11 @@ class ProductRightStyle extends Component {
} }
componentDidMount(){ componentDidMount(){
console.log('本地测试数据====localMockData===', localMockData) // console.log('本地测试数据====localMockData===', localMockData)
// 赋值测试数据 // // 赋值测试数据
this.setState({ // this.setState({
// singleHeadData: cloneObject(localMockData.localSingleSeleHead), // // rowSingleData: cloneObject(localMockData.localSingleRowData)
// rowSingleData: cloneObject(localMockData.localSingleRowData) // })
})
} }
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
...@@ -79,41 +76,10 @@ class ProductRightStyle extends Component { ...@@ -79,41 +76,10 @@ class ProductRightStyle extends Component {
} }
} }
// 点击模板选中 -- 之前版本
handleItemStencil(item, index) {
// console.warn('xuanze', index, item)
// let { rightSecondData, selectItem } = this.state
// let { select, id } = item
// console.warn(selectItem)
// console.warn(selectItem, rightSecondData[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('EditThirdLevelPage')
// }
// console.warn(select, rightSecondData[id].select)
// rightSecondData[id].select = !select;
// this.setState({ rightSecondData })
// this.handleRIghtStencil()
}
// handleRIghtStencil() {
// console.warn(`选中了${JSON.stringify(this.state.selectItem)}`)
// }
// 大类右侧标题点击事件 // 大类右侧标题点击事件
TitleClickEvent(item, index) { TitleClickEvent(item, index) {
let {superIndex} = this.props let {superIndex} = this.props
let {rightSecondData} = this.state // console.log('右侧标题点击事件 ', superIndex, index, item)
// console.log('右侧标题点击事件 ', superIndex, index, item, rightSecondData[index])
if(superIndex >= 0 && superIndex < 4) { if(superIndex >= 0 && superIndex < 4) {
this.props.navigation.navigate('EditThirdLevelPage', { this.props.navigation.navigate('EditThirdLevelPage', {
title: '选择产品 - 编辑模板', title: '选择产品 - 编辑模板',
...@@ -121,138 +87,75 @@ class ProductRightStyle extends Component { ...@@ -121,138 +87,75 @@ class ProductRightStyle extends Component {
superItem: item, superItem: item,
superIndex: index superIndex: index
}, },
childrenPageCallBack: this.childrenPageCallBack.bind(this) childrenPageCallBack: this.childrenPageCallBack.bind(this) // 传递函数,编辑完成时调用
// 传递函数,编辑完成时调用
}) })
}else { }else {
// 单选耗材中级标题点击之后 // 单选耗材 中级标题点击之后
this.changeThrShow(true, item, index) this.changeThrShow(true, item, index)
} }
// else if ( superIndex > 0 && superIndex < 4) {
// this.handleIsShowDialog() // -- 之前版本
// }
} }
// 大类加减,整理加一/减一 // 大类加减,小类所有加1/减1
handleAllPlusReduce(curData, curIndex, isPlus){ handleAllPlusReduce(curData, curIndex, isPlus){
let {rightSecondData} = this.state let {rightSecondData} = this.state
let {superLeftData} = this.props let {superLeftData} = this.props
// console.log('大类加减,整理加一/减一', curData, curIndex) // console.log('大类加减,整理加一/减一', curData, curIndex)
// console.log('右侧数据', rightSecondData, curData[CHILD_DATA_NAME]) // console.log('右侧数据', rightSecondData, curData[CHILD_DATA_NAME])
let rowData = [] let rowData = [] // 本地测试,需要获取接口数据(无数据时,加法)
rowData = cloneObject(localMockData.localSingleRowData) // 初始化数据
// if(!isPlus){
// console.log('本地测试,获取接口数据--', curData)
// 本地测试,获取接口数据(无数据时,加法)
rowData = cloneObject(localMockData.localSingleRowData) // 初始化数据 if((!curData[CHILD_DATA_NAME] || !curData[CHILD_DATA_NAME].length) && isPlus){
let curObj = {
console.log('curData[CHILD_DATA_NAME]--本地测试,获取接口数据--', curData) superId: curData['id'], // 本地测试
superIndex: curIndex, // 本地测试
if((!curData[CHILD_DATA_NAME] || !curData[CHILD_DATA_NAME].length) && isPlus){ superTit: superLeftData['title'], // 本地测试
// let chDa = leItem[DEFAULT_SECOND_DATA][superIndex] superImg: curData['imgIcon'], // 本地测试
let curObj = { superTip: curData['title'] , // 本地测试
superId: curData['id'], // 本地测试 curTitle: curData['title'], // 本地测试
superIndex: curIndex, // 本地测试 version: 0,
superTit: superLeftData['title'], // 本地测试 lineOptions: rowData,
superImg: curData['imgIcon'], // 本地测试 [DEFAULT_FIELD]: 0
superTip: curData['title'] , // 本地测试
curTitle: curData['title'], // 本地测试
version: 0,
lineOptions: rowData,
[DEFAULT_FIELD]: 0
}
// 初始化
curData[CHILD_DATA_NAME] = []
curData[CHILD_DATA_NAME].push(curObj)
curData[DEFAULT_FIELD] = 0
} }
// 初始化
curData[CHILD_DATA_NAME] = []
curData[CHILD_DATA_NAME].push(curObj)
curData[DEFAULT_FIELD] = 0
}
// 加法/减法
// 加法/减法 if(curData[CHILD_DATA_NAME] && curData[CHILD_DATA_NAME].length > 0){
if(curData[CHILD_DATA_NAME] && curData[CHILD_DATA_NAME].length > 0){ let sumCount = 0
curData[CHILD_DATA_NAME][0].lineOptions.forEach(function(lineIt) {
// rowData = cloneObject(curData[CHILD_DATA_NAME][0].lineOptions) if(!lineIt[DEFAULT_FIELD]){
lineIt[DEFAULT_FIELD] = 0
// if(curData[CHILD_DATA_NAME][0].lineOptions){ }
let sumCount = 0 if(!isPlus){
curData[CHILD_DATA_NAME][0].lineOptions.forEach(function(lineIt, lineInd) { // 减法
if(!lineIt[DEFAULT_FIELD]){ if(lineIt[DEFAULT_FIELD]){
lineIt[DEFAULT_FIELD] = 0 lineIt[DEFAULT_FIELD] -= 1
}
if(!isPlus){
// 减法
if(lineIt[DEFAULT_FIELD]){
lineIt[DEFAULT_FIELD] -= 1
}else {
lineIt[DEFAULT_FIELD] = 0
}
}else {
// 加法
lineIt[DEFAULT_FIELD] += 1
}
sumCount += lineIt[DEFAULT_FIELD]
})
if(sumCount){
curData[CHILD_DATA_NAME][0][DEFAULT_FIELD] = sumCount
curData[DEFAULT_FIELD] = sumCount
curData[CHILD_DATA_NAME][0].superTip = `${curData['title']}x${sumCount}`
}else { }else {
curData[DEFAULT_FIELD] = 0 lineIt[DEFAULT_FIELD] = 0
delete curData[CHILD_DATA_NAME]
} }
}else {
// rowData = cloneObject(curData[CHILD_DATA_NAME][0].lineOptions) // 加法
// } lineIt[DEFAULT_FIELD] += 1
}
sumCount += lineIt[DEFAULT_FIELD]
})
if(sumCount){
curData[CHILD_DATA_NAME][0][DEFAULT_FIELD] = sumCount
curData[DEFAULT_FIELD] = sumCount
curData[CHILD_DATA_NAME][0].superTip = `${curData['title']}x${sumCount}`
}else {
curData[DEFAULT_FIELD] = 0
delete curData[CHILD_DATA_NAME]
} }
}
// }
// else {
// // 加法
// // 本地测试,获取接口数据
// rowData = cloneObject(localMockData.localSingleRowData)
// if(curData[CHILD_DATA_NAME] && curData[CHILD_DATA_NAME].length > 0 && curData[CHILD_DATA_NAME][0].lineOptions) {
// curData[CHILD_DATA_NAME][0].lineOptions.forEach(function(lineIt) {
// if(!lineIt[DEFAULT_FIELD]){
// lineIt[DEFAULT_FIELD] = 0
// }
// lineIt[DEFAULT_FIELD] += 1
// })
// rowData = cloneObject(curData[CHILD_DATA_NAME][0].lineOptions)
// }
// // if(!curData[CHILD_DATA_NAME]){
// // // 加法需要调用接口
// // // let childData = leItem[DEFAULT_SECOND_DATA][superIndex]
// // // let curObj = {
// // // superId: childData['id'], // 本地测试
// // // superIndex: superIndex, // 本地测试
// // // superTit: leItem['title'], // 本地测试
// // // superImg: childData['imgIcon'], // 本地测试
// // // superTip: childData['title'] , // 本地测试
// // // version: 0,
// // // lineOptions: childData,
// // // [DEFAULT_FIELD]: sumCount
// // // }
// // // curData[CHILD_DATA_NAME]
// // }
// }
// console.log('修改后的数据', curData, rowData, curIndex) // console.log('修改后的数据', curData, rowData, curIndex)
// this.props.thirdCallBack(rowData, curIndex)
this.handleCalCallBack(curData, curIndex, 'rightSecondData', DEFAULT_FIELD) this.handleCalCallBack(curData, curIndex, 'rightSecondData', DEFAULT_FIELD)
this.setState({ this.setState({
rightSecondData rightSecondData
...@@ -260,28 +163,18 @@ class ProductRightStyle extends Component { ...@@ -260,28 +163,18 @@ class ProductRightStyle extends Component {
} }
// 编辑页面的回调 // 编辑页面的回调
childrenPageCallBack(childData, index) { childrenPageCallBack(childData, index) {
let {rightSecondData} = this.state let {rightSecondData} = this.state
// console.log('编辑页面的回调----', childData, index)
console.log('编辑页面的回调----', childData, index)
// 本地测试
// let curCalField = 'quantity'
let that = this let that = this
rightSecondData.forEach(function(rsdItem, rsdIndex) { rightSecondData.forEach(function(rsdItem, rsdIndex) {
if(!rsdItem[CHILD_DATA_NAME]) { if(!rsdItem[CHILD_DATA_NAME]) {
rsdItem[CHILD_DATA_NAME] = [] rsdItem[CHILD_DATA_NAME] = []
// rsdItem[CHILD_DATA_NAME] = {}
} }
if(!rsdItem[DEFAULT_FIELD]) { if(!rsdItem[DEFAULT_FIELD]) {
rsdItem[DEFAULT_FIELD] = 0 rsdItem[DEFAULT_FIELD] = 0
} }
// if(!rsdItem[versionName]) {
// rsdItem[versionName] = 0
// }
if(rsdIndex === index) { if(rsdIndex === index) {
let superTip = '' let superTip = ''
childData.map((chDa, chInd) => { childData.map((chDa, chInd) => {
...@@ -301,71 +194,39 @@ class ProductRightStyle extends Component { ...@@ -301,71 +194,39 @@ class ProductRightStyle extends Component {
lineOptions: childData, lineOptions: childData,
[DEFAULT_FIELD]: 1 [DEFAULT_FIELD]: 1
} }
if(rsdItem[CHILD_DATA_NAME].length !== 0){ if(rsdItem[CHILD_DATA_NAME].length !== 0){
curObj.version = rsdItem[CHILD_DATA_NAME].length curObj.version = rsdItem[CHILD_DATA_NAME].length
} }
let filEquArr = rsdItem[CHILD_DATA_NAME].filter(function(lineItem) { let filEquArr = rsdItem[CHILD_DATA_NAME].filter(function(lineItem) {
if(_.isEqual(lineItem.lineOptions, childData)){ if(_.isEqual(lineItem.lineOptions, childData)){
lineItem[DEFAULT_FIELD] += 1 lineItem[DEFAULT_FIELD] += 1
return lineItem return lineItem
} }
}) })
// 本地测试 // 本地测试
if(filEquArr.length === 0) { if(filEquArr.length === 0) {
rsdItem[CHILD_DATA_NAME].push(curObj) rsdItem[CHILD_DATA_NAME].push(curObj)
} }
rsdItem[DEFAULT_FIELD] = Number(rsdItem[DEFAULT_FIELD]) + 1 rsdItem[DEFAULT_FIELD] = Number(rsdItem[DEFAULT_FIELD]) + 1
// console.log('回调后的rsdItem====', rsdItem) // console.log('回调后的rsdItem====', rsdItem)
that.handleCalCallBack(rsdItem, rsdIndex, 'rightSecondData', DEFAULT_FIELD) that.handleCalCallBack(rsdItem, rsdIndex, 'rightSecondData', DEFAULT_FIELD)
} }
}) })
// console.log('回调后的数组====', rightSecondData) // console.log('回调后的数组====', rightSecondData)
this.setState({ this.setState({
rightSecondData rightSecondData
}) })
} }
// // 关闭当前弹窗
// handleCloseModal(show) {
// this.setState({
// toolShowPopup: show
// })
// }
// // 螺钉盒、器械包、辅助工具 弹窗显示
// handleIsShowDialog() {
// this.setState({
// toolShowPopup: !this.state.toolShowPopup
// })
// }
// 修改当前小类是否展示 // 修改当前小类是否展示
changeThrShow(show, superItem, superIndex) { changeThrShow(show, superItem, superIndex) {
let {curThridObj, rowSingleData} = this.state let {curThridObj, rowSingleData} = this.state
// console.log('修改当前小类是否展示----', show, superItem, superIndex)
console.log('修改当前小类是否展示----', show, superItem, superIndex)
let localTestImageUrls = localMockData.localTestImageUrls // 本地测试数据 let localTestImageUrls = localMockData.localTestImageUrls // 本地测试数据
let curRowData = cloneObject(localMockData.localSingleRowData) // 本地测试数据 此处应该要请求接口,获取小类数据
let curRowData = cloneObject(localMockData.localSingleRowData)
// if(superItem){
// }else {
// curRowData = cloneObject(localMockData.localSingleRowData)
// }
if(superItem) { if(superItem) {
// curThridObj.title = curItem.title
curThridObj = { curThridObj = {
superItem: superItem, superItem: superItem,
superIndex: superIndex, superIndex: superIndex,
...@@ -375,71 +236,30 @@ class ProductRightStyle extends Component { ...@@ -375,71 +236,30 @@ class ProductRightStyle extends Component {
if(superItem[CHILD_DATA_NAME] && superItem[CHILD_DATA_NAME].length > 0 && superItem[CHILD_DATA_NAME][0].lineOptions) { if(superItem[CHILD_DATA_NAME] && superItem[CHILD_DATA_NAME].length > 0 && superItem[CHILD_DATA_NAME][0].lineOptions) {
curRowData = cloneObject(superItem[CHILD_DATA_NAME][0].lineOptions) curRowData = cloneObject(superItem[CHILD_DATA_NAME][0].lineOptions)
} }
// curThridObj = [{
// ...curItem,
// localThridOption:
// }]
// 此处应该要请求接口,获取小类数据
} }
this.setState({ this.setState({
thridIsVisible: show, thridIsVisible: show,
curThridObj, curThridObj,
rowSingleData: curRowData rowSingleData: curRowData
}) })
if(!show){ if(!show){
// 点击标题时回调函数修改左侧数据 // 点击标题时回调函数修改左侧数据
this.props.thirdCallBack(rowSingleData, curThridObj.superIndex) this.props.thirdCallBack(rowSingleData, curThridObj.superIndex)
} }
// this.props.changeThrShow(show) ============????
}
// 单选耗材 - 头数据
handleHeadCalCallBack(item, index) {
// let { singleHeadData } = this.state
// singleHeadData[index] = item
// this.setState({
// singleHeadData
// })
// console.log('计算==单选耗材行数据===', item, index, rowSingleData)
}
// 单选耗材 - 行数据
handleRowCalCallBack(item, index) {
// let { rowSingleData } = this.state
// rowSingleData[index] = item
// this.setState({
// rowSingleData
// })
// console.log('计算==单选耗材行数据===', item, index, rowSingleData)
} }
// 修改列表计算后数据 - 头/行 // 修改列表计算后数据 - 头/行
handleCalCallBack(item, index, dataName, coutFieName){ handleCalCallBack(item, index, dataName, coutFieName){
// console.log('修改列表计算后数据==',item, index, dataName, coutFieName)
let {rightSecondData, rowSingleData, curThridObj} = this.state
// rowSingleData.localThridContData = item
// if(!dataName){
// }
if(dataName && this.state[dataName]) { if(dataName && this.state[dataName]) {
let curDataName = this.state[dataName] let curDataName = this.state[dataName]
curDataName[index] = item curDataName[index] = item
this.setState({ this.setState({
[dataName]: curDataName [dataName]: curDataName
}) })
// console.log('计算==头/行===', index, dataName, curDataName)
if(coutFieName) { if(coutFieName) {
// console.log('修改列表计算参数==',item, index, dataName, coutFieName) // 除了单选耗材小类的回调
// console.log('除了单选耗材的回调==',item, index, dataName, coutFieName)
// 计算==头 // 计算==头
let sumCount = 0 let sumCount = 0
curDataName.map(item => { curDataName.map(item => {
...@@ -449,101 +269,12 @@ class ProductRightStyle extends Component { ...@@ -449,101 +269,12 @@ class ProductRightStyle extends Component {
}) })
// console.log('计算==数量汇总=字段=', sumCount, coutFieName) // console.log('计算==数量汇总=字段=', sumCount, coutFieName)
this.props.superCallBack(sumCount, coutFieName) this.props.superCallBack(sumCount, coutFieName)
}else {
// console.log('修改【单选耗材小类】参数==',item, index, dataName, coutFieName)
// console.log('修改【单选耗材小类】计算后数据==',curDataName)
// console.log('修改【单选耗材小类】计算后父数据==',curThridObj)
// console.log('修改【单选耗材小类】计算后=显示=',this.state.thridIsVisible)
// this.props.thirdCallBack(curDataName, curThridObj.superIndex)
// 计算耗材行, 行数据加起来是头数据
// rightSecondData
// let sumCount = 0
// console.log('中类---', rightSecondData)
// console.log('小类---', curDataName)
// let listItem = rightSecondData[curThridObj.superIndex]
// listItem[CHILD_DATA_NAME]
// listItem[SELECTED_QUQNTITY] = 0
// listItem[SELECTED_DATA_ARR] = []
// listItem[DEFAULT_SECOND_DATA] = curDataName
// listItem[DEFAULT_SECOND_DATA].forEach(function(chItem) {
// if(chItem[DEFAULT_FIELD]){
// listItem[SELECTED_QUQNTITY] += Number(chItem[DEFAULT_FIELD])
// listItem[SELECTED_DATA_ARR].push(chItem)
// }
// })
// let seNum = 0, seArr = []
// curDataName.map(cuDa => {
// if(!cuDa[DEFAULT_FIELD]){
// cuDa[DEFAULT_FIELD] = 0
// }
// seNum += Number(cuDa[DEFAULT_FIELD])
// seArr.push(cuDa)
// })
// let curTempArr = [
// {
// title: '单选耗材',
// iconImg: localMockData.localTestImageUrls,
// localThridContData: curDataName, // push所有
// [SELECTED_QUQNTITY]: seNum,
// [SELECTED_DATA_ARR]: seArr
// }
// ]
// console.log('修改后的中类----', rightSecondData)
// console.log('修改后的小类 curDataName----', curDataName)
// this.childrenPageCallBack(curTempArr, curThridObj.superIndex)
// this.props.superCallBack(listItem[SELECTED_QUQNTITY], DEFAULT_FIELD)
// this.setState({
// rightSecondData
// })
// rightSecondData.map(function(listItem) {
// listItem[SELECTED_QUQNTITY] = 0
// listItem[SELECTED_DATA_ARR] = []
// if(listItem[DEFAULT_SECOND_DATA].length){
// listItem[DEFAULT_SECOND_DATA].forEach(function(chItem) {
// if(chItem[DEFAULT_FIELD]){
// listItem[SELECTED_QUQNTITY] += Number(chItem[DEFAULT_FIELD])
// listItem[SELECTED_DATA_ARR].push(chItem)
// }
// })
// }
// })
// rightSecondData.map(item => {
// if(!item[DEFAULT_FIELD]){
// item[DEFAULT_FIELD] = 0
// }
// // curDataName
// if(item[DEFAULT_FIELD]){
// sumCount += Number(item[DEFAULT_FIELD])
// }
// })
// console.log('计算==数量汇总=字段=', coutFieName, sumCount)
// this.props.superCallBack(sumCount, DEFAULT_FIELD)
} }
} }
} }
// 返回右侧二级每一列(单选耗材以上) // 返回右侧二级每一列(单选耗材以上)
renderSecondtem(item, index) { renderSecondtem(item, index) {
// let { toolShowPopup } = this.state
// let curCalField = 'quantity'
return ( return (
<SafeAreaView style={styles.ri_container}> <SafeAreaView style={styles.ri_container}>
<PicTitDetaiCalcu <PicTitDetaiCalcu
...@@ -555,7 +286,8 @@ class ProductRightStyle extends Component { ...@@ -555,7 +286,8 @@ class ProductRightStyle extends Component {
titText={'title'} titText={'title'}
tipTextOne={'tip1'} tipTextOne={'tip1'}
tipTextTwo={'tip2'} tipTextTwo={'tip2'}
listImgIcon={'imgIcon'} // listImgIcon={'imgIcon'}
listImgIcon={'imgIconArr'}
listPicType={'SQUARE'} listPicType={'SQUARE'}
plusCallBack={(item, index) => this.TitleClickEvent(item,index)} plusCallBack={(item, index) => this.TitleClickEvent(item,index)}
reduceCallBack={() => this.props.superReduceBack()} reduceCallBack={() => this.props.superReduceBack()}
...@@ -581,7 +313,6 @@ class ProductRightStyle extends Component { ...@@ -581,7 +313,6 @@ class ProductRightStyle extends Component {
// 单选耗材 -- 小类每一列 // 单选耗材 -- 小类每一列
renderThridItem(item, index) { renderThridItem(item, index) {
// let curCalField = 'quantity'
return ( return (
<SafeAreaView style={styles.thr_container}> <SafeAreaView style={styles.thr_container}>
<PicTitDetaiCalcu <PicTitDetaiCalcu
...@@ -615,7 +346,6 @@ class ProductRightStyle extends Component { ...@@ -615,7 +346,6 @@ class ProductRightStyle extends Component {
// 单选耗材 -- 大类每一列 // 单选耗材 -- 大类每一列
renderOtherListItem(item, index) { renderOtherListItem(item, index) {
// let curCalField = 'quantity'
return ( return (
<SafeAreaView style={styles.oth_container}> <SafeAreaView style={styles.oth_container}>
<PicTitDetaiCalcu <PicTitDetaiCalcu
...@@ -623,11 +353,13 @@ class ProductRightStyle extends Component { ...@@ -623,11 +353,13 @@ class ProductRightStyle extends Component {
listIndex={index} listIndex={index}
calField={DEFAULT_FIELD} calField={DEFAULT_FIELD}
listPicType={'ROUND'} listPicType={'ROUND'}
// subCalCallBack={(item,index) => this.handleCalCallBack(item, index, 'singleHeadData', DEFAULT_FIELD)}
subCalCallBack={(item,index) => this.handleCalCallBack(item, index, 'rightSecondData', DEFAULT_FIELD)} subCalCallBack={(item,index) => this.handleCalCallBack(item, index, 'rightSecondData', DEFAULT_FIELD)}
titCallBack={(item,index) => this.TitleClickEvent(item, index)} titCallBack={(item,index) => this.TitleClickEvent(item, index)}
titText={'title'} titText={'title'}
listImgIcon={'imgIcon'} // listImgIcon={'imgIcon'}
listImgIcon={'imgIconArr'}
tipTextOne={'tip1'}
tipTextTwo={'tip2'}
plusCallBack={(item, index) => this.handleAllPlusReduce(item,index, true)} plusCallBack={(item, index) => this.handleAllPlusReduce(item,index, true)}
reduceCallBack={(item, index) => this.handleAllPlusReduce(item,index)} reduceCallBack={(item, index) => this.handleAllPlusReduce(item,index)}
/> />
...@@ -642,7 +374,6 @@ class ProductRightStyle extends Component { ...@@ -642,7 +374,6 @@ class ProductRightStyle extends Component {
<FlatList <FlatList
style={styles.cont_other_list} style={styles.cont_other_list}
keyExtractor={item => item.id} keyExtractor={item => item.id}
// data={this.state.singleHeadData}
data={this.state.rightSecondData} data={this.state.rightSecondData}
extraData={this.state} extraData={this.state}
renderItem={({item, index}) => this.renderOtherListItem(item, index)} renderItem={({item, index}) => this.renderOtherListItem(item, index)}
...@@ -669,13 +400,6 @@ class ProductRightStyle extends Component { ...@@ -669,13 +400,6 @@ class ProductRightStyle extends Component {
// 返回右侧单选耗材 -- 三级顶部标题和图片 // 返回右侧单选耗材 -- 三级顶部标题和图片
renderThrHeadStyle() { renderThrHeadStyle() {
let { thridIsVisible, curThridObj } = this.state let { thridIsVisible, curThridObj } = this.state
// let localTestImageUrls = localMockData.localTestImageUrls // 本地测试数据
// // let testObj = {
// // title: '测试标题__',
// // image: localTestImageUrls
// // }
// curThridObj.image = localTestImageUrls
if (thridIsVisible) { if (thridIsVisible) {
return ( return (
<View> <View>
...@@ -686,7 +410,7 @@ class ProductRightStyle extends Component { ...@@ -686,7 +410,7 @@ class ProductRightStyle extends Component {
> >
<View style={styles.thr_head_back}> <View style={styles.thr_head_back}>
<View style={styles.thr_icon_box}> <View style={styles.thr_icon_box}>
<Image source={require('../../../images/arr_left.png')} style={styles.thr_icon}></Image> <Image source={require('../../../images/arr_left.png')} style={icon_style}></Image>
</View> </View>
<Text style={styles.thr_head_tit}>{ curThridObj.title }</Text> <Text style={styles.thr_head_tit}>{ curThridObj.title }</Text>
</View> </View>
...@@ -730,99 +454,92 @@ const styles = StyleSheet.create({ ...@@ -730,99 +454,92 @@ const styles = StyleSheet.create({
cont_right_scroll_cont: {}, cont_right_scroll_cont: {},
cont_right_list: {}, cont_right_list: {},
ri_container: {}, ri_container: {},
ri_tou_box: {}, // ri_tou_box: {},
ri_inner: { // ri_inner: {
flexDirection: 'row', // flexDirection: 'row',
justifyContent: 'space-between', // justifyContent: 'space-between',
alignItems: 'center', // alignItems: 'center',
paddingVertical: 14 // paddingVertical: 14
}, // },
ri_text_box: {}, // ri_text_box: {},
ri_te_tit: { // ri_te_tit: {
fontSize: 18, // fontSize: 18,
color: first_text_color, // color: first_text_color,
// fontWeight: 'bold', // // fontWeight: 'bold',
fontFamily: font_family_medium // fontFamily: font_family_medium
}, // },
ri_te_ot: { // ri_te_ot: {
fontSize: 14, // fontSize: 14,
color: third_text_color, // color: third_text_color,
fontFamily: font_family_light // fontFamily: font_family_light
}, // },
ri_img_box: { // ri_img_box: {
width: 18, // width: 18,
height: 18 // height: 18
}, // },
// ri_img_check: { // ri_img_check: {
// width: '100%', // width: '100%',
// height: '100%' // height: '100%'
// }, // },
model_cont: {}, model_cont: {},
model_cont_inner: { // model_cont_inner: {
marginBottom: 48 // marginBottom: 48
}, // },
mo_cont_title: { // mo_cont_title: {
color: first_text_color, // color: first_text_color,
// fontWeight: 'bold', // // fontWeight: 'bold',
fontSize: 14, // fontSize: 14,
lineHeight: 24, // lineHeight: 24,
fontFamily: font_family_medium // fontFamily: font_family_medium
}, // },
mo_cont_tip: { // mo_cont_tip: {
color: second_text_color, // color: second_text_color,
fontSize: 14, // fontSize: 14,
lineHeight: 24, // lineHeight: 24,
fontFamily: font_family_regular // fontFamily: font_family_regular
}, // },
mo_img_box: { // mo_img_box: {
flex: 1, // flex: 1,
borderWidth: 1, // borderWidth: 1,
borderColor: '#E1E1E1', // borderColor: '#E1E1E1',
justifyContent: 'center', // justifyContent: 'center',
alignItems: 'center', // alignItems: 'center',
height: pxSize(120) // height: pxSize(120)
}, // },
mo_img: { // mo_img: {
width: pxSize(100), // width: pxSize(100),
height: '100%' // height: '100%'
}, // },
// other right // other right
cont_other_cont: {}, cont_other_cont: {},
cont_other_list: { cont_other_list: {},
// paddingTop: 14 oth_container: {},
}, // oth_inner: {},
oth_container: { // oth_box: {},
// flex: 1, // oth_box_item: {
// marginBottom: 14 // flexDirection: 'row',
// paddingTop: 0, // justifyContent: 'flex-start',
// marginTop: 0 // alignItems: 'center'
}, // },
oth_inner: {}, // oth_img_box: {
oth_box: {}, // borderColor: '#ccc',
oth_box_item: { // borderWidth: 1,
flexDirection: 'row', // borderRadius: 50,
justifyContent: 'flex-start', // width: pxSize(50),
alignItems: 'center' // height: pxSize(50),
}, // justifyContent: 'center',
oth_img_box: { // alignItems: 'center'
borderColor: '#ccc', // },
borderWidth: 1, // oth_img: {
borderRadius: 50, // width: '90%',
width: pxSize(50), // height: '90%'
height: pxSize(50), // },
justifyContent: 'center', // oth_tit: {
alignItems: 'center' // textAlign: 'left',
}, // paddingLeft: 10,
oth_img: { // fontSize: second_text_size,
width: '90%', // fontFamily: font_family_regular
height: '90%' // },
},
oth_tit: {
textAlign: 'left',
paddingLeft: 10,
fontSize: second_text_size,
fontFamily: font_family_regular
},
stencil_cont: {}, stencil_cont: {},
thr_head_inner: {}, thr_head_inner: {},
thr_head_back: { thr_head_back: {
...@@ -834,10 +551,10 @@ const styles = StyleSheet.create({ ...@@ -834,10 +551,10 @@ const styles = StyleSheet.create({
width: pxSize(14), width: pxSize(14),
height: pxSize(18) height: pxSize(18)
}, },
thr_icon: { // thr_icon: {
width: '100%', // width: '100%',
height: '100%' // height: '100%'
}, // },
thr_head_tit: { thr_head_tit: {
color: third_text_color, color: third_text_color,
paddingLeft: 6, paddingLeft: 6,
...@@ -850,53 +567,7 @@ const styles = StyleSheet.create({ ...@@ -850,53 +567,7 @@ const styles = StyleSheet.create({
marginBottom: 10 marginBottom: 10
}, },
cont_thr_list: {}, cont_thr_list: {},
thr_container: {}, thr_container: {}
// thr_inner: {
// paddingVertical: 0,
// paddingBottom: 26
// },
// thr_ot: {
// 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; export default ProductRightStyle;
\ No newline at end of file
...@@ -40,11 +40,13 @@ const localTopProcOption = [ ...@@ -40,11 +40,13 @@ const localTopProcOption = [
// 多张图片放大 // 多张图片放大
const localTestImageUrls = [{ const localTestImageUrls = [{
url: 'https://obs.uat.sfrx.guke.tech/upload/dingding/image/QDw05sTo.jpg' url: 'https://obs.uat.sfrx.guke.tech/jeecg-boot/sys/common/view/files/20200731/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20200731113857_1596166761793_1596184849964.jpg'
},{ },{
url: 'https://obs.uat.sfrx.guke.tech/upload/dingding/image/QDw05sTo.jpg' url: 'https://obs.uat.sfrx.guke.tech/jeecg-boot/sys/common/view/files/20200921/5_1599645385381_1600672374371.jpg'
},{ },{
url: 'https://obs.uat.sfrx.guke.tech/jeecg-boot/sys/common/view/upload/dingding/image/8V4599aH.jpg' url: 'https://obs.uat.sfrx.guke.tech/jeecg-boot/sys/common/view/files/20200921/4_1599645381425_1600672375091.jpg'
},{
url: 'https://obs.uat.sfrx.guke.tech/jeecg-boot/sys/common/view/files/20200921/3_1599645381259_1600672375488.jpg'
}] }]
// 手术模板 -- 大类 // 手术模板 -- 大类
...@@ -52,6 +54,7 @@ const localSingleSeleHead_1 = [{ ...@@ -52,6 +54,7 @@ const localSingleSeleHead_1 = [{
"id": "0", "id": "0",
title: '手术模板', title: '手术模板',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -61,6 +64,7 @@ const localSingleSeleHead_1 = [{ ...@@ -61,6 +64,7 @@ const localSingleSeleHead_1 = [{
"id": "1", "id": "1",
title: '内衬Harmony 28/10°OD(P 2', title: '内衬Harmony 28/10°OD(P 2',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -70,6 +74,7 @@ const localSingleSeleHead_1 = [{ ...@@ -70,6 +74,7 @@ const localSingleSeleHead_1 = [{
"id": "2", "id": "2",
title: '内衬Harmony 28/10°OD(P', title: '内衬Harmony 28/10°OD(P',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -81,6 +86,7 @@ const localSingleSeleHead_2 = [{ ...@@ -81,6 +86,7 @@ const localSingleSeleHead_2 = [{
"id": "0", "id": "0",
title: '钉盒', title: '钉盒',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -90,6 +96,7 @@ const localSingleSeleHead_2 = [{ ...@@ -90,6 +96,7 @@ const localSingleSeleHead_2 = [{
"id": "1", "id": "1",
title: '内衬Harmony 28/10°OD(P 2', title: '内衬Harmony 28/10°OD(P 2',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -99,6 +106,7 @@ const localSingleSeleHead_2 = [{ ...@@ -99,6 +106,7 @@ const localSingleSeleHead_2 = [{
"id": "2", "id": "2",
title: '内衬Harmony 28/10°OD(P', title: '内衬Harmony 28/10°OD(P',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -111,6 +119,7 @@ const localSingleSeleHead_3 = [{ ...@@ -111,6 +119,7 @@ const localSingleSeleHead_3 = [{
"id": "0", "id": "0",
title: '器械包', title: '器械包',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -120,6 +129,7 @@ const localSingleSeleHead_3 = [{ ...@@ -120,6 +129,7 @@ const localSingleSeleHead_3 = [{
"id": "1", "id": "1",
title: '内衬Harmony 28/10°OD(P 2', title: '内衬Harmony 28/10°OD(P 2',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -129,6 +139,7 @@ const localSingleSeleHead_3 = [{ ...@@ -129,6 +139,7 @@ const localSingleSeleHead_3 = [{
"id": "2", "id": "2",
title: '内衬Harmony 28/10°OD(P', title: '内衬Harmony 28/10°OD(P',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -140,6 +151,7 @@ const localSingleSeleHead_4 = [{ ...@@ -140,6 +151,7 @@ const localSingleSeleHead_4 = [{
"id": "0", "id": "0",
title: '零散器械', title: '零散器械',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -149,6 +161,7 @@ const localSingleSeleHead_4 = [{ ...@@ -149,6 +161,7 @@ const localSingleSeleHead_4 = [{
"id": "1", "id": "1",
title: '内衬Harmony 28/10°OD(P 2', title: '内衬Harmony 28/10°OD(P 2',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -158,6 +171,7 @@ const localSingleSeleHead_4 = [{ ...@@ -158,6 +171,7 @@ const localSingleSeleHead_4 = [{
"id": "2", "id": "2",
title: '内衬Harmony 28/10°OD(P', title: '内衬Harmony 28/10°OD(P',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -169,6 +183,7 @@ const localSingleSeleHead_5 = [{ ...@@ -169,6 +183,7 @@ const localSingleSeleHead_5 = [{
"id": "0", "id": "0",
title: '中置器(PE)', title: '中置器(PE)',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -178,6 +193,7 @@ const localSingleSeleHead_5 = [{ ...@@ -178,6 +193,7 @@ const localSingleSeleHead_5 = [{
"id": "1", "id": "1",
title: '内衬Harmony---', title: '内衬Harmony---',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -187,6 +203,7 @@ const localSingleSeleHead_5 = [{ ...@@ -187,6 +203,7 @@ const localSingleSeleHead_5 = [{
"id": "2", "id": "2",
title: '内衬Harmony 28/10°OD', title: '内衬Harmony 28/10°OD',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -196,6 +213,7 @@ const localSingleSeleHead_5 = [{ ...@@ -196,6 +213,7 @@ const localSingleSeleHead_5 = [{
"id": "3", "id": "3",
title: '中置器(PE)4', title: '中置器(PE)4',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -205,6 +223,7 @@ const localSingleSeleHead_5 = [{ ...@@ -205,6 +223,7 @@ const localSingleSeleHead_5 = [{
"id": "4", "id": "4",
title: '中置器(PE)5', title: '中置器(PE)5',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -214,6 +233,7 @@ const localSingleSeleHead_5 = [{ ...@@ -214,6 +233,7 @@ const localSingleSeleHead_5 = [{
"id": "5", "id": "5",
title: '中置器(PE)6', title: '中置器(PE)6',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -223,6 +243,7 @@ const localSingleSeleHead_5 = [{ ...@@ -223,6 +243,7 @@ const localSingleSeleHead_5 = [{
"id": "6", "id": "6",
title: '中置器(PE)7', title: '中置器(PE)7',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -232,6 +253,7 @@ const localSingleSeleHead_5 = [{ ...@@ -232,6 +253,7 @@ const localSingleSeleHead_5 = [{
"id": "7", "id": "7",
title: '中置器(PE)8', title: '中置器(PE)8',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -241,8 +263,9 @@ const localSingleSeleHead_5 = [{ ...@@ -241,8 +263,9 @@ const localSingleSeleHead_5 = [{
const localSingleSeleHead_6= [{ const localSingleSeleHead_6= [{
"id": "0", "id": "0",
title: '6-中置器(PE)11', title: '-中置器(PE)11',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -250,8 +273,9 @@ const localSingleSeleHead_6= [{ ...@@ -250,8 +273,9 @@ const localSingleSeleHead_6= [{
}, },
{ {
"id": "1", "id": "1",
title: '6-中置器(PE)22', title: '-中置器(PE)22',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -259,8 +283,9 @@ const localSingleSeleHead_6= [{ ...@@ -259,8 +283,9 @@ const localSingleSeleHead_6= [{
}, },
{ {
"id": "2", "id": "2",
title: '6-中置器(PE)33', title: '-中置器(PE)33',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -270,8 +295,9 @@ const localSingleSeleHead_6= [{ ...@@ -270,8 +295,9 @@ const localSingleSeleHead_6= [{
const localSingleSeleHead_7 = [{ const localSingleSeleHead_7 = [{
"id": "0", "id": "0",
title: 'h7-中置器(PE)1111', title: '骨-中置器(PE)11',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -279,8 +305,9 @@ const localSingleSeleHead_7 = [{ ...@@ -279,8 +305,9 @@ const localSingleSeleHead_7 = [{
}, },
{ {
"id": "1", "id": "1",
title: 'h7-中置器(PE)2222', title: '骨-中置器(PE)22',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -288,8 +315,9 @@ const localSingleSeleHead_7 = [{ ...@@ -288,8 +315,9 @@ const localSingleSeleHead_7 = [{
}, },
{ {
"id": "2", "id": "2",
title: 'h7-中置器(PE)3333', title: '骨-中置器(PE)33',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -299,8 +327,9 @@ const localSingleSeleHead_7 = [{ ...@@ -299,8 +327,9 @@ const localSingleSeleHead_7 = [{
const localSingleSeleHead_8 = [{ const localSingleSeleHead_8 = [{
"id": "0", "id": "0",
title: 'h8-中置器(PE)11', title: '-中置器(PE)11',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -310,8 +339,9 @@ const localSingleSeleHead_8 = [{ ...@@ -310,8 +339,9 @@ const localSingleSeleHead_8 = [{
const localSingleSeleHead_9 = [{ const localSingleSeleHead_9 = [{
"id": "0", "id": "0",
title: 'h9-中置器(PE)', title: '-中置器(PE)',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -322,8 +352,9 @@ const localSingleSeleHead_9 = [{ ...@@ -322,8 +352,9 @@ const localSingleSeleHead_9 = [{
const localSingleSeleHead_10 = [{ const localSingleSeleHead_10 = [{
"id": "0", "id": "0",
title: 'h10-中置器(PE)11', title: '-中置器(PE)11',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -334,8 +365,9 @@ const localSingleSeleHead_10 = [{ ...@@ -334,8 +365,9 @@ const localSingleSeleHead_10 = [{
const localSingleSeleHead_11 = [{ const localSingleSeleHead_11 = [{
"id": "0", "id": "0",
title: 'h11-中置器', title: '-中置器',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
tip1: '创建人:金城武', tip1: '创建人:金城武',
tip2: '创建时间:2020.03.01', tip2: '创建时间:2020.03.01',
select: false, select: false,
...@@ -450,6 +482,7 @@ const localThridContData_1 = [ ...@@ -450,6 +482,7 @@ const localThridContData_1 = [
tip1: '型号:10', tip1: '型号:10',
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 2 quantity: 2
}, },
{ {
...@@ -458,6 +491,7 @@ const localThridContData_1 = [ ...@@ -458,6 +491,7 @@ const localThridContData_1 = [
tip1: '型号:10', tip1: '型号:10',
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 1 quantity: 1
}, },
{ {
...@@ -466,6 +500,7 @@ const localThridContData_1 = [ ...@@ -466,6 +500,7 @@ const localThridContData_1 = [
tip1: '型号:10', tip1: '型号:10',
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 1 quantity: 1
}, },
{ {
...@@ -474,6 +509,7 @@ const localThridContData_1 = [ ...@@ -474,6 +509,7 @@ const localThridContData_1 = [
tip1: '型号:10', tip1: '型号:10',
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 0 quantity: 0
}, },
{ {
...@@ -482,6 +518,7 @@ const localThridContData_1 = [ ...@@ -482,6 +518,7 @@ const localThridContData_1 = [
tip1: '型号:10', tip1: '型号:10',
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 0 quantity: 0
}, },
{ {
...@@ -490,6 +527,7 @@ const localThridContData_1 = [ ...@@ -490,6 +527,7 @@ const localThridContData_1 = [
tip1: '型号:10', tip1: '型号:10',
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 0 quantity: 0
}, },
{ {
...@@ -498,6 +536,7 @@ const localThridContData_1 = [ ...@@ -498,6 +536,7 @@ const localThridContData_1 = [
tip1: '型号:10', tip1: '型号:10',
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 0 quantity: 0
}, },
{ {
...@@ -506,6 +545,7 @@ const localThridContData_1 = [ ...@@ -506,6 +545,7 @@ const localThridContData_1 = [
tip1: '型号:10', tip1: '型号:10',
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 0 quantity: 0
}, },
{ {
...@@ -514,6 +554,7 @@ const localThridContData_1 = [ ...@@ -514,6 +554,7 @@ const localThridContData_1 = [
tip1: '型号:10', tip1: '型号:10',
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 0 quantity: 0
} }
] ]
...@@ -526,6 +567,7 @@ const localThridContData_2 = [ ...@@ -526,6 +567,7 @@ const localThridContData_2 = [
tip1: '型号:10', tip1: '型号:10',
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 1 quantity: 1
}, },
{ {
...@@ -534,6 +576,7 @@ const localThridContData_2 = [ ...@@ -534,6 +576,7 @@ const localThridContData_2 = [
tip1: '型号:10', tip1: '型号:10',
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 0 quantity: 0
}, },
{ {
...@@ -542,6 +585,7 @@ const localThridContData_2 = [ ...@@ -542,6 +585,7 @@ const localThridContData_2 = [
tip1: '型号:10', tip1: '型号:10',
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 0 quantity: 0
} }
] ]
...@@ -554,6 +598,7 @@ const localThridContData_3 = [ ...@@ -554,6 +598,7 @@ const localThridContData_3 = [
tip1: '型号:10', tip1: '型号:10',
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 0 quantity: 0
}, },
{ {
...@@ -562,6 +607,7 @@ const localThridContData_3 = [ ...@@ -562,6 +607,7 @@ const localThridContData_3 = [
tip1: '型号:10', tip1: '型号:10',
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 2 quantity: 2
}, },
{ {
...@@ -570,6 +616,7 @@ const localThridContData_3 = [ ...@@ -570,6 +616,7 @@ const localThridContData_3 = [
tip1: '型号:10', tip1: '型号:10',
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 0 quantity: 0
} }
] ]
...@@ -582,6 +629,7 @@ const localThridContData_4 = [ ...@@ -582,6 +629,7 @@ const localThridContData_4 = [
tip1: '型号:10', tip1: '型号:10',
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 0 quantity: 0
}, },
{ {
...@@ -590,6 +638,7 @@ const localThridContData_4 = [ ...@@ -590,6 +638,7 @@ const localThridContData_4 = [
tip1: '型号:10', tip1: '型号:10',
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 3 quantity: 3
}, },
{ {
...@@ -598,6 +647,7 @@ const localThridContData_4 = [ ...@@ -598,6 +647,7 @@ const localThridContData_4 = [
tip1: '型号:10', tip1: '型号:10',
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
quantity: 0 quantity: 0
} }
] ]
...@@ -639,6 +689,7 @@ const localBottomOption = [ ...@@ -639,6 +689,7 @@ const localBottomOption = [
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
value: 0, value: 0,
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
select: false, select: false,
quantity: 1 quantity: 1
} }
...@@ -655,6 +706,7 @@ const localBottomOption = [ ...@@ -655,6 +706,7 @@ const localBottomOption = [
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
value: 0, value: 0,
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
select: false, select: false,
quantity: 2 quantity: 2
} }
...@@ -671,6 +723,7 @@ const localBottomOption = [ ...@@ -671,6 +723,7 @@ const localBottomOption = [
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
value: 0, value: 0,
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
select: false, select: false,
quantity: 3 quantity: 3
} }
...@@ -687,6 +740,7 @@ const localBottomOption = [ ...@@ -687,6 +740,7 @@ const localBottomOption = [
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
value: 0, value: 0,
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
imgIconArr: localTestImageUrls,
select: false, select: false,
quantity: 4 quantity: 4
} }
...@@ -703,6 +757,7 @@ const localBottomOption = [ ...@@ -703,6 +757,7 @@ const localBottomOption = [
tip2: '物料代码:JUST00000104', tip2: '物料代码:JUST00000104',
value: 0, value: 0,
imgIcon: require('../../../../images/model_test.png'), imgIcon: require('../../../../images/model_test.png'),
iconImg: localTestImageUrls,
select: false, select: false,
quantity: 3 quantity: 3
} }
......
...@@ -48,8 +48,8 @@ export default selfOrder = (state = defaultState, action) => { ...@@ -48,8 +48,8 @@ export default selfOrder = (state = defaultState, action) => {
case SELF_INIT_DATA: case SELF_INIT_DATA:
return Object.assign({}, state, { return Object.assign({}, state, {
// 初始化数据 // 初始化数据
self_list_status: QUICK_ORDER_LIST_NO, self_list_status: SELF_ORDER_LIST_NO,
submit_self_order_status: QUICK_SUBMIT_NO, submit_self_order_status: SELF_SUBMIT_NO,
selfOrderOption: {} selfOrderOption: {}
}) })
default: default:
......
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