dev01 2 年 前
コミット
2745d31937

+ 184 - 90
js/component/manageCenter/financialManage/distribute/shouKuanAll.jsx

@@ -15,7 +15,8 @@ import {
   Modal,
   Tabs,
   Col,
-  Tag, Tooltip
+  Tag,
+  Tooltip,
 } from "antd";
 import OrderDesc from "../orderDetail/orderDesc";
 import Receivable from "./receivable";
@@ -35,8 +36,8 @@ import {
   splitUrl,
 } from "@/tools";
 import { ChooseList } from "../../order/orderNew/chooseList";
-import Project from "../../../../component/project"
-import {getProjectName} from "../../../tools";
+import Project from "../../../../component/project";
+import { getProjectName } from "../../../tools";
 const FormItem = Form.Item;
 const { TabPane } = Tabs;
 
@@ -200,18 +201,22 @@ const ShouKuang = React.createClass({
           title: "客户名称",
           dataIndex: "userName",
           key: "userName",
-          render: text => {
+          render: (text) => {
             return (
-                <Tooltip title={text}>
-                  <div style={{
-                    maxWidth:'150px',
-                    overflow:'hidden',
+              <Tooltip title={text}>
+                <div
+                  style={{
+                    maxWidth: "150px",
+                    overflow: "hidden",
                     textOverflow: "ellipsis",
-                    whiteSpace:'nowrap',
-                  }}>{text}</div>
-                </Tooltip>
-            )
-          }
+                    whiteSpace: "nowrap",
+                  }}
+                >
+                  {text}
+                </div>
+              </Tooltip>
+            );
+          },
         },
         {
           title: "订单负责人",
@@ -327,18 +332,22 @@ const ShouKuang = React.createClass({
           title: "客户名称",
           dataIndex: "userName",
           key: "userName",
-          render: text => {
+          render: (text) => {
             return (
-                <Tooltip title={text}>
-                  <div style={{
-                    maxWidth:'150px',
-                    overflow:'hidden',
+              <Tooltip title={text}>
+                <div
+                  style={{
+                    maxWidth: "150px",
+                    overflow: "hidden",
                     textOverflow: "ellipsis",
-                    whiteSpace:'nowrap',
-                  }}>{text}</div>
-                </Tooltip>
-            )
-          }
+                    whiteSpace: "nowrap",
+                  }}
+                >
+                  {text}
+                </div>
+              </Tooltip>
+            );
+          },
         },
         {
           title: "订单负责人",
@@ -439,18 +448,22 @@ const ShouKuang = React.createClass({
           title: "客户名称",
           dataIndex: "userName",
           key: "userName",
-          render: text => {
+          render: (text) => {
             return (
-                <Tooltip title={text}>
-                  <div style={{
-                    maxWidth:'150px',
-                    overflow:'hidden',
+              <Tooltip title={text}>
+                <div
+                  style={{
+                    maxWidth: "150px",
+                    overflow: "hidden",
                     textOverflow: "ellipsis",
-                    whiteSpace:'nowrap',
-                  }}>{text}</div>
-                </Tooltip>
-            )
-          }
+                    whiteSpace: "nowrap",
+                  }}
+                >
+                  {text}
+                </div>
+              </Tooltip>
+            );
+          },
         },
         {
           title: "订单负责人",
@@ -547,18 +560,22 @@ const ShouKuang = React.createClass({
           title: "客户名称",
           dataIndex: "userName",
           key: "userName",
-          render: text => {
+          render: (text) => {
             return (
-                <Tooltip title={text}>
-                  <div style={{
-                    maxWidth:'150px',
-                    overflow:'hidden',
+              <Tooltip title={text}>
+                <div
+                  style={{
+                    maxWidth: "150px",
+                    overflow: "hidden",
                     textOverflow: "ellipsis",
-                    whiteSpace:'nowrap',
-                  }}>{text}</div>
-                </Tooltip>
-            )
-          }
+                    whiteSpace: "nowrap",
+                  }}
+                >
+                  {text}
+                </div>
+              </Tooltip>
+            );
+          },
         },
 
         {
@@ -666,18 +683,22 @@ const ShouKuang = React.createClass({
           title: "客户名称",
           dataIndex: "buyerName",
           key: "buyerName",
-          render: text => {
+          render: (text) => {
             return (
-                <Tooltip title={text}>
-                  <div style={{
-                    maxWidth:'150px',
-                    overflow:'hidden',
+              <Tooltip title={text}>
+                <div
+                  style={{
+                    maxWidth: "150px",
+                    overflow: "hidden",
                     textOverflow: "ellipsis",
-                    whiteSpace:'nowrap',
-                  }}>{text}</div>
-                </Tooltip>
-            )
-          }
+                    whiteSpace: "nowrap",
+                  }}
+                >
+                  {text}
+                </div>
+              </Tooltip>
+            );
+          },
         },
         {
           title: "订单部门",
@@ -720,7 +741,7 @@ const ShouKuang = React.createClass({
           key: "costAmount",
           render: (text) => {
             return isNaN(parseFloat(text)) ? text : parseFloat(text);
-          }
+          },
         },
         {
           title: "已付成本(万元)",
@@ -779,19 +800,23 @@ const ShouKuang = React.createClass({
           key: "buyerName",
           className: "title-table",
           fixed: "left",
-          width:150,
-          render: text => {
+          width: 150,
+          render: (text) => {
             return (
-                <Tooltip title={text}>
-                  <div style={{
-                    maxWidth:'150px',
-                    overflow:'hidden',
+              <Tooltip title={text}>
+                <div
+                  style={{
+                    maxWidth: "150px",
+                    overflow: "hidden",
                     textOverflow: "ellipsis",
-                    whiteSpace:'nowrap',
-                  }}>{text}</div>
-                </Tooltip>
-            )
-          }
+                    whiteSpace: "nowrap",
+                  }}
+                >
+                  {text}
+                </div>
+              </Tooltip>
+            );
+          },
         },
         {
           title: "订单编号",
@@ -880,7 +905,7 @@ const ShouKuang = React.createClass({
           className: "title-table",
           render: (text) => {
             return isNaN(parseFloat(text)) ? text : parseFloat(text);
-          }
+          },
         },
         {
           title: "已付成本(万元)",
@@ -889,7 +914,7 @@ const ShouKuang = React.createClass({
           className: "title-table",
           render: (text) => {
             return isNaN(parseFloat(text)) ? text : parseFloat(text);
-          }
+          },
         },
         {
           title: "最近收款(万元)",
@@ -1234,8 +1259,8 @@ const ShouKuang = React.createClass({
   },
   search() {
     this.setState({
-      selectedRowKeys: []
-    })
+      selectedRowKeys: [],
+    });
     this.loadData();
   },
 
@@ -2182,11 +2207,11 @@ const ShouKuang = React.createClass({
           <TabPane tab="更改表格显示数据" key="1">
             <div style={{ marginLeft: 10 }}>
               <ChooseList
-                  columns={this.state.columns}
-                  changeFn={this.changeList}
-                  changeList={this.state.changeList}
-                  top={55}
-                  margin={11}
+                columns={this.state.columns}
+                changeFn={this.changeList}
+                changeList={this.state.changeList}
+                top={55}
+                margin={11}
               />
             </div>
           </TabPane>
@@ -2486,14 +2511,16 @@ const ShouKuang = React.createClass({
           }}
         >
           <Spin spinning={this.state.loading}>
-            {this.state.pvisible && <Project
-              record={this.state.record}
-              visible={this.state.pvisible}
-              isAuditPaymentGLY={true}
-              cancel={() => {
-                this.setState({ pvisible: false });
-              }}
-            />}
+            {this.state.pvisible && (
+              <Project
+                record={this.state.record}
+                visible={this.state.pvisible}
+                isAuditPaymentGLY={true}
+                cancel={() => {
+                  this.setState({ pvisible: false });
+                }}
+              />
+            )}
             <div
               className="patent-table"
               style={
@@ -2631,6 +2658,16 @@ const ShouKuang = React.createClass({
             </TabPane>
           </Tabs>
         </Modal>
+
+        <Project
+          record={this.state.record}
+          visible={this.state.pvisible}
+          isAuditPaymentGLY={true}
+          cancel={() => {
+            this.setState({ pvisible: false });
+          }}
+        />
+
         <Modal
           visible={this.state.proVisible}
           footer=""
@@ -2646,14 +2683,70 @@ const ShouKuang = React.createClass({
           }}
         >
           <Spin spinning={this.state.loading}>
-            {this.state.pvisible && <Project
-              record={this.state.record}
-              visible={this.state.pvisible}
-              isAuditPaymentGLY={true}
-              cancel={() => {
-                this.setState({ pvisible: false });
+            <div
+              className="patent-table"
+              style={
+                {
+                  // width: 900,
+                  // position: "relative",
+                  // left: "50%",
+                  // transform: "translate(-50%)",
+                  // padding: "25px 0 30px 30px"
+                }
+              }
+              ref={(e) => {
+                this.refs.all = e;
               }}
-            />}
+            >
+              <Table
+                columns={this.state.proColumns}
+                dataSource={this.state.proDataList}
+                scroll={{ x: "max-content", y: 0 }}
+                onRowClick={this.tableRowClickPro}
+                pagination={false}
+                bordered
+                size="small"
+              />
+            </div>
+            <span style={{ display: "block", marginTop: 10, color: "red" }}>
+              外包(内部)价格总计(万元):{this.state.totalWaibao}
+            </span>
+          </Spin>
+
+          <ReactToPrint
+            trigger={() => (
+              <Button
+                type="primary"
+                style={{
+                  float: "right",
+                  marginTop: 10,
+                  position: "absolute",
+                  top: 0,
+                  right: 30,
+                }}
+              >
+                打印
+              </Button>
+            )}
+            content={() => this.refs.all}
+          />
+        </Modal>
+
+        {/* <Modal
+          visible={this.state.proVisible}
+          footer=""
+          title="项目进度"
+          className="admin-desc-content"
+          width="1300px"
+          pagination={false}
+          onCancel={() => {
+            this.loadData(this.state.page);
+            this.setState({
+              proVisible: false,
+            });
+          }}
+        >
+          <Spin spinning={this.state.loading}>
             <div
               className="patent-table"
               style={
@@ -2701,7 +2794,8 @@ const ShouKuang = React.createClass({
             )}
             content={() => this.refs.all}
           />
-        </Modal>
+        </Modal> */}
+
         <KaiPiaoModal
           visible={this.state.avisible}
           data={this.state.modalData}

+ 166 - 131
js/component/manageCenter/order/orderNew/changeComponent/orderCoor.jsx

@@ -29,38 +29,41 @@ class OrderCoor extends Component {
     this.state = {
       dataView: null,
       PublicView: null,
-      contentView:'',
-      remarksView:'',
-      contentViewLength:0,
-      contentViewLength1:0,
+      contentView: "",
+      remarksView: "",
+      contentViewLength: 0,
+      contentViewLength1: 0,
       columnsView: [
         {
           title: "服务时间",
           dataIndex: "serviceTimes",
           key: "serviceTimes",
-          width:'80px'
+          width: "80px",
         },
         {
           title: "服务内容",
           dataIndex: "content",
           key: "content",
-          width:"300"
+          width: "300",
         },
         {
           title: "备注",
           dataIndex: "remarks",
           key: "remarks",
-          width:"300"
+          width: "300",
         },
         {
           title: "操作",
           dataIndex: "cz",
           key: "cz",
-          width:'100px',
+          width: "100px",
           render: (text, record) => {
             return (
               <div>
-                {this.state.processStatus == 0 || this.props.processStatus == 0 && this.props.orderStatus == 3 || this.props.orderStatus == 5  ? (
+                {this.state.processStatus == 0 ||
+                (this.props.processStatus == 0 &&
+                  this.props.orderStatus == 3) ||
+                this.props.orderStatus == 5 ? (
                   <Button
                     onClick={(e) => {
                       e.stopPropagation();
@@ -132,7 +135,7 @@ class OrderCoor extends Component {
           title: "公出目标",
           dataIndex: "remarks",
           key: "remarks",
-          width:"300"
+          width: "300",
         },
       ],
       dataSourceView: [],
@@ -153,12 +156,12 @@ class OrderCoor extends Component {
     this.assistList = this.assistList.bind(this);
     this.submitView = this.submitView.bind(this);
     this.submitOrder = this.submitOrder.bind(this);
-    this.handleSearch = this.handleSearch.bind(this)
-    this.onSelectView = this.onSelectView.bind(this)
+    this.handleSearch = this.handleSearch.bind(this);
+    this.onSelectView = this.onSelectView.bind(this);
   }
   componentDidMount() {
-    this.assistList()
-    this.orderServiceList()
+    this.assistList();
+    this.orderServiceList();
   }
   viewConfirm(fn, record) {
     confirm({
@@ -250,11 +253,11 @@ class OrderCoor extends Component {
             loading: false,
             modalView: false,
             viewKey: this.state.viewKey + 1,
-            dateView:'',
-            contentView:'',
-            remarksView:'',
-            contentViewLength:0,
-            contentViewLength1:0,
+            dateView: "",
+            contentView: "",
+            remarksView: "",
+            contentViewLength: 0,
+            contentViewLength1: 0,
           });
           message.success("添加成功");
           this.orderServiceList();
@@ -288,7 +291,10 @@ class OrderCoor extends Component {
           });
           message.warning(data.error[0].message);
         } else {
-          if (this.props.processStatus === 0 || this.props.processStatus === 0 && this.props.orderStatus == 3) {
+          if (
+            this.props.processStatus === 0 ||
+            (this.props.processStatus === 0 && this.props.orderStatus == 3)
+          ) {
             this.setState({
               closable: true,
               disabledView: "inline-block",
@@ -309,7 +315,7 @@ class OrderCoor extends Component {
     );
   }
   // 获取上门服务列表
-  orderServiceList(record) {
+  orderServiceList() {
     $.ajax({
       method: "get",
       dataType: "json",
@@ -319,7 +325,6 @@ class OrderCoor extends Component {
         orderNo: this.props.orderNo,
       },
       success: function (data) {
-        // console.log(data.data)
         if (data.error.length) {
           this.setState({
             loading: false,
@@ -447,22 +452,26 @@ class OrderCoor extends Component {
     let assistList = this.assistList;
     const formItemLayout = {
       labelCol: { span: 8 },
-      wrapperCol: { span: 14 }
+      wrapperCol: { span: 14 },
     };
-    let dataSourceView =  this.state.dataSourceView ? this.state.dataSourceView.map((group, index) => (
-      <Select.Option key={index} value={group.aid}>
-        {group.name}
-      </Select.Option>
-    )) : '';
+    let dataSourceView = this.state.dataSourceView
+      ? this.state.dataSourceView.map((group, index) => (
+          <Select.Option key={index} value={group.aid}>
+            {group.name}
+          </Select.Option>
+        ))
+      : "";
     return (
       <div>
         {/* 新增协单人员 */}
         <div>
-          <div style={{ marginLeft: this.props.mro || '50px',display:'flex' }}>
+          <div
+            style={{ marginLeft: this.props.mro || "50px", display: "flex" }}
+          >
             <div
               style={{
-                minWidth:'66px',
-                maxWidth:'100px',
+                minWidth: "66px",
+                maxWidth: "100px",
                 fontSize: "12px",
                 color: "red",
               }}
@@ -470,59 +479,59 @@ class OrderCoor extends Component {
               协单人员 :
             </div>
             <div>
-            {this.state.personnel.length > 0
-              ? this.state.personnel.map(function (value, key) {
-                  return (
-                    <Tag
-                    style={{marginBottom:'5px'}}
-                      key={value.id}
-                      closable={closable}
-                      onClose={(e) => {
-                        e.preventDefault();
-                        confirm({
-                          title: "确定删除此人员吗?",
-                          // content: (
-                          //   <span style={{ color: "red" }}>
-                          //     删除后会将该项目下的所有催款节点自动清除!!!
-                          //   </span>
-                          // ),
-                          onOk() {
-                            $.ajax({
-                              method: "post",
-                              dataType: "json",
-                              crossDomain: false,
-                              url:
-                                globalConfig.context +
-                                "/api/admin/newOrder/deleteAssist",
-                              data: {
-                                id: value.id,
-                              },
-                              success: function (data) {
-                                if (data.error.length) {
-                                  message.warning(data.error[0].message);
-                                } else {
-                                  message.success("删除成功");
-                                  assistList();
-                                }
-                              }.bind(this),
-                            }).always(
-                              function () {
-                                this.setState({
-                                  loading: false,
-                                });
-                              }.bind(this)
-                            );
-                          },
-                          onCancel() {},
-                        });
-                      }}
-                    >
-                      {value.name}
-                    </Tag>
-                  );
-                })
-              : "无"}
-              </div>
+              {this.state.personnel.length > 0
+                ? this.state.personnel.map(function (value, key) {
+                    return (
+                      <Tag
+                        style={{ marginBottom: "5px" }}
+                        key={value.id}
+                        closable={closable}
+                        onClose={(e) => {
+                          e.preventDefault();
+                          confirm({
+                            title: "确定删除此人员吗?",
+                            // content: (
+                            //   <span style={{ color: "red" }}>
+                            //     删除后会将该项目下的所有催款节点自动清除!!!
+                            //   </span>
+                            // ),
+                            onOk() {
+                              $.ajax({
+                                method: "post",
+                                dataType: "json",
+                                crossDomain: false,
+                                url:
+                                  globalConfig.context +
+                                  "/api/admin/newOrder/deleteAssist",
+                                data: {
+                                  id: value.id,
+                                },
+                                success: function (data) {
+                                  if (data.error.length) {
+                                    message.warning(data.error[0].message);
+                                  } else {
+                                    message.success("删除成功");
+                                    assistList();
+                                  }
+                                }.bind(this),
+                              }).always(
+                                function () {
+                                  this.setState({
+                                    loading: false,
+                                  });
+                                }.bind(this)
+                              );
+                            },
+                            onCancel() {},
+                          });
+                        }}
+                      >
+                        {value.name}
+                      </Tag>
+                    );
+                  })
+                : "无"}
+            </div>
           </div>
           <div
             style={{
@@ -550,14 +559,14 @@ class OrderCoor extends Component {
           <div
             style={{
               marginTop: "10px ",
-              marginLeft:this.props.mrs || '50px',
+              marginLeft: this.props.mrs || "50px",
               display: this.state.coorVisible,
             }}
           >
             <Form onSubmit={this.handleSubmit} ref={this.formRef}>
               <Form.Item {...formItemLayout} label="" name="coor" hasFeedback>
                 <AutoComplete
-                allowClear
+                  allowClear
                   dataSource={dataSourceView}
                   style={{ width: 200 }}
                   onSelect={this.onSelectView}
@@ -602,7 +611,9 @@ class OrderCoor extends Component {
               justifyContent: "space-between",
             }}
           >
-            <div style={{ marginLeft: this.props.mrs || '50px', fontSize: "18px" }}>
+            <div
+              style={{ marginLeft: this.props.mrs || "50px", fontSize: "18px" }}
+            >
               上门服务次数
             </div>
             <div>
@@ -624,11 +635,11 @@ class OrderCoor extends Component {
                 onClick={() => {
                   this.setState({
                     modalView: true,
-                    dateView:'',
-                    contentView:'',
-                    remarksView:'',
-                    contentViewLength:0,
-                    contentViewLength1:0,
+                    dateView: "",
+                    contentView: "",
+                    remarksView: "",
+                    contentViewLength: 0,
+                    contentViewLength1: 0,
                   });
                 }}
               >
@@ -699,7 +710,7 @@ class OrderCoor extends Component {
                 hasFeedback
               >
                 <DatePicker
-                 placeholder="预计技术员上门服务时间"
+                  placeholder="预计技术员上门服务时间"
                   onChange={(date, dateString) => {
                     this.setState({
                       dateView: dateString,
@@ -712,59 +723,83 @@ class OrderCoor extends Component {
                 label="服务内容"
                 name="remarks"
                 hasFeedback
-                style={{position:'relative'}}
+                style={{ position: "relative" }}
               >
                 <TextArea
-                maxLength={500}
-                placeholder="需要技术员上门服务内容"
+                  maxLength={500}
+                  placeholder="需要技术员上门服务内容"
                   rows={4}
                   onChange={(e) => {
-                    this.setState({
-                      contentView: e.target.value,
-                      // contentViewLength:this.state.contentView.length+1
-                    },()=>{
-                      if(!this.state.contentView) {
-                        this.setState({
-                          contentViewLength:0,
-                        })
-                      }else{
-                        this.setState({
-                          contentViewLength:this.state.contentView.length
-                        })
+                    this.setState(
+                      {
+                        contentView: e.target.value,
+                        // contentViewLength:this.state.contentView.length+1
+                      },
+                      () => {
+                        if (!this.state.contentView) {
+                          this.setState({
+                            contentViewLength: 0,
+                          });
+                        } else {
+                          this.setState({
+                            contentViewLength: this.state.contentView.length,
+                          });
+                        }
                       }
-                    });
+                    );
                   }}
                 />
-                <div style={{position:'absolute',right:'20px',bottom:'-5px',zIndex:'10'}}>{this.state.contentViewLength+'/500'}</div>
+                <div
+                  style={{
+                    position: "absolute",
+                    right: "20px",
+                    bottom: "-5px",
+                    zIndex: "10",
+                  }}
+                >
+                  {this.state.contentViewLength + "/500"}
+                </div>
               </Form.Item>
               <Form.Item
                 {...formItemLayout}
                 label="备注"
                 name="remarks"
                 hasFeedback
-                style={{position:'relative'}}
+                style={{ position: "relative" }}
               >
                 <TextArea
-                maxLength={500}
-                 placeholder="需要技术员注意事项"
+                  maxLength={500}
+                  placeholder="需要技术员注意事项"
                   rows={4}
                   onChange={(e) => {
-                    this.setState({
-                      remarksView: e.target.value,
-                    },()=>{
-                      if(!this.state.remarksView) {
-                        this.setState({
-                          contentViewLength1:0,
-                        })
-                      }else{
-                        this.setState({
-                          contentViewLength1:this.state.remarksView.length
-                        })
+                    this.setState(
+                      {
+                        remarksView: e.target.value,
+                      },
+                      () => {
+                        if (!this.state.remarksView) {
+                          this.setState({
+                            contentViewLength1: 0,
+                          });
+                        } else {
+                          this.setState({
+                            contentViewLength1: this.state.remarksView.length,
+                          });
+                        }
                       }
-                    });
+                    );
                   }}
                 />
-                 <div style={{position:'absolute',right:'20px',bottom:'-5px',zIndex:'10'}}>{this.state.contentViewLength1+'/500'}</div>
+                <div
+                  style={{
+                    position: "absolute",
+                    right: "20px",
+                    bottom: "-5px",
+                    zIndex: "10",
+                  }}
+                >
+                  {this.state.contentViewLength1 + "/500"}
+                </div>
               </Form.Item>
             </Form>
             <div
@@ -787,11 +822,11 @@ class OrderCoor extends Component {
                   this.setState({
                     modalView: false,
                     viewKey: this.state.viewKey + 1,
-                    dateView:'',
-                    contentView:'',
-                    remarksView:'',
-                    contentViewLength:0,
-                    contentViewLength1:0,
+                    dateView: "",
+                    contentView: "",
+                    remarksView: "",
+                    contentViewLength: 0,
+                    contentViewLength1: 0,
                   });
                 }}
               >

+ 1 - 1
js/component/project.jsx

@@ -1294,7 +1294,7 @@ const project = React.createClass({
                     </FormItem>
                   </div>
                   {/* 协单人员 */}
-                  <OrderCoor orderNo={this.state.orderNo}/>
+                  <OrderCoor orderNo={this.props.record.orderNo}/>
                   <div>
                     <h3 className="sub-title">项目业务</h3>
                     {/* {this.state.processStatus == 0 ? (

+ 1 - 1
package.json

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