Commit ef444ba0 by wong.peiyi

借货单通过部门而不是通过销售员过滤、ios拍照及上传heic不了bug修复

parent 89116767
Showing with 19 additions and 3 deletions
...@@ -747,7 +747,10 @@ class EquipConsuPage extends Component { ...@@ -747,7 +747,10 @@ class EquipConsuPage extends Component {
handleOrderInfoCheck(curData) { handleOrderInfoCheck(curData) {
let { state, props } = this let { state, props } = this
let that = this let that = this
const {OBS_MOBILE_CONSU_DEPARTMENT_DISPLAY} = state.sysValues
if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) { if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
if (OBS_MOBILE_CONSU_DEPARTMENT_DISPLAY > 0 && !this.judgeDepartmentIsNull()) return
that.setState({ that.setState({
currentTitle: curData.title, currentTitle: curData.title,
currentItem: { currentItem: {
...@@ -764,10 +767,14 @@ class EquipConsuPage extends Component { ...@@ -764,10 +767,14 @@ class EquipConsuPage extends Component {
let params = { let params = {
access_token: props.token, access_token: props.token,
org_code: state.listOptionData[1].value, org_code: state.listOptionData[1].value,
seller_code: props.userInfo.user_name,
customer_code: state.listOptionData[2].value, customer_code: state.listOptionData[2].value,
collect_header_status: 'RETURNED,COLLECTED' collect_header_status: 'RETURNED,COLLECTED'
} }
if (OBS_MOBILE_CONSU_DEPARTMENT_DISPLAY > 0) {
params.department_code = state.listOptionData[15].value
} else {
params.seller_code = props.userInfo.user_name
}
props.requestEquipOrderInfo(params) props.requestEquipOrderInfo(params)
}) })
} }
...@@ -775,13 +782,19 @@ class EquipConsuPage extends Component { ...@@ -775,13 +782,19 @@ class EquipConsuPage extends Component {
// 客户名称选择后,判断订单信息是否只有一条数据 // 客户名称选择后,判断订单信息是否只有一条数据
async customerGetOrderInfo() { async customerGetOrderInfo() {
let { state, props } = this let { state, props } = this
const {OBS_MOBILE_CONSU_DEPARTMENT_DISPLAY} = state.sysValues
let params = { let params = {
access_token: props.token, access_token: props.token,
org_code: state.listOptionData[1].value, org_code: state.listOptionData[1].value,
seller_code: props.userInfo.user_name,
customer_code: state.listOptionData[2].value, customer_code: state.listOptionData[2].value,
collect_header_status: 'RETURNED,COLLECTED' collect_header_status: 'RETURNED,COLLECTED'
} }
if (OBS_MOBILE_CONSU_DEPARTMENT_DISPLAY > 0 && !!state.listOptionData[15].value) {
params.department_code = state.listOptionData[15].value
} else {
params.seller_code = props.userInfo.user_name
}
let that = this let that = this
let { global_domain_config } = props let { global_domain_config } = props
let cusResult = await reqEquipOrderInfo(global_domain_config, params); let cusResult = await reqEquipOrderInfo(global_domain_config, params);
...@@ -1162,6 +1175,9 @@ class EquipConsuPage extends Component { ...@@ -1162,6 +1175,9 @@ class EquipConsuPage extends Component {
source = res.uri; source = res.uri;
} else { } else {
source = res.uri.replace('file://',''); source = res.uri.replace('file://','');
if (!res.fileName) {
res.fileName = new Date().getTime() + '.HEIC'
}
} }
const formData = new FormData(); const formData = new FormData();
let file = { uri: source, type: 'multipart/form-data', name: res.fileName }; let file = { uri: source, type: 'multipart/form-data', name: res.fileName };
...@@ -1283,7 +1299,7 @@ class EquipConsuPage extends Component { ...@@ -1283,7 +1299,7 @@ class EquipConsuPage extends Component {
return this.showTipFirstSelect(3) return this.showTipFirstSelect(3)
} }
// 判断订单信息是否为空 // 判断部门信息是否为空
judgeDepartmentIsNull() { judgeDepartmentIsNull() {
return this.showTipFirstSelect(15) return this.showTipFirstSelect(15)
} }
......
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