dev01 1 ay önce
ebeveyn
işleme
272a5e4d22

+ 4 - 0
js/component/dataDic.js

@@ -1852,6 +1852,10 @@ module.exports = {
       value: "9",
       key: "内勤",
     },
+    {
+      value: "10",
+      key: "业务",
+    },
   ],
   //职务
   post: [

+ 0 - 0
js/component/manageCenter/financialManage/business/index.less


+ 430 - 0
js/component/manageCenter/financialManage/business/unlimited.jsx

@@ -0,0 +1,430 @@
+import React from 'react';
+import {
+  DatePicker,
+  Tooltip,
+  Button,
+  AutoComplete,
+  Input,
+  Select,
+  Spin,
+  Table,
+  message,
+  Form,
+  Tabs,
+  Switch
+} from 'antd';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import { ShowModal, getApprovedType } from "@/tools.js";
+import { } from "@/dataDic";
+import ShowModalDiv from "@/showModal.jsx";
+import { ChooseList } from "../../order/orderNew/chooseList";
+
+import './index.less';
+
+const TabPane = Tabs.TabPane;
+const { RangePicker, } = DatePicker;
+
+const Unlimited = Form.create()(React.createClass({
+
+  getInitialState() {
+    return {
+      searchValues: {},
+      loading: false,
+      exportPendingLoading: false,
+      changeList: undefined,
+      dataSource: [],
+      pagination: {
+        defaultCurrent: 1,
+        defaultPageSize: 10,
+        showQuickJumper: true,
+        pageSize: 10,
+        onChange: function (page) {
+          this.loadData(page);
+        }.bind(this),
+        showTotal: function (total) {
+          return '共' + total + '条数据';
+        }
+      },
+      columns: [
+        {
+          title: "特批类型",
+          dataIndex: "type",
+          key: "type",
+          width: 110,
+          render: (text, record) => {
+            return (
+              <span>
+                {getApprovedType(text ? text.split(",").map(Number) : [], record.typeExplain)}
+              </span>
+            );
+          },
+        },
+        {
+          title: "合同编号",
+          dataIndex: "contractNo",
+          key: "contractNo",
+        },
+        {
+          title: '客户名称',
+          dataIndex: 'userName',
+          key: 'userName',
+          render: (text, record) => {
+            return (
+              <Tooltip title={text}>
+                <div style={{ maxWidth: 200 }}>{text}</div>
+              </Tooltip>
+            );
+          }
+        },
+        {
+          title: "订单部门",
+          dataIndex: "depName",
+          key: "depName",
+          width: 100,
+        },
+        {
+          title: "订单负责人",
+          dataIndex: "salesmanName",
+          key: "salesmanName"
+        },
+        {
+          title: "签单日期",
+          dataIndex: "time",
+          key: "time",
+        },
+        {
+          title: "下单时间",
+          dataIndex: "createDate",
+          key: "createTime",
+          width: 80,
+          render: (text) => {
+            return <div style={{ textAlign: "center" }}>{text}</div>
+          },
+        },
+        {
+          title: "签单金额(万元)",
+          dataIndex: "totalAmount",
+          key: "totalAmount",
+          render: (text) => {
+            return <div style={{ textAlign: "center" }}>{text}</div>
+          },
+        },
+        {
+          title: "开票金额(万元)",
+          dataIndex: "invoiceAmount",
+          key: "invoiceAmount",
+          render: (text) => {
+            return <div style={{ textAlign: "center" }}>{text}</div>
+          },
+        },
+        {
+          title: "已收款(万元)",
+          dataIndex: "settlementAmount",
+          key: "settlementAmount",
+          render: (text) => {
+            return <div style={{ textAlign: "center" }}>{text}</div>
+          },
+        },
+        {
+          title: "应收款(万元)",
+          dataIndex: "orderReceivables",
+          key: "orderReceivables",
+          render: (text) => {
+            return <div style={{ textAlign: "center" }}>{text}</div>
+          },
+        },
+        {
+          title: "欠款(万元)",
+          dataIndex: "orderArrears",
+          key: "orderArrears",
+          render: (text) => {
+            return <div style={{ textAlign: "center" }}>{text}</div>
+          },
+        },
+        {
+          title: "总成本/实付",
+          dataIndex: "costAmount",
+          key: "costAmount",
+          render: (text) => {
+            return <div style={{ textAlign: "center" }}>{text}</div>
+          },
+        },
+        {
+          title: "公出时长(时)",
+          dataIndex: "duration",
+          key: "duration",
+        },
+      ],
+      dataSource: [],
+      departmentArr: [],
+    };
+  },
+
+  componentWillMount() {
+    // this.departmentList();
+    // this.selectSuperId();
+    this.loadData();
+  },
+
+  loadData(pageNo) {
+    const { searchValues, pagination } = this.state;
+    this.setState({
+      loading: true,
+    });
+    let datas = Object.assign(searchValues, {
+      pageNo: pageNo || 1,
+      pageSize: pagination.pageSize,
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/statistis/orderProject",
+      data: datas,
+      success: function (data) {
+        ShowModal(this);
+        this.setState({
+          loading: false,
+        });
+        if (data.error && data.error.length === 0) {
+          if (data.data.list) {
+            pagination.current = data.data.pageNo;
+            pagination.total = data.data.totalCount;
+            if (data.data && data.data.list && !data.data.list.length) {
+              pagination.current = 0;
+              pagination.total = 0;
+            }
+            this.setState({
+              dataSource: data.data.list,
+              pagination: this.state.pagination,
+              pageNo: data.data.pageNo,
+            });
+          } else {
+            this.setState({
+              dataSource: data.data,
+              pagination: false,
+            });
+          }
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(
+      function () {
+        this.setState({
+          loading: false,
+        });
+      }.bind(this)
+    );
+  },
+
+  // 部门
+  departmentList() {
+    this.setState({
+      loading: true,
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/organization/selectSuperId",
+      data: {},
+      success: function (data) {
+        let thedata = data.data;
+        let theArr = [];
+        if (!thedata) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+          thedata = {};
+        } else {
+          thedata.map(function (item, index) {
+            theArr.push({
+              key: index,
+              name: item.name,
+              id: item.id,
+            });
+          });
+        }
+        this.setState({
+          departmentArr: theArr,
+        });
+      }.bind(this),
+    }).always(
+      function () {
+        this.setState({
+          loading: false,
+        });
+      }.bind(this)
+    );
+  },
+
+  // 项目类别
+  selectSuperId() {
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/ProjectSize/getAllCname",
+      data: {
+        flag: 0
+      },
+      success: function (data) {
+        let theArr = [];
+        let thedata = data.data;
+        if (!thedata) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+        }
+        for (let i = 0; i < data.data.length; i++) {
+          let theData = data.data[i];
+          theArr.push(
+            <Select.Option value={theData.id} key={theData.cname}>
+              {theData.cname}
+            </Select.Option>
+          );
+        }
+        this.setState({
+          contactsOption: theArr,
+          contactsOptionData: data.data,
+        });
+      }.bind(this)
+    }).always(
+
+    );
+  },
+
+  changeList(arr) {
+    const newArr = [];
+    let list = this.state.columns
+    list.forEach((item) => {
+      arr.forEach((val) => {
+        if (val === item.title) {
+          newArr.push(item);
+        }
+      });
+    });
+    this.setState({
+      changeList: newArr,
+    });
+  },
+
+  search() {
+    this.loadData();
+  },
+
+  reset() {
+    this.setState({
+
+      searchValues: JSON.parse(JSON.stringify({})),
+    }, () => {
+      this.loadData();
+    })
+  },
+
+  render() {
+    const { searchValues } = this.state
+    let departmentArr = this.state.departmentArr || [];
+    return (
+      <div className="user-content">
+        <ShowModalDiv ShowModal={this.state.showModal} onClose={() => { this.setState({ showModal: false }) }} />
+        <div className="content-title" style={{ marginBottom: 10 }}>
+          <span style={{ fontWeight: 900, fontSize: 16 }}>无限制公出管理</span>
+        </div>
+        <div className="user-search">
+          <Tabs
+            defaultActiveKey="1"
+            className="test">
+            <TabPane tab="搜索" key="1">
+              <div
+                className="user-search"
+                style={{
+                  marginTop: "10px",
+                  marginLeft: "10px",
+                  marginRight: "10px",
+                }}
+              >
+                <Input
+                  placeholder="合同编号"
+                  style={{
+                    width: 220,
+                    marginRight: "10px",
+                  }}
+                  value={searchValues["contractNo"]
+                    ? searchValues["contractNo"]
+                    : ""}
+                  onChange={(e) => {
+                    searchValues["contractNo"] = e.target.value;
+                    this.setState({
+                      searchValues: searchValues,
+                    });
+                  }}
+                />
+                <Input
+                  placeholder="客户名称"
+                  style={{
+                    width: 220,
+                    marginRight: "10px",
+                  }}
+                  value={searchValues["userName"]
+                    ? searchValues["userName"]
+                    : ""}
+                  onChange={(e) => {
+                    searchValues["userName"] = e.target.value;
+                    this.setState({
+                      searchValues: searchValues,
+                    });
+                  }}
+                />
+                <Input
+                  placeholder="项目名称"
+                  value={searchValues["projectName"]
+                    ? searchValues["projectName"]
+                    : ""}
+                  style={{ width: 220, marginRight: 10 }}
+                  onChange={e => {
+                    searchValues["projectName"] = e.target.value
+                    this.setState({
+                      searchValues: searchValues,
+                    });
+                  }}
+                />
+
+                <Button type="primary" onClick={this.search} style={{ marginRight: 10 }}>
+                  搜索
+                </Button>
+                <Button onClick={this.reset}>重置</Button>
+              </div>
+            </TabPane>
+            <TabPane tab="更改表格显示数据" key="2">
+              <div style={{ marginLeft: 10 }}>
+                <ChooseList
+                  columns={this.state.columns}
+                  changeFn={this.changeList}
+                  changeList={this.state.changeList}
+                  top={55}
+                  margin={11}
+                />
+              </div>
+            </TabPane>
+          </Tabs>
+        </div>
+        <div className="patent-table">
+          <Spin spinning={this.state.loading}>
+            <Table
+              columns={this.state.changeList
+                ? this.state.changeList
+                : this.state.columns}
+              dataSource={this.state.dataSource}
+              pagination={this.state.pagination}
+              bordered
+            />
+          </Spin>
+        </div>
+      </div >
+    );
+  }
+}));
+export default Unlimited;

+ 75 - 1
js/component/manageCenter/order/orderNew/billing.jsx

@@ -605,6 +605,29 @@ const MyService = Form.create()(
             dataIndex: "financeName",
             key: "financeName",
           },
+          // {
+          //   title: "应公出/已公出",
+          //   dataIndex: "a",
+          //   key: "a",
+          //   width: 100,
+          //   render: (text) => {
+          //     return (
+          //       <div>
+          //         {text}
+          //         <Button
+          //           type="primary"
+          //           onClick={(e) => {
+          //             this.setState({
+          //               upRelease: true
+          //             })
+          //           }}
+          //         >
+          //           设置公出
+          //         </Button>
+          //       </div>
+          //     );
+          //   },
+          // },
           {
             title: "操作",
             dataIndex: "abc",
@@ -2087,7 +2110,7 @@ const MyService = Form.create()(
                     </Select>
                     <span style={{ marginRight: "10px" }}>下单时间 :</span>
                     <RangePicker
-                      style={{ width: 200 }}
+                      style={{ width: 200, marginRight: 10 }}
                       value={[
                         this.state.releaseDate[0]
                           ? moment(this.state.releaseDate[0])
@@ -2100,6 +2123,27 @@ const MyService = Form.create()(
                         this.setState({ releaseDate: dataString });
                       }}
                     />
+                    {/* <Input
+                      placeholder="请输入营销员名字"
+                      style={{ width: 150, marginRight: 10 }}
+                      value={this.state.name}
+                      onChange={(e) => {
+                        this.setState({ name: e.target.value });
+                      }}
+                    />
+                    <Select
+                      style={{ width: 150 }}
+                      placeholder="无限制公出"
+                      value={this.state.ss}
+                      onChange={(e) => {
+                        this.setState({
+                          ss: e,
+                        });
+                      }}
+                    >
+                      <Option value="0">无限制公出(未设置)</Option>
+                      <Option value="1">无限制公出(已设置)</Option>
+                    </Select> */}
                   </Row>
                 </div>
               </TabPane>
@@ -3683,6 +3727,36 @@ const MyService = Form.create()(
                 content={() => this.refs.all}
               />
             </Modal>
+
+            <Modal
+              maskClosable={false}
+              visible={this.state.upRelease}
+              footer=""
+              title="设置公出"
+              width={400}
+              onCancel={() => {
+                this.setState({
+                  upRelease: false
+                })
+              }}
+            >
+              <div style={{ color: "red" }}>
+                <div style={{ textAlign: "center" }}>合同XXXXXXXXXXXXXX,属于“无限制”公出合同!</div>
+                <div style={{ textAlign: "center" }}>请预计所有技术老师,总计公出本合同的时长</div>
+                <div style={{ marginTop: 10, textAlign: "center" }}>
+                  预估公出时间 <Input style={{ width: 50, textAlign: "center" }} />(小时)
+                </div>
+                <div style={{ marginTop: 10, textAlign: "center" }}>
+                  <Button
+                    type="primary"
+                    onClick={() => { }}
+                  >
+                    确定
+                  </Button>
+                </div>
+                <div style={{ textAlign: "center", marginBottom: 10 }}>审核后生效,如需修改,需重新审核</div>
+              </div>
+            </Modal>
           </div>
         </div>
       );