|
|
@@ -79,6 +79,9 @@ import FlowChart from '../../../common/flowchart'; // 流程图
|
|
|
import Gxczx from '../../../common/orderDetail/gxczx' // 高新纯咨询合同说明详情
|
|
|
import Property from '../../../common/orderDetail/property' // 知识产权情况
|
|
|
import ApproveTypeTooltip from "../../../common/ApproveTypeTooltip/index.js";
|
|
|
+// 订单保密&违约说明
|
|
|
+import ConfidenBreach from "./confidenBreach.jsx";
|
|
|
+import ConfidenBreachView from "./confidenBreachView.jsx";
|
|
|
|
|
|
|
|
|
const Option = AutoComplete.Option;
|
|
|
@@ -188,6 +191,10 @@ const NewService = Form.create()(
|
|
|
},
|
|
|
getInitialState() {
|
|
|
return {
|
|
|
+ // 保密&违约说明
|
|
|
+ confidenBreachData: {},
|
|
|
+ confidenBreachChangeData: {},
|
|
|
+ confidenBreachDtData: {},
|
|
|
marks: "",
|
|
|
score: "",
|
|
|
type: "",
|
|
|
@@ -2192,6 +2199,89 @@ const NewService = Form.create()(
|
|
|
resVisible: false,
|
|
|
});
|
|
|
},
|
|
|
+ validConfiderBreachForm(data) {
|
|
|
+ let flag = true;
|
|
|
+ let msg = '';
|
|
|
+ data.ndaUrl = data.ndaUrl || []
|
|
|
+ data.breachClauseUrl = data.breachClauseUrl || []
|
|
|
+ if (data.nda === undefined || data.nda === null || data.nda === '') {
|
|
|
+ flag = false;
|
|
|
+ msg = '请选择是否签订保密协议'
|
|
|
+ } else if (data.nda == '1' && !data.ndaUrl.length) {
|
|
|
+ flag = false;
|
|
|
+ msg = '请上传保密协议图片'
|
|
|
+ } else if (data.breachClause1 === undefined || data.breachClause1 === null || data.breachClause1 === '') {
|
|
|
+ flag = false;
|
|
|
+ msg = '请选择是否有违约条款'
|
|
|
+ } else if (data.breachClause1 != '0' && !data.breachClause2) {
|
|
|
+ flag = false;
|
|
|
+ msg = '请选择与技术有关/无关'
|
|
|
+ } else if (data.breachClause1 != '0' && !data.breachClauseUrl.length) {
|
|
|
+ flag = false;
|
|
|
+ msg = '请上传签约条款图片'
|
|
|
+ }
|
|
|
+
|
|
|
+ return { flag, msg }
|
|
|
+ },
|
|
|
+ // 获取保密&违约说明数据
|
|
|
+ getConfidenBreachFormData(data) {
|
|
|
+ const _data = Object.assign({}, data);
|
|
|
+ _data.ndaUrl = _data.ndaUrl || [];
|
|
|
+ _data.breachClauseUrl = _data.breachClauseUrl || [];
|
|
|
+ if (_data.breachClause1 == '0') {
|
|
|
+ _data.breachClause = '0'
|
|
|
+ } else if (_data.breachClause1 == '1' && _data.breachClause2 == '1') {
|
|
|
+ // 有限责任违约条款、与技术服务有关
|
|
|
+ _data.breachClause = '1'
|
|
|
+ } else if (_data.breachClause1 == '1' && _data.breachClause2 == '0') {
|
|
|
+ // 有限责任违约条款、与技术服务无关
|
|
|
+ _data.breachClause = '2'
|
|
|
+ } else if (_data.breachClause1 == '2' && _data.breachClause2 == '1') {
|
|
|
+ // 无限责任违约条款、与技术服务有关
|
|
|
+ _data.breachClause = '3'
|
|
|
+ } else if (_data.breachClause1 == '2' && _data.breachClause2 == '0') {
|
|
|
+ // 无限责任违约条款、与技术服务无关
|
|
|
+ _data.breachClause = '4'
|
|
|
+ }
|
|
|
+ _data.ndaUrl = _data.ndaUrl.map(item => item.response.data).join(',')
|
|
|
+ _data.breachClauseUrl = _data.breachClauseUrl.map(item => item.response.data).join(',')
|
|
|
+ delete _data.breachClause1
|
|
|
+ delete _data.breachClause2
|
|
|
+ return _data;
|
|
|
+ },
|
|
|
+ setConfidenBreachFormData(data) {
|
|
|
+ let breachClause1, breachClause2 = ''
|
|
|
+ if (data.breachClause == 0) {
|
|
|
+ breachClause1 = '0'
|
|
|
+ } else if (data.breachClause == 1) {
|
|
|
+ breachClause1 = '1'
|
|
|
+ breachClause2 = '1'
|
|
|
+ } else if (data.breachClause == 2) {
|
|
|
+ breachClause1 = '1'
|
|
|
+ breachClause2 = '0'
|
|
|
+ } else if (data.breachClause == 3) {
|
|
|
+ breachClause1 = '2'
|
|
|
+ breachClause2 = '1'
|
|
|
+ } else if (data.breachClause == 4) {
|
|
|
+ breachClause1 = '2'
|
|
|
+ breachClause2 = '0'
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ nda: data.nda,
|
|
|
+ ndaUrl: data.ndaUrl ? splitUrl(
|
|
|
+ data.ndaUrl,
|
|
|
+ ",",
|
|
|
+ globalConfig.avatarHost + "/upload"
|
|
|
+ ) : [],
|
|
|
+ breachClause1,
|
|
|
+ breachClause2,
|
|
|
+ breachClauseUrl: data.breachClauseUrl ? splitUrl(
|
|
|
+ data.breachClauseUrl,
|
|
|
+ ",",
|
|
|
+ globalConfig.avatarHost + "/upload"
|
|
|
+ ) : []
|
|
|
+ }
|
|
|
+ },
|
|
|
//新建订单、编辑订单保存
|
|
|
handleSubmit(e) {
|
|
|
e.preventDefault();
|
|
|
@@ -2342,6 +2432,15 @@ const NewService = Form.create()(
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if (this.props.userDetaile) {
|
|
|
+ let breachValid = this.validConfiderBreachForm(this.state.confidenBreachData)
|
|
|
+ if (!breachValid.flag) {
|
|
|
+ message.warning(breachValid.msg);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
this.setState({
|
|
|
loading: true,
|
|
|
});
|
|
|
@@ -2368,6 +2467,8 @@ const NewService = Form.create()(
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ let confidenBreachData = this.getConfidenBreachFormData(this.state.confidenBreachData)
|
|
|
+
|
|
|
$.ajax({
|
|
|
method: "POST",
|
|
|
dataType: "json",
|
|
|
@@ -2402,6 +2503,10 @@ const NewService = Form.create()(
|
|
|
|
|
|
type: this.state.approvaType.sort(compare).toString(), // 特批类型
|
|
|
typeExplain: this.state.approvaType.indexOf(0) === -1 ? "" : this.state.typeExplain, // 其他备注
|
|
|
+ nda: confidenBreachData.nda,
|
|
|
+ ndaUrl: confidenBreachData.ndaUrl,
|
|
|
+ breachClause: confidenBreachData.breachClause,
|
|
|
+ breachClauseUrl: confidenBreachData.breachClauseUrl
|
|
|
},
|
|
|
}).done(
|
|
|
function (data) {
|
|
|
@@ -2606,6 +2711,26 @@ const NewService = Form.create()(
|
|
|
},
|
|
|
channelName: thisData.salesType == "3" ? thisData.other : "",//销售类型为渠道的时候给编辑出的渠道名称赋值
|
|
|
|
|
|
+ confidenBreachData: this.setConfidenBreachFormData(thisData),
|
|
|
+ confidenBreachChangeData: this.setConfidenBreachFormData(thisData),
|
|
|
+ confidenBreachDtData: {
|
|
|
+ nda: thisData.nda,
|
|
|
+ ndaUrl: thisData.ndaUrl
|
|
|
+ ? splitUrl(
|
|
|
+ thisData.ndaUrl,
|
|
|
+ ",",
|
|
|
+ globalConfig.avatarHost + "/upload"
|
|
|
+ )
|
|
|
+ : [],
|
|
|
+ breachClause: thisData.breachClause,
|
|
|
+ breachClauseUrl: thisData.breachClauseUrl
|
|
|
+ ? splitUrl(
|
|
|
+ thisData.breachClauseUrl,
|
|
|
+ ",",
|
|
|
+ globalConfig.avatarHost + "/upload"
|
|
|
+ )
|
|
|
+ : [],
|
|
|
+ },
|
|
|
});
|
|
|
// 判断状态
|
|
|
if (this.state.processStatus === 0) {
|
|
|
@@ -3939,6 +4064,39 @@ const NewService = Form.create()(
|
|
|
message.warning("请上传新合同扫描件!");
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ const paramsData = {
|
|
|
+ orderNo: this.state.orderNo, //订单编号
|
|
|
+ processState: 0,
|
|
|
+ status: 0,
|
|
|
+ startRemarks: this.state.startRemarks,
|
|
|
+ remarks: this.state.remarksC,
|
|
|
+ voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
|
|
|
+ totalAmount: this.state.totalAmount,
|
|
|
+ firstAmount: this.state.firstAmount,
|
|
|
+ settlementAmount: this.state.settlementAmount,
|
|
|
+ changeAmount: this.state.changeAmount,
|
|
|
+ applicant: this.state.salesmanName,
|
|
|
+ depName: this.state.depName,
|
|
|
+ type: this.state.typeChange,
|
|
|
+ contractPictureUrl: this.state.isNew
|
|
|
+ ? newContractUrl : undefined,//合同替换件
|
|
|
+ }
|
|
|
+ if (this.state.typeChange == 7) {
|
|
|
+ let breachValid = this.validConfiderBreachForm(this.state.confidenBreachChangeData)
|
|
|
+ if (!breachValid.flag) {
|
|
|
+ message.warning(breachValid.msg);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ let confidenBreachData = this.getConfidenBreachFormData(this.state.confidenBreachChangeData)
|
|
|
+
|
|
|
+ paramsData.nda = confidenBreachData.nda
|
|
|
+ paramsData.ndaUrl = confidenBreachData.ndaUrl
|
|
|
+ paramsData.breachClause = confidenBreachData.breachClause
|
|
|
+ paramsData.breachClauseUrl = confidenBreachData.breachClauseUrl
|
|
|
+ }
|
|
|
+
|
|
|
this.setState({
|
|
|
loading: true,
|
|
|
});
|
|
|
@@ -3948,23 +4106,7 @@ const NewService = Form.create()(
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
|
|
|
- data: {
|
|
|
- orderNo: this.state.orderNo, //订单编号
|
|
|
- processState: 0,
|
|
|
- status: 0,
|
|
|
- startRemarks: this.state.startRemarks,
|
|
|
- remarks: this.state.remarksC,
|
|
|
- voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
|
|
|
- totalAmount: this.state.totalAmount,
|
|
|
- firstAmount: this.state.firstAmount,
|
|
|
- settlementAmount: this.state.settlementAmount,
|
|
|
- changeAmount: this.state.changeAmount,
|
|
|
- applicant: this.state.salesmanName,
|
|
|
- depName: this.state.depName,
|
|
|
- type: this.state.typeChange,
|
|
|
- contractPictureUrl: this.state.isNew
|
|
|
- ? newContractUrl : undefined,//合同替换件
|
|
|
- },
|
|
|
+ data: paramsData,
|
|
|
}).done(
|
|
|
function (data) {
|
|
|
this.setState({
|
|
|
@@ -6779,7 +6921,6 @@ const NewService = Form.create()(
|
|
|
{getApprovedType(this.state.approvaType, this.state.typeExplain, 1)}
|
|
|
</span>
|
|
|
</FormItem>
|
|
|
- { this.state.approval }
|
|
|
{ this.state.approval > 0 && <div className="clearfix">
|
|
|
<FormItem
|
|
|
labelCol={{ span: 5 }}
|
|
|
@@ -7089,6 +7230,17 @@ const NewService = Form.create()(
|
|
|
</Button>
|
|
|
</FormItem>
|
|
|
|
|
|
+ {/* 违约&保密说明 */}
|
|
|
+ <ConfidenBreach
|
|
|
+ orderNo={this.state.orderNo}
|
|
|
+ data={this.state.confidenBreachData}
|
|
|
+ onChange={(value, updateKey) => {
|
|
|
+ const { confidenBreachData } = this.state;
|
|
|
+ confidenBreachData[updateKey] = value;
|
|
|
+ this.setState({ confidenBreachData })
|
|
|
+ }}
|
|
|
+ />
|
|
|
+
|
|
|
<Gxczx
|
|
|
isShow={this.state.isShow}
|
|
|
isCreat={true}
|
|
|
@@ -7192,6 +7344,7 @@ const NewService = Form.create()(
|
|
|
)}
|
|
|
</div>
|
|
|
</FormItem>
|
|
|
+
|
|
|
</div>
|
|
|
)}
|
|
|
</div>
|
|
|
@@ -7278,20 +7431,26 @@ const NewService = Form.create()(
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
) : (
|
|
|
- <FormItem
|
|
|
- labelCol={{ span: 4 }}
|
|
|
- wrapperCol={{ span: 16 }}
|
|
|
- label="订单留言"
|
|
|
- >
|
|
|
- <p
|
|
|
- style={{ width: 500, wordWrap: "break-word" }}
|
|
|
+ <div>
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
+ wrapperCol={{ span: 16 }}
|
|
|
+ label="订单留言"
|
|
|
>
|
|
|
- {this.state.orderRemarks}
|
|
|
- </p>
|
|
|
- </FormItem>
|
|
|
+ <p
|
|
|
+ style={{ width: 500, wordWrap: "break-word" }}
|
|
|
+ >
|
|
|
+ {this.state.orderRemarks}
|
|
|
+ </p>
|
|
|
+
|
|
|
+ </FormItem>
|
|
|
+ <ConfidenBreachView data={this.state.confidenBreachDtData} />
|
|
|
+ </div>
|
|
|
)}
|
|
|
</div>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
<div className="clearfix">
|
|
|
<FormItem
|
|
|
className="half-item"
|
|
|
@@ -8576,6 +8735,20 @@ const NewService = Form.create()(
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
}
|
|
|
+ {/* 违约&保密说明 */}
|
|
|
+ { this.state.typeChange == 7 ? (
|
|
|
+ <ConfidenBreach
|
|
|
+ orderNo={this.state.orderNo}
|
|
|
+ data={this.state.confidenBreachChangeData}
|
|
|
+ onChange={(value, updateKey) => {
|
|
|
+ const { confidenBreachChangeData } = this.state;
|
|
|
+ confidenBreachChangeData[updateKey] = value;
|
|
|
+ this.setState({ confidenBreachChangeData })
|
|
|
+ }}
|
|
|
+ labelCol={4}
|
|
|
+ wrapperCol={18}
|
|
|
+ />
|
|
|
+ ) : null }
|
|
|
<div className="clearfix">
|
|
|
<Button
|
|
|
type="primary"
|
|
|
@@ -8923,6 +9096,11 @@ const NewService = Form.create()(
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
}
|
|
|
+
|
|
|
+ { this.state.detailChange.typeChange == 7 ? (
|
|
|
+ <ConfidenBreachView data={this.state.detailChange} />
|
|
|
+ ) : null }
|
|
|
+
|
|
|
<ul
|
|
|
style={{
|
|
|
width: "868px",
|