|  | @@ -177,15 +177,56 @@ class PublicContent extends Component {
 | 
	
		
			
				|  |  |        ),
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  // 增加 省 市 区拼接,地址带区域的则把区域去掉
 | 
	
		
			
				|  |  | +  getArea() {
 | 
	
		
			
				|  |  | +    const { locationInfor } = this.props
 | 
	
		
			
				|  |  | +    // if (locationInfor.province || locationInfor.city || locationInfor.district) {
 | 
	
		
			
				|  |  | +    //   let pcd = locationInfor.province + locationInfor.city + locationInfor.district
 | 
	
		
			
				|  |  | +    //   let str = locationInfor.name
 | 
	
		
			
				|  |  | +    //   let index = str.lastIndexOf("区")
 | 
	
		
			
				|  |  | +    //   let name = str.substring(index + 1)
 | 
	
		
			
				|  |  | +    //   return pcd + name
 | 
	
		
			
				|  |  | +    // } else {
 | 
	
		
			
				|  |  | +    //   let str = locationInfor.name
 | 
	
		
			
				|  |  | +    //   return str
 | 
	
		
			
				|  |  | +    // }
 | 
	
		
			
				|  |  | +    let address = locationInfor.name;
 | 
	
		
			
				|  |  | +    let defaultProvince = locationInfor.province || "";
 | 
	
		
			
				|  |  | +    let defaultCity = locationInfor.city || "";
 | 
	
		
			
				|  |  | +    let defaultDistrict = locationInfor.district || "";
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    // 假设省市区的关键字有 "省", "市", "区"
 | 
	
		
			
				|  |  | +    const provinceKeyword = '省';
 | 
	
		
			
				|  |  | +    const cityKeyword = '市';
 | 
	
		
			
				|  |  | +    const districtKeyword = '区';
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    // 判断是否包含省市区关键字,如果不包含则进行补全
 | 
	
		
			
				|  |  | +    if (address.indexOf(provinceKeyword) === -1) {
 | 
	
		
			
				|  |  | +      address = `${defaultProvince}${address}`;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    if (address.indexOf(cityKeyword) === -1) {
 | 
	
		
			
				|  |  | +      address = address.replace(provinceKeyword, `${provinceKeyword}${defaultCity}`);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    console.log(address.indexOf(districtKeyword) + "===" + address.indexOf("小区"))
 | 
	
		
			
				|  |  | +    if (address.indexOf(districtKeyword) !== -1 && address.indexOf("小区") !== -1) {
 | 
	
		
			
				|  |  | +      address = address.replace(cityKeyword, `${cityKeyword}${defaultDistrict}`);
 | 
	
		
			
				|  |  | +    } else if (address.indexOf(districtKeyword) === -1) {
 | 
	
		
			
				|  |  | +      address = address.replace(cityKeyword, `${cityKeyword}${defaultDistrict}`);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    return address;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |    // 修改公出提交
 | 
	
		
			
				|  |  |    onSubmit() {
 | 
	
		
			
				|  |  | -    const { isVerify = false } = this.props;
 | 
	
		
			
				|  |  | +    const { dtails, locationInfor, isVerify = false } = this.props;
 | 
	
		
			
				|  |  |      let objectType = this.props.dtails.uids.indexOf(',') > -1 ? 1 : 0
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      this.setState({
 | 
	
		
			
				|  |  |        loading: true,
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |      let datas;
 | 
	
		
			
				|  |  | +    let addressName = !!locationInfor.province ? locationInfor.province + locationInfor.city + locationInfor.district : "";
 | 
	
		
			
				|  |  |      if (this.props.dtails.type == 0) {
 | 
	
		
			
				|  |  |        datas = {
 | 
	
		
			
				|  |  |          id: this.props.dtails.id,
 | 
	
	
		
			
				|  | @@ -195,9 +236,10 @@ class PublicContent extends Component {
 | 
	
		
			
				|  |  |          remarks: this.state.reason,
 | 
	
		
			
				|  |  |          plan: this.state.plan,
 | 
	
		
			
				|  |  |          expectedEffect: this.state.expectedEffect,
 | 
	
		
			
				|  |  | -        districtName: this.props.locationInfor.name,
 | 
	
		
			
				|  |  | -        longitude: this.props.locationInfor.longitude,
 | 
	
		
			
				|  |  | -        latitude: this.props.locationInfor.latitude,
 | 
	
		
			
				|  |  | +        districtName: this.getArea(),
 | 
	
		
			
				|  |  | +        addressName: addressName,
 | 
	
		
			
				|  |  | +        longitude: locationInfor.longitude,
 | 
	
		
			
				|  |  | +        latitude: locationInfor.latitude,
 | 
	
		
			
				|  |  |          annexUrl: this.state.imgs.length === 0 ? "" : this.state.imgs.join(","),
 | 
	
		
			
				|  |  |          duration: this.state.totalDuration,
 | 
	
		
			
				|  |  |          validDate: JSON.stringify(this.state.validDates),
 | 
	
	
		
			
				|  | @@ -216,7 +258,8 @@ class PublicContent extends Component {
 | 
	
		
			
				|  |  |          remarks: this.state.reason,
 | 
	
		
			
				|  |  |          // plan: this.state.plan,
 | 
	
		
			
				|  |  |          // expectedEffect: this.state.expectedEffect,
 | 
	
		
			
				|  |  | -        districtName: this.props.locationInfor.name,
 | 
	
		
			
				|  |  | +        districtName: this.getArea(),
 | 
	
		
			
				|  |  | +        addressName: addressName,
 | 
	
		
			
				|  |  |          longitude: this.props.locationInfor.longitude,
 | 
	
		
			
				|  |  |          latitude: this.props.locationInfor.latitude,
 | 
	
		
			
				|  |  |          annexUrl: this.state.imgs.length === 0 ? "" : this.state.imgs.join(","),
 | 
	
	
		
			
				|  | @@ -238,7 +281,8 @@ class PublicContent extends Component {
 | 
	
		
			
				|  |  |          remarks: this.state.reason,
 | 
	
		
			
				|  |  |          plan: this.state.plan,
 | 
	
		
			
				|  |  |          expectedEffect: this.state.expectedEffect,
 | 
	
		
			
				|  |  | -        districtName: this.props.locationInfor.name,
 | 
	
		
			
				|  |  | +        districtName: this.getArea(),
 | 
	
		
			
				|  |  | +        addressName: addressName,
 | 
	
		
			
				|  |  |          longitude: this.props.locationInfor.longitude,
 | 
	
		
			
				|  |  |          latitude: this.props.locationInfor.latitude,
 | 
	
		
			
				|  |  |          annexUrl: this.state.imgs.length === 0 ? "" : this.state.imgs.join(","),
 | 
	
	
		
			
				|  | @@ -288,6 +332,7 @@ class PublicContent extends Component {
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |    // 再次公出提交
 | 
	
		
			
				|  |  |    goAgain() {
 | 
	
		
			
				|  |  | +    const { locationInfor } = this.props
 | 
	
		
			
				|  |  |      if (!this.state.rangeStartMinuteVal) {
 | 
	
		
			
				|  |  |        Taro.showToast({ title: "请选择公出时间", icon: "none" });
 | 
	
		
			
				|  |  |        return;
 | 
	
	
		
			
				|  | @@ -339,7 +384,8 @@ class PublicContent extends Component {
 | 
	
		
			
				|  |  |        releaseStarts: this.state.rangeStartMinuteVal,
 | 
	
		
			
				|  |  |        releaseEnds: this.state.rangeEndMinuteVal,
 | 
	
		
			
				|  |  |        remarks: this.state.reason,
 | 
	
		
			
				|  |  | -      districtName: this.props.locationInfor.name,
 | 
	
		
			
				|  |  | +      districtName: this.getArea(),
 | 
	
		
			
				|  |  | +      addressName: locationInfor.province + locationInfor.city + locationInfor.district,
 | 
	
		
			
				|  |  |        longitude: this.props.locationInfor.longitude,
 | 
	
		
			
				|  |  |        latitude: this.props.locationInfor.latitude,
 | 
	
		
			
				|  |  |        annexUrl: this.state.imgs.length === 0 ? "" : this.state.imgs.join(","),
 | 
	
	
		
			
				|  | @@ -506,8 +552,7 @@ class PublicContent extends Component {
 | 
	
		
			
				|  |  |                  <View>总计公出:<Text style={{ color: 'red' }}>{obj.peopleCount}人,{obj.timesCount}次,{obj.durationCount}时</Text>。</View>
 | 
	
		
			
				|  |  |                  <View>
 | 
	
		
			
				|  |  |                    <Text style={{ color: 'red' }}>
 | 
	
		
			
				|  |  | -                    本合同{["低于1万元以下", "在1~3万", "在3~5万", "在5~10万", "在10万及以上"][obj.amountType]},
 | 
	
		
			
				|  |  | -                    {["原则上技术人员不可下户", `本次申请,已超出${obj.durationMax}小时`, `本次公出申请,已超出${obj.durationMax}小时`, `本次公出申请,已超出${obj.durationMax}小时`, ""][obj.amountType]}
 | 
	
		
			
				|  |  | +                    {obj.amountName},{obj.amountType}
 | 
	
		
			
				|  |  |                    </Text>。
 | 
	
		
			
				|  |  |                  </View>
 | 
	
		
			
				|  |  |                  <View>如需公出,需<Text style={{ color: 'red' }}>{obj.adminName}</Text>审核。</View>
 |