Przeglądaj źródła

公出协单和非公出协单代码提交

dev01 23 godzin temu
rodzic
commit
013026bba6

+ 22 - 1
js/component/dataDic.js

@@ -4250,7 +4250,7 @@ module.exports = {
       color: '#1E90FF'
     },
     {
-      title: '审核',
+      title: '审核',
       id: 6,
       color: '#1d4fea'
     },
@@ -4353,4 +4353,25 @@ module.exports = {
     { label: '其他', value: 0 },
   ],
 
+  // 非公出协单项目类型
+  assistTypeOptions: [
+    // { label: '其他', value: 0 },
+    { label: '高企认定', value: 1 },
+    { label: '会员服务', value: 2 },
+    { label: '科技项目', value: 3 },
+    { label: '研动力系统', value: 4 },
+    { label: '知识产权', value: 5 },
+    { label: '军工', value: 6 },
+    { label: '涉密', value: 7 },
+    { label: '技术合同登记', value: 8 },
+    { label: '第三方认证项目', value: 9 },
+  ],
+
+  // 协单内容
+  assistContentOptions: [
+    { label: '其他', value: 0 },
+    { label: '会议', value: 1 },
+    { label: '写方案', value: 2 },
+    { label: '接待', value: 3 },
+  ],
 };

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

@@ -111,7 +111,8 @@ const Business = React.createClass({
       data: {
         pageNo: pageNo || 1,
         pageSize: this.state.paginationt.pageSize,
-        uid: this.props.data.id
+        uid: this.props.data.id,
+        type: this.props.type
       },
       success: function (data) {
         let theArr = [];

+ 1 - 0
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/intentionDetail.jsx

@@ -181,6 +181,7 @@ const IntentionDetail = React.createClass({
               <Business
                 closeDetail={this.closeDetail}
                 data={this.props.IntentionData}
+                type={1}
                 businessState={this.state.businessState}
               />
             </TabPane>

+ 42 - 1
js/component/manageCenter/customer/NEW/query/queryCutomer.jsx

@@ -269,7 +269,11 @@ const QueryCustomer = React.createClass({
                 {record.shareType === '1' &&
                   <Button style={{ marginLeft: 10 }} onClick={(e) => {
                     e.stopPropagation();
-                    this.receive(record)
+                    if (record.newChannel == 1) {
+                      this.rTips(record)
+                    } else {
+                      this.receive(record)
+                    }
                     // let _this = this;
                     // confirm({
                     //   title: '提醒!',
@@ -659,6 +663,43 @@ const QueryCustomer = React.createClass({
     })
     this.props.form.resetFields();
   },
+  rTips(e) {
+    let _this = this;
+    Modal.confirm({
+      title: "温馨提示",
+      content: "确认要领取此客户吗?",
+      onOk() {
+        _this.receiveNew(e)
+      },
+      onCancel() { },
+    });
+  },
+  /*领取为私有渠道信息*/
+  receiveNew(e) {
+    this.setState({
+      loading: true,
+      selectedRowKeys: [],
+    });
+    $.ajax({
+      method: "post",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/customer/receiveAsChannel",
+      data: {
+        uid: e.uid,
+      }
+    }).done(function (data) {
+      if (!data.error.length) {
+        message.success('领取成功!');
+        this.setState({
+          loading: false,
+        })
+      } else {
+        message.warning(data.error[0].message);
+      };
+      this.loadData(this.state.ispage);
+    }.bind(this));
+  },
   receives(e) {
     this.setState({
       loading: true,

+ 9 - 1
js/component/manageCenter/customer/content.jsx

@@ -820,7 +820,15 @@ class Content extends Component {
           });
         });
         break;
-
+      // 非公出协单统计
+      case 'noPublicStatistics':
+        require.ensure([], () => {
+          const NoPublicStatistics = require('./noPublicStatistics/index').default;
+          this.setState({
+            component: <NoPublicStatistics />
+          });
+        });
+        break;
       default:
         require.ensure([], () => {
           const Module = require('../module').default;

+ 3 - 0
js/component/manageCenter/customer/managementFollow/followUpSummary/index.jsx

@@ -426,6 +426,8 @@ class FollowUpSummary extends Component {
   }
 
   reset() {
+    this.state.pagination.current = 1;
+    this.state.pagination.total = 0;
     this.setState({
       userName: undefined,
       followName: undefined,
@@ -436,6 +438,7 @@ class FollowUpSummary extends Component {
       releaseDate1: [],
       releaseDate2: [],
       dataSource: [],
+      pagination: this.state.pagination
     }, () => {
       this.Cascaders.empty();
       this.props.shiroType != 2 && this.loadData();

+ 684 - 0
js/component/manageCenter/customer/noPublicStatistics/index.jsx

@@ -0,0 +1,684 @@
+import React, { Component } from "react";
+import {
+  AutoComplete,
+  Button,
+  DatePicker,
+  Input,
+  message,
+  Select,
+  Spin,
+  Table,
+  Tabs,
+} from "antd";
+import { ShowModal } from "@/tools";
+import { ChooseList } from "../../order/orderNew/chooseList";
+import $ from "jquery/src/ajax";
+import "./index.less";
+import moment from "moment";
+import Cascaders from "../../../common/cascaders";
+import { assistTypeOptions, assistContentOptions } from "../../../dataDic"
+
+const { TabPane } = Tabs;
+const { RangePicker } = DatePicker;
+
+const ALL_TYPE = {
+  0: '公出协单',
+  1: '非公出协单'
+}
+class NoPublicStatistics extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      pageNo: 1,
+      loading: false,
+      changeList: undefined,
+      columns: [
+        {
+          title: "序号",
+          dataIndex: "key",
+          key: "key",
+          width: 45,
+        },
+        {
+          title: "协单类型",
+          dataIndex: "type",
+          key: "type",
+          width: 80,
+        },
+        {
+          title: "内容",
+          dataIndex: "content",
+          key: "content",
+          width: 140,
+        },
+        {
+          title: "发起人员",
+          dataIndex: "aname",
+          key: "aname",
+          width: 75,
+        },
+        {
+          title: "协单人员",
+          dataIndex: "assistAidName",
+          key: "assistAidName",
+          width: 120,
+        },
+        {
+          title: "客户名称",
+          dataIndex: "userNames",
+          key: "userNames",
+          width: 140,
+        },
+        {
+          title: "签单次数",
+          dataIndex: "signNumber",
+          key: "signNumber",
+          width: 70,
+          textAlign: 'center'
+        },
+        {
+          title: "公出次数(累计数)",
+          dataIndex: "publicCount",
+          key: "publicCount",
+          width: 80,
+        },
+        {
+          title: "协单数总数/协单/非公出协单",
+          dataIndex: "xdcs",
+          key: "xdcs",
+          width: 95,
+          render(text, record) {
+            let assistCEle = <span>{ record.assistCount }</span>
+            if ( record.assistCount > 5 ) {
+              assistCEle = <span style={{ color: 'red' }}>{ record.assistCount }</span>
+            }
+            return <div>
+              { assistCEle }
+              <span>/{ record.publicAssistCount }</span>
+              <span>/{ record.nonPublicCount }</span>
+            </div>
+          },
+        },
+        {
+          title: "协单时间",
+          dataIndex: "releaseStart",
+          key: "releaseStart  ",
+          width: 140,
+        },
+        {
+          title: "协单项目",
+          dataIndex: "assistType",
+          key: "assistType",
+          width: 260,
+        },
+        {
+          title: "已签项目",
+          dataIndex: "taskNames",
+          key: "taskNames ",
+          minWidth: 300,
+        },
+      ],
+      pagination: {
+        defaultCurrent: 1,
+        defaultPageSize: 10,
+        showQuickJumper: true,
+        pageSize: 10,
+        onChange: function (page) {
+          this.loadData(page);
+        }.bind(this),
+        showTotal: function (total) {
+          return "共" + total + "条数据";
+        },
+      },
+      dataSource: [],
+      type: undefined, // 协单类型
+      contentType: [], // 协单内容
+      assistType: [], // 协单项目类型
+      releaseDate: [moment(Date.now() - 777600000).format('YYYY-MM-DD'), moment(Date.now()).format('YYYY-MM-DD')],
+      deptId: undefined, // 公出部门
+      theTypes: undefined,
+      theTypes1: undefined,
+      theCustomerTypes: undefined,
+      assistCount: undefined, // 协单总数
+      
+    };
+    this.loadData = this.loadData.bind(this);
+    this.resetAll = this.resetAll.bind(this);
+    this.changeList = this.changeList.bind(this);
+    this.httpChange = this.httpChange.bind(this);
+    this.blurChange = this.blurChange.bind(this);
+    this.selectAuto = this.selectAuto.bind(this);
+    this.httpChange1 = this.httpChange1.bind(this);
+    this.blurChange1 = this.blurChange1.bind(this);
+    this.selectAuto1 = this.selectAuto1.bind(this);
+    this.getCustomer = this.getCustomer.bind(this);
+    this.selectCustomerAuto = this.selectCustomerAuto.bind(this);
+    this.httpCustomerChange = this.httpCustomerChange.bind(this);
+    this.blurCustomerChange = this.blurCustomerChange.bind(this);
+    this.exportExec = this.exportExec.bind(this);
+  }
+
+  changeList(arr) {
+    const newArr = [];
+    this.state.columns.forEach((item) => {
+      arr.forEach((val) => {
+        if (val === item.title) {
+          newArr.push(item);
+        }
+      });
+    });
+    this.setState({
+      changeList: newArr,
+    });
+  }
+
+  getSearchParams() {
+    const { type, contentType, assistType, theTypes, theTypes1, deptId, releaseDate, assistCount } = this.state
+    return {
+      type,
+      contentType: contentType && contentType.length ? contentType.join(',') : undefined,
+      assistType: assistType && assistType.length ? assistType.join(',') : undefined,
+      aid: theTypes || undefined, // 公出人员
+      assistAid: theTypes1 || undefined, // 协单人员
+      deptId,
+      startTime: releaseDate[0] || undefined,
+      endTime: releaseDate[1] || undefined,
+      assistCount,
+    }
+  }
+
+  loadData(pageNo) {
+    this.setState({
+      loading: true,
+    });
+    const paramsData = Object.assign({
+      pageNo: pageNo || 1,
+      pageSize: this.state.pagination.pageSize
+    }, this.getSearchParams())
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/release/listAssist",
+      data: paramsData,
+      success: function (data) {
+        ShowModal(this);
+        let theArr = [];
+        this.setState({
+          loading: false,
+        });
+        if (data.error && data.error.length === 0) {
+          for (let i = 0; i < data.data.list.length; i++) {
+            let thisdata = data.data.list[i];
+            thisdata.key = (data.data.pageNo - 1) * data.data.pageSize + i + 1;
+            theArr.push(thisdata);
+          }
+          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;
+          }
+          this.setState({
+            dataSource: theArr,
+            pagination: this.state.pagination,
+            pageNo: data.data.pageNo,
+          });
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(
+      function () {
+        this.setState({
+          loading: false,
+        });
+      }.bind(this)
+    );
+  }
+
+  resetAll() {
+    this.setState(
+      {
+        releaseDate: [moment(Date.now() - 777600000).format('YYYY-MM-DD'), moment(Date.now()).format('YYYY-MM-DD')],
+        type: undefined,
+        contentType: [],
+        assistType: [],
+        theTypes: undefined,
+        theTypes1: undefined,
+        deptId: undefined,
+        assistCount: undefined
+      },
+      () => {
+        this.Cascaders.empty();
+        this.loadData();
+      }
+    );
+  }
+
+  getSupervisorList(e, succCallback) {
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/customer/listAdminByName",
+      data: {
+        adminName: e,
+        status: "2",
+      },
+      success: function (data) {
+        if (data.error && data.error.length === 0) {
+          succCallback && succCallback(data.data)
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    });
+  }
+
+  httpChange(e) {
+    if (e.length >= 1) {
+      this.getSupervisorList(e, (data) => {
+        this.setState({
+          customerArr: data
+        })
+      })
+    }
+    this.setState({
+      auto: e,
+    });
+  }
+
+  httpChange1(e) {
+    if (e.length >= 1) {
+      this.getSupervisorList(e, (data) => {
+        this.setState({
+          customerArr1: data
+        })
+      })
+    }
+    this.setState({
+      auto1: e,
+    });
+  }
+
+  selectAuto(value, options) {
+    this.setState({
+      auto: value,
+    });
+  }
+
+  selectAuto1(value, options) {
+    this.setState({
+      auto1: value,
+    });
+  }
+
+  httpCustomerChange(e) {
+    if (e.length >= 1) {
+      this.getCustomer(e);
+    }
+    this.setState({
+      customer: e,
+    });
+  }
+
+  selectCustomerAuto(value, options) {
+    this.setState({
+      customer: value,
+    });
+  }
+
+  getCustomer(e) {
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/customer/getUserByName",
+      data: {
+        name: e,
+      },
+      success: function (data) {
+        if (data.error && data.error.length === 0) {
+          this.setState({
+            customerList: data.data,
+          });
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    });
+  }
+
+  findDataIdByName(e, list = []) {
+    if (list && list.length) {
+      return list.find(item => item.name == e.toString()).id
+    }
+    return
+  }
+
+  blurCustomerChange(e) {
+    const { contactLists } = this.state
+    this.setState({
+      theCustomerTypes: this.findDataIdByName.bind(this, e, contactLists),
+    });
+  }
+  
+  blurChange(e) {
+    const { customerArr } = this.state
+    this.setState({
+      theTypes: this.findDataIdByName.bind(this, e, customerArr),
+    });
+  }
+
+  blurChange1(e) {
+    const { customerArr1 } = this.state
+    this.setState({
+      theTypes1: this.findDataIdByName.bind(this, e, customerArr1),
+    });
+  }
+
+  componentWillMount() {
+    this.loadData();
+  }
+
+  exportExec() {
+    this.setState({
+      exportPendingLoading: true,
+    });
+    message.config({
+      duration: 20,
+    });
+    let loading = message.loading("下载中...");
+
+    const paramsData = this.getSearchParams()
+
+    let newParams = {}
+    Object.keys(paramsData).map(key => {
+      if (paramsData[key]) {
+        newParams[key] = paramsData[key]
+      }
+    })
+
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url:
+        globalConfig.context + "/api/admin/release/listAssistExprot",
+      data: newParams,
+      success: function (data) {
+        if (data.error.length === 0) {
+          this.download(data.data);
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(
+      function () {
+        loading();
+        this.setState({
+          exportPendingLoading: false,
+        });
+      }.bind(this)
+    );
+  }
+
+  download(fileName) {
+    window.location.href =
+      globalConfig.context + "/open/download?fileName="+fileName;
+  }
+
+  render() {
+    const dataSources = this.state.customerArr || [];
+    const dataSources1 = this.state.customerArr1 || [];
+    const options = dataSources.map((group) => (
+      <Select.Option key={group.id} value={group.name}>
+        {group.name}
+      </Select.Option>
+    ));
+    const options1 = dataSources1.map((group) => (
+      <Select.Option key={group.id} value={group.name}>
+        {group.name}
+      </Select.Option>
+    ));
+    const customerList = this.state.customerList || [];
+    const customerOptions = customerList.map((group) => (
+      <Select.Option key={group.id} value={group.name}>
+        {group.name}
+      </Select.Option>
+    ));
+    return (
+      <div>
+        <div className="user-content">
+          <div className="content-title">
+            <span>协单统计</span>
+          </div>
+          <Tabs defaultActiveKey="1" className="test">
+            <TabPane tab="搜索" key="1">
+              <div
+                className="user-search"
+                style={{
+                  marginTop: "10px",
+                  marginLeft: "10px",
+                  marginRight: "10px",
+                }}
+              >
+                <span>
+                  <Select
+                    placeholder="全部协单类型"
+                    style={{ width: 120 }}
+                    value={this.state.type}
+                    onChange={(e) => {
+                      this.setState({ type: e });
+                    }}
+                  >
+                    {
+                      Object.keys(ALL_TYPE).map(key =>
+                        <Select.Option value={key}>{ ALL_TYPE[key] }</Select.Option>
+                      )
+                    }
+                  </Select>
+                </span>
+                <span>
+                  <Select
+                    placeholder="请选择协单内容"
+                    style={{ width: 120 }}
+                    value={this.state.contentType}
+                    onChange={(e) => {
+                      this.setState({ contentType: e });
+                    }}
+                    multiple
+                  >
+                    { 
+                      assistContentOptions.map(item =>
+                        <Select.Option value={item.value}>{item.label}</Select.Option>
+                      )
+                    }
+                  </Select>
+                </span>
+                <span>
+                  <AutoComplete
+                    className="certain-category-search"
+                    dropdownClassName="certain-category-search-dropdown"
+                    dropdownMatchSelectWidth={false}
+                    style={{ width: "120px" }}
+                    dataSource={options}
+                    placeholder="输入公出发起人"
+                    value={this.state.auto}
+                    onChange={this.httpChange}
+                    filterOption={true}
+                    onBlur={this.blurChange}
+                    onSelect={this.selectAuto}
+                  >
+                    <Input />
+                  </AutoComplete>
+                </span>
+                <span>
+                  <AutoComplete
+                    className="certain-category-search"
+                    dropdownClassName="certain-category-search-dropdown"
+                    dropdownMatchSelectWidth={false}
+                    style={{ width: "120px" }}
+                    dataSource={options1}
+                    placeholder="输入协单人员"
+                    value={this.state.auto1}
+                    onChange={this.httpChange1}
+                    filterOption={true}
+                    onBlur={this.blurChange1}
+                    onSelect={this.selectAuto1}
+                  >
+                    <Input />
+                  </AutoComplete>
+                </span>
+                <span>
+                  <AutoComplete
+                    className="certain-category-search"
+                    dropdownClassName="certain-category-search-dropdown"
+                    dropdownMatchSelectWidth={false}
+                    style={{ width: "160px" }}
+                    dataSource={customerOptions}
+                    placeholder="输入客户名称"
+                    value={this.state.customer}
+                    onChange={this.httpCustomerChange}
+                    filterOption={true}
+                    onBlur={this.blurCustomerChange}
+                    onSelect={this.selectCustomerAuto}
+                  >
+                    <Input />
+                  </AutoComplete>
+                </span>
+                <span>
+                  <Select
+                    placeholder="请选择协单项目"
+                    style={{ width: 180 }}
+                    value={this.state.assistType}
+                    onChange={(e) => {
+                      this.setState({ assistType: e });
+                    }}
+                    multiple
+                  >
+                    { 
+                      assistTypeOptions.map(item =>
+                        <Select.Option value={item.value}>{item.label}</Select.Option>
+                      )
+                    }
+                  </Select>
+                </span>
+                <span style={{ marginRight: "10px" }}>
+                  <span style={{ marginRight: "5px", marginBottom: "10px" }}>
+                    协单时间:
+                  </span>
+                  <RangePicker
+                    allowClear={window.adminData.shiroList.indexOf("11") == -1}
+                    disabledDate={(current) => {//“运营管理”角色只能查看部分时间段(暂时10天)的数据
+                      let iskeep = window.adminData.shiroList.indexOf("11") != -1
+                      return iskeep && current && current.valueOf() < Date.now() - 864000000;
+                    }}
+                    style={{ marginRight: "10px", marginBottom: "10px", width: 200 }}
+                    value={[
+                      this.state.releaseDate[0]
+                        ? moment(this.state.releaseDate[0])
+                        : null,
+                      this.state.releaseDate[1]
+                        ? moment(this.state.releaseDate[1])
+                        : null,
+                    ]}
+                    onChange={(data, dataString) => {
+                      this.setState({ releaseDate: dataString });
+                    }}
+                  />
+                </span>
+                <Cascaders
+                  ref={node => this.Cascaders = node}
+                  placeholder="请选择公出部门"
+                  id="id"
+                  name="name"
+                  children="list"
+                  height={28}
+                  onSel={(e) => {
+                    this.setState({
+                      deptId: JSON.stringify(e),
+                    });
+                  }}
+                />
+                <span>
+                  <Select
+                    placeholder="请选择协单总数"
+                    style={{ width: 120 }}
+                    value={this.state.assistCount}
+                    onChange={(e) => {
+                      this.setState({ assistCount: e });
+                    }}
+                  >
+                    <Select.Option value={1}>小于5</Select.Option>
+                    <Select.Option value={2}>5-9</Select.Option>
+                    <Select.Option value={3}>10-14</Select.Option>
+                    <Select.Option value={4}>大于14</Select.Option>
+                  </Select>
+                </span>
+                
+                <Button
+                  type="primary"
+                  onClick={() => {
+                    this.loadData();
+                  }}
+                  style={{ marginRight: "10px", marginBottom: "10px" }}
+                >
+                  搜索
+                </Button>
+                <Button
+                  onClick={this.resetAll}
+                  style={{ marginRight: "10px", marginBottom: "10px" }}
+                >
+                  重置
+                </Button>
+              </div>
+            </TabPane>
+            <TabPane tab="更改表格显示数据" key="2">
+              <div style={{ marginLeft: 10 }}>
+                <Spin spinning={this.state.loading}>
+                  <ChooseList
+                    columns={this.state.columns}
+                    changeFn={this.changeList}
+                    changeList={this.state.changeList}
+                    top={55}
+                    margin={11}
+                  />
+                </Spin>
+              </div>
+            </TabPane>
+            <TabPane tab="导出" key="3">
+              <div style={{ float: "left" }}>
+                <Button
+                  loading={this.state.exportPendingLoading}
+                  onClick={this.exportExec}
+                  style={{ margin: 10 }}
+                >
+                  导出excel
+                </Button>
+              </div>
+            </TabPane>
+          </Tabs>
+          <div className="patent-table">
+            <Spin spinning={this.state.loading}>
+              <Table
+                bordered
+                size="middle"
+                columns={
+                  this.state.changeList
+                    ? this.state.changeList
+                    : this.state.columns
+                }
+                dataSource={this.state.dataSource}
+                pagination={this.state.pagination}
+              />
+            </Spin>
+          </div>
+        </div>
+      </div>
+    );
+  }
+}
+
+export default NoPublicStatistics;

+ 22 - 0
js/component/manageCenter/customer/noPublicStatistics/index.less

@@ -0,0 +1,22 @@
+.projectTable {
+  cursor: pointer;
+}
+
+.projectTable:hover {
+  background: #71a7e885 !important;
+}
+
+.ant-upload-list {
+  display: inline-block !important;
+}
+
+.light {
+  // background: #87CEEB;
+  background: #D3D3D3;
+  // background: #CD8162;
+}
+
+.dark {
+  background: white;
+  // background: #87CEEB;
+}

+ 5 - 0
js/component/manageCenter/customer/publicStatistics/index.jsx

@@ -33,6 +33,11 @@ class ProjecCount extends Component {
           key: "name",
         },
         {
+          title: "非公出协单次数",
+          dataIndex: "xds",
+          key: "xds",
+        },
+        {
           title: "公出次数",
           dataIndex: "tg",
           key: "tg",

+ 57 - 27
js/component/manageCenter/customer/publicSummary/index.jsx

@@ -21,6 +21,7 @@ import "./index.less";
 import moment from "moment";
 import ImgList from "../../../common/imgList";
 import Cascaders from "../../../common/cascaders";
+import { assistTypeOptions } from "../../../dataDic"
 
 const { TabPane } = Tabs;
 const { RangePicker } = DatePicker;
@@ -159,31 +160,38 @@ class PublicSummary extends Component {
           title: "标签",
           dataIndex: "status",
           key: "status",
-          width: 200,
-          render: (text, record) => (
-            <div>
-              <div style={{ display: "flex", flexDirection: "row" }}>
-                <Tag
-                  color={["#45b97c", "#69541b", "#f47920", "#8552a1", "#228fbd"][record.type]}
-                >
-                  {
-                    record.type === 0
-                      ? "业务公出" : record.type === 1
-                        ? "技术公出" : record.type === 2
-                          ? "行政公出" : record.type === 3
-                            ? "技术协单" : record.type === 4
-                              ? "协单助手" : ""
-                  }
-                </Tag>
-                <Tag color={getClockState(text).color}>
-                  {getClockState(text).title}
-                </Tag>
-                {record.updateStatus == 1 && <Tag color="#1E90FF">改</Tag>}
+          width: 320,
+          render: (text, record) => {
+            const assistTypeList = record.assistType ? record.assistType.split(',') : []
+            const statusEnum = {
+              0: "业务公出",
+              1: "技术公出",
+              2: "行政公出",
+              3: "技术协单",
+              4: "协单助手",
+              5: "非公出协单(营销)",
+              6: "非公出协单(技术)"
+            }
+            return (
+              <div>
+                <div style={{ display: "flex", flexDirection: "row", flexWrap: "wrap" }}>
+                  <Tag
+                    color={["#45b97c", "#69541b", "#f47920", "#8552a1", "#228fbd", "rgb(47 50 195)", "rgb(47 50 195)"][record.type]}
+                    style={{ marginBottom: '4px' }}
+                  >
+                    {statusEnum[record.type] || ''}
+                  </Tag>
+                  { assistTypeList.map(type => <Tag color="rgb(47 50 195)" style={{ marginBottom: '4px' }}>{type}</Tag>) }
+                  <Tag color={getClockState(text).color}>
+                    {getClockState(text).title}
+                  </Tag>
+                  {record.updateStatus == 1 && <Tag color="#1E90FF">改</Tag>}
+                </div>
+                {record.type === 1 && <div style={{ marginTop: 5 }}>{record.contractNo}</div>}
+                {record.type === 1 && <div>{record.totalAmout + "(万元)"}</div>}
               </div>
-              {record.type === 1 && <div style={{ marginTop: 5 }}>{record.contractNo}</div>}
-              {record.type === 1 && <div>{record.totalAmout + "(万元)"}</div>}
-            </div>
-          ),
+            )
+          },
         },
         {
           title: "公出目标",
@@ -406,6 +414,7 @@ class PublicSummary extends Component {
       theTypes1: undefined,
       theCustomerTypes: undefined,
       contractNo: undefined,
+      assistType: [],
     };
     this.loadData = this.loadData.bind(this);
     this.resetAll = this.resetAll.bind(this);
@@ -504,6 +513,7 @@ class PublicSummary extends Component {
         deps: this.state.deps || undefined,
         publicType: this.state.type,
         contractNo: this.state.contractNo || undefined,
+        assistType: this.state.assistType && this.state.assistType.length ? this.state.assistType.join(',') : undefined
       },
       success: function (data) {
         ShowModal(this);
@@ -556,6 +566,7 @@ class PublicSummary extends Component {
         theTypes1: undefined,
         type: undefined,
         contractNo: undefined,
+        assistType: []
       },
       () => {
         this.Cascaders.empty();
@@ -744,8 +755,8 @@ class PublicSummary extends Component {
       // depId: this.state.depId,
       deps: this.state.deps || undefined,
       publicType: this.state.type,
-      contractNo: this.state.contractNo || undefined
-
+      contractNo: this.state.contractNo || undefined,
+      assistType: this.state.assistType ? this.state.assistType.join(',') : undefined
     };
     for (let i of Object.keys(data)) {
       if (i === "status" || i === "clockIn") {
@@ -910,7 +921,7 @@ class PublicSummary extends Component {
                     <Select.Option value={2}>异常打卡</Select.Option>
                   </Select>
                 </span>
-                <span style={{ marginRight: "10px" }}>
+                <span>
                   <Select
                     placeholder="请选择公出类型"
                     style={{ width: 120 }}
@@ -923,10 +934,29 @@ class PublicSummary extends Component {
                     <Select.Option value={1}>技术打卡</Select.Option>
                     <Select.Option value={2}>行政打卡</Select.Option>
                     <Select.Option value={3}>技术协单</Select.Option>
+                    <Select.Option value={5}>非公出协单(营销)</Select.Option>
+                    <Select.Option value={6}>非公出协单(技术)</Select.Option>
                     <Select.Option value={4}>协单助手</Select.Option>
                   </Select>
                 </span>
                 <span>
+                  <Select
+                    placeholder="请选择协单项目"
+                    style={{ width: 200 }}
+                    value={this.state.assistType}
+                    onChange={(e) => {
+                      this.setState({ assistType: e });
+                    }}
+                    multiple
+                  >
+                    { 
+                      assistTypeOptions.map(item =>
+                        <Select.Option value={item.value}>{item.label}</Select.Option>
+                      )
+                    }
+                  </Select>
+                </span>
+                <span>
                   <AutoComplete
                     className="certain-category-search"
                     dropdownClassName="certain-category-search-dropdown"

+ 93 - 2
js/component/manageCenter/order/orderNew/confidenBreach.jsx

@@ -1,6 +1,7 @@
 import React, { Component } from "react";
 import { Form, Radio } from "antd";
 import PicturesWall from "./changeComponent/picturesWall.js";
+import { splitUrl } from "@/tools.js";
 
 
 /**
@@ -12,13 +13,103 @@ class ConfidenBreach extends Component {
     super(props);
   }
 
+  // 校验表单数据,对外部使用
+  validFormData(data) {
+    console.log(data)
+    let flag = true;
+    let msg = '';
+    data.ndaUrl = data.ndaUrl || []
+    data.breachClauseUrl = data.breachClauseUrl || []
+    if (data.nda === undefined || data.nda === null || data.nda === '') {
+      flag = false;
+      msg = '请选择是否签订保密协议'
+    } else if (data.nda == '1' && !data.ndaUrl.length) {
+      flag = false;
+      msg = '请上传保密协议图片'
+    } else if (data.breachClause1 === undefined || data.breachClause1 === null || data.breachClause1 === '') {
+      flag = false;
+      msg = '请选择是否有违约条款'
+    } else if (data.breachClause1 != '0' && !data.breachClause2) {
+      flag = false;
+      msg = '请选择与技术有关/无关'
+    } else if (data.breachClause1 != '0' && !data.breachClauseUrl.length) {
+      flag = false;
+      msg = '请上传签约条款图片'
+    }
+
+    return { flag, msg }
+  }
+
+  // 转换表单数据,对外部使用
+  transFormData(data) {
+    let breachClause1, breachClause2 = ''
+    if (data.breachClause == 0) {
+      breachClause1 = '0'
+    } else if (data.breachClause == 1) {
+      breachClause1 = '1'
+      breachClause2 = '1'
+    } else if (data.breachClause == 2) {
+      breachClause1 = '1'
+      breachClause2 = '0'
+    } else if (data.breachClause == 3) {
+      breachClause1 = '2'
+      breachClause2 = '1'
+    } else if (data.breachClause == 4) {
+      breachClause1 = '2'
+      breachClause2 = '0'
+    }
+    return {
+      nda: data.nda,
+      ndaUrl: data.ndaUrl ? splitUrl(
+        data.ndaUrl,
+        ",",
+        globalConfig.avatarHost + "/upload"
+      ) : [],
+      breachClause1,
+      breachClause2,
+      breachClauseUrl: data.breachClauseUrl ? splitUrl(
+        data.breachClauseUrl,
+        ",",
+        globalConfig.avatarHost + "/upload"
+      ) : []
+    }
+  }
+
+  // 获取保密&违约说明数据,对外部使用
+  getFormData(data) {
+    const _data = Object.assign({}, data);
+    _data.ndaUrl = _data.ndaUrl || [];
+    _data.breachClauseUrl = _data.breachClauseUrl || [];
+    if (_data.breachClause1 == '0') {
+      _data.breachClause = '0'
+    } else if (_data.breachClause1 == '1' && _data.breachClause2 == '1') {
+      // 有限责任违约条款、与技术服务有关
+      _data.breachClause = '1'
+    } else if (_data.breachClause1 == '1' && _data.breachClause2 == '0') {
+      // 有限责任违约条款、与技术服务无关
+      _data.breachClause = '2'
+    } else if (_data.breachClause1 == '2' && _data.breachClause2 == '1') {
+      // 无限责任违约条款、与技术服务有关
+      _data.breachClause = '3'
+    } else if (_data.breachClause1 == '2' && _data.breachClause2 == '0') {
+      // 无限责任违约条款、与技术服务无关
+      _data.breachClause = '4'
+    }
+    _data.ndaUrl = _data.ndaUrl.map(item => item.response.data).join(',')
+    _data.breachClauseUrl = _data.breachClauseUrl.map(item => item.response.data).join(',')
+    delete _data.breachClause1
+    delete _data.breachClause2
+    return _data;
+  }
+
   onChange(value, updateKey) {
     this.props.onChange(value, updateKey)
   }
 
   render() {
-    const { orderNo, data: { nda, ndaUrl, breachClauseUrl, breachClause1, breachClause2 } } = this.props;
-    
+    const { orderNo } = this.props;
+    const _data = this.props.data || {}
+    const { nda, ndaUrl, breachClauseUrl, breachClause1, breachClause2 } = _data
     let ndaString = nda !== null && nda !== undefined ? nda.toString() : ''
 
     return (

+ 2 - 4
js/component/manageCenter/order/orderNew/confidenBreachView.jsx

@@ -17,8 +17,8 @@ const breachClauseOptions = {
   0: '否',
   1: '有,有限责任违约条款,与技术服务有关',
   2: '有,有限责任违约条款,与技术服务无关',
-  3: ',无限责任违约条款,与技术服务有关',
-  4: ',无限责任违约条款,与技术服务无关'
+  3: ',无限责任违约条款,与技术服务有关',
+  4: ',无限责任违约条款,与技术服务无关'
 };
 class ConfidenBreachView extends Component {
   constructor(props) {
@@ -47,8 +47,6 @@ class ConfidenBreachView extends Component {
       _data = this.props.data
     }
     const { nda, ndaUrl, breachClauseUrl, breachClause } = _data;
-
-    console.log(nda, ndaUrl, breachClause, breachClauseUrl)
     return (
       <div>
         <div style={{display: 'flex', alignItems: 'center' }}>

+ 77 - 50
js/component/manageCenter/project/task/myTask.jsx

@@ -67,6 +67,7 @@ import Cascaders from "../../../common/cascaders";
 import Property from '../../../common/orderDetail/property'; // 知识产权情况
 import Progress from './progress';
 import ApproveTypeTooltip from '../../../common/ApproveTypeTooltip';
+import ConfidenBreachView from '../../order/orderNew/confidenBreachView'
 
 
 const confirm = Modal.confirm
@@ -193,6 +194,7 @@ const Task = React.createClass({
   },
   getInitialState() {
     return {
+      confidenBreachData: {},
       isNull: true,
       approvaType: [],
       satisfactionDegreeUrl: [], // 满意度调查表
@@ -1663,6 +1665,63 @@ const Task = React.createClass({
       attachmentUrls = picArr.join(',')
     }
 
+    // const { validFormData, getFormData } = this.refs.confidenbreachRef
+    // const _confidenBreachValid = validFormData(this.state.confidenBreachData)
+    // if (!_confidenBreachValid.flag) {
+    //   message.warning(_confidenBreachValid.msg)
+    //   return
+    // }
+    // const _confidenBreachFormData = getFormData(this.state.confidenBreachData)
+    
+    const paramsData = Object.assign({
+      id: this.state.id, //项目编号
+      orderNo: this.state.orderNo, //订单编号
+      projectStatus: status || this.state.projectStatus, //项目状态
+      taskStatus: this.state.taskStatus, //项目状态
+      taskComment: this.state.taskComment, //说明
+      startDate: this.state.startDate, //启动日期
+      endDate: this.state.endDate, //结束日期
+      acceptDate: this.state.acceptDate, //受理日期
+      reviewDate: this.state.reviewDate, //评审日期
+      publicityDate: this.state.publicityDate, //公示日期
+      licenceDate: this.state.licenceDate, //发证日期
+      attachmentUrl: attachmentUrls.length ? attachmentUrls : '', //附件
+      contacts: this.state.contacts, //联系人
+      contactMobile: this.state.contactMobile, //联系人电话
+      legalPerson: this.state.legalPerson, //法人
+      legalPersonTel: this.state.legalPersonTel, //法人电话
+      certificateNumber: this.state.certificateNumber, //证书编号
+      status: this.state.status, //状态
+      // formRetrieve: this.state.formRetrieve, //满意度
+      taskRefund: this.state.taskRefund, //退单
+      refundContent: this.state.refundContent, //退单信息
+      retrieveContent: this.state.retrieveContent, //回收信息
+      locationProvince: this.state.ProvinceCity[0],
+      locationCity: this.state.ProvinceCity[1],
+      locationArea: this.state.ProvinceCity[2],
+      postalAddress: this.state.postalAddress, //详细地址
+      arrivalMoney: this.state.arrivalMoney, //是否到款
+      setUpAmount: this.state.setUpAmount, //立项金额
+      declareUser: this.state.declareUser, //账号
+      declarePwd: this.state.declarePwd, //密码
+      outsourceName: this.state.outsourceName, //外包公司
+      outsourcePrice: this.state.outsourcePrice, //外包价格
+      declarationBatch: this.state.declarationBatch,
+      specialComment: this.state.specialComment || undefined,//特别说明
+      setUpStatus: typeof this.state.setUpStatus === 'number' ? this.state.setUpStatus : undefined,//是否立项
+      setUpTime: this.state.setUpTime || undefined,//立项时间
+      highTechStatus: typeof this.state.highTechStatus === 'number' ? this.state.highTechStatus : undefined,//是否高新
+      spotCheckStatus: typeof this.state.spotCheckStatus === 'number' ? this.state.spotCheckStatus : undefined,//是否抽查 0否 1未通过 2通过
+      urgentDay: typeof this.state.urgentDay === 'number' ? this.state.urgentDay : undefined,//加急天数
+      ifMaterial: typeof this.state.ifMaterial === 'number' ? this.state.ifMaterial : undefined,//有无材料
+      acceptCount: this.state.acceptCount || undefined,
+      certificatesCount: this.state.certificatesCount || undefined,
+      rejectCount: this.state.rejectCount || undefined,
+      certificationCorporate: this.state.certificationCorporate || undefined,//认证费公司
+      certificationFee: this.state.certificationFee,//认证费
+      ifCertificationFee: this.state.ifCertificationFee,//是否包含认证费
+    })
+
     this.setState({
       loading: true,
     })
@@ -1671,54 +1730,7 @@ const Task = React.createClass({
       dataType: 'json',
       crossDomain: false,
       url: globalConfig.context + '/api/admin/orderProject/updateOrderTask',
-      data: {
-        id: this.state.id, //项目编号
-        orderNo: this.state.orderNo, //订单编号
-        projectStatus: status || this.state.projectStatus, //项目状态
-        taskStatus: this.state.taskStatus, //项目状态
-        taskComment: this.state.taskComment, //说明
-        startDate: this.state.startDate, //启动日期
-        endDate: this.state.endDate, //结束日期
-        acceptDate: this.state.acceptDate, //受理日期
-        reviewDate: this.state.reviewDate, //评审日期
-        publicityDate: this.state.publicityDate, //公示日期
-        licenceDate: this.state.licenceDate, //发证日期
-        attachmentUrl: attachmentUrls.length ? attachmentUrls : '', //附件
-        contacts: this.state.contacts, //联系人
-        contactMobile: this.state.contactMobile, //联系人电话
-        legalPerson: this.state.legalPerson, //法人
-        legalPersonTel: this.state.legalPersonTel, //法人电话
-        certificateNumber: this.state.certificateNumber, //证书编号
-        status: this.state.status, //状态
-        // formRetrieve: this.state.formRetrieve, //满意度
-        taskRefund: this.state.taskRefund, //退单
-        refundContent: this.state.refundContent, //退单信息
-        retrieveContent: this.state.retrieveContent, //回收信息
-        locationProvince: this.state.ProvinceCity[0],
-        locationCity: this.state.ProvinceCity[1],
-        locationArea: this.state.ProvinceCity[2],
-        postalAddress: this.state.postalAddress, //详细地址
-        arrivalMoney: this.state.arrivalMoney, //是否到款
-        setUpAmount: this.state.setUpAmount, //立项金额
-        declareUser: this.state.declareUser, //账号
-        declarePwd: this.state.declarePwd, //密码
-        outsourceName: this.state.outsourceName, //外包公司
-        outsourcePrice: this.state.outsourcePrice, //外包价格
-        declarationBatch: this.state.declarationBatch,
-        specialComment: this.state.specialComment || undefined,//特别说明
-        setUpStatus: typeof this.state.setUpStatus === 'number' ? this.state.setUpStatus : undefined,//是否立项
-        setUpTime: this.state.setUpTime || undefined,//立项时间
-        highTechStatus: typeof this.state.highTechStatus === 'number' ? this.state.highTechStatus : undefined,//是否高新
-        spotCheckStatus: typeof this.state.spotCheckStatus === 'number' ? this.state.spotCheckStatus : undefined,//是否抽查 0否 1未通过 2通过
-        urgentDay: typeof this.state.urgentDay === 'number' ? this.state.urgentDay : undefined,//加急天数
-        ifMaterial: typeof this.state.ifMaterial === 'number' ? this.state.ifMaterial : undefined,//有无材料
-        acceptCount: this.state.acceptCount || undefined,
-        certificatesCount: this.state.certificatesCount || undefined,
-        rejectCount: this.state.rejectCount || undefined,
-        certificationCorporate: this.state.certificationCorporate || undefined,//认证费公司
-        certificationFee: this.state.certificationFee,//认证费
-        ifCertificationFee: this.state.ifCertificationFee,//是否包含认证费
-      },
+      data: paramsData,
     }).done(
       function (data) {
         this.setState({
@@ -1925,6 +1937,13 @@ const Task = React.createClass({
             deleteSign: thisdata.deleteSign,
 
             patentStatus: thisdata.patentStatus, // 知识产权情况
+            // 保密&违约说明
+            confidenBreachData: {
+              nda: thisdata.nda,
+              ndaUrl: thisdata.ndaUrl,
+              breachClause: thisdata.breachClause,
+              breachClauseUrl: thisdata.breachClauseUrl
+            },
           })
         }
       }.bind(this),
@@ -1963,7 +1982,7 @@ const Task = React.createClass({
         }
         this.setState({
           dataSourceX: theArr,
-          type: theArr[0].type,
+          type: theArr[0].type ? theArr[0].type.toString() : '',
         })
       }.bind(this),
     }).always(
@@ -4445,7 +4464,7 @@ const Task = React.createClass({
                         >
                           <span>
                             {getApproval(this.state.approval)}
-                            {getApprovedType(this.state.type ? this.state.type.split(",").map(Number) : [], this.state.typeExplain, 1)}
+                            {/* {getApprovedType(!!this.state.type ? this.state.type.split(",").map(Number) : [], this.state.typeExplain, 1)} */}
                           </span>
                         </FormItem>
                         <FormItem
@@ -4740,6 +4759,14 @@ const Task = React.createClass({
                           loading={this.state.loading}
                         />
                       </div>
+
+                      {/* 保密&违约说明信息 */}
+                      <ConfidenBreachView
+                        labelCol={4}
+                        wrapperCol={18}
+                        data={this.state.confidenBreachData}
+                      />
+
                       {/*<div className="clearfix">*/}
                       {/*  <h3 className="sub-title">外包信息</h3>*/}
                       {/*  <FormItem*/}

+ 14 - 0
js/component/manageCenter/project/task/taskQuery.jsx

@@ -48,6 +48,7 @@ import NewEditProject from "../../../common/projectOperation/newEditProject";
 import OrderItemStatus from "../../../common/orderItemStatus";
 import EnterpriseNameChange from "../../../common/enterpriseNameChange";
 import Property from '../../../common/orderDetail/property' // 知识产权情况
+import ConfidenBreachView from '../../order/orderNew/confidenBreachView';
 
 const Task = React.createClass({
   loadData(pageNo) {
@@ -135,6 +136,7 @@ const Task = React.createClass({
   },
   getInitialState() {
     return {
+      confidenBreachData: {},
       approvaType: [],
       orderData: [],
       orderNo: "",
@@ -650,6 +652,14 @@ const Task = React.createClass({
             deleteSign: thisdata.deleteSign,
 
             patentStatus: thisdata.patentStatus, // 知识产权情况
+
+            // 保密&违约说明
+            confidenBreachData: {
+              nda: thisdata.nda,
+              ndaUrl: thisdata.ndaUrl,
+              breachClause: thisdata.breachClause,
+              breachClauseUrl: thisdata.breachClauseUrl
+            },
           });
         }
       }.bind(this),
@@ -989,6 +999,7 @@ const Task = React.createClass({
                 globalConfig.avatarHost + "/upload"
               )
               : [],
+            
           });
         }
       }.bind(this),
@@ -1902,6 +1913,9 @@ const Task = React.createClass({
                         loading={this.state.loading}
                       />
                     </div>
+
+                    <ConfidenBreachView data={this.state.confidenBreachData} />
+
                     <div className="clearfix">
                       <h3 className="sub-title">申报系统账户信息</h3>
                       {/*<span style={{color:'red'}}>注:仅技术部可见</span>*/}

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.3.39",
+  "version": "1.3.48",
   "description": "",
   "main": "index.js",
   "scripts": {