Commit a8938b2c by wong.peiyi

[调整] 多仓借还显隐调整

parent 1b5dbc4a
...@@ -71,7 +71,7 @@ import PageListArrow from '../common/listDataComponent/PageListArrow'; ...@@ -71,7 +71,7 @@ import PageListArrow from '../common/listDataComponent/PageListArrow';
class EquipConsuPage extends Component { class EquipConsuPage extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
canSubFlag: false, // 生成订单按钮样式改变 canSubFlag: false, // 生成订单按钮样式改变
listOptionData: [ // 页面元素 listOptionData: [ // 页面元素
{ {
...@@ -86,7 +86,7 @@ class EquipConsuPage extends Component { ...@@ -86,7 +86,7 @@ class EquipConsuPage extends Component {
name: '请选择', name: '请选择',
value: '' value: ''
}, },
{ {
"id": "2", "id": "2",
title: '客户名称', title: '客户名称',
name: '请选择', name: '请选择',
...@@ -215,7 +215,7 @@ class EquipConsuPage extends Component { ...@@ -215,7 +215,7 @@ class EquipConsuPage extends Component {
// ], // ],
showNotEnogPop: false, // 库存不足弹窗 showNotEnogPop: false, // 库存不足弹窗
not_enough_items_list:[], // 库存不足数据 not_enough_items_list:[], // 库存不足数据
bor_ware_required: '', // APP借货仓库必填权限 bor_ware_required: 0, // APP借货仓库必填权限
} }
} }
...@@ -279,7 +279,7 @@ class EquipConsuPage extends Component { ...@@ -279,7 +279,7 @@ class EquipConsuPage extends Component {
// data 录音数据 // data 录音数据
console.log(this.state.currentTime) console.log(this.state.currentTime)
}; };
}) })
} }
/** /**
...@@ -303,7 +303,7 @@ class EquipConsuPage extends Component { ...@@ -303,7 +303,7 @@ class EquipConsuPage extends Component {
} }
AudioRecorder.prepareRecordingAtPath(path,option) AudioRecorder.prepareRecordingAtPath(path,option)
} }
// 开始录音 // 开始录音
_record = async () => { _record = async () => {
console.log('-----this.state.hasPermission---', this.state.hasPermission) console.log('-----this.state.hasPermission---', this.state.hasPermission)
...@@ -330,7 +330,7 @@ class EquipConsuPage extends Component { ...@@ -330,7 +330,7 @@ class EquipConsuPage extends Component {
// }, { // }, {
// text: '取消', // text: '取消',
// }]) // }])
// } // }
// console.log('this.state.hasPermission---!!----', this.state.hasPermission) // console.log('this.state.hasPermission---!!----', this.state.hasPermission)
// this.setState({hasPermission: isAuthor}) // this.setState({hasPermission: isAuthor})
// this.prepareRecordingPath(this.state.audioPath); // this.prepareRecordingPath(this.state.audioPath);
...@@ -356,7 +356,7 @@ class EquipConsuPage extends Component { ...@@ -356,7 +356,7 @@ class EquipConsuPage extends Component {
// } catch (err) { // } catch (err) {
// console.log('start record-!!-error->',err) // console.log('start record-!!-error->',err)
// } // }
// }) // })
// } else { // } else {
// console.log('---否则---') // console.log('---否则---')
// show('录音开始') // show('录音开始')
...@@ -402,14 +402,14 @@ class EquipConsuPage extends Component { ...@@ -402,14 +402,14 @@ class EquipConsuPage extends Component {
console.error(err) console.error(err)
} }
} }
// 停止录音 // 停止录音
_stop = async () => { _stop = async () => {
console.log('----stop---', this.state.hasPermission) console.log('----stop---', this.state.hasPermission)
if(!this.state.hasPermission) { if(!this.state.hasPermission) {
return return
// return alert('没有授权') // return alert('没有授权')
} }
show('录音结束') show('录音结束')
try { try {
await AudioRecorder.stopRecording(); await AudioRecorder.stopRecording();
...@@ -418,7 +418,7 @@ class EquipConsuPage extends Component { ...@@ -418,7 +418,7 @@ class EquipConsuPage extends Component {
console.log('stop record--error->', error); console.log('stop record--error->', error);
} }
} }
// 播放录音 // 播放录音
_play = async () => { _play = async () => {
let that = this let that = this
...@@ -471,7 +471,7 @@ class EquipConsuPage extends Component { ...@@ -471,7 +471,7 @@ class EquipConsuPage extends Component {
case QUICK_ORDER_LIST_FAILURE: case QUICK_ORDER_LIST_FAILURE:
this.changeSubLoding(false) this.changeSubLoding(false)
break; break;
default: default:
break; break;
} }
} }
...@@ -480,7 +480,7 @@ class EquipConsuPage extends Component { ...@@ -480,7 +480,7 @@ class EquipConsuPage extends Component {
case LOGIN_NO: case LOGIN_NO:
navigation.navigate('LoginPage') navigation.navigate('LoginPage')
break; break;
default: default:
break; break;
} }
} }
...@@ -508,7 +508,7 @@ class EquipConsuPage extends Component { ...@@ -508,7 +508,7 @@ class EquipConsuPage extends Component {
case QUICK_SUBMIT_FAILURE: case QUICK_SUBMIT_FAILURE:
this.changeSubLoding(false, '提交中') this.changeSubLoding(false, '提交中')
break; break;
default: default:
break; break;
} }
} }
...@@ -559,11 +559,11 @@ class EquipConsuPage extends Component { ...@@ -559,11 +559,11 @@ class EquipConsuPage extends Component {
let tempStatus = false let tempStatus = false
let tempTit = '' let tempTit = ''
let maxIndex = 10 let maxIndex = 10
if(bor_ware_required === 'Y'){ if(bor_ware_required === 3){
maxIndex = 11 maxIndex = 11
} }
for(let chIndex in listOptionData) { for(let chIndex in listOptionData) {
if(chIndex > 0 && chIndex < maxIndex if(chIndex > 0 && chIndex < maxIndex
&& chIndex != 6 && chIndex != 8 && chIndex != 6 && chIndex != 8
&& !listOptionData[chIndex].value && !listOptionData[chIndex].value
&& listOptionData[chIndex].name !== '其他') { && listOptionData[chIndex].name !== '其他') {
...@@ -685,7 +685,7 @@ class EquipConsuPage extends Component { ...@@ -685,7 +685,7 @@ class EquipConsuPage extends Component {
} else if (currentTitle === '借货仓库') { } else if (currentTitle === '借货仓库') {
let filterOpt = dedupQuoteArray(quickOrderOption, 'source_inv_code') let filterOpt = dedupQuoteArray(quickOrderOption, 'source_inv_code')
tempOption = this.changeNameAndValue(filterOpt, 'source_inv_name', 'source_inv_code') tempOption = this.changeNameAndValue(filterOpt, 'source_inv_name', 'source_inv_code')
} }
this.setState({ this.setState({
listCurrentOption: [...tempOption] listCurrentOption: [...tempOption]
}, () => { }, () => {
...@@ -775,7 +775,7 @@ class EquipConsuPage extends Component { ...@@ -775,7 +775,7 @@ class EquipConsuPage extends Component {
}, () => { }, () => {
// 在此修改接口 // 在此修改接口
that.getCustomerData() that.getCustomerData()
}) })
} }
} }
// 获取客户名称 // 获取客户名称
...@@ -1080,7 +1080,7 @@ class EquipConsuPage extends Component { ...@@ -1080,7 +1080,7 @@ class EquipConsuPage extends Component {
this.setState({ this.setState({
listOptionData: listOptionData listOptionData: listOptionData
}) })
} }
this.closeDateModal(true) this.closeDateModal(true)
} }
// 关闭日期选择器 // 关闭日期选择器
...@@ -1102,7 +1102,7 @@ class EquipConsuPage extends Component { ...@@ -1102,7 +1102,7 @@ class EquipConsuPage extends Component {
return item return item
}) })
}) })
} }
// 订单类型 点击 // 订单类型 点击
handleOrderCheck(curData) { handleOrderCheck(curData) {
let { props } = this let { props } = this
...@@ -1120,7 +1120,7 @@ class EquipConsuPage extends Component { ...@@ -1120,7 +1120,7 @@ class EquipConsuPage extends Component {
value_set_code:'SUR_ORDER_TYPE' value_set_code:'SUR_ORDER_TYPE'
} }
props.requestQuickOrderType(params) props.requestQuickOrderType(params)
}) })
} }
} }
// 借货仓库 点击 // 借货仓库 点击
...@@ -1144,7 +1144,7 @@ class EquipConsuPage extends Component { ...@@ -1144,7 +1144,7 @@ class EquipConsuPage extends Component {
process_code: 'COLLECT' process_code: 'COLLECT'
} }
props.requestQuickSurColSetting(params) props.requestQuickSurColSetting(params)
}) })
} }
} }
// 备注 输入 // 备注 输入
...@@ -1163,7 +1163,7 @@ class EquipConsuPage extends Component { ...@@ -1163,7 +1163,7 @@ class EquipConsuPage extends Component {
async handleSubmit() { async handleSubmit() {
this.changeCanSub(true) this.changeCanSub(true)
let { state, props } = this let { state, props } = this
let that = this let that = this
// 可提交 并且 不处于正在提交中 // 可提交 并且 不处于正在提交中
if(state.canSubFlag && !state.isSubLoding) { if(state.canSubFlag && !state.isSubLoding) {
// 先提交录音,再提交接口 // 先提交录音,再提交接口
...@@ -1277,9 +1277,9 @@ class EquipConsuPage extends Component { ...@@ -1277,9 +1277,9 @@ class EquipConsuPage extends Component {
this.clearAllData() this.clearAllData()
let { state: { params: { title } } } = this.props.navigation let { state: { params: { title } } } = this.props.navigation
this.props.navigation.navigate('SubSuccPage', { this.props.navigation.navigate('SubSuccPage', {
title: `${title} - 下单成功`, title: `${title} - 下单成功`,
orderNumber: quickOrderOption.survey_collect_number orderNumber: quickOrderOption.survey_collect_number
}) })
} }
} }
} }
...@@ -1306,7 +1306,7 @@ class EquipConsuPage extends Component { ...@@ -1306,7 +1306,7 @@ class EquipConsuPage extends Component {
} }
}, () => { }, () => {
that.handleSubmit() that.handleSubmit()
}) })
} }
// 库存不足弹窗关闭 // 库存不足弹窗关闭
handleNotEnoughCloseModal(show) { handleNotEnoughCloseModal(show) {
...@@ -1325,10 +1325,10 @@ class EquipConsuPage extends Component { ...@@ -1325,10 +1325,10 @@ class EquipConsuPage extends Component {
console.log('sysRes:==', sysRes) console.log('sysRes:==', sysRes)
if(sysRes.error_code === 0){ if(sysRes.error_code === 0){
this.setState({ this.setState({
bor_ware_required: sysRes.data.profile_value bor_ware_required: Number(sysRes.data.profile_value) || 0
}) })
}else { // }else {
this.showWarnError(sysRes) // this.showWarnError(sysRes)
} }
} }
showWarnError(res){ showWarnError(res){
...@@ -1437,16 +1437,20 @@ class EquipConsuPage extends Component { ...@@ -1437,16 +1437,20 @@ class EquipConsuPage extends Component {
listCallBack={() => this.handleOrderCheck(listOptionData[9])} listCallBack={() => this.handleOrderCheck(listOptionData[9])}
listHasArrow={true} listHasArrow={true}
/> />
<PageListArrow {
listActOpa={.8} bor_ware_required > 1 ?
listHasAster={bor_ware_required === 'Y'} <PageListArrow
listItem={listOptionData[10]} listActOpa={.8}
listName={'name'} listHasAster={bor_ware_required === 3}
listTitle={'title'} listItem={listOptionData[10]}
listCallBack={() => this.handleWareCheck(listOptionData[10])} listName={'name'}
listHasArrow={true} listTitle={'title'}
/> listCallBack={() => this.handleWareCheck(listOptionData[10])}
listHasArrow={true}
/>
: <Text></Text>
}
<DateModel <DateModel
date={listOptionData[8].dateValue} date={listOptionData[8].dateValue}
closeModal={(show) => this.closeDateModal(show)} closeModal={(show) => this.closeDateModal(show)}
...@@ -1468,7 +1472,7 @@ class EquipConsuPage extends Component { ...@@ -1468,7 +1472,7 @@ class EquipConsuPage extends Component {
} }
// 返回选择器弹窗 // 返回选择器弹窗
renderPickerModel() { renderPickerModel() {
let { let {
listCurrentOption, listCurrentOption,
currentItem, currentItem,
currentTitle, currentTitle,
...@@ -1502,7 +1506,7 @@ class EquipConsuPage extends Component { ...@@ -1502,7 +1506,7 @@ class EquipConsuPage extends Component {
underlineColorAndroid = {'transparent'} underlineColorAndroid = {'transparent'}
multiline = {true} multiline = {true}
ref = {textInput => this.TextInput = textInput} ref = {textInput => this.TextInput = textInput}
numberOfLines = {8} numberOfLines = {8}
style={list_common_item.rema_Input} style={list_common_item.rema_Input}
maxLength={140} maxLength={140}
onChangeText={(text) => this.handleRemarkInput(text)} onChangeText={(text) => this.handleRemarkInput(text)}
...@@ -1523,7 +1527,7 @@ class EquipConsuPage extends Component { ...@@ -1523,7 +1527,7 @@ class EquipConsuPage extends Component {
<View style={list_common_item.reco_btn_cont}> <View style={list_common_item.reco_btn_cont}>
{ !stop ? <Text style={list_common_item.reco_btn_tit}>还有什么要安排的,可录音备注哟!</Text> : null } { !stop ? <Text style={list_common_item.reco_btn_tit}>还有什么要安排的,可录音备注哟!</Text> : null }
{ {
!stop ? !stop ?
<View style={list_common_item.reco_btn_inner}> <View style={list_common_item.reco_btn_inner}>
<TouchableOpacity <TouchableOpacity
activeOpacity = {.8} activeOpacity = {.8}
...@@ -1536,7 +1540,7 @@ class EquipConsuPage extends Component { ...@@ -1536,7 +1540,7 @@ class EquipConsuPage extends Component {
</View> </View>
<Text style={list_common_item.reco_btn_text}>长按录音</Text> <Text style={list_common_item.reco_btn_text}>长按录音</Text>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
: <View style={list_common_item.reco_play_box}> : <View style={list_common_item.reco_play_box}>
<View style={list_common_item.play_btn}> <View style={list_common_item.play_btn}>
...@@ -1556,7 +1560,7 @@ class EquipConsuPage extends Component { ...@@ -1556,7 +1560,7 @@ class EquipConsuPage extends Component {
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
} }
</View> </View>
</CellTextStyle> </CellTextStyle>
) )
...@@ -1571,14 +1575,14 @@ class EquipConsuPage extends Component { ...@@ -1571,14 +1575,14 @@ class EquipConsuPage extends Component {
} }
// 返回库存不足弹窗 // 返回库存不足弹窗
renderNotEnoughModel() { renderNotEnoughModel() {
let { let {
not_enough_items_list, not_enough_items_list,
showNotEnogPop showNotEnogPop
} = this.state } = this.state
return ( return (
<SafeAreaView style={styles.item_container}> <SafeAreaView style={styles.item_container}>
<NotEnoughModel <NotEnoughModel
not_enough_items_list={not_enough_items_list} not_enough_items_list={not_enough_items_list}
callback={() => this.handleNotEnoughCallBack()} callback={() => this.handleNotEnoughCallBack()}
show={showNotEnogPop} show={showNotEnogPop}
...@@ -1588,11 +1592,11 @@ class EquipConsuPage extends Component { ...@@ -1588,11 +1592,11 @@ class EquipConsuPage extends Component {
) )
} }
render() { render() {
let {canSubFlag} = this.state let {canSubFlag} = this.state
let {navigation} = this.props let {navigation} = this.props
let {title} = navigation.state.params let {title} = navigation.state.params
return ( return (
<View style={styles.quick_container}> <View style={styles.quick_container}>
<StatusBarView <StatusBarView
isReactStackNavigator={true} isReactStackNavigator={true}
...@@ -1615,9 +1619,9 @@ class EquipConsuPage extends Component { ...@@ -1615,9 +1619,9 @@ class EquipConsuPage extends Component {
textStyle= {styles.sub_btn} textStyle= {styles.sub_btn}
onPress={() => this.handleSubmit()} onPress={() => this.handleSubmit()}
/> />
</ScrollView> </ScrollView>
{ this.renderLodingItem() } { this.renderLodingItem() }
{ this.renderNotEnoughModel() } { this.renderNotEnoughModel() }
</SafeAreaView> </SafeAreaView>
</View> </View>
); );
...@@ -1634,9 +1638,9 @@ const styles = StyleSheet.create({ ...@@ -1634,9 +1638,9 @@ const styles = StyleSheet.create({
}, },
list_cont: { list_cont: {
flex: 1 flex: 1
}, },
item_container: { item_container: {
flex: 1 flex: 1
}, },
sub_btn_pro: { sub_btn_pro: {
backgroundColor: promary_color backgroundColor: promary_color
...@@ -1696,5 +1700,5 @@ const mapDispatchToProps = (dispatch) => { ...@@ -1696,5 +1700,5 @@ const mapDispatchToProps = (dispatch) => {
} }
} }
} }
export default connect(mapStateToProps, mapDispatchToProps)(EquipConsuPage); export default connect(mapStateToProps, mapDispatchToProps)(EquipConsuPage);
\ No newline at end of file
...@@ -70,7 +70,7 @@ import PageListArrow from '../common/listDataComponent/PageListArrow'; ...@@ -70,7 +70,7 @@ import PageListArrow from '../common/listDataComponent/PageListArrow';
class TransOrderPage extends Component { class TransOrderPage extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
canSubFlag: false, // 生成订单按钮样式改变 canSubFlag: false, // 生成订单按钮样式改变
listOptionData: [ // 备注以上的元素 listOptionData: [ // 备注以上的元素
{ {
...@@ -85,7 +85,7 @@ class TransOrderPage extends Component { ...@@ -85,7 +85,7 @@ class TransOrderPage extends Component {
name: '请选择', name: '请选择',
value: '' value: ''
}, },
{ {
"id": "2", "id": "2",
title: '客户名称', title: '客户名称',
name: '请选择', name: '请选择',
...@@ -141,7 +141,7 @@ class TransOrderPage extends Component { ...@@ -141,7 +141,7 @@ class TransOrderPage extends Component {
voice_url: '', // 录音地址 voice_url: '', // 录音地址
sur_order_transfer_line: '', sur_order_transfer_line: '',
img_url: '' // 图片地址 img_url: '' // 图片地址
// seller_code: '', // 用户名username // seller_code: '', // 用户名username
// org_code: '', // 组织 // org_code: '', // 组织
// customer_code: '', // 客户名称 // customer_code: '', // 客户名称
...@@ -172,7 +172,7 @@ class TransOrderPage extends Component { ...@@ -172,7 +172,7 @@ class TransOrderPage extends Component {
], ],
isShowImage: false, isShowImage: false,
currShowImgIndex: 0, currShowImgIndex: 0,
bor_ware_required: '', // APP目标仓库必填权限 bor_ware_required: 0, // APP目标仓库显示及必填权限
} }
} }
...@@ -237,7 +237,7 @@ class TransOrderPage extends Component { ...@@ -237,7 +237,7 @@ class TransOrderPage extends Component {
// data 录音数据 // data 录音数据
console.log(this.state.currentTime) console.log(this.state.currentTime)
}; };
}) })
} }
/** /**
...@@ -261,7 +261,7 @@ class TransOrderPage extends Component { ...@@ -261,7 +261,7 @@ class TransOrderPage extends Component {
} }
AudioRecorder.prepareRecordingAtPath(path,option) AudioRecorder.prepareRecordingAtPath(path,option)
} }
// 开始录音 // 开始录音
_record = async () => { _record = async () => {
// 【有问题】 // 【有问题】
...@@ -287,7 +287,7 @@ class TransOrderPage extends Component { ...@@ -287,7 +287,7 @@ class TransOrderPage extends Component {
// }, { // }, {
// text: '取消', // text: '取消',
// }]) // }])
// } // }
// console.log('this.state.hasPermission---!!----', this.state.hasPermission) // console.log('this.state.hasPermission---!!----', this.state.hasPermission)
// this.setState({hasPermission: isAuthor}) // this.setState({hasPermission: isAuthor})
// this.prepareRecordingPath(this.state.audioPath); // this.prepareRecordingPath(this.state.audioPath);
...@@ -313,7 +313,7 @@ class TransOrderPage extends Component { ...@@ -313,7 +313,7 @@ class TransOrderPage extends Component {
// } catch (err) { // } catch (err) {
// console.log('start record-!!-error->',err) // console.log('start record-!!-error->',err)
// } // }
// }) // })
// } else { // } else {
// console.log('---否则---') // console.log('---否则---')
// show('录音开始') // show('录音开始')
...@@ -359,13 +359,13 @@ class TransOrderPage extends Component { ...@@ -359,13 +359,13 @@ class TransOrderPage extends Component {
console.error(err) console.error(err)
} }
} }
// 停止录音 // 停止录音
_stop = async () => { _stop = async () => {
if(!this.state.hasPermission) { if(!this.state.hasPermission) {
return return
// return alert('没有授权') // return alert('没有授权')
} }
show('录音结束') show('录音结束')
try { try {
await AudioRecorder.stopRecording(); await AudioRecorder.stopRecording();
...@@ -374,7 +374,7 @@ class TransOrderPage extends Component { ...@@ -374,7 +374,7 @@ class TransOrderPage extends Component {
console.log('stop record--error->', error); console.log('stop record--error->', error);
} }
} }
// 播放录音 // 播放录音
_play = async () => { _play = async () => {
let that = this let that = this
...@@ -428,7 +428,7 @@ class TransOrderPage extends Component { ...@@ -428,7 +428,7 @@ class TransOrderPage extends Component {
case TRANS_ORDER_LIST_FAILURE: case TRANS_ORDER_LIST_FAILURE:
this.changeSubLoding(false) this.changeSubLoding(false)
break; break;
default: default:
break; break;
} }
} }
...@@ -437,7 +437,7 @@ class TransOrderPage extends Component { ...@@ -437,7 +437,7 @@ class TransOrderPage extends Component {
case LOGIN_NO: case LOGIN_NO:
navigation.navigate('LoginPage') navigation.navigate('LoginPage')
break; break;
default: default:
break; break;
} }
} }
...@@ -474,7 +474,7 @@ class TransOrderPage extends Component { ...@@ -474,7 +474,7 @@ class TransOrderPage extends Component {
case TRANS_SUBMIT_FAILURE: case TRANS_SUBMIT_FAILURE:
this.changeSubLoding(false, '提交中') this.changeSubLoding(false, '提交中')
break; break;
default: default:
break; break;
} }
} }
...@@ -515,7 +515,7 @@ class TransOrderPage extends Component { ...@@ -515,7 +515,7 @@ class TransOrderPage extends Component {
let tempStatus = false let tempStatus = false
let tempTit = '' let tempTit = ''
let maxIndex = 4 let maxIndex = 4
if(bor_ware_required === 'Y'){ if(bor_ware_required === 3){
maxIndex = 5 maxIndex = 5
} }
for(let chIndex in listOptionData) { for(let chIndex in listOptionData) {
...@@ -714,7 +714,7 @@ class TransOrderPage extends Component { ...@@ -714,7 +714,7 @@ class TransOrderPage extends Component {
seller_code: props.userInfo.user_name seller_code: props.userInfo.user_name
} }
props.requestTransSurgeryHospital(params) props.requestTransSurgeryHospital(params)
}) })
} }
} }
// 组织选择后,判断当前客户名称是否只有一个 // 组织选择后,判断当前客户名称是否只有一个
...@@ -733,7 +733,7 @@ class TransOrderPage extends Component { ...@@ -733,7 +733,7 @@ class TransOrderPage extends Component {
let { listOptionData } = state let { listOptionData } = state
// props.requestListDataSuccess(customers) // props.requestListDataSuccess(customers)
let filterOpt = dedupQuoteArray(customers, 'customer_code') let filterOpt = dedupQuoteArray(customers, 'customer_code')
if(filterOpt.length === 0) { if(filterOpt.length === 0) {
show(`当前${listOptionData[2].title}为空`) show(`当前${listOptionData[2].title}为空`)
return return
} }
...@@ -780,7 +780,7 @@ class TransOrderPage extends Component { ...@@ -780,7 +780,7 @@ class TransOrderPage extends Component {
setting_type: 'COLLECT' setting_type: 'COLLECT'
} }
props.requestTransTargetOrderInfo(params) props.requestTransTargetOrderInfo(params)
}) })
} }
} }
// 客户名称选择后,判断目标订单信息是否只有一条数据 // 客户名称选择后,判断目标订单信息是否只有一条数据
...@@ -851,7 +851,7 @@ class TransOrderPage extends Component { ...@@ -851,7 +851,7 @@ class TransOrderPage extends Component {
showTypePop: true showTypePop: true
}) })
}, 500) }, 500)
}) })
} }
} }
...@@ -909,7 +909,7 @@ class TransOrderPage extends Component { ...@@ -909,7 +909,7 @@ class TransOrderPage extends Component {
if(!listOptionData[7].subOption.length) { if(!listOptionData[7].subOption.length) {
this.props.setTransDetailOption([], {}) this.props.setTransDetailOption([], {})
} }
if(this.judgeOrgIsNull() && this.judgeCustomerIsNull() if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()
&& this.judgeOrderInfoIsNull()) { && this.judgeOrderInfoIsNull()) {
this.props.navigation.navigate('TransSearchPage', { this.props.navigation.navigate('TransSearchPage', {
title: '耗材明细 - 转单查询', title: '耗材明细 - 转单查询',
...@@ -1003,7 +1003,7 @@ class TransOrderPage extends Component { ...@@ -1003,7 +1003,7 @@ class TransOrderPage extends Component {
localPhoOption.push(source); // 本地图片地址 localPhoOption.push(source); // 本地图片地址
listOptionData[8].uploadImgArr.push(url) // 服务器图片地址 listOptionData[8].uploadImgArr.push(url) // 服务器图片地址
that.setState({ that.setState({
localPhoOption, localPhoOption,
listOptionData listOptionData
}); });
...@@ -1140,7 +1140,7 @@ class TransOrderPage extends Component { ...@@ -1140,7 +1140,7 @@ class TransOrderPage extends Component {
this.clearAllData() // 清空数据 this.clearAllData() // 清空数据
let { state: { params: { title } } } = this.props.navigation let { state: { params: { title } } } = this.props.navigation
this.props.navigation.navigate('SubSuccPage', { this.props.navigation.navigate('SubSuccPage', {
title: `${title} - 下单成功`, title: `${title} - 下单成功`,
orderNumber: transOrderOption.data.sur_order_transfer_number // 订单号 orderNumber: transOrderOption.data.sur_order_transfer_number // 订单号
}) })
} }
...@@ -1183,10 +1183,10 @@ class TransOrderPage extends Component { ...@@ -1183,10 +1183,10 @@ class TransOrderPage extends Component {
console.log('sysRes:==', sysRes) console.log('sysRes:==', sysRes)
if(sysRes.error_code === 0){ if(sysRes.error_code === 0){
this.setState({ this.setState({
bor_ware_required: sysRes.data.profile_value bor_ware_required: Number(sysRes.data.profile_value) || 0
}) })
}else { // }else {
this.showWarnError(sysRes) // this.showWarnError(sysRes)
} }
} }
showWarnError(res){ showWarnError(res){
...@@ -1240,15 +1240,18 @@ class TransOrderPage extends Component { ...@@ -1240,15 +1240,18 @@ class TransOrderPage extends Component {
listHasArrow={true} listHasArrow={true}
listMaxLines={3} listMaxLines={3}
/> />
<PageListArrow {
listActOpa={.8} bor_ware_required > 1 &&
listHasAster={bor_ware_required === 'Y'} <PageListArrow
listItem={listOptionData[4]} listActOpa={.8}
listName={'name'} listHasAster={bor_ware_required === 3}
listTitle={'title'} listItem={listOptionData[4]}
listCallBack={() => this.handleWareCheck(listOptionData[4])} listName={'name'}
listHasArrow={true} listTitle={'title'}
/> listCallBack={() => this.handleWareCheck(listOptionData[4])}
listHasArrow={true}
/>
}
{ this.renderPickerModel() } { this.renderPickerModel() }
...@@ -1267,7 +1270,7 @@ class TransOrderPage extends Component { ...@@ -1267,7 +1270,7 @@ class TransOrderPage extends Component {
// 返回选择器弹窗 // 返回选择器弹窗
renderPickerModel() { renderPickerModel() {
let { let {
listCurrentOption, listCurrentOption,
currentItem, currentItem,
currentTitle, currentTitle,
...@@ -1302,7 +1305,7 @@ class TransOrderPage extends Component { ...@@ -1302,7 +1305,7 @@ class TransOrderPage extends Component {
underlineColorAndroid = {'transparent'} underlineColorAndroid = {'transparent'}
multiline = {true} multiline = {true}
ref = {textInput => this.TextInput = textInput} ref = {textInput => this.TextInput = textInput}
numberOfLines = {8} numberOfLines = {8}
style={list_common_item.rema_Input} style={list_common_item.rema_Input}
maxLength={140} maxLength={140}
onChangeText={(text) => this.handleRemarkInput(text)} onChangeText={(text) => this.handleRemarkInput(text)}
...@@ -1323,7 +1326,7 @@ class TransOrderPage extends Component { ...@@ -1323,7 +1326,7 @@ class TransOrderPage extends Component {
<View style={list_common_item.reco_btn_cont}> <View style={list_common_item.reco_btn_cont}>
{ !stop ? <Text style={list_common_item.reco_btn_tit}>还有什么要安排的,可录音备注哟!</Text> : null } { !stop ? <Text style={list_common_item.reco_btn_tit}>还有什么要安排的,可录音备注哟!</Text> : null }
{ {
!stop ? !stop ?
<View style={list_common_item.reco_btn_inner}> <View style={list_common_item.reco_btn_inner}>
<TouchableOpacity <TouchableOpacity
activeOpacity = {.8} activeOpacity = {.8}
...@@ -1357,7 +1360,7 @@ class TransOrderPage extends Component { ...@@ -1357,7 +1360,7 @@ class TransOrderPage extends Component {
</View> </View>
} }
</View> </View>
</CellTextStyle> </CellTextStyle>
) )
...@@ -1371,7 +1374,7 @@ class TransOrderPage extends Component { ...@@ -1371,7 +1374,7 @@ class TransOrderPage extends Component {
<View style={list_common_item.detail_inner}> <View style={list_common_item.detail_inner}>
<Text style={list_common_item.detail_tit}>耗材明细</Text> <Text style={list_common_item.detail_tit}>耗材明细</Text>
{ {
state.listOptionData[7].subOption.length ? state.listOptionData[7].subOption.length ?
<View <View
// activeOpacity={1} // activeOpacity={1}
style={list_common_item.detail_sub_cont}> style={list_common_item.detail_sub_cont}>
...@@ -1388,7 +1391,7 @@ class TransOrderPage extends Component { ...@@ -1388,7 +1391,7 @@ class TransOrderPage extends Component {
onPress={() => this.handleDetailBtmCheck()} onPress={() => this.handleDetailBtmCheck()}
> >
<Image style={[icon_style, list_common_item.detail_top_icon]} source={require('../../images/arr_btm.png')} /> <Image style={[icon_style, list_common_item.detail_top_icon]} source={require('../../images/arr_btm.png')} />
</TouchableOpacity> : </TouchableOpacity> :
<TouchableOpacity <TouchableOpacity
activeOpacity={.8} activeOpacity={.8}
style={[list_common_item.detail_icon, list_common_item.detail_icon_rig]} style={[list_common_item.detail_icon, list_common_item.detail_icon_rig]}
...@@ -1397,7 +1400,7 @@ class TransOrderPage extends Component { ...@@ -1397,7 +1400,7 @@ class TransOrderPage extends Component {
<Image style={[icon_style, list_common_item.detail_top_icon]} source={require('../../images/arr_rig.png')} /> <Image style={[icon_style, list_common_item.detail_top_icon]} source={require('../../images/arr_rig.png')} />
</TouchableOpacity> </TouchableOpacity>
} }
</View> </View>
{ {
state.listOptionData[7].isShowSub ? state.listOptionData[7].isShowSub ?
...@@ -1418,7 +1421,7 @@ class TransOrderPage extends Component { ...@@ -1418,7 +1421,7 @@ class TransOrderPage extends Component {
} }
</View> : null </View> : null
} }
<View style={list_common_item.detail_footer}> <View style={list_common_item.detail_footer}>
<TouchableOpacity <TouchableOpacity
activeOpacity={.8} activeOpacity={.8}
...@@ -1470,12 +1473,12 @@ class TransOrderPage extends Component { ...@@ -1470,12 +1473,12 @@ class TransOrderPage extends Component {
> >
<Image style={icon_style} source={require('../../images/add_icon_large.png')} /> <Image style={icon_style} source={require('../../images/add_icon_large.png')} />
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
</CellTextStyle> </CellTextStyle>
) )
} }
// 返回增加的图片 // 返回增加的图片
renderPicItem(item, index) { renderPicItem(item, index) {
return ( return (
...@@ -1501,7 +1504,7 @@ class TransOrderPage extends Component { ...@@ -1501,7 +1504,7 @@ class TransOrderPage extends Component {
// 加载放大图片弹窗 // 加载放大图片弹窗
renderZoomPicture() { renderZoomPicture() {
let { isShowImage, currShowImgIndex, listOptionData } = this.state let { isShowImage, currShowImgIndex, listOptionData } = this.state
let { global_domain_config } = this.props let { global_domain_config } = this.props
// // 测试 // // 测试
// let zoomImages = [{ // let zoomImages = [{
// url: 'https://obs.uat.sfrx.guke.tech/upload/dingding/image/QDw05sTo.jpg', // url: 'https://obs.uat.sfrx.guke.tech/upload/dingding/image/QDw05sTo.jpg',
...@@ -1512,14 +1515,14 @@ class TransOrderPage extends Component { ...@@ -1512,14 +1515,14 @@ class TransOrderPage extends Component {
// url: 'https://obs.uat.sfrx.guke.tech/upload/dingding/image/QDw05sTo.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/upload/dingding/image/8V4599aH.jpg' // url: 'https://obs.uat.sfrx.guke.tech/jeecg-boot/sys/common/view/upload/dingding/image/8V4599aH.jpg'
// }] // }]
// 正式 // 正式
let zoomImages = [] let zoomImages = []
listOptionData[8].uploadImgArr.forEach(item => { listOptionData[8].uploadImgArr.forEach(item => {
zoomImages.push({ zoomImages.push({
url: `${global_domain_config}/${item}` url: `${global_domain_config}/${item}`
}) })
}) })
return ( return (
<ZoomPictureModel <ZoomPictureModel
isShowImage={isShowImage} isShowImage={isShowImage}
...@@ -1539,11 +1542,11 @@ class TransOrderPage extends Component { ...@@ -1539,11 +1542,11 @@ class TransOrderPage extends Component {
) )
} }
render() { render() {
let { canSubFlag } = this.state let { canSubFlag } = this.state
let { navigation } = this.props let { navigation } = this.props
let { title } = navigation.state.params let { title } = navigation.state.params
return ( return (
<View style={styles.trans_container}> <View style={styles.trans_container}>
<StatusBarView <StatusBarView
isReactStackNavigator={true} isReactStackNavigator={true}
...@@ -1555,7 +1558,7 @@ class TransOrderPage extends Component { ...@@ -1555,7 +1558,7 @@ class TransOrderPage extends Component {
<ScrollView <ScrollView
style={styles.trans_main} style={styles.trans_main}
showsVerticalScrollIndicator={false} showsVerticalScrollIndicator={false}
> >
{this.renderListItem()} {this.renderListItem()}
{this.renderRemarksItem()} {this.renderRemarksItem()}
{this.renderRecordingItem()} {this.renderRecordingItem()}
...@@ -1587,9 +1590,9 @@ const styles = StyleSheet.create({ ...@@ -1587,9 +1590,9 @@ const styles = StyleSheet.create({
}, },
list_cont: { list_cont: {
flex: 1 flex: 1
}, },
item_container: { item_container: {
flex: 1 flex: 1
}, },
sub_btn_pro: { sub_btn_pro: {
backgroundColor: promary_color backgroundColor: promary_color
...@@ -1644,5 +1647,5 @@ const mapDispatchToProps = (dispatch) => { ...@@ -1644,5 +1647,5 @@ const mapDispatchToProps = (dispatch) => {
} }
} }
} }
export default connect(mapStateToProps, mapDispatchToProps)(TransOrderPage); export default connect(mapStateToProps, mapDispatchToProps)(TransOrderPage);
\ No newline at end of file
This diff could not be displayed because it is too large.
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