dev01 1 hónapja%!(EXTRA string=óta)
szülő
commit
6107a415d2

+ 2 - 2
src/pages/interviewDetail/components/InteractList.jsx

@@ -7,7 +7,7 @@ import 'taro-ui/dist/style/components/button.scss';
 import './index.less';
 
 
-class InteractList extends Component {
+class InterviewHisList extends Component {
   constructor(props) {
     super(props);
     this.state = {
@@ -58,4 +58,4 @@ class InteractList extends Component {
   }
 }
 
-export default InteractList;
+export default InterviewHisList;

src/pages/interviewDetail/components/index.less → src/components/common/InterviewHisList/index.less


+ 4 - 3
src/pages/applyDepart/index.jsx

@@ -169,11 +169,12 @@ class ApplyDepart extends Component {
 
   setTabDisabled(item) {
     let userInfo = Taro.getStorageSync('userInfor');
-    if (item.type === 1 && userInfo.type !== 3) {
-      return true;
-    } else if (item.type === 2 && userInfo.position === 1) {
+    if ([1, 2].indexOf(item.type) > -1 && userInfo.type !== 3) {
       return true;
     }
+    // else if (item.type === 2 && userInfo.position === 1) {
+    //   return true;
+    // }
     return false;
   }
 

+ 1 - 1
src/pages/applyDepart/publicContent.jsx

@@ -660,7 +660,7 @@ class PublicContent extends Component {
           style={{ display: "block", paddingTop: "10px" }}
         >
           {/* 公出目标 */}
-          {[2, 3].indexOf(this.props.enterpriseInfor.type) > -1 && (
+          {[1, 2].indexOf(this.props.enterpriseInfor.type) > -1 && (
             <View className="formName">
                 <Text><Text style={{ color: "red" }}>*</Text>公出目标:</Text>
                 <View

+ 0 - 38
src/pages/customerProfile/components/InteractList.jsx

@@ -1,38 +0,0 @@
-import { View } from "@tarojs/components";
-import React, { Component } from "react";
-import { AtFloatLayout, AtTimeline } from "taro-ui";
-
-import 'taro-ui/dist/style/components/float-layout.scss';
-import 'taro-ui/dist/style/components/button.scss';
-
-
-class InteractList extends Component {
-  constructor(props) {
-    super(props);
-    this.state = {
-    }
-
-    this.handleClose = this.handleClose.bind(this);
-  }
-
-  handleClose() {
-    this.props.onClose();
-  }
-
-  render() {
-    const hisItems = this.props.list.map(record => {
-        return { title: record.createTime, content: [record[this.props.type] || '空'] }
-    })
-    return (
-        <AtFloatLayout isOpened={this.props.isOpened} title={this.props.title} scrollY onClose={this.handleClose}>
-            <AtTimeline 
-                pending 
-                items={hisItems}
-            >
-            </AtTimeline>
-        </AtFloatLayout>
-    )
-  }
-}
-
-export default InteractList;

+ 20 - 19
src/pages/customerProfile/index.jsx

@@ -41,9 +41,10 @@ import { getChannel } from "../../utils/tools";
 import Superior from "../../components/common/superior";
 import CheckboxPicker from "../../components/common/CheckboxPicker";
 import AddressPicker from "../../components/common/addressPicker"
-import InteractList from "./components/InteractList";
 import CustomerProjectSelect from '../../components/common/CustomerProjectSelect';
 import address from '../../utils/tools/city.js'
+import InterviewHisList from "../../components/common/InterviewHisList";
+
 
 class CustomerProfile extends Component {
   $instance = getCurrentInstance();
@@ -280,8 +281,9 @@ class CustomerProfile extends Component {
 
   // 客户档案详情
   queryByUidAll(updateType) {
+    let notRequired = this.$instance.router.params.notRequired === 'true' ? true : false;
     queryByUidAll(
-      this.$instance.router.params.notRequired,
+      notRequired,
       { id: this.$instance.router.params.id, }
     )
       .then((v) => {
@@ -1357,11 +1359,12 @@ class CustomerProfile extends Component {
                                   info: {
                                     uid: this.$instance.router.params.id,
                                     id: dtails.id,
-                                    inventionPatentCount: dtails.inventionPatentCount || '',
-                                    utilityModelCount: dtails.utilityModelCount || '',
-                                    appearancePatentCount: dtails.appearancePatentCount || '',
-                                    softwareWorksCount: dtails.softwareWorksCount || '',
-                                    otherCount: dtails.otherCount || '',
+                                    inventionPatentCount: dtails.inventionPatentCount,
+                                    utilityModelCount: dtails.utilityModelCount,
+                                    appearancePatentCount: dtails.appearancePatentCount,
+                                    softwareWorksCount: dtails.softwareWorksCount,
+                                    standard: dtails.standard,
+                                    otherCount: dtails.otherCount,
                                   }
                                 })
                               }}
@@ -1370,12 +1373,12 @@ class CustomerProfile extends Component {
                         </View>
                         <View className="val">
                           专利&nbsp;<Text className="num">{dtails.patentCount}</Text>&nbsp;&nbsp;&nbsp;
-                            其中发明专利&nbsp;<Text className="num">{dtails.inventionPatentCount || ''}</Text>&nbsp;&nbsp;&nbsp;
-                            实用新型&nbsp;<Text className="num">{dtails.utilityModelCount || ''}</Text>&nbsp;&nbsp;&nbsp;
-                            外观设计&nbsp;<Text className="num">{dtails.appearancePatentCount || ''}</Text>&nbsp;&nbsp;&nbsp;
-                            软著&nbsp;<Text className="num">{dtails.softwareWorksCount || ''}</Text>&nbsp;&nbsp;&nbsp;
+                            其中发明专利&nbsp;<Text className="num">{dtails.inventionPatentCount}</Text>&nbsp;&nbsp;&nbsp;
+                            实用新型&nbsp;<Text className="num">{dtails.utilityModelCount}</Text>&nbsp;&nbsp;&nbsp;
+                            外观设计&nbsp;<Text className="num">{dtails.appearancePatentCount}</Text>&nbsp;&nbsp;&nbsp;
+                            软著&nbsp;<Text className="num">{dtails.softwareWorksCount}</Text>&nbsp;&nbsp;&nbsp;
                             标准&nbsp;<Text className="num">{String(dtails.standard) === '1' ? '有' : String(dtails.standard) === '0' ? '无' : ''}</Text>&nbsp;&nbsp;&nbsp;
-                            其他类型&nbsp;<Text className="num">{dtails.otherCount || ''}</Text>&nbsp;&nbsp;&nbsp;
+                            其他类型&nbsp;<Text className="num">{dtails.otherCount}</Text>&nbsp;&nbsp;&nbsp;
                         </View>
 
                         <View className="tit" style={{ margin: '32rpx 0 20rpx;'}}>2.财务数据</View>
@@ -1801,8 +1804,6 @@ class CustomerProfile extends Component {
                 <View style={{ display: 'flex', margin: '12rpx 0' }}>
                   <Text style={{ fontSize: '32rpx', marginRight: '16rpx', width: '172rpx' }}>标准</Text>
                   <RadioGroup title="标准" onChange={e => {
-                    // dtails.standard = Number(e.target.value);
-                    // this.setState({ dtails });
                     this.setState({
                       info: Object.assign(info, {
                         standard: Number(e.target.value),
@@ -1810,10 +1811,10 @@ class CustomerProfile extends Component {
                     })
                   }}>
                     <Label className='radio-list__label'>
-                      <Radio className='radio-list__radio' value={1} checked={String(dtails.standard) === '1'}>有</Radio>
+                      <Radio className='radio-list__radio' value={1} checked={String(info.standard) === '1'}>有</Radio>
                     </Label>
                     <Label className='radio-list__label'>
-                      <Radio className='radio-list__radio' value={0} checked={String(dtails.standard) === '0'}>无</Radio>
+                      <Radio className='radio-list__radio' value={0} checked={String(info.standard) === '0'}>无</Radio>
                     </Label>
                   </RadioGroup>
                 </View>
@@ -1821,10 +1822,10 @@ class CustomerProfile extends Component {
                   name='otherCount'
                   title='其他'
                   type='number'
-                  value={dtails.otherCount}
+                  value={info.otherCount}
                   onChange={e => {
                     this.setState({
-                      info: Object.assign(dtails, {
+                      info: Object.assign(info, {
                         otherCount: e,
                       })
                     })
@@ -2227,7 +2228,7 @@ class CustomerProfile extends Component {
         ></CheckboxPicker>
 
         {/* 沟通情况历史记录 */}
-        <InteractList
+        <InterviewHisList
           isOpened={this.state.interactShow}
           list={this.state.interactList}
           type={this.state.interactShowType}

+ 2 - 4
src/pages/egressDetails/index.jsx

@@ -449,7 +449,6 @@ class EgressDetails extends Component {
   }
 
   onSelFiles(data, type) {
-    console.log(data)
     let url = '';
     if (type == 1) {
       // 企业档案表
@@ -473,7 +472,7 @@ class EgressDetails extends Component {
       })
     } else {
       Taro.navigateTo({
-        url: url + "?id=" + data.uids + "&prdid="+ data.prdList[0].id +"&notRequired=true&readonly=true"
+        url: url + "?id=" + data.uids + "&prdid="+ data.prdList[0].id +"&notRequired=false&readonly=true"
       });
     }
   }
@@ -1027,7 +1026,6 @@ class EgressDetails extends Component {
               options={this.state.filesList}
               value={this.state.uid}
               onClick={e => {
-                console.log(e)
                 let currFileItem = this.state.filesList.find(item => item.value == e);
                 this.setState({
                   uid: e,
@@ -1049,7 +1047,7 @@ class EgressDetails extends Component {
                   isSelFiles: false
                 })
                 Taro.navigateTo({
-                  url: this.state.detailUrl + "?id=" + this.state.uid + "&notRequired=true&readonly=true&prdid="+this.state.prdid,
+                  url: this.state.detailUrl + "?id=" + this.state.uid + "&notRequired=false&readonly=true&prdid="+this.state.prdid,
                 });
               }}>确定</Button>
           </AtModalAction>

+ 0 - 39
src/pages/interview/components/InteractList.jsx

@@ -1,39 +0,0 @@
-import { View } from "@tarojs/components";
-import React, { Component } from "react";
-import { AtFloatLayout, AtTimeline } from "taro-ui";
-
-import 'taro-ui/dist/style/components/float-layout.scss';
-import 'taro-ui/dist/style/components/button.scss';
-import './index.less';
-
-
-class InteractList extends Component {
-  constructor(props) {
-    super(props);
-    this.state = {
-    }
-
-    this.handleClose = this.handleClose.bind(this);
-  }
-
-  handleClose() {
-    this.props.onClose();
-  }
-
-  render() {
-    const hisItems = this.props.list.map(record => {
-        return { title: record.createTime, content: [record[this.props.type] || '空'] }
-    })
-    return (
-        <AtFloatLayout isOpened={this.props.isOpened} title={this.props.title} scrollY onClose={this.handleClose}>
-          <AtTimeline 
-              pending 
-              items={hisItems}
-          >
-          </AtTimeline>
-        </AtFloatLayout>
-    )
-  }
-}
-
-export default InteractList;

+ 0 - 13
src/pages/interview/components/index.less

@@ -1,13 +0,0 @@
-.at-timeline-item {
-  padding-bottom: 36rpx;
-}
-.at-timeline-item__content-item {
-  color: #333;
-  font-weight: 600;
-}
-.at-timeline-item__content--sub {
-  color: #999;
-  margin-top: 8rpx;
-  font-size: 25rpx;
-  font-weight: 400;
-}

+ 35 - 32
src/pages/interview/myUser.jsx

@@ -43,8 +43,8 @@ import { getChannel } from "../../utils/tools";
 import Superior from "../../components/common/superior";
 import CheckboxPicker from "../../components/common/CheckboxPicker";
 import AddressPicker from "../../components/common/addressPicker"
-import InteractList from "./components/InteractList";
 import CustomerProjectSelect from '../../components/common/CustomerProjectSelect';
+import InterviewHisList from "../../components/common/InterviewHisList";
 
 class CustomerProfile extends Component {
   $instance = getCurrentInstance();
@@ -684,6 +684,7 @@ class CustomerProfile extends Component {
       if (this.state.upType == 1) {
         // 计算专利
         let patentCount = this.countZlNum(this.state.info);
+        console.log(this.state.info)
         this.setState({ isOpened: false, dtails: { ...this.state.dtails, ...this.state.info, patentCount } })
       } else {
         this.setState({ isOpened: false, dtails: { ...this.state.dtails, ...this.state.info } })
@@ -702,7 +703,8 @@ class CustomerProfile extends Component {
       });
       return;
     } else {
-      let isAdded = projectList.some(item => item.pid == checkProject[0].id)
+      let normalProjectList = projectList.filter(item => item.status === 0);
+      let isAdded = normalProjectList.some(item => item.pid == checkProject[0].id)
       if (isAdded) {
         Taro.showToast({
           title: checkProject[0].bname + '已存在,请勿重复添加!',
@@ -1617,11 +1619,12 @@ class CustomerProfile extends Component {
                                   info: {
                                     uid: this.props.customerList[this.props.interviewIdx].id,
                                     id: dtails.id,
-                                    inventionPatentCount: dtails.inventionPatentCount || '',
-                                    utilityModelCount: dtails.utilityModelCount || '',
-                                    appearancePatentCount: dtails.appearancePatentCount || '',
-                                    softwareWorksCount: dtails.softwareWorksCount || '',
-                                    otherCount: dtails.otherCount || '',
+                                    inventionPatentCount: dtails.inventionPatentCount,
+                                    utilityModelCount: dtails.utilityModelCount,
+                                    appearancePatentCount: dtails.appearancePatentCount,
+                                    softwareWorksCount: dtails.softwareWorksCount,
+                                    otherCount: dtails.otherCount,
+                                    standard: dtails.standard,
                                   }
                                 })
                               }}
@@ -1630,12 +1633,12 @@ class CustomerProfile extends Component {
                         </View>
                         <View className="val">
                           专利&nbsp;<Text className="num">{dtails.patentCount}</Text>&nbsp;&nbsp;&nbsp;
-                            其中发明专利&nbsp;<Text className="num">{dtails.inventionPatentCount || ''}</Text>&nbsp;&nbsp;&nbsp;
-                            实用新型&nbsp;<Text className="num">{dtails.utilityModelCount || ''}</Text>&nbsp;&nbsp;&nbsp;
-                            外观设计&nbsp;<Text className="num">{dtails.appearancePatentCount || ''}</Text>&nbsp;&nbsp;&nbsp;
-                            软著&nbsp;<Text className="num">{dtails.softwareWorksCount || ''}</Text>&nbsp;&nbsp;&nbsp;
+                            其中发明专利&nbsp;<Text className="num">{dtails.inventionPatentCount}</Text>&nbsp;&nbsp;&nbsp;
+                            实用新型&nbsp;<Text className="num">{dtails.utilityModelCount}</Text>&nbsp;&nbsp;&nbsp;
+                            外观设计&nbsp;<Text className="num">{dtails.appearancePatentCount}</Text>&nbsp;&nbsp;&nbsp;
+                            软著&nbsp;<Text className="num">{dtails.softwareWorksCount}</Text>&nbsp;&nbsp;&nbsp;
                             标准&nbsp;<Text className="num">{String(dtails.standard) === '1' ? '有' : String(dtails.standard) === '0' ? '无' : ''}</Text>&nbsp;&nbsp;&nbsp;
-                            其他类型&nbsp;<Text className="num">{dtails.otherCount || ''}</Text>&nbsp;&nbsp;&nbsp;
+                            其他类型&nbsp;<Text className="num">{dtails.otherCount}</Text>&nbsp;&nbsp;&nbsp;
                         </View>
 
                         <View className="tit" style={{ margin: '32rpx 0 20rpx;'}}>2.财务数据</View>
@@ -1643,19 +1646,19 @@ class CustomerProfile extends Component {
                           <View className="item-title">营收(万元):</View>
                           <View className="item-value">
                             <View style={{width: '260rpx'}}>
-                            <AtInput
-                              min={0}
-                              value={dtails.financialRevenue}
-                              name='financialRevenue'
-                              type='number'
-                              placeholder='请输入数量'
-                              size='mini'
-                              onChange={value => {
-                                dtails.financialRevenue = this.addCommas(value);
-                                this.setState({ dtails })
-                              }}
-                              cursor={-1}
-                            />
+                              <AtInput
+                                min={0}
+                                value={dtails.financialRevenue}
+                                name='financialRevenue'
+                                type='number'
+                                placeholder='请输入数量'
+                                size='mini'
+                                onChange={value => {
+                                  dtails.financialRevenue = this.addCommas(value);
+                                  this.setState({ dtails })
+                                }}
+                                cursor={-1}
+                              />
                             </View>
                           </View>
                         </View>
@@ -1996,14 +1999,14 @@ class CustomerProfile extends Component {
                 <View style={{ display: 'flex', margin: '12rpx 0' }}>
                   <Text style={{ fontSize: '32rpx', marginRight: '16rpx', width: '172rpx' }}>标准</Text>
                   <RadioGroup title="标准" onChange={e => {
-                    dtails.standard = Number(e.target.value);
-                    this.setState({ dtails });
+                    info.standard = Number(e.target.value);
+                    this.setState({ info });
                   }}>
                     <Label className='radio-list__label'>
-                      <Radio className='radio-list__radio' value={1} checked={String(dtails.standard) === '1'}>有</Radio>
+                      <Radio className='radio-list__radio' value={1} checked={String(info.standard) === '1'}>有</Radio>
                     </Label>
                     <Label className='radio-list__label'>
-                      <Radio className='radio-list__radio' value={0} checked={String(dtails.standard) === '0'}>无</Radio>
+                      <Radio className='radio-list__radio' value={0} checked={String(info.standard) === '0'}>无</Radio>
                     </Label>
                   </RadioGroup>
                 </View>
@@ -2011,10 +2014,10 @@ class CustomerProfile extends Component {
                   name='otherCount'
                   title='其他'
                   type='number'
-                  value={dtails.otherCount}
+                  value={info.otherCount}
                   onChange={e => {
                     this.setState({
-                      info: Object.assign(dtails, {
+                      info: Object.assign(info, {
                         otherCount: e,
                       })
                     })
@@ -2258,7 +2261,7 @@ class CustomerProfile extends Component {
         ></CheckboxPicker>
 
         {/* 沟通情况历史记录 */}
-        <InteractList
+        <InterviewHisList
           isOpened={this.state.interactShow}
           list={this.state.interactList}
           type={this.state.interactShowType}

+ 3 - 3
src/pages/interview/otherUser.jsx

@@ -45,8 +45,8 @@ import { getChannel } from "../../utils/tools";
 import Superior from "../../components/common/superior";
 import CheckboxPicker from "../../components/common/CheckboxPicker";
 import AddressPicker from "../../components/common/addressPicker"
-import InteractList from "./components/InteractList";
 import CustomerProjectSelect from '../../components/common/CustomerProjectSelect';
+import InterviewHisList from "../../components/common/InterviewHisList";
 
 class CustomerOtherProfile extends Component {
   $instance = getCurrentInstance();
@@ -104,7 +104,7 @@ class CustomerOtherProfile extends Component {
         interviewFeedback = '',
         followUpPlan = '';
       if (list.length) {
-        if (!!list[list.length - 1].prdid || isInterviewIng) {
+        if (!list[list.length - 1].prdid || isInterviewIng) {
           earlyCommunication = list[list.length - 1].earlyCommunication;
           customerDemand = list[list.length - 1].customerDemand;
           interviewIdeas = list[list.length - 1].interviewIdeas;
@@ -561,7 +561,7 @@ class CustomerOtherProfile extends Component {
         </View>
 
         {/* 沟通情况历史记录 */}
-        <InteractList
+        <InterviewHisList
           isOpened={this.state.interactShow}
           list={this.state.interactList}
           type={this.state.interactShowType}

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 431 - 415
src/pages/interviewDetail/index.jsx


+ 10 - 2
src/utils/servers/http.js

@@ -1,8 +1,9 @@
 import Taro from '@tarojs/taro'
 import getBaseUrl from './baseUrl'
+import { pageToLogin } from "./utils"
 import interceptors from './interceptors'
 
-interceptors.forEach(i => Taro.addInterceptor(i))
+// interceptors.forEach(i => Taro.addInterceptor(i))
 
 class httpRequest {
   baseOptions(params, method = "GET") {
@@ -22,7 +23,14 @@ class httpRequest {
         'Accept':'application/json, text/javascript,'
       },
     };
-    return Taro.request(option);
+    return Taro.request(option).then(res => {
+      if(res.data.error && res.data.error.length !== 0 && res.data.error[0].field === '403'){
+        Taro.setStorageSync("token", "");
+        Taro.setStorageSync('userInfor', "");
+        pageToLogin()
+      }
+      return res.data;
+    })
   }
 
   get(url, data = "") {

+ 1 - 2
src/utils/servers/interceptors.js

@@ -3,9 +3,8 @@ import { pageToLogin } from "./utils"
 import { HTTP_STATUS } from './config'
 
 const customInterceptor = (chain) => {
-
   const requestParams = chain.requestParams
-
+  // pageToLogin();
   return chain.proceed(requestParams).then(res => {
     // 只要请求成功,不管返回什么状态码,都走这个回调
     if (res.statusCode === HTTP_STATUS.NOT_FOUND) {