Browse Source

开单上传图片处理,软著自动计算申请支付金额

dev01 2 years ago
parent
commit
8aa4e6730b

+ 43 - 1
js/component/common/imgList/index.js

@@ -1,5 +1,6 @@
 import React, { Component } from 'react';
 import { Icon, message, Spin, Upload, Progress, Modal } from 'antd';
+import $ from 'jquery/src/ajax';
 import './index.less';
 import Viewer from 'viewerjs';
 import 'viewerjs/dist/viewer.css';
@@ -32,6 +33,7 @@ class ImgList extends Component {
         }
         this.imgLoading = this.imgLoading.bind(this);
         this.beforeUpload = this.beforeUpload.bind(this);
+        this.onRemove = this.onRemove.bind(this);
         this.setTimeOutObj = null;
     }
 
@@ -104,6 +106,45 @@ class ImgList extends Component {
         }
     }
 
+    async onRemove(info) {
+        const { orderNo, sign, deleteApi } = this.props
+        if (!deleteApi) {
+            return
+        }
+        let name = info.response.data
+        let remove = new Promise(function (resolve, reject) {
+            Modal.confirm({
+                title: '操作确认',
+                content: '是否确认删除?',
+                okText: '确定',
+                cancelText: '取消',
+                onOk() {
+                    $.ajax({
+                        method: "post",
+                        dataType: "json",
+                        crossDomain: false,
+                        url: globalConfig.context + deleteApi,
+                        data: {
+                            orderNo,
+                            sign,
+                            fileName: name
+                        }
+                    }).done(function (data) {
+                        if (!data.error.length) {
+                            resolve(true);
+                        } else {
+
+                        };
+                    }.bind(this));
+                },
+                onCancel() {
+                    resolve(false)
+                },
+            })
+        });
+        return await remove;
+    }
+
     componentWillUnmount() {
         this.setTimeOutObj && clearTimeout(this.setTimeOutObj);
     }
@@ -228,6 +269,7 @@ class ImgList extends Component {
                                     }
                                 }
                             }}
+                            onRemove={this.onRemove}
                         >
                             {Object.keys(this.props.uploadConfig).length === 0 ? "" : uploadButton}
                         </Upload>
@@ -256,7 +298,7 @@ class ImgList extends Component {
                         status="active"
                         percent={parseFloat(this.state.percent * 100).toFixed(0)}
                     />
-                    
+
                     <div className='promptText'>文件上传中...</div>
                 </div> : <div />}
                 {

+ 10 - 6
js/component/dataDic.js

@@ -3084,12 +3084,8 @@ module.exports = {
       label: '进行中',
     },
     {
-      value: 2,
-      label: '暂停(客户通知暂停)',
-    },
-    {
-      value: 3,
-      label: '暂停(业务线通知暂停)',
+      value: 29,
+      label: '暂停',
     },
     {
       value: 4,
@@ -3257,6 +3253,14 @@ module.exports = {
         }
       ]
     },
+    {
+      value: 2,
+      label: '暂停(客户通知暂停)',
+    },
+    {
+      value: 3,
+      label: '暂停(业务线通知暂停)',
+    },
   ],
   //项目状态
   projectStatus: [

+ 111 - 107
js/component/manageCenter/components/checkProject/applyPaymentModal.js

@@ -1,5 +1,5 @@
-import React,{Component} from 'react';
-import {Button, Form, Input, message, Modal, Radio, Spin, InputNumber} from "antd";
+import React, { Component } from 'react';
+import { Button, Form, Input, message, Modal, Radio, Spin, InputNumber } from "antd";
 import $ from "jquery";
 
 const layout = {
@@ -16,25 +16,25 @@ const formItemLayout = {
     wrapperCol: { span: 14 },
 };
 
-class ApplyPaymentModal extends Component{
+class ApplyPaymentModal extends Component {
 
 
     constructor(props) {
         super(props);
-        this.state={
+        this.state = {
             loading: false,
             paymentStatus: 0,
         }
     }
 
     //申请付款
-    handleSubmit(e){
+    handleSubmit(e) {
         e.preventDefault();
         this.props.form.validateFieldsAndScroll((err, values) => {
             if (err) {
                 return;
             }
-            if(values.quantity<1){
+            if (values.quantity < 1) {
                 message.warning('申请支付数量不能小于零');
                 return false;
             }
@@ -42,14 +42,14 @@ class ApplyPaymentModal extends Component{
                 loading: true
             })
             values.tid = this.props.tid;
-            if(this.props.type === 2){
+            if (this.props.type === 2) {
                 values.chooseType = 2;                 //支付类型 0第三方 1催款 2官费
-            }else{
-                if(this.props.previewPayInfor.nodeId){                      //催款
+            } else {
+                if (this.props.previewPayInfor.nodeId) {                      //催款
                     values.nodeId = this.props.previewPayInfor.nodeId;
                     values.chooseType = 1;                          //支付选择 0第三方 1催款 2官费
                     values.tpcId = this.props.previewPayInfor.cid;  //第三方机构id
-                }else{
+                } else {
                     values.chooseType = 0                           //支付选择 0第三方 1催款 2官费
                     values.tpcId = this.props.previewPayInfor.id;   //第三方机构id
                 }
@@ -79,10 +79,10 @@ class ApplyPaymentModal extends Component{
     }
 
     render() {
-        const { getFieldDecorator,setFieldsValue } = this.props.form;
+        const { getFieldDecorator, setFieldsValue } = this.props.form;
         const { previewPayInfor } = this.props;
-        if(this.props.type !== 2 && !previewPayInfor){return;}
-        return(
+        if (this.props.type !== 2 && !previewPayInfor) { return; }
+        return (
             <Modal
                 maskClosable={false}
                 footer={null}
@@ -104,14 +104,14 @@ class ApplyPaymentModal extends Component{
                             initialValues={{
                                 remember: true,
                             }}
-                            onSubmit={(e)=>{
+                            onSubmit={(e) => {
                                 this.handleSubmit(e)
                             }}
                         >
                             <Form.Item
                                 {...formItemLayout}
                                 style={{
-                                    display:'flex'
+                                    display: 'flex'
                                 }}
                                 label="付款单位/个人:"
                             >
@@ -129,47 +129,47 @@ class ApplyPaymentModal extends Component{
                                 )}
                             </Form.Item>
                             {/* 0正常 1专利 2软著 3审计 */}
-                            {this.props.projectType === 1 && this.props.patentType === 1 ?<Form.Item
-                                        {...formItemLayout}
-                                        style={{
-                                            display:'flex'
-                                        }}
-                                        label="支付状态:"
-                                    >
-                                        {getFieldDecorator('paymentStatus', {
-                                            initialValue: this.state.paymentStatus,
-                                            rules: [{ required: false, message: '请选择支付状态!' }],
-                                        })(
-                                            <Radio.Group onChange={(e)=>{
-                                                this.setState({
-                                                    paymentStatus: e.target.value
-                                                })
-                                                if(e.target.value === 1){
-                                                    setFieldsValue({
-                                                        quantity:parseInt(previewPayInfor.quantity),
-                                                        applicationAmount:(previewPayInfor.partyAmount ?
-                                                            ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :
-                                                            parseFloat(previewPayInfor.totalAmount))/2
-                                                    });
-                                                } else if(e.target.value === 2){
-                                                    setFieldsValue({
-                                                        quantity:parseInt(previewPayInfor.quantity),
-                                                        applicationAmount:(previewPayInfor.partyAmount ?
-                                                            ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :
-                                                            parseFloat(previewPayInfor.totalAmount))
-                                                    });
-                                                }
-                                            }}>
-                                                <Radio value={0}>自定义</Radio>
-                                                <Radio value={1}>半款</Radio>
-                                                <Radio value={2}>全款</Radio>
-                                            </Radio.Group>
-                                        )}
-                                    </Form.Item> : <div/>}
+                            {this.props.projectType === 1 && this.props.patentType === 1 ? <Form.Item
+                                {...formItemLayout}
+                                style={{
+                                    display: 'flex'
+                                }}
+                                label="支付状态:"
+                            >
+                                {getFieldDecorator('paymentStatus', {
+                                    initialValue: this.state.paymentStatus,
+                                    rules: [{ required: false, message: '请选择支付状态!' }],
+                                })(
+                                    <Radio.Group onChange={(e) => {
+                                        this.setState({
+                                            paymentStatus: e.target.value
+                                        })
+                                        if (e.target.value === 1) {
+                                            setFieldsValue({
+                                                quantity: parseInt(previewPayInfor.quantity),
+                                                applicationAmount: (previewPayInfor.partyAmount ?
+                                                    ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :
+                                                    parseFloat(previewPayInfor.totalAmount)) / 2
+                                            });
+                                        } else if (e.target.value === 2) {
+                                            setFieldsValue({
+                                                quantity: parseInt(previewPayInfor.quantity),
+                                                applicationAmount: (previewPayInfor.partyAmount ?
+                                                    ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :
+                                                    parseFloat(previewPayInfor.totalAmount))
+                                            });
+                                        }
+                                    }}>
+                                        <Radio value={0}>自定义</Radio>
+                                        <Radio value={1}>半款</Radio>
+                                        <Radio value={2}>全款</Radio>
+                                    </Radio.Group>
+                                )}
+                            </Form.Item> : <div />}
                             {this.props.type !== 2 ? <Form.Item
                                 {...formItemLayout}
                                 style={{
-                                    display:'flex'
+                                    display: 'flex'
                                 }}
                                 label="单价(万元):"
                             >
@@ -178,13 +178,13 @@ class ApplyPaymentModal extends Component{
                                 {
                                     isNaN(parseFloat(previewPayInfor.unitPrice)) ? previewPayInfor.unitPrice :
                                         getFieldDecorator('unitPrice', {
-                                        initialValue:previewPayInfor.unitPrice,
-                                        rules: [{ required: true, message: '请输入单价!' }],
-                                    })(
-                                        <Input disabled={true} style={{ width: '200px' }} placeholder="请输入单价" type={'number'}/>
-                                    )
+                                            initialValue: previewPayInfor.unitPrice,
+                                            rules: [{ required: true, message: '请输入单价!' }],
+                                        })(
+                                            <Input disabled={true} style={{ width: '200px' }} placeholder="请输入单价" type={'number'} />
+                                        )
                                 }
-                            </Form.Item> : <div/>}
+                            </Form.Item> : <div />}
                             {/*{*/}
                             {/*    this.props.type === 2 ?*/}
                             {/*        <Form.Item*/}
@@ -209,7 +209,7 @@ class ApplyPaymentModal extends Component{
                             <Form.Item
                                 {...formItemLayout}
                                 style={{
-                                    display:'flex'
+                                    display: 'flex'
                                 }}
                                 label="数量(个):"
                             >
@@ -218,7 +218,7 @@ class ApplyPaymentModal extends Component{
                             {this.props.type !== 2 ? <Form.Item
                                 {...formItemLayout}
                                 style={{
-                                    display:'flex'
+                                    display: 'flex'
                                 }}
                                 label="总价(万元):"
                             >
@@ -232,7 +232,7 @@ class ApplyPaymentModal extends Component{
                             <Form.Item
                                 {...formItemLayout}
                                 style={{
-                                    display:'flex'
+                                    display: 'flex'
                                 }}
                                 label="本次申请支付数量:"
                             >
@@ -245,10 +245,10 @@ class ApplyPaymentModal extends Component{
                                         style={{ width: '200px' }}
                                         precision={0}
                                         placeholder="请输入本次申请支付数量"
-                                        onChange={(e)=>{
-                                            if(this.props.projectType === 1 && this.props.patentType === 0){
+                                        onChange={(e) => {
+                                            if (this.props.projectType === 1 && this.props.patentType === 0) {
                                                 setFieldsValue({
-                                                    applicationAmount:e*previewPayInfor.unitPrice
+                                                    applicationAmount: e * previewPayInfor.unitPrice
                                                 });
                                             }
                                         }}
@@ -268,62 +268,66 @@ class ApplyPaymentModal extends Component{
                                     供应商
                                         第三方信息
                                             本次申请支付数量  都可以修改
-                                            本次申请支付金额  专利申请类型不显示,专利买卖类型可以修改申请支付金额,其他类型也能修改
+                                            本次申请支付金额  专利申请类型不显示,专利买卖类型可以修改申请支付金额,其他类型也能修改       (后加软著不可申请支付金额)
                                         付款节点(专利申请无付款节点)
                                             本次申请支付数量  都可以修改
                                             本次申请支付金额  都可以修改
 
 
-                                外包
-                                    第三方信息
-                                        本次申请支付数量  都可以修改
-                                        本次申请支付金额  专利申请不可以修改但显示(专利申请的申请金额会随支付数量乘以单价变化),其他类型可以修改
-                                    付款节点
-                                        本次申请支付数量  都可以修改
-                                        本次申请支付金额  专利申请不可以修改但显示(专利申请的申请金额会随支付数量乘以单价变化),其他类型可以修改
+                                    外包
+                                        第三方信息
+                                            本次申请支付数量  都可以修改
+                                            本次申请支付金额  专利申请不可以修改但显示(专利申请的申请金额会随支付数量乘以单价变化),其他类型可以修改
+                                        付款节点
+                                            本次申请支付数量  都可以修改
+                                            本次申请支付金额  专利申请不可以修改但显示(专利申请的申请金额会随支付数量乘以单价变化),其他类型可以修改
                             */}
-                            {this.props.type !== 2 && !(this.props.startType === 1 ? (this.props.projectType === 1 && this.props.patentType === 0) : false) ? <Form.Item
-                                {...formItemLayout}
-                                style={{
-                                    display:'flex'
-                                }}
-                                label="本次申请支付金额(万元):"
-                            >
-                                {getFieldDecorator('applicationAmount', {
-                                    initialValue:this.props.type === 2 ?(
-                                        ((previewPayInfor.costReduction === 1 ? previewPayInfor.reductionAmount : previewPayInfor.officialUnitPrice) * 1000000 * parseInt(previewPayInfor.quantity)) / 1000000
-                                    ): (
-                                        !isNaN(parseFloat(previewPayInfor.totalAmount)) && !isNaN(parseFloat(previewPayInfor.partyAmount))?
-                                        (
-                                            this.state.paymentStatus === 1 ?
-                                            (previewPayInfor.partyAmount ?
-                                                ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :
-                                            parseFloat(previewPayInfor.totalAmount)) / 2 :
-                                            previewPayInfor.partyAmount ?
-                                                ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :
-                                            parseFloat(previewPayInfor.totalAmount)
-                                        ) : null
-                                    ),
-                                    rules: [{ required: true, message: '请输入本次申请支付金额!' }],
-                                })(
-                                    <InputNumber
-                                        min={0}
-                                        disabled={this.state.paymentStatus !== 0 || (this.props.projectType === 1 && this.props.patentType === 0)}
-                                        style={{ width: '200px' }}
-                                        placeholder="请输入本次申请支付金额"/>
-                                )}
-                            </Form.Item> : null}
+                            {this.props.type !== 2 &&
+                                !(this.props.startType === 1
+                                    ? ((this.props.projectType === 1 && this.props.patentType === 0) || this.props.projectType === 2)
+                                    : false)
+                                ? <Form.Item
+                                    {...formItemLayout}
+                                    style={{
+                                        display: 'flex'
+                                    }}
+                                    label="本次申请支付金额(万元):"
+                                >
+                                    {getFieldDecorator('applicationAmount', {
+                                        initialValue: this.props.type === 2 ? (
+                                            ((previewPayInfor.costReduction === 1 ? previewPayInfor.reductionAmount : previewPayInfor.officialUnitPrice) * 1000000 * parseInt(previewPayInfor.quantity)) / 1000000
+                                        ) : (
+                                            !isNaN(parseFloat(previewPayInfor.totalAmount)) && !isNaN(parseFloat(previewPayInfor.partyAmount)) ?
+                                                (
+                                                    this.state.paymentStatus === 1 ?
+                                                        (previewPayInfor.partyAmount ?
+                                                            ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :
+                                                            parseFloat(previewPayInfor.totalAmount)) / 2 :
+                                                        previewPayInfor.partyAmount ?
+                                                            ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :
+                                                            parseFloat(previewPayInfor.totalAmount)
+                                                ) : null
+                                        ),
+                                        rules: [{ required: true, message: '请输入本次申请支付金额!' }],
+                                    })(
+                                        <InputNumber
+                                            min={0}
+                                            disabled={this.state.paymentStatus !== 0 || (this.props.projectType === 1 && this.props.patentType === 0)}
+                                            style={{ width: '200px' }}
+                                            placeholder="请输入本次申请支付金额" />
+                                    )}
+                                </Form.Item> : null}
                             <Form.Item
                                 {...formItemLayout}
                                 style={{
-                                    display:'flex'
+                                    display: 'flex'
                                 }}
                                 label="备注:"
                             >
                                 {getFieldDecorator('remarks', {
                                     rules: [{ required: true, message: '请输入备注!' }],
                                 })(
-                                    <Input style={{ width: '200px' }} placeholder="请输入备注" type={'textarea'}/>
+                                    <Input style={{ width: '200px' }} placeholder="请输入备注" type={'textarea'} />
                                 )}
                             </Form.Item>
                             <Form.Item>
@@ -331,7 +335,7 @@ class ApplyPaymentModal extends Component{
                                     display: 'flex',
                                     justifyContent: 'center',
                                 }}>
-                                    <Button type="primary" htmlType="submit" style={{width:'60%',height:'40px'}}>
+                                    <Button type="primary" htmlType="submit" style={{ width: '60%', height: '40px' }}>
                                         {this.props.type === 2 ? "确定申请付官费" : "确定申请支付"}
                                     </Button>
                                 </div>

+ 14 - 167
js/component/manageCenter/order/orderNew/addService.jsx

@@ -6330,7 +6330,9 @@ const NewService = Form.create()(
                                     fileList={this.getOrgCodeUrl}
                                     pictureUrl={this.state.orgCodeUrl}
                                     url="/api/admin/order/uploadOrderImg"
-                                    sign=""
+                                    orderNo={this.state.orderNo}
+                                    sign="contract"
+                                    deleteApi="/api/admin/order/deleteOrderImg"
                                   />
                                   <p>图片建议:要清晰。</p>
                                   <Button
@@ -6354,7 +6356,9 @@ const NewService = Form.create()(
                                     fileList={this.getReplenishUrl}
                                     pictureUrl={this.state.replenishUrl}
                                     url="/api/admin/order/uploadOrderImg"
-                                    sign=""
+                                    orderNo={this.state.orderNo}
+                                    sign="supplement"
+                                    deleteApi="/api/admin/order/deleteOrderImg"
                                   />
                                   <p>图片建议:要清晰。</p>
                                 </FormItem>
@@ -6384,59 +6388,6 @@ const NewService = Form.create()(
                                       <div />
                                     )}
                                   </div>
-                                  <Modal
-                                    maskClosable={false}
-                                    footer={null}
-                                    width={"50%"}
-                                    visible={this.state.previewVisible}
-                                    onCancel={() => {
-                                      this.setState({
-                                        previewVisible: false,
-                                        rotateDeg: 0,
-                                      });
-                                    }}
-                                  >
-                                    <img
-                                      alt=""
-                                      style={{
-                                        width: "100%",
-                                        transform: `rotate(${this.state.rotateDeg}deg)`,
-                                      }}
-                                      src={this.state.previewImage || ""}
-                                    />
-                                    <Button
-                                      onClick={this.rotate}
-                                      style={{
-                                        position: "relative",
-                                        left: "50%",
-                                        transform: "translateX(-50%)",
-                                      }}
-                                    >
-                                      旋转
-                                    </Button>
-                                    <Button
-                                      onClick={this.upImg}
-                                      style={{
-                                        position: "absolute",
-                                        left: -81,
-                                        top: "50%",
-                                        transform: "translateY(-50%)",
-                                      }}
-                                    >
-                                      上一张
-                                    </Button>
-                                    <Button
-                                      onClick={this.downImg}
-                                      style={{
-                                        position: "absolute",
-                                        right: -81,
-                                        top: "50%",
-                                        transform: "translateY(-50%)",
-                                      }}
-                                    >
-                                      下一张
-                                    </Button>
-                                  </Modal>
                                   <Button
                                     style={{
                                       float: "right",
@@ -6471,59 +6422,6 @@ const NewService = Form.create()(
                                       <div />
                                     )}
                                   </div>
-                                  <Modal
-                                    maskClosable={false}
-                                    footer={null}
-                                    width={"50%"}
-                                    visible={this.state.previewVisibles}
-                                    onCancel={() => {
-                                      this.setState({
-                                        previewVisibles: false,
-                                        rotateDeg: 0,
-                                      });
-                                    }}
-                                  >
-                                    <img
-                                      alt=""
-                                      style={{
-                                        width: "100%",
-                                        transform: `rotate(${this.state.rotateDeg}deg)`,
-                                      }}
-                                      src={this.state.previewImage || ""}
-                                    />
-                                    <Button
-                                      onClick={this.rotates}
-                                      style={{
-                                        position: "relative",
-                                        left: "50%",
-                                        transform: "translateX(-50%)",
-                                      }}
-                                    >
-                                      旋转
-                                    </Button>
-                                    <Button
-                                      onClick={this.upImgs}
-                                      style={{
-                                        position: "absolute",
-                                        left: -81,
-                                        top: "50%",
-                                        transform: "translateY(-50%)",
-                                      }}
-                                    >
-                                      上一张
-                                    </Button>
-                                    <Button
-                                      onClick={this.downImgs}
-                                      style={{
-                                        position: "absolute",
-                                        right: -81,
-                                        top: "50%",
-                                        transform: "translateY(-50%)",
-                                      }}
-                                    >
-                                      下一张
-                                    </Button>
-                                  </Modal>
                                 </FormItem>
                               </div>
                             )}
@@ -6548,7 +6446,9 @@ const NewService = Form.create()(
                                       fileList={this.getContentUrl}
                                       pictureUrl={this.state.contentUrl}
                                       url="/api/admin/order/uploadOrderImg"
-                                      sign=""
+                                      orderNo={this.state.orderNo}
+                                      sign="content"
+                                      deleteApi="/api/admin/order/deleteOrderImg"
                                     />
                                     <p> <span style={{ color: "red", display: "inline-block" }}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)</span>图片建议:要清晰。</p>
                                   </div> :
@@ -6559,59 +6459,6 @@ const NewService = Form.create()(
                                         fileList={this.state.contentUrl}
                                         ItemWidth={"96px"}
                                       />
-                                      <Modal
-                                        maskClosable={false}
-                                        footer={null}
-                                        width={"50%"}
-                                        visible={this.state.previewVisibleCont}
-                                        onCancel={() => {
-                                          this.setState({
-                                            previewVisibleCont: false,
-                                            rotateDeg: 0,
-                                          });
-                                        }}
-                                      >
-                                        <img
-                                          alt=""
-                                          style={{
-                                            width: "100%",
-                                            transform: `rotate(${this.state.rotateDeg}deg)`,
-                                          }}
-                                          src={this.state.previewImage || ""}
-                                        />
-                                        <Button
-                                          onClick={this.rotateCont}
-                                          style={{
-                                            position: "relative",
-                                            left: "50%",
-                                            transform: "translateX(-50%)",
-                                          }}
-                                        >
-                                          旋转
-                                        </Button>
-                                        <Button
-                                          onClick={this.upImgCont}
-                                          style={{
-                                            position: "absolute",
-                                            left: -81,
-                                            top: "50%",
-                                            transform: "translateY(-50%)",
-                                          }}
-                                        >
-                                          上一张
-                                        </Button>
-                                        <Button
-                                          onClick={this.downImgCont}
-                                          style={{
-                                            position: "absolute",
-                                            right: -81,
-                                            top: "50%",
-                                            transform: "translateY(-50%)",
-                                          }}
-                                        >
-                                          下一张
-                                        </Button>
-                                      </Modal>
                                     </div> : "暂无附件!"}
                               </div>
                             </FormItem>
@@ -7387,7 +7234,11 @@ const NewService = Form.create()(
                       </TabPane>
                       <TabPane tab="合同变更发起" key="2">
                         {
-                          <div>
+                          <div className="contractchange">
+                            {
+                              !(this.state.processStatus == 5 || this.state.processStatus == 6) &&
+                              <div className="cmask">当前状态不能发起合同变更</div>
+                            }
                             <div className="clearfix">
                               <FormItem
                                 className="half-item"
@@ -7839,7 +7690,6 @@ const NewService = Form.create()(
                               <Button
                                 type="primary"
                                 style={{ float: "right", marginRight: 40 }}
-                                // onClick={this.changeApply}
                                 loading={this.state.loading}
                                 onClick={(e) => {
                                   if (this.state.isCaoGao) {
@@ -7857,9 +7707,6 @@ const NewService = Form.create()(
                                 {this.state.isCaoGao ? "发起变更申请" : "下一步"}
                               </Button>
                             </div>
-                            {/* ) : (
-                              ""
-                            )} */}
                           </div>
                         }
                       </TabPane>

+ 9 - 26
js/component/manageCenter/order/orderNew/changeComponent/picturesWall.js

@@ -7,26 +7,9 @@ class PicturesWall extends Component {
   constructor(props) {
     super(props);
     this.state = {
-      previewVisible: false,
-      previewImage: "",
       fileList: this.props.pictureUrl
     };
-    this.handleCancel = this.handleCancel.bind(this);
     this.handleChange = this.handleChange.bind(this);
-    this.handlePreview = this.handlePreview.bind(this);
-  }
-
-  handleCancel() {
-    this.setState({
-      previewVisible: false
-    });
-  }
-
-  handlePreview(file) {
-    this.setState({
-      previewImage: file.url || file.thumbUrl,
-      previewVisible: true
-    });
   }
 
   handleChange(info) {
@@ -39,24 +22,24 @@ class PicturesWall extends Component {
 
   componentWillReceiveProps(nextProps) {
     this.state.fileList = nextProps.pictureUrl;
-    this.state.pojectApplicationUrl = undefined;
   }
 
   render() {
-    const { previewVisible, previewImage, fileList } = this.state;
-    const uploadButton = (
-      <div>
-        <Icon type="plus" />
-        <div className="ant-upload-text">点击上传</div>
-      </div>
-    );
+    const { fileList } = this.state;
+    const { orderNo = undefined, deleteApi = "", sign = "" } = this.props
     return (
       <div style={{ display: "inline-block" }}>
         <ImgList
+          deleteApi={deleteApi}
+          orderNo={orderNo}
+          sign={sign}
           domId={this.props.domId}
           uploadConfig={{
             action: globalConfig.context + this.props.url,
-            data: { sign: this.props.sign },
+            data: {
+              orderNo: orderNo,
+              sign: this.props.sign,
+            },
             multiple: true,
             listType: "picture-card",
           }}

+ 31 - 5
js/component/manageCenter/order/orderNew/inquiry.jsx

@@ -1711,14 +1711,14 @@ const IntentionCustomer = Form.create()(
     },
     //整行点击
     tableRowClick(record) {
-      this.setState({
-        visible: true,
-        orderNos: record.orderNo
-      });
       this.xiangqing(record.orderNo);
       this.xiangmu(record.orderNo);
       this.jiedian(record.orderNo);
       this.jiedianNew(record.orderNo);
+      this.setState({
+        visible: true,
+        orderNos: record.orderNo
+      });
     },
     //点击打卡项目详情
     tableRowClickX(record) {
@@ -1744,10 +1744,16 @@ const IntentionCustomer = Form.create()(
     visitCancel() {
       this.setState({
         visible: false,
+        dataSourceX: [],
+        contactList: [],
+        contactListNew: [],
       });
     },
     //订单详情
     xiangqing(orderNos) {
+      this.setState({
+        loading: true,
+      });
       $.ajax({
         method: "get",
         dataType: "json",
@@ -1757,6 +1763,9 @@ const IntentionCustomer = Form.create()(
           orderNo: orderNos,
         },
         success: function (data) {
+          this.setState({
+            loading: false,
+          });
           if (data.error.length || data.data.list == "") {
             if (data.error && data.error.length) {
               message.warning(data.error[0].message);
@@ -1829,6 +1838,9 @@ const IntentionCustomer = Form.create()(
     },
     //项目列表
     xiangmu(orderNos) {
+      this.setState({
+        loading: true,
+      });
       $.ajax({
         method: "get",
         dataType: "json",
@@ -1838,8 +1850,10 @@ const IntentionCustomer = Form.create()(
           orderNo: orderNos,
         },
         success: function (data) {
+          this.setState({
+            loading: false,
+          });
           let theArr = [];
-
           if (data.error.length || data.data.list == "") {
             if (data.error && data.error.length) {
               message.warning(data.error[0].message);
@@ -1866,6 +1880,9 @@ const IntentionCustomer = Form.create()(
     },
     //节点列表
     jiedian(orderNos) {
+      this.setState({
+        loading: true,
+      });
       $.ajax({
         method: "get",
         dataType: "json",
@@ -1875,6 +1892,9 @@ const IntentionCustomer = Form.create()(
           orderNo: orderNos,
         },
         success: function (data) {
+          this.setState({
+            loading: false,
+          });
           let theArr = [];
           let thisData = [];
           if (data.error.length || data.data.list == "") {
@@ -1909,6 +1929,9 @@ const IntentionCustomer = Form.create()(
     },
     //查看催款节点
     jiedianNew(orderNos) {
+      this.setState({
+        loading: true,
+      });
       $.ajax({
         method: "get",
         dataType: "json",
@@ -1919,6 +1942,9 @@ const IntentionCustomer = Form.create()(
           orderNo: orderNos,
         },
         success: function (data) {
+          this.setState({
+            loading: false,
+          });
           if (data.error && data.error.length) {
             message.warning(data.error[0].message);
           } else {

+ 93 - 26
js/component/manageCenter/order/userMangagement.less

@@ -1,53 +1,66 @@
 .user-content {
     background: #fff;
     padding: 20px;
+
     .content-title {
         color: #333;
         font-size: 16px;
         overflow: hidden;
     }
+
     .user-search {
         margin-bottom: 10px;
-        > input {
+
+        >input {
             width: 140px;
         }
-         > button,
+
+        >button,
         .ant-select,
-        > input {
+        >input {
             margin-right: 10px;
             margin-top: 10px;
         }
+
         .ant-switch {
             margin-left: 10px;
         }
+
         .search-more {
             margin: 10px 0;
-            > span {
+
+            >span {
                 margin-right: 10px;
             }
         }
     }
 }
+
 .half-item {
     float: left;
     width: 50%;
     min-height: 36px;
     margin-bottom: 10px;
+
     button {
         margin-left: 20px;
     }
 }
+
 .half-middle {
     width: 80%;
     margin: 10px auto;
     height: 36px;
+
     button {
         margin-left: 20px;
     }
 }
+
 .patent-table {
     clear: both;
 }
+
 .set-submit {
     margin-right: 20px;
     font-size: 16px;
@@ -55,69 +68,123 @@
     height: 30px;
     line-height: 30px;
 }
+
 .deletButton {
     float: right;
     margin-bottom: 15px;
 }
+
 .clearfix {
     clear: both;
 }
+
 .mandatory {
     color: red;
     margin-left: 8px;
 }
-.search-more .ant-select-auto-complete.ant-select-lg .ant-input{
-    height:28px
+
+.search-more .ant-select-auto-complete.ant-select-lg .ant-input {
+    height: 28px
 }
-.rolesCol{width: 90%;}
-.setSave,.operations,.cancel{
+
+.rolesCol {
+    width: 90%;
+}
+
+.setSave,
+.operations,
+.cancel {
     float: left;
 }
-.setSave{margin-right: 10px;margin-left: 188px;}
-.toVoid{float: left;margin-right: 10px;}
-.btnSave{text-align: center;margin-top: 10px;overflow: hidden;}
-.ant-calendar-picker-input{height: 27px;}
+
+.setSave {
+    margin-right: 10px;
+    margin-left: 188px;
+}
+
+.toVoid {
+    float: left;
+    margin-right: 10px;
+}
+
+.btnSave {
+    text-align: center;
+    margin-top: 10px;
+    overflow: hidden;
+}
+
+.ant-calendar-picker-input {
+    height: 27px;
+}
+
 /*变更说明*/
-.changeBorder .half-item{
+.changeBorder .half-item {
     margin-bottom: 0;
 }
+
 .changeRemark {
     border-bottom: 1px solid #ccc;
 }
-.changeRemark div{
-     margin-bottom: 0px;
+
+.changeRemark div {
+    margin-bottom: 0px;
 }
-.changeStatusTxt label{
+
+.changeStatusTxt label {
     color: red;
 }
 
-.single{
-	display: block;
-	cursor: pointer;
+.single {
+    display: block;
+    cursor: pointer;
 }
 
-.single:hover{
-	background: skyblue;
+.single:hover {
+    background: skyblue;
 }
+
 .ant-tabs-bar {
     margin-bottom: 0;
 }
+
 .user-content .user-search {
     margin-top: 0 !important;
 }
+
 .ant-tabs-tab {
     font-weight: 900;
 }
-.ant-table-small .ant-table-thead > tr > th {
+
+.ant-table-small .ant-table-thead>tr>th {
     background: #f5f5f5;
 }
+
 .light {
     // background: #87CEEB;
     background: #D3D3D3;
     // background: #CD8162;
-  }
-  
-  .dark {
+}
+
+.dark {
     background: white;
     // background: #87CEEB;
-  }
+}
+
+.contractchange {
+    padding: 20px 0;
+    position: relative;
+
+    .cmask {
+        position: absolute;
+        inset: 0px;
+        z-index: 10;
+        display: flex;
+        justify-content: center;
+        padding-top: 200px;
+        background: rgba(0, 0, 0, 0.7);
+        border-radius: 4px;
+        color: #fff;
+        font-size: 24px;
+    }
+
+}

+ 56 - 49
js/component/manageCenter/project/project/enterpriseProjectQuery.jsx

@@ -54,9 +54,6 @@ class EnterpriseProjectQuery extends Component {
                     title: '订单部门',
                     dataIndex: 'depName',
                     key: 'depName',
-                    render: (text) => {
-                        return (text && text.length > 8 ? text.substr(0, 8) + '...' : text)
-                    }
                 },
                 {
                     title: "营销员",
@@ -433,6 +430,15 @@ class EnterpriseProjectQuery extends Component {
         this.loadData();
     }
 
+    // 暂停项目 颜色
+    suspendColor(record) {
+        if (record.projectStatus == 29) {
+            return 'light'
+        } else {
+            return 'dark'
+        }
+    }
+
 
     render() {
         const dataSources = this.state.customerArr || [];
@@ -444,7 +450,7 @@ class EnterpriseProjectQuery extends Component {
         return (
             <div className="user-content">
                 <div className="content-title">
-                    <span>企业项目派单查询</span>
+                    <span style={{ fontWeight: 900, fontSize: 16 }}>企业项目派单查询</span>
                 </div>
                 <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
                     <TabPane tab="搜索" key="1">
@@ -455,7 +461,7 @@ class EnterpriseProjectQuery extends Component {
                         }}>
                             <Input
                                 placeholder="订单编号"
-                                style={{ width: 100, marginRight: '10px', marginBottom: '10px' }}
+                                style={{ width: 200, marginRight: '10px', marginBottom: '10px' }}
                                 value={this.state.searchOrderNo}
                                 onChange={e => {
                                     this.setState({ searchOrderNo: e.target.value });
@@ -463,7 +469,7 @@ class EnterpriseProjectQuery extends Component {
                             />
                             <Input
                                 placeholder="合同编号"
-                                style={{ width: 100, marginRight: '10px', marginBottom: '10px' }}
+                                style={{ width: 200, marginRight: '10px', marginBottom: '10px' }}
                                 value={this.state.searchContractNo}
                                 onChange={e => {
                                     this.setState({ searchContractNo: e.target.value });
@@ -471,52 +477,12 @@ class EnterpriseProjectQuery extends Component {
                             />
                             <Input
                                 placeholder="企业名称"
-                                style={{ width: 100, marginRight: '10px', marginBottom: '10px' }}
+                                style={{ width: 200, marginRight: '10px', marginBottom: '10px' }}
                                 value={this.state.searchEnterpriseName}
                                 onChange={e => {
                                     this.setState({ searchEnterpriseName: e.target.value });
                                 }}
                             />
-                            <span style={{ display: "inline-block" }}>
-                                <span style={{ marginRight: '10px', marginBottom: '10px' }}>项目类别 :</span>
-                                <Select
-                                    value={this.state.projectStatus || undefined}
-                                    placeholder="请选择项目类别"
-                                    notFoundContent="未获取到上级品类列表"
-                                    style={{ width: 100, marginRight: '10px', marginBottom: '10px' }}
-                                    onChange={(e) => {
-                                        let infor = this.state.contactsOptionData.filter((v) => v.id === e);
-                                        this.setState({
-                                            projectStatus: e,
-                                        })
-                                    }}
-                                >
-                                    {this.state.contactsOption}
-                                </Select>
-                            </span>
-                            <span style={{ display: "inline-block" }}>
-                                <span style={{ marginRight: '10px', marginBottom: '10px' }}>项目分类 :</span>
-                                <Select
-                                    value={typeof this.state.projectType === 'number' ? this.state.projectType : undefined}
-                                    placeholder="请选择项目分类"
-                                    style={{ width: 100, marginRight: '10px', marginBottom: '10px' }}
-                                    onChange={(e) => {
-                                        this.setState({
-                                            projectType: e,
-                                        })
-                                    }}
-                                >
-                                    {/*0通用 1专利 2软著 3审计 4双软 5高新*/}
-                                    <Option value={0}>通用</Option>
-                                    <Option value={1}>专利</Option>
-                                    <Option value={2}>软著</Option>
-                                    <Option value={3}>审计</Option>
-                                    <Option value={4}>双软</Option>
-                                    <Option value={5}>高新</Option>
-                                    <Option value={6}>商标</Option>
-                                    <Option value={7}>会员</Option>
-                                </Select>
-                            </span>
                             <span style={{ display: "inline-block", marginRight: '10px', marginBottom: '10px' }}>
                                 <Spin spinning={this.state.departmentListloading}>
                                     <span>订单部门:</span>
@@ -572,11 +538,51 @@ class EnterpriseProjectQuery extends Component {
                                 </AutoComplete>
                             </span>
                             <span style={{ display: "inline-block" }}>
+                                <span style={{ marginRight: '10px', marginBottom: '10px' }}>项目类别 :</span>
+                                <Select
+                                    value={this.state.projectStatus || undefined}
+                                    placeholder="请选择项目类别"
+                                    notFoundContent="未获取到上级品类列表"
+                                    style={{ width: 150, marginRight: '10px', marginBottom: '10px' }}
+                                    onChange={(e) => {
+                                        let infor = this.state.contactsOptionData.filter((v) => v.id === e);
+                                        this.setState({
+                                            projectStatus: e,
+                                        })
+                                    }}
+                                >
+                                    {this.state.contactsOption}
+                                </Select>
+                            </span>
+                            <span style={{ display: "inline-block" }}>
+                                <span style={{ marginRight: '10px', marginBottom: '10px' }}>项目分类 :</span>
+                                <Select
+                                    value={typeof this.state.projectType === 'number' ? this.state.projectType : undefined}
+                                    placeholder="请选择项目分类"
+                                    style={{ width: 150, marginRight: '10px', marginBottom: '10px' }}
+                                    onChange={(e) => {
+                                        this.setState({
+                                            projectType: e,
+                                        })
+                                    }}
+                                >
+                                    {/*0通用 1专利 2软著 3审计 4双软 5高新*/}
+                                    <Option value={0}>通用</Option>
+                                    <Option value={1}>专利</Option>
+                                    <Option value={2}>软著</Option>
+                                    <Option value={3}>审计</Option>
+                                    <Option value={4}>双软</Option>
+                                    <Option value={5}>高新</Option>
+                                    <Option value={6}>商标</Option>
+                                    <Option value={7}>会员</Option>
+                                </Select>
+                            </span>
+                            <span style={{ display: "inline-block" }}>
                                 <span style={{ marginRight: '10px', marginBottom: '10px' }}>申报批次 :</span>
                                 <Select
                                     value={this.state.declarationBatch || undefined}
                                     placeholder="请选择批次"
-                                    style={{ width: 100, marginRight: '10px', marginBottom: '10px' }}
+                                    style={{ width: 150, marginRight: '10px', marginBottom: '10px' }}
                                     onChange={(e) => {
                                         this.setState({
                                             declarationBatch: e,
@@ -594,7 +600,7 @@ class EnterpriseProjectQuery extends Component {
                                 <Select
                                     value={this.state.projectAmount || undefined}
                                     placeholder="请选择项目金额"
-                                    style={{ width: 100, marginRight: '10px', marginBottom: '10px' }}
+                                    style={{ width: 150, marginRight: '10px', marginBottom: '10px' }}
                                     onChange={(e) => {
                                         this.setState({
                                             projectAmount: e,
@@ -693,6 +699,7 @@ class EnterpriseProjectQuery extends Component {
                             }}
                             bordered
                             size="middle"
+                            rowClassName={this.suspendColor}
                         />
                     </Spin>
                 </div>

+ 1 - 1
js/component/manageCenter/project/task/newSupplier.js

@@ -241,7 +241,7 @@ class NewSupplier extends Component {
                         thirdRemarks: '',
                         thirdUrgent: 0,
                     })
-                    this.props.payNodeTable();
+                    !!this.props.payNodeTable && this.props.payNodeTable();
                     this.props.onCancel();
                 } else {
                     message.warning(data.error[0].message)

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

@@ -1163,6 +1163,15 @@ const Task = React.createClass({
     });
   },
 
+  // 暂停项目 颜色
+  suspendColor(record) {
+    if (record.projectStatus == 29) {
+      return 'light'
+    } else {
+      return 'dark'
+    }
+  },
+
 
   render() {
     const dataSources = this.state.customerArr || [];
@@ -1396,6 +1405,7 @@ const Task = React.createClass({
               }}
               pagination={this.state.pagination}
               onRowClick={this.tableRowClick.bind(this)}
+              rowClassName={this.suspendColor}
             />
           </Spin>
         </div>

+ 1 - 1
js/component/tools.js

@@ -1823,7 +1823,7 @@ const obj = {
       return v.value === e
     });
     if (arr.length) {
-      return arr[0].label
+      return arr[0].value == 29 ? <Tag color="#FF0000">{arr[0].label}</Tag> : <span>{arr[0].label}</span>
     }
     return '';
   },

+ 1 - 1
package.json

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