Procházet zdrojové kódy

添加 官费 费减 选项

mentoswzq před 4 roky
rodič
revize
50e4a9f075

+ 2 - 1
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/visit.jsx

@@ -130,6 +130,7 @@ const Visit = React.createClass({
 							  e.stopPropagation();
 							  this.setState({
 								  guidanceVisible: true,
+								  visitModul: false,
 								  followId: record.followId
 							  })
 						  }}
@@ -321,7 +322,7 @@ const Visit = React.createClass({
 	            	 onRowClick={this.VisitRowClick}
 	            	 />
 			    </Spin> 
-			    <VisitDetail 
+			    <VisitDetail
 			    	categoryArr={this.props.categoryArr}
 			    	followData={this.state.followData}
 			    	visitModul={this.state.visitModul}

+ 2 - 2
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/visitDetail.jsx

@@ -331,7 +331,7 @@ const VisitDetail = React.createClass({
 		const followData= this.props.followData || []
 		return(
 			<div>
-				<Modal	
+				{this.state.visitModul ? <Modal
 				      className="customeDetails"
 				      footer=''
 			          title="客户跟进详情"
@@ -399,7 +399,7 @@ const VisitDetail = React.createClass({
 					   			</FormItem>}
 					   		</Spin>
 					    </Form>
-				</Modal> 
+				</Modal> : <div/>}
 				<BusName 
 					businessId={this.state.businessId}
 					busModul={this.state.busModul}

+ 6 - 6
js/component/manageCenter/customer/managementFollow/customerFollow/index.jsx

@@ -29,9 +29,9 @@ class CustomerFollow extends Component{
         super(props);
         this.state={
             nameSearch: '',
-            provinceSearch: '',
+            provinceSearch: undefined,
             addressSearch: '',
-            level: '',
+            level: undefined,
             releaseDate: [],
             selectedRowKeys: [],
             sortType: 0,
@@ -261,9 +261,9 @@ class CustomerFollow extends Component{
     reset(){
         this.setState({
             nameSearch: '',
-            provinceSearch: '',
+            provinceSearch: undefined,
             addressSearch: '',
-            level: '',
+            level: undefined,
             releaseDate: [],
             selectedRowKeys: [],
             sortType: 0,
@@ -388,7 +388,7 @@ class CustomerFollow extends Component{
                                 }}
                             />
                             <Select
-                                placeholder=""
+                                placeholder="选择地区"
                                 style={{ width: 80 }}
                                 value={this.state.provinceSearch}
                                 onChange={(e) => {
@@ -413,7 +413,7 @@ class CustomerFollow extends Component{
                                 onChange={(e) => {
                                     this.setState({ level: e });
                                 }}
-                                placeholder="选择客户等级"
+                                placeholder="选择客户等级"
                             >
                                 <Select.Option value="0">一般客户</Select.Option>
                                 <Select.Option value="1">意向客户</Select.Option>

+ 67 - 4
js/component/manageCenter/order/orderNew/addService.jsx

@@ -2039,7 +2039,7 @@ const NewService = Form.create()(
             totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
             this.setState({
               contactListNew: theArr,
-              totalCui,
+              totalCui:parseFloat(totalCui),
             });
           }
         }.bind(this),
@@ -2914,8 +2914,8 @@ const NewService = Form.create()(
           commodityPrice: this.state.commodityPrice, //签单总价
           taskComment: this.state.taskComment, //服务说明
           main: this.state.main, //是否为主要项目
-          officialCost: this.state.officialCost, //是否有官费
-          costReduction: this.state.costReduction, //是否有费减
+          officialCost: this.state.displayFees==='block' ? this.state.officialCost : '', //是否有官费
+          costReduction: this.state.displayFees==='block' ?this.state.costReduction : '', //是否有费减
         },
       }).done(
         function (data) {
@@ -2937,7 +2937,6 @@ const NewService = Form.create()(
     tableRowClick(record) {
       console.log(record);
       if (record.type=='1'){
-        console.log(record.officialCost);
         this.setState({
           displayFees: "block",
           costReduction: record.costReduction,
@@ -3282,6 +3281,9 @@ const NewService = Form.create()(
         applicant: undefined,
         depNameChange: undefined,
         typeChange: undefined,
+        displayFees: "none",
+        officialCost: "",
+        costReduction: "",
       });
     },
 
@@ -3389,6 +3391,9 @@ const NewService = Form.create()(
         taskComment: "",
         main: undefined,
         commodityPrice: "",
+        displayFees: "none",
+        officialCost: "",
+        costReduction: "",
       });
     },
     changeProSubmit() {
@@ -3396,6 +3401,16 @@ const NewService = Form.create()(
         message.warning("服务名称不匹配!");
         return false;
       }
+      if (this.state.displayFees==='block') {
+        if(this.state.officialCost===''){
+          message.warning("请选择官费!");
+          return false;
+        }
+        if (this.state.costReduction==='') {
+          message.warning("请选择费减!");
+          return false;
+        }
+      }
       if (!this.state.commodityPrice) {
         message.warning("请输入金额!");
         this.refs.commodityPrice.focus();
@@ -3436,6 +3451,8 @@ const NewService = Form.create()(
           taskComment: this.state.taskComment, //服务说明
           main: this.state.main, //是否为主要项目
           cid: this.state.changeId, //变更ID
+          officialCost: this.state.displayFees==='block' ? this.state.officialCost : '', //是否有官费
+          costReduction: this.state.displayFees==='block' ?this.state.costReduction : '', //是否有费减
           type,
         },
         success: function (data) {
@@ -6523,6 +6540,52 @@ const NewService = Form.create()(
                     <span className="mandatory">*</span>
                   </FormItem>
                   <FormItem
+                      className="half-item"
+                      labelCol={{ span: 3 }}
+                      wrapperCol={{ span: 14 }}
+                      label="官费:"
+                      style={{
+                        display: this.state.displayFees,
+                        marginLeft: "55px",
+                      }}
+                  >
+                      <span style={{ color: "red", marginRight: "27px" }}>
+                        *
+                      </span>
+                    <Radio.Group
+                        value={this.state.officialCost}
+                        onChange={(e) => {
+                          this.setState({ officialCost: e.target.value });
+                        }}
+                    >
+                      <Radio value="1">含官费</Radio>
+                      <Radio value="0">不含官费</Radio>
+                    </Radio.Group>
+                  </FormItem>
+                  <FormItem
+                      className="half-item"
+                      labelCol={{ span: 3 }}
+                      wrapperCol={{ span: 14 }}
+                      label="费减:"
+                      style={{
+                        display: this.state.displayFees,
+                        marginLeft: "55px",
+                      }}
+                  >
+                      <span style={{ color: "red", marginRight: "27px" }}>
+                        *
+                      </span>
+                    <Radio.Group
+                        value={this.state.costReduction}
+                        onChange={(e) => {
+                          this.setState({ costReduction: e.target.value });
+                        }}
+                    >
+                      <Radio value="1">有费减</Radio>
+                      <Radio value="0">无费减</Radio>
+                    </Radio.Group>
+                  </FormItem>
+                  <FormItem
                     className="half-item"
                     {...formItemLayout}
                     label="实签价格(万元)"

+ 164 - 37
js/component/manageCenter/order/orderNew/reject.jsx

@@ -1,5 +1,23 @@
 import React from 'react';
-import { Icon, Button, AutoComplete,Input, Select, Spin, Popconfirm, Table, message,DatePicker, Upload, Form ,Modal,Col,Tag, Tabs} from 'antd';
+import {
+  Icon,
+  Button,
+  AutoComplete,
+  Input,
+  Select,
+  Spin,
+  Popconfirm,
+  Table,
+  message,
+  DatePicker,
+  Upload,
+  Form,
+  Modal,
+  Col,
+  Tag,
+  Tabs,
+  Radio
+} from 'antd';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
 import {boutique ,tepi,jiedian} from '@/dataDic.js';
@@ -91,24 +109,9 @@ const IntentionCustomer = Form.create()(
           } else {
             for (let i = 0; i < data.data.list.length; i++) {
               let thisdata = data.data.list[i];
-              theArr.push({
-                key: i,
-                id: thisdata.id, //用户ID
-                orderNo: thisdata.orderNo, //订单编号
-                totalAmount: thisdata.totalAmount + "", //签单金额
-                processStatus: thisdata.processStatus, //流程状态
-                liquidationStatus: thisdata.liquidationStatus, //结算状态
-                approval: thisdata.approval, //特批状态
-                signDate: thisdata.signDate, //签单时间
-                userName: thisdata.userName, //客户名称
-                salesmanName: thisdata.salesmanName, //营销员名称
-                financeName: thisdata.financeName, //财务名称
-                createDate: thisdata.createDate, //下单时间
-                initiateName: thisdata.initiateName, //驳回人
-                reason: thisdata.reason, //驳回信息
-                backDate: thisdata.backDate, //驳回日期
-                backId: thisdata.backId, //驳回编号
-              });
+              thisdata.key = i;
+              thisdata.totalAmount = thisdata.totalAmount + ""; //签单金额
+              theArr.push(thisdata);
             }
             this.state.pagination.total = data.data.totalCount;
             this.state.pagination.current = data.data.pageNo;
@@ -874,6 +877,13 @@ const IntentionCustomer = Form.create()(
     },
     //点击打卡项目详情
     tableRowClickX(record) {
+      if (record.type=='1'){
+        this.setState({
+          displayFees: "block",
+          costReduction: record.costReduction,
+          officialCost: record.officialCost,
+        });
+      }
       this.setState({
         jid: record.id, //项目ID
         kid: record.commodityId, //商品ID
@@ -890,6 +900,9 @@ const IntentionCustomer = Form.create()(
     nextCancel() {
       this.setState({
         addnextVisible: false,
+        displayFees: "none",
+        officialCost: "", //是否有官费
+        costReduction: "", //是否有费减
       });
     },
     //订单详情
@@ -1005,22 +1018,8 @@ const IntentionCustomer = Form.create()(
           } else {
             for (let i = 0; i < data.data.length; i++) {
               let thisdata = data.data[i];
-              theArr.push({
-                key: i,
-                id: thisdata.id,
-                orderNo: thisdata.orderNo, //订单编号
-                commodityId: thisdata.commodityId, //项目ID
-                commodityName: thisdata.commodityName, //项目名称
-                cname: thisdata.cname, //项目类别
-                commodityPrice: thisdata.commodityPrice, //项目价格
-                commodityQuantity: thisdata.commodityQuantity, //项目数量
-                main: thisdata.main, //是否为主要任务
-                taskComment: thisdata.taskComment, //任务说明
-                contacts: thisdata.contacts, //联系人
-                contactsMobile: thisdata.contactsMobile, //联系人电话
-                sort: thisdata.cSort,
-                splitStatus: thisdata.splitStatus,
-              });
+              thisdata.key = i;
+              theArr.push(thisdata);
             }
           }
           this.setState({
@@ -1617,6 +1616,16 @@ const IntentionCustomer = Form.create()(
         message.warning("服务名称不匹配!");
         return false;
       }
+      if (this.state.displayFees==='block') {
+        if(this.state.officialCost===''){
+          message.warning("请选择官费!");
+          return false;
+        }
+        if (this.state.costReduction==='') {
+          message.warning("请选择费减!");
+          return false;
+        }
+      }
       if (moneyVerify(this.state.commodityPrice)) {
         return;
       }
@@ -1654,6 +1663,8 @@ const IntentionCustomer = Form.create()(
           commodityPrice: this.state.commodityPrice, //签单总价
           taskComment: this.state.taskComment, //服务说明
           main: this.state.main, //是否为主要项目
+          officialCost: this.state.displayFees==='block' ? this.state.officialCost : '', //是否有官费
+          costReduction: this.state.displayFees==='block' ?this.state.costReduction : '', //是否有费减
         },
       }).done(
         function (data) {
@@ -1759,6 +1770,9 @@ const IntentionCustomer = Form.create()(
         commodityPrice: "",
         addState: 1,
         addnextVisible: true,
+        displayFees: "none",
+        officialCost: "",
+        costReduction: "",
       });
     },
     //修改项目详情
@@ -1768,6 +1782,16 @@ const IntentionCustomer = Form.create()(
         message.warning("金额不能为空!");
         return false;
       }
+      if (this.state.displayFees==='block') {
+        if(this.state.officialCost===''){
+          message.warning("请选择官费!");
+          return false;
+        }
+        if (this.state.costReduction==='') {
+          message.warning("请选择费减!");
+          return false;
+        }
+      }
       if (!this.state.commodityQuantity) {
         message.warning("数量不能为空!");
         return false;
@@ -1790,6 +1814,8 @@ const IntentionCustomer = Form.create()(
           commodityPrice: this.state.commodityPrice, //金额
           commodityQuantity: this.state.commodityQuantity, //数量
           taskComment: this.state.taskComment, //备注
+          officialCost: this.state.displayFees==='block' ? this.state.officialCost : '', //是否有官费
+          costReduction: this.state.displayFees==='block' ?this.state.costReduction : '', //是否有费减
         },
       }).done(
         function (data) {
@@ -1901,6 +1927,15 @@ const IntentionCustomer = Form.create()(
           kid = item;
         }
       });
+      if (kid.type == "1") {
+        this.setState({
+          displayFees: "block",
+        });
+      } else {
+        this.setState({
+          displayFees: "none",
+        });
+      }
       this.setState({
         commodityName: value,
         gid: kid.id,
@@ -2587,7 +2622,7 @@ const IntentionCustomer = Form.create()(
                 </Spin>
               </Form>
             </Modal> : <div/>}
-            <Modal
+            {this.state.addnextVisible ? <Modal
               maskClosable={false}
               visible={this.state.addnextVisible}
               onOk={this.nextCancel}
@@ -2647,6 +2682,52 @@ const IntentionCustomer = Form.create()(
                         <span className="mandatory">*</span>
                       </FormItem>
                       <FormItem
+                          className="half-item"
+                          labelCol={{ span: 3 }}
+                          wrapperCol={{ span: 14 }}
+                          label="官费:"
+                          style={{
+                            display: this.state.displayFees,
+                            marginLeft: "55px",
+                          }}
+                      >
+                      <span style={{ color: "red", marginRight: "27px" }}>
+                        *
+                      </span>
+                        <Radio.Group
+                            value={this.state.officialCost}
+                            onChange={(e) => {
+                              this.setState({ officialCost: e.target.value });
+                            }}
+                        >
+                          <Radio value="1">含官费</Radio>
+                          <Radio value="0">不含官费</Radio>
+                        </Radio.Group>
+                      </FormItem>
+                      <FormItem
+                          className="half-item"
+                          labelCol={{ span: 3 }}
+                          wrapperCol={{ span: 14 }}
+                          label="费减:"
+                          style={{
+                            display: this.state.displayFees,
+                            marginLeft: "55px",
+                          }}
+                      >
+                      <span style={{ color: "red", marginRight: "27px" }}>
+                        *
+                      </span>
+                        <Radio.Group
+                            value={this.state.costReduction}
+                            onChange={(e) => {
+                              this.setState({ costReduction: e.target.value });
+                            }}
+                        >
+                          <Radio value="1">有费减</Radio>
+                          <Radio value="0">无费减</Radio>
+                        </Radio.Group>
+                      </FormItem>
+                      <FormItem
                         className="half-item"
                         {...formItemLayout}
                         label="实签价格(万元)"
@@ -2748,6 +2829,52 @@ const IntentionCustomer = Form.create()(
                         <span className="mandatory">*</span>
                       </FormItem>
                       <FormItem
+                          className="half-item"
+                          labelCol={{ span: 3 }}
+                          wrapperCol={{ span: 14 }}
+                          label="官费:"
+                          style={{
+                            display: this.state.displayFees,
+                            marginLeft: "55px",
+                          }}
+                      >
+                          <span style={{ color: "red", marginRight: "27px" }}>
+                            *
+                          </span>
+                        <Radio.Group
+                            value={this.state.officialCost}
+                            onChange={(e) => {
+                              this.setState({ officialCost: e.target.value });
+                            }}
+                        >
+                          <Radio value={1}>含官费</Radio>
+                          <Radio value={0}>不含官费</Radio>
+                        </Radio.Group>
+                      </FormItem>
+                      <FormItem
+                          className="half-item"
+                          labelCol={{ span: 3 }}
+                          wrapperCol={{ span: 14 }}
+                          label="费减:"
+                          style={{
+                            display: this.state.displayFees,
+                            marginLeft: "55px",
+                          }}
+                      >
+                          <span style={{ color: "red", marginRight: "27px" }}>
+                            *
+                          </span>
+                        <Radio.Group
+                            value={this.state.costReduction}
+                            onChange={(e) => {
+                              this.setState({ costReduction: e.target.value });
+                            }}
+                        >
+                          <Radio value={1}>有费减</Radio>
+                          <Radio value={0}>无费减</Radio>
+                        </Radio.Group>
+                      </FormItem>
+                      <FormItem
                         className="half-item"
                         {...formItemLayout}
                         label="金额(万元)"
@@ -2824,7 +2951,7 @@ const IntentionCustomer = Form.create()(
                   )}
                 </Spin>
               </Form>
-            </Modal>
+            </Modal> : <div/>}
             {/* <Modal
             visible={this.state.rizhivisible}
             className="admin-desc-content"

+ 2 - 2
js/component/manageCenter/project/project/projectAssignment.jsx

@@ -710,8 +710,8 @@ const PaiDan = React.createClass({
         commodityPrice: this.state.commodityPrice, //签单总价
         taskComment: this.state.taskComment, //服务说明
         main: this.state.main, //是否为主要项目
-        officialCost: this.state.officialCost, //是否有官费
-        costReduction: this.state.costReduction, //是否有费减
+        officialCost: this.state.displayFees==='block' ? this.state.officialCost : '', //是否有官费
+        costReduction: this.state.displayFees==='block' ?this.state.costReduction : '', //是否有费减
       }
     }).done(
       function(data) {

+ 2 - 2
js/component/manageCenter/project/project/zxsglyOutSourcingPaiDan.jsx

@@ -770,8 +770,8 @@ const zxsglyOutSourcingPaiDan = React.createClass({
         commodityPrice: this.state.commodityPrice, //签单总价
         taskComment: this.state.taskComment, //服务说明
         main: this.state.main, //是否为主要项目
-        officialCost: this.state.officialCost, //是否有官费
-        costReduction: this.state.costReduction, //是否有费减
+        officialCost: this.state.displayFees==='block' ? this.state.officialCost : '', //是否有官费
+        costReduction: this.state.displayFees==='block' ?this.state.costReduction : '', //是否有费减
       }
     }).done(
       function(data) {

+ 7 - 0
js/component/manageCenter/project/task/myTask.jsx

@@ -470,6 +470,13 @@ const Task = React.createClass({
           title: '金额(万元)',
           dataIndex: 'commodityPrice',
           key: 'commodityPrice',
+          render: (text, record) => {
+           return (
+               <span>
+                 {this.props.isZxs ? '***' : text}
+               </span>
+           )
+          }
         },
         {
           title: '负责人',

+ 24 - 15
js/component/manageCenter/set/projectConfigure/softwareConfigure.js

@@ -9,8 +9,8 @@ class SoftwareConfigure extends Component{
         super(props);
         this.state={
             companyName:'',        //公司名称
-            urgent: '',            //加急
-            material: '',          //材料
+            urgent: undefined,            //加急
+            material: undefined,          //材料
             pagination: {
                 defaultCurrent: 1,
                 defaultPageSize: 10,
@@ -106,6 +106,7 @@ class SoftwareConfigure extends Component{
             ],
             addSoftVisible: false,
             infor: {},
+            pageNo: 1,
         }
         this.loadData = this.loadData.bind(this);
         this.tableRowClick = this.tableRowClick.bind(this);
@@ -117,7 +118,7 @@ class SoftwareConfigure extends Component{
     }
 
     //搜索功能和初始列表加载
-    loadData() {
+    loadData(pageNo) {
         this.setState({
             loading: true,
         });
@@ -127,25 +128,31 @@ class SoftwareConfigure extends Component{
             crossDomain: false,
             url: globalConfig.context + '/api/admin/company/listSoftWritingPrice',
             data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
                 companyName:this.state.companyName,       //公司名称
                 urgent: this.state.urgent,    //加急
                 material: this.state.material,  //材料
             },
             success: function (data) {
-                let theArr = [];
                 if (!data.data || !data.data.list) {
                     if (data.error && data.error.length) {
                         message.warning(data.error[0].message);
-                    };
+                    }
                 } else {
                     this.state.pagination.current = data.data.pageNo;
                     this.state.pagination.total = data.data.totalCount;
+                    if (data.data && data.data.list && !data.data.list.length) {
+                        this.state.pagination.current = 0;
+                        this.state.pagination.total = 0;
+                    }
                     data.data.list.map((v,i)=>{v.key = i})
                     this.setState({
                         dataSource: data.data.list,
-                        pagination: this.state.pagination
+                        pagination: this.state.pagination,
+                        pageNo: data.data.pageNo
                     });
-                };
+                }
 
             }.bind(this),
         }).always(function () {
@@ -165,8 +172,8 @@ class SoftwareConfigure extends Component{
     reset(){
         this.setState({
             companyName:'',       //公司名称
-            urgent: '',    //加急
-            material: '',  //材料
+            urgent: undefined,    //加急
+            material: undefined,  //材料
         },()=>{
             this.loadData();
         })
@@ -208,11 +215,13 @@ class SoftwareConfigure extends Component{
                                onChange={(e) => { this.setState({ companyName: e.target.value }); }} />
                         <div style={{display:'flex',flexFlow:'row nowrap'}}>
                             <div style={{marginLeft:10,marginRight:10}}>材料:</div>
-                            <Select style={{ width:'200px',marginRight:'10px' }}
-                                    value={this.state.material}
-                                    onChange={(e) => {this.setState({ material: e }) }}>
-                                <Select.Option value={0}>无</Select.Option>
-                                <Select.Option value={1}>有</Select.Option>
+                            <Select
+                                placeholder="材料"
+                                style={{ width:'200px',marginRight:'10px' }}
+                                value={this.state.material}
+                                onChange={(e) => {this.setState({ material: e }) }}>
+                                    <Select.Option value={0}>无</Select.Option>
+                                    <Select.Option value={1}>有</Select.Option>
                             </Select>
                         </div>
                         <div style={{display:'flex',flexFlow:'row nowrap'}}>
@@ -261,7 +270,7 @@ class SoftwareConfigure extends Component{
                         })
                     }}
                     successFn={()=>{
-                        this.loadData();
+                        this.loadData(this.state.pageNo);
                         this.setState({
                             addSoftVisible : false,
                             infor: {}