|
@@ -1,6 +1,8 @@
|
|
import React, { Component } from "react";
|
|
import React, { Component } from "react";
|
|
-import { AutoComplete, Button, Form, Input, message, Modal, Radio, Select, Spin } from "antd";
|
|
|
|
|
|
+import { AutoComplete, Button, Form, Input, message, Modal, Select, Spin } from "antd";
|
|
import $ from "jquery";
|
|
import $ from "jquery";
|
|
|
|
+import ImgList from "../../common/imgList";
|
|
|
|
+import { splitUrl } from "../../tools";
|
|
|
|
|
|
const FormItem = Form.Item;
|
|
const FormItem = Form.Item;
|
|
|
|
|
|
@@ -9,6 +11,58 @@ const formItemLayout = {
|
|
wrapperCol: { span: 14 },
|
|
wrapperCol: { span: 14 },
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+const PicturesWall = React.createClass({
|
|
|
|
+ getInitialState() {
|
|
|
|
+ return {
|
|
|
|
+ previewVisible: false,
|
|
|
|
+ previewImage: "",
|
|
|
|
+ fileList: this.props.pictureUrl,
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ getDefaultProps() {
|
|
|
|
+ return {
|
|
|
|
+ changeClick: this.modifyChange,
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ handleCancel() {
|
|
|
|
+ this.setState({ previewVisible: false });
|
|
|
|
+ },
|
|
|
|
+ handlePreview(file) {
|
|
|
|
+ this.setState({
|
|
|
|
+ previewImage: file.url || file.thumbUrl,
|
|
|
|
+ previewVisible: true,
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ handleChange(info) {
|
|
|
|
+ let fileList = info.fileList;
|
|
|
|
+ this.setState({ fileList });
|
|
|
|
+ this.props.fileList(fileList);
|
|
|
|
+ },
|
|
|
|
+ componentWillReceiveProps(nextProps) {
|
|
|
|
+ this.state.fileList = nextProps.pictureUrl;
|
|
|
|
+ },
|
|
|
|
+ render() {
|
|
|
|
+ const { fileList } = this.state;
|
|
|
|
+ return (
|
|
|
|
+ <div style={{ display: "inline-block" }}>
|
|
|
|
+ <ImgList
|
|
|
|
+ domId={this.props.domId}
|
|
|
|
+ uploadConfig={{
|
|
|
|
+ action: globalConfig.context + "/api/admin/orderProject/uploadMemberFile",
|
|
|
|
+ data: { sign: "order_invoice_file" },
|
|
|
|
+ multiple: true,
|
|
|
|
+ listType: "picture-card",
|
|
|
|
+ }}
|
|
|
|
+ onChange={(infor) => {
|
|
|
|
+ this.handleChange(infor);
|
|
|
|
+ }}
|
|
|
|
+ fileList={fileList}
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+});
|
|
|
|
+
|
|
class ProjectOperationVip extends Component {
|
|
class ProjectOperationVip extends Component {
|
|
constructor(props) {
|
|
constructor(props) {
|
|
super(props);
|
|
super(props);
|
|
@@ -24,18 +78,17 @@ class ProjectOperationVip extends Component {
|
|
declarationBatch: '',
|
|
declarationBatch: '',
|
|
ifCertificationFee: '',
|
|
ifCertificationFee: '',
|
|
displayFees: "none",
|
|
displayFees: "none",
|
|
-
|
|
|
|
customerArr: [],
|
|
customerArr: [],
|
|
patentTypeList: [],
|
|
patentTypeList: [],
|
|
-
|
|
|
|
loading: false,
|
|
loading: false,
|
|
-
|
|
|
|
- patentTransfer: props.dataInfor ? props.dataInfor.patentTransfer : 0 //收否为专利转让 0 否 1 是
|
|
|
|
|
|
+ patentTransfer: props.dataInfor ? props.dataInfor.patentTransfer : 0, //收否为专利转让 0 否 1 是
|
|
|
|
+ orgCodeUrl: [],
|
|
}
|
|
}
|
|
this.onSubmit = this.onSubmit.bind(this);
|
|
this.onSubmit = this.onSubmit.bind(this);
|
|
this.httpChange = this.httpChange.bind(this);
|
|
this.httpChange = this.httpChange.bind(this);
|
|
this.selectAuto = this.selectAuto.bind(this);
|
|
this.selectAuto = this.selectAuto.bind(this);
|
|
this.setValue = this.setValue.bind(this);
|
|
this.setValue = this.setValue.bind(this);
|
|
|
|
+ this.getOrgCodeUrl = this.getOrgCodeUrl.bind(this);
|
|
}
|
|
}
|
|
|
|
|
|
componentDidMount() {
|
|
componentDidMount() {
|
|
@@ -52,10 +105,31 @@ class ProjectOperationVip extends Component {
|
|
commodityQuantity: dataInfor.commodityQuantity, // 数量
|
|
commodityQuantity: dataInfor.commodityQuantity, // 数量
|
|
memberType: dataInfor.memberType.toString(),// 付款情况
|
|
memberType: dataInfor.memberType.toString(),// 付款情况
|
|
taskComment: dataInfor.taskComment, // 备注
|
|
taskComment: dataInfor.taskComment, // 备注
|
|
|
|
+ orgCodeUrl: dataInfor.pictureUrl ? splitUrl(dataInfor.pictureUrl, ",", globalConfig.avatarHost + "/upload") : [],// 附件
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+ //
|
|
|
|
+ getOrgCodeUrl(e) {
|
|
|
|
+ this.setState({ orgCodeUrl: e });
|
|
|
|
+ }
|
|
// 新建会员项目
|
|
// 新建会员项目
|
|
onSubmit() {
|
|
onSubmit() {
|
|
|
|
+
|
|
|
|
+ let pictureUrl = [];
|
|
|
|
+ if (this.state.orgCodeUrl.length) {
|
|
|
|
+ let picArr = [];
|
|
|
|
+ this.state.orgCodeUrl.map(function (item) {
|
|
|
|
+ if (
|
|
|
|
+ item.response &&
|
|
|
|
+ item.response.data &&
|
|
|
|
+ item.response.data.length
|
|
|
|
+ ) {
|
|
|
|
+ picArr.push(item.response.data);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ pictureUrl = picArr.join(",");
|
|
|
|
+ }
|
|
|
|
+
|
|
if (this.state.commodityId === undefined || !this.state.commodityId) {
|
|
if (this.state.commodityId === undefined || !this.state.commodityId) {
|
|
message.warning("服务名称不匹配!");
|
|
message.warning("服务名称不匹配!");
|
|
return
|
|
return
|
|
@@ -72,17 +146,24 @@ class ProjectOperationVip extends Component {
|
|
message.warning("请选择付款情况!");
|
|
message.warning("请选择付款情况!");
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ if (this.state.memberType == "1" || this.state.memberType == "2") {
|
|
|
|
+ if (typeof pictureUrl !== "string") {
|
|
|
|
+ message.warning("请上传附件!");
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.setState({
|
|
this.setState({
|
|
loading: true,
|
|
loading: true,
|
|
});
|
|
});
|
|
let infor = {
|
|
let infor = {
|
|
- commodityId: this.state.commodityId, //项目编号
|
|
|
|
orderNo: this.props.orderNo, //订单编号
|
|
orderNo: this.props.orderNo, //订单编号
|
|
|
|
+ commodityId: this.state.commodityId, //项目编号
|
|
commodityName: this.state.commodityName, //项目名称
|
|
commodityName: this.state.commodityName, //项目名称
|
|
commodityQuantity: this.state.commodityQuantity, //商品数量
|
|
commodityQuantity: this.state.commodityQuantity, //商品数量
|
|
commodityPrice: 0, //签单总价
|
|
commodityPrice: 0, //签单总价
|
|
taskComment: this.state.taskComment, //服务说明
|
|
taskComment: this.state.taskComment, //服务说明
|
|
memberType: this.state.memberType,//会员付款状态
|
|
memberType: this.state.memberType,//会员付款状态
|
|
|
|
+ pictureUrl: pictureUrl.length ? pictureUrl : "",//附件
|
|
}
|
|
}
|
|
$.ajax({
|
|
$.ajax({
|
|
method: "POST",
|
|
method: "POST",
|
|
@@ -105,7 +186,6 @@ class ProjectOperationVip extends Component {
|
|
跟进查看会员项目的审核状态,审核通过,即表示添加会员项目完成!!!
|
|
跟进查看会员项目的审核状态,审核通过,即表示添加会员项目完成!!!
|
|
</div>),
|
|
</div>),
|
|
});
|
|
});
|
|
- // message.success("保存成功!");
|
|
|
|
this.props.onCancel();
|
|
this.props.onCancel();
|
|
} else {
|
|
} else {
|
|
message.warning(data.error[0].message);
|
|
message.warning(data.error[0].message);
|
|
@@ -115,6 +195,22 @@ class ProjectOperationVip extends Component {
|
|
}
|
|
}
|
|
// 修改会员项目
|
|
// 修改会员项目
|
|
onChange() {
|
|
onChange() {
|
|
|
|
+
|
|
|
|
+ let pictureUrl = [];
|
|
|
|
+ if (this.state.orgCodeUrl.length) {
|
|
|
|
+ let picArr = [];
|
|
|
|
+ this.state.orgCodeUrl.map(function (item) {
|
|
|
|
+ if (
|
|
|
|
+ item.response &&
|
|
|
|
+ item.response.data &&
|
|
|
|
+ item.response.data.length
|
|
|
|
+ ) {
|
|
|
|
+ picArr.push(item.response.data);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ pictureUrl = picArr.join(",");
|
|
|
|
+ }
|
|
|
|
+
|
|
if (this.state.commodityId === undefined || !this.state.commodityId) {
|
|
if (this.state.commodityId === undefined || !this.state.commodityId) {
|
|
message.warning("服务名称不匹配!");
|
|
message.warning("服务名称不匹配!");
|
|
return
|
|
return
|
|
@@ -131,6 +227,12 @@ class ProjectOperationVip extends Component {
|
|
message.warning("请选择付款情况!");
|
|
message.warning("请选择付款情况!");
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ if (this.state.memberType == "1" || this.state.memberType == "2") {
|
|
|
|
+ if (typeof pictureUrl !== "string") {
|
|
|
|
+ message.warning("请上传附件!");
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.setState({
|
|
this.setState({
|
|
loading: true,
|
|
loading: true,
|
|
});
|
|
});
|
|
@@ -142,10 +244,12 @@ class ProjectOperationVip extends Component {
|
|
data: {
|
|
data: {
|
|
id: this.state.fid, //任务ID
|
|
id: this.state.fid, //任务ID
|
|
commodityId: this.state.commodityId, //项目ID
|
|
commodityId: this.state.commodityId, //项目ID
|
|
|
|
+ commodityName: this.state.commodityName, //项目名称
|
|
orderNo: this.props.orderNo, //订单编号
|
|
orderNo: this.props.orderNo, //订单编号
|
|
commodityQuantity: this.state.commodityQuantity, //数量
|
|
commodityQuantity: this.state.commodityQuantity, //数量
|
|
taskComment: this.state.taskComment, //备注
|
|
taskComment: this.state.taskComment, //备注
|
|
memberType: this.state.memberType,//会员付款状态
|
|
memberType: this.state.memberType,//会员付款状态
|
|
|
|
+ pictureUrl: pictureUrl.length ? pictureUrl : "",//附件
|
|
},
|
|
},
|
|
}).done(
|
|
}).done(
|
|
function (data) {
|
|
function (data) {
|
|
@@ -273,7 +377,16 @@ class ProjectOperationVip extends Component {
|
|
/>}
|
|
/>}
|
|
<span className="mandatory">*</span>
|
|
<span className="mandatory">*</span>
|
|
</FormItem>
|
|
</FormItem>
|
|
- <div style={{ marginTop: "33px", color: "red", textAlign: "right", position: "relative", top: "-8", left: "0" }}>如会员项目,服务一年,请填写1,服务二年,请填写2,依次类推</div>
|
|
|
|
|
|
+ <div
|
|
|
|
+ style={{
|
|
|
|
+ marginTop: "33px",
|
|
|
|
+ color: "red",
|
|
|
|
+ textAlign: "right",
|
|
|
|
+ position: "relative",
|
|
|
|
+ top: "-8",
|
|
|
|
+ left: "0"
|
|
|
|
+ }}
|
|
|
|
+ >如会员项目,服务一年,请填写1,服务二年,请填写2,依次类推</div>
|
|
<FormItem
|
|
<FormItem
|
|
className="half-item"
|
|
className="half-item"
|
|
{...formItemLayout}
|
|
{...formItemLayout}
|
|
@@ -305,6 +418,27 @@ class ProjectOperationVip extends Component {
|
|
</Select>}
|
|
</Select>}
|
|
<span className="mandatory">*</span>
|
|
<span className="mandatory">*</span>
|
|
</FormItem>
|
|
</FormItem>
|
|
|
|
+ {
|
|
|
|
+ (this.state.memberType == "1" || this.state.memberType == "2") &&
|
|
|
|
+ <div className="clearfix">
|
|
|
|
+ <FormItem
|
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
|
+ wrapperCol={{ span: 16 }}
|
|
|
|
+ label="上传附件"
|
|
|
|
+ >
|
|
|
|
+ <PicturesWall
|
|
|
|
+ domId={'vip'}
|
|
|
|
+ fileList={this.getOrgCodeUrl}
|
|
|
|
+ pictureUrl={this.state.orgCodeUrl}
|
|
|
|
+ />
|
|
|
|
+ <span className="mandatory">*</span>
|
|
|
|
+ </FormItem>
|
|
|
|
+ <div style={{ color: "red", marginLeft: 144, marginBottom: 15 }}>
|
|
|
|
+ 特批需上传附件图,请上传客户同意我方继续服务并安排给我司付款的聊天记录截图,
|
|
|
|
+ <p>若没有客户同意继续服务及会安排付款的截图,特派流程将无法走下去,以免造成派单耽搁</p>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ }
|
|
<div className="clearfix">
|
|
<div className="clearfix">
|
|
<FormItem
|
|
<FormItem
|
|
labelCol={{ span: 4 }}
|
|
labelCol={{ span: 4 }}
|