|
@@ -22,6 +22,7 @@ import $ from "jquery/src/ajax";
|
|
|
import "../userMangagement.less";
|
|
|
import "../billing.less";
|
|
|
import moment from "moment";
|
|
|
+import { shenghePeo } from "@/tools.js";
|
|
|
import Picture from "@/manageCenter/publicComponent/picture";
|
|
|
import ResolutionDetail from "@/resolutionDetail";
|
|
|
import quxiao from "../../../../../image/quxiao.png";
|
|
@@ -2452,7 +2453,7 @@ const NewService = Form.create()(
|
|
|
if (key === "3") {
|
|
|
this.getChangeData();
|
|
|
}
|
|
|
- if (key === "2") {
|
|
|
+ if (key === "2" || key === "3") {
|
|
|
let url = window.location.href.substring(7);
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
@@ -3346,34 +3347,24 @@ const NewService = Form.create()(
|
|
|
// console.log(data.data);
|
|
|
if (data.data && data.data.length) {
|
|
|
let thisdata = data.data[data.data.length - 1];
|
|
|
- let obj = {
|
|
|
- id: thisdata.id,
|
|
|
- typeChange: thisdata.type,
|
|
|
- totalAmount: thisdata.totalAmount,
|
|
|
- settlementAmount: thisdata.settlementAmount,
|
|
|
- changeAmount: thisdata.changeAmount,
|
|
|
- remarksC: thisdata.remarks,
|
|
|
- startRemarks: thisdata.zxsRemarks,
|
|
|
- processState: thisdata.processState,
|
|
|
- status: thisdata.status,
|
|
|
- arrears: thisdata.arrears,
|
|
|
- createTimes: thisdata.createTimes,
|
|
|
- voucherUrl: thisdata.voucherUrl
|
|
|
+ thisdata.typeChange = thisdata.type;
|
|
|
+ thisdata.remarksC = thisdata.remarks;
|
|
|
+ thisdata.startRemarks = thisdata.zxsRemarks;
|
|
|
+ thisdata.voucherUrl = thisdata.voucherUrl
|
|
|
? splitUrl(
|
|
|
thisdata.voucherUrl,
|
|
|
",",
|
|
|
globalConfig.avatarHost + "/upload",
|
|
|
url
|
|
|
- )
|
|
|
- : [],
|
|
|
- };
|
|
|
+ )
|
|
|
+ : [];
|
|
|
this.proList(thisdata.id);
|
|
|
this.cuiList(thisdata.id);
|
|
|
this.logList(thisdata.id);
|
|
|
this.setState({
|
|
|
//判断是否有合同变更记录
|
|
|
isJilu: true,
|
|
|
- detailChange: obj,
|
|
|
+ detailChange: thisdata,
|
|
|
});
|
|
|
}
|
|
|
}.bind(this),
|
|
@@ -3946,6 +3937,47 @@ const NewService = Form.create()(
|
|
|
rotateDeg,
|
|
|
});
|
|
|
},
|
|
|
+ showConfirmChange(fn, record) {
|
|
|
+ confirm({
|
|
|
+ title: "确定取消本次变更吗?",
|
|
|
+ content: (
|
|
|
+ <span style={{ color: "red" }}>
|
|
|
+ 取消后本次变更将作废!!!
|
|
|
+ </span>
|
|
|
+ ),
|
|
|
+ onOk() {
|
|
|
+ fn();
|
|
|
+ },
|
|
|
+ onCancel() { }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ deleteChange() {
|
|
|
+ this.setState({
|
|
|
+ loading: true,
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ url: globalConfig.context + "/api/admin/orderChange/cancelOrderChange",
|
|
|
+ method: "post",
|
|
|
+ data: {
|
|
|
+ id: this.state.changeId,
|
|
|
+ status: this.state.status,
|
|
|
+ processState: this.state.processState,
|
|
|
+ orderNo: this.state.orderNo
|
|
|
+ },
|
|
|
+ }).done(
|
|
|
+ function (data) {
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ });
|
|
|
+ if (!data.error.length) {
|
|
|
+ message.success("取消成功!");
|
|
|
+ this.handleCancelclose()
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ },
|
|
|
render() {
|
|
|
const expandedRowRender = (e) => {
|
|
|
const data = e.list;
|
|
@@ -5450,6 +5482,30 @@ const NewService = Form.create()(
|
|
|
>
|
|
|
重置
|
|
|
</Button>
|
|
|
+ {this.state.status === 3 ? (
|
|
|
+ <Button
|
|
|
+ type="danger"
|
|
|
+ style={{
|
|
|
+ float: "right",
|
|
|
+ backgroundColor: "red",
|
|
|
+ color: "white",
|
|
|
+ position: "absolute",
|
|
|
+ right: 0,
|
|
|
+ height: 50,
|
|
|
+ borderRadius: 20,
|
|
|
+ zIndex: 100,
|
|
|
+ top: 0,
|
|
|
+ }}
|
|
|
+ onClick={(e) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ this.showConfirmChange(this.deleteChange);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 取消本次变更
|
|
|
+ </Button>
|
|
|
+ ) : (
|
|
|
+ ""
|
|
|
+ )}
|
|
|
{/* <Button type="danger" >取消本次变更</Button> */}
|
|
|
</FormItem>
|
|
|
</div>
|
|
@@ -5840,10 +5896,20 @@ const NewService = Form.create()(
|
|
|
label="当前进度"
|
|
|
>
|
|
|
<span>
|
|
|
- {getProcessStatusNew(
|
|
|
- this.state.detailChange.processState,
|
|
|
- this.state.detailChange.status
|
|
|
- )}
|
|
|
+ {/*当前是进度角色是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示*/}
|
|
|
+ {
|
|
|
+ this.state.detailChange.processState === 2 || this.state.detailChange.processState === 3
|
|
|
+ ? shenghePeo(
|
|
|
+ this.state.detailChange.processState === 2
|
|
|
+ ? this.state.detailChange.consultantExamine
|
|
|
+ : this.state.detailChange.managerExamine,
|
|
|
+ this.state.detailChange.processState
|
|
|
+ )
|
|
|
+ : getProcessStatusNew(
|
|
|
+ this.state.detailChange.processState,
|
|
|
+ this.state.detailChange.status
|
|
|
+ )
|
|
|
+ }
|
|
|
</span>
|
|
|
</FormItem>
|
|
|
{/* <FormItem
|
|
@@ -5986,6 +6052,30 @@ const NewService = Form.create()(
|
|
|
{/* src={this.state.previewImage || ""}*/}
|
|
|
{/* />*/}
|
|
|
{/*</Modal>*/}
|
|
|
+ {this.state.status === 3 ? (
|
|
|
+ <Button
|
|
|
+ type="danger"
|
|
|
+ style={{
|
|
|
+ float: "right",
|
|
|
+ backgroundColor: "red",
|
|
|
+ color: "white",
|
|
|
+ position: "absolute",
|
|
|
+ right: 0,
|
|
|
+ height: 50,
|
|
|
+ borderRadius: 20,
|
|
|
+ zIndex: 100,
|
|
|
+ top: 0,
|
|
|
+ }}
|
|
|
+ onClick={(e) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ this.showConfirmChange(this.deleteChange);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 取消本次变更
|
|
|
+ </Button>
|
|
|
+ ) : (
|
|
|
+ ""
|
|
|
+ )}
|
|
|
</div>
|
|
|
</FormItem>
|
|
|
</div>
|