|
@@ -1,5 +1,5 @@
|
|
|
import React, { Component } from 'react';
|
|
|
-import { Button, Form, Input, message, Modal, Spin, Table, Tabs, Tag, Tooltip } from "antd";
|
|
|
+import { Button, Form, Input, message, Modal, Spin, Table, Tabs, Tag, Tooltip, Radio } from "antd";
|
|
|
import PatentSchedule from "../task/patentSchedule";
|
|
|
import ImgList from "../../../common/imgList";
|
|
|
import OrderDetail from "../../order/orderNew/changeComponent/orderDetail";
|
|
@@ -13,14 +13,17 @@ import {
|
|
|
getboutique,
|
|
|
getprovince,
|
|
|
ShowModal,
|
|
|
- getProjectName
|
|
|
+ getProjectName,
|
|
|
+ getFormRetrieve,
|
|
|
} from "@/tools";
|
|
|
import OrderRiZi from "@/orderRiZi.jsx";
|
|
|
+import Picture from '@/manageCenter/publicComponent/picture'
|
|
|
import $ from "jquery";
|
|
|
import DeclarationProgress from "../../../common/declarationProgress";
|
|
|
import OrderItemStatus from "../../../common/orderItemStatus";
|
|
|
import EnterpriseNameChange from "../../../common/enterpriseNameChange";
|
|
|
|
|
|
+
|
|
|
const FormItem = Form.Item;
|
|
|
const { TabPane } = Tabs;
|
|
|
const formItemLayout = {
|
|
@@ -54,11 +57,13 @@ class ProjectDetails extends Component {
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
this.state = {
|
|
|
- timeRecordparse: {},
|
|
|
+ satisfactionDegreeUrl: [], // 满意度调查表
|
|
|
+ satisfactionDegree: "", // 满意度
|
|
|
+ formRetrieve: "",// 满意调查表上传状态
|
|
|
|
|
|
+ timeRecordparse: {},
|
|
|
activeKey: '1',
|
|
|
loading: false,
|
|
|
-
|
|
|
orderData: [],
|
|
|
orderNo: "",
|
|
|
jiedian: [],
|
|
@@ -124,12 +129,12 @@ class ProjectDetails extends Component {
|
|
|
return (
|
|
|
<Tooltip title={text}>
|
|
|
<div
|
|
|
- // style={{
|
|
|
- // maxWidth: '150px',
|
|
|
- // overflow: 'hidden',
|
|
|
- // textOverflow: "ellipsis",
|
|
|
- // whiteSpace: 'nowrap',
|
|
|
- // }}
|
|
|
+ // style={{
|
|
|
+ // maxWidth: '150px',
|
|
|
+ // overflow: 'hidden',
|
|
|
+ // textOverflow: "ellipsis",
|
|
|
+ // whiteSpace: 'nowrap',
|
|
|
+ // }}
|
|
|
>{text}</div>
|
|
|
</Tooltip>
|
|
|
)
|
|
@@ -538,7 +543,13 @@ class ProjectDetails extends Component {
|
|
|
legalPersonTel: thisdata.legalPersonTel, //法人电话
|
|
|
certificateNumber: thisdata.certificateNumber, //证书编号
|
|
|
status: thisdata.status, //状态
|
|
|
- formRetrieve: thisdata.formRetrieve, //满意度表格
|
|
|
+
|
|
|
+ formRetrieve: thisdata.formRetrieve, //满意调查表状态
|
|
|
+ satisfactionDegree: thisdata.satisfactionDegree, //满意度
|
|
|
+ satisfactionDegreeUrl: thisdata.satisfactionDegreeUrl
|
|
|
+ ? splitUrl(thisdata.satisfactionDegreeUrl, ',', globalConfig.avatarHost + '/upload')
|
|
|
+ : [], //满意度调查表
|
|
|
+
|
|
|
taskRefund: thisdata.taskRefund, //退单
|
|
|
refundContent: thisdata.refundContent, //退单信息
|
|
|
retrieveContent: thisdata.retrieveContent, //回收信息
|
|
@@ -874,6 +885,68 @@ class ProjectDetails extends Component {
|
|
|
this.loaduserss(this.props.id);
|
|
|
}
|
|
|
|
|
|
+ // 修改项目满意度
|
|
|
+ updateSatisfactionDegree(status) {
|
|
|
+ let satisfactionDegreeUrls = []
|
|
|
+ if (this.state.satisfactionDegreeUrl.length) {
|
|
|
+ let picArr = []
|
|
|
+ this.state.satisfactionDegreeUrl.map(function (item) {
|
|
|
+ if (item.response && item.response.data && item.response.data.length) {
|
|
|
+ picArr.push(item.response.data)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ satisfactionDegreeUrls = picArr.join(',')
|
|
|
+ }
|
|
|
+ if (status == 2) {
|
|
|
+ if (satisfactionDegreeUrls.length == 0) {
|
|
|
+ message.warning("请先上传满意度调查表!");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.state.formRetrieve) {
|
|
|
+ message.warning("请先选择满意度!");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let obj1 = {
|
|
|
+ id: this.props.id,
|
|
|
+ formRetrieve: 1,
|
|
|
+ }
|
|
|
+ let obj2 = {
|
|
|
+ id: this.props.id,
|
|
|
+ formRetrieve: status,
|
|
|
+ satisfactionDegree: this.state.satisfactionDegree,
|
|
|
+ satisfactionDegreeUrl: satisfactionDegreeUrls.length ? satisfactionDegreeUrls : '',
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ loading: true,
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ url: globalConfig.context + "/api/admin/orderProject/updateSatisfactionDegree",
|
|
|
+ method: "post",
|
|
|
+ data: status == 1 ? obj1 : obj2,
|
|
|
+ }).done(
|
|
|
+ function (data) {
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ });
|
|
|
+ if (data.error.length === 0) {
|
|
|
+ if (status == 1) {
|
|
|
+ this.setState({
|
|
|
+ formRetrieve: 1
|
|
|
+ })
|
|
|
+ } else if (status == 2) {
|
|
|
+ this.setState({
|
|
|
+ formRetrieve: 2
|
|
|
+ })
|
|
|
+ message.success("保存成功!");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
// 可展开颜色不同
|
|
|
addRowColor(record) {
|
|
|
if (!!record.splitList && record.splitList.length > 0) {
|
|
@@ -995,7 +1068,7 @@ class ProjectDetails extends Component {
|
|
|
</div>
|
|
|
}>
|
|
|
<TabPane tab="项目概况" key="1">
|
|
|
- {this.state.activeKey === "1" ? <Form
|
|
|
+ <Form
|
|
|
layout="horizontal"
|
|
|
id="demand-form"
|
|
|
style={{ paddingBottom: "0px" }}
|
|
@@ -1092,24 +1165,85 @@ class ProjectDetails extends Component {
|
|
|
<span>{this.state.outsource === 0 ? "否" : "是"}</span>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
+
|
|
|
<div className="clearfix">
|
|
|
<FormItem
|
|
|
- className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
+ labelCol={{ span: 3 }}
|
|
|
+ wrapperCol={{ span: 16 }}
|
|
|
label="满意度表格"
|
|
|
>
|
|
|
- <span>
|
|
|
- {utils.getSatisfaction(this.state.formRetrieve)}
|
|
|
- </span>
|
|
|
- </FormItem>
|
|
|
- <FormItem
|
|
|
- className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="(满意度)备注"
|
|
|
- >
|
|
|
- <span>{this.state.retrieveContent}</span>
|
|
|
+ <div>
|
|
|
+ {getFormRetrieve(this.state.formRetrieve)}
|
|
|
+ {this.state.formRetrieve == 0 &&
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ style={{ marginTop: "5px", marginLeft: '5px', }}
|
|
|
+ onClick={() => { this.updateSatisfactionDegree(1) }}
|
|
|
+ >已发送至客户</Button>}
|
|
|
+ {
|
|
|
+ (this.state.formRetrieve == 1 || this.state.formRetrieve == 2) &&
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span: 3 }}
|
|
|
+ wrapperCol={{ span: 16 }}
|
|
|
+ label="满意度调查整表"
|
|
|
+ >
|
|
|
+ <Picture
|
|
|
+ showRemove={false} //删除图标
|
|
|
+ domId={'table'}
|
|
|
+ fileList={(e) => {
|
|
|
+ this.setState({ satisfactionDegreeUrl: e })
|
|
|
+ }}
|
|
|
+ pictureUrl={this.state.satisfactionDegreeUrl}
|
|
|
+ visible={this.props.visible}
|
|
|
+ data={{
|
|
|
+ sign: 'satisfactionDegree',
|
|
|
+ url: '/api/admin/orderProject/upload/satisfactionDegree',
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ <p style={{ color: 'red' }}>
|
|
|
+ {
|
|
|
+ this.state.formRetrieve == 0
|
|
|
+ ? "注:满意度调查整表,已发送时,即可上传回复件了!"
|
|
|
+ : "注:回收表格后,即可上传回复件了"
|
|
|
+ }
|
|
|
+ </p>
|
|
|
+ {
|
|
|
+ (this.state.formRetrieve == 1 || this.state.formRetrieve == 2) &&
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span: 3 }}
|
|
|
+ wrapperCol={{ span: 16 }}
|
|
|
+ label="满意度"
|
|
|
+ >
|
|
|
+ <Radio.Group
|
|
|
+ value={this.state.satisfactionDegree}
|
|
|
+ onChange={(e) => {
|
|
|
+ this.setState({ satisfactionDegree: e.target.value })
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Radio value={0}>非常满意</Radio>
|
|
|
+ <Radio value={1}>满意</Radio>
|
|
|
+ <Radio value={2}>一般</Radio>
|
|
|
+ <Radio value={3}>不满意</Radio>
|
|
|
+ </Radio.Group>
|
|
|
+ <div>
|
|
|
+ <Button type="primary" size="small"
|
|
|
+ onClick={() => {
|
|
|
+ this.updateSatisfactionDegree(2)
|
|
|
+ }}>保存并上传</Button>
|
|
|
+ </div>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ </div>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
+
|
|
|
{/*软著显示 bpType: 0 正常 1专利 2软著 3审计 4双软 5高新 6商标*/}
|
|
|
{this.state.bpType === 2 ? <div className="clearfix">
|
|
|
<FormItem
|
|
@@ -1603,7 +1737,7 @@ class ProjectDetails extends Component {
|
|
|
</div>
|
|
|
</div>
|
|
|
</Spin>
|
|
|
- </Form> : null}
|
|
|
+ </Form>
|
|
|
</TabPane>
|
|
|
{!this.props.isZxs || (this.state.isHuiyuan && this.props.isZxs) ? (
|
|
|
<TabPane tab="订单详情" key="2">
|