|
@@ -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,
|
|
|
});
|
|
|
}}
|
|
|
>
|