|
@@ -287,6 +287,7 @@ const NewService = Form.create()(
|
|
|
orgCodeUrl: [],
|
|
|
voucherUrl: [],
|
|
|
replenishUrl: [],
|
|
|
+ contentUrl:[],
|
|
|
customerArr: [],
|
|
|
declarationBatch: 1, //申报批次 默认第一批
|
|
|
// 禁用变更类型转换
|
|
@@ -1819,6 +1820,29 @@ const NewService = Form.create()(
|
|
|
});
|
|
|
theReplenishUrl = picArr.join(",");
|
|
|
}
|
|
|
+ // 服务内容上传图片
|
|
|
+ let contentUrl = [];
|
|
|
+ console.log(this.props.userDetaile);
|
|
|
+ if(this.props.userDetaile) {
|
|
|
+ if (this.state.contentUrl.length ) {
|
|
|
+ let picArr = [];
|
|
|
+ this.state.contentUrl.map(function (item) {
|
|
|
+ if (
|
|
|
+ item.response &&
|
|
|
+ item.response.data &&
|
|
|
+ item.response.data.length
|
|
|
+ ) {
|
|
|
+ picArr.push(item.response.data);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ contentUrl = picArr.join(",");
|
|
|
+ }else{
|
|
|
+ message.info("请上传服务内容图片")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //
|
|
|
if (this.props.userDetaile) {
|
|
|
if (isNaN(parseInt(this.state.totalAmount))) {
|
|
|
message.warning("签单金额不能为空");
|
|
@@ -1908,6 +1932,7 @@ const NewService = Form.create()(
|
|
|
orderRemarks: this.state.orderRemarks, //订单备注
|
|
|
contractPictureUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
|
|
|
agreementUrl: theReplenishUrl.length ? theReplenishUrl : "",
|
|
|
+ serviceContent:contentUrl.length ? contentUrl : "",
|
|
|
orderDep: this.state.organizationSearch,
|
|
|
},
|
|
|
}).done(
|
|
@@ -2030,6 +2055,13 @@ const NewService = Form.create()(
|
|
|
globalConfig.avatarHost + "/upload"
|
|
|
)
|
|
|
: [], //图片地址
|
|
|
+ contentUrl:thisData.serviceContent
|
|
|
+ ? splitUrl(
|
|
|
+ thisData.serviceContent,
|
|
|
+ ",",
|
|
|
+ globalConfig.avatarHost + "/upload"
|
|
|
+ )
|
|
|
+ : [], //图片地址
|
|
|
signDate: thisData.signDate, //签单时间
|
|
|
userName: thisData.userName, //客户名称
|
|
|
salesmanName: thisData.salesmanName, //营销员名称
|
|
@@ -2807,6 +2839,9 @@ const NewService = Form.create()(
|
|
|
getReplenishUrl(e) {
|
|
|
this.setState({ replenishUrl: e });
|
|
|
},
|
|
|
+ getContentUrl(e) {
|
|
|
+ this.setState({ contentUrl: e });
|
|
|
+ },
|
|
|
getVoucherUrl(e) {
|
|
|
this.setState({ voucherUrl: e });
|
|
|
},
|
|
@@ -3955,6 +3990,44 @@ const NewService = Form.create()(
|
|
|
rotateDeg,
|
|
|
});
|
|
|
},
|
|
|
+ downImgCont() {
|
|
|
+ let num = 0;
|
|
|
+ for (let i = 0; i < this.state.contentUrl.length; i++) {
|
|
|
+ if (this.state.contentUrl[i].url == this.state.previewImage) {
|
|
|
+ num = i;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (num == this.state.replenishUrl.length - 1) {
|
|
|
+ return message.warning("已经是最后一张了哦");
|
|
|
+ }
|
|
|
+ this.state.previewImage = this.state.contentUrl[num + 1].url;
|
|
|
+ this.setState({
|
|
|
+ previewImage: this.state.previewImage,
|
|
|
+ rotateDeg: 0,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ upImgCont() {
|
|
|
+ let num = 0;
|
|
|
+ for (let i = 0; i < this.state.contentUrl.length; i++) {
|
|
|
+ if (this.state.contentUrl[i].url == this.state.previewImage) {
|
|
|
+ num = i;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (num == 0) {
|
|
|
+ return message.warning("已经是第一张了哦");
|
|
|
+ }
|
|
|
+ this.state.previewImage = this.state.contentUrl[num - 1].url;
|
|
|
+ this.setState({
|
|
|
+ previewImage: this.state.previewImage,
|
|
|
+ rotateDeg: 0,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ rotateCont() {
|
|
|
+ let rotateDeg = this.state.rotateDeg + 90;
|
|
|
+ this.setState({
|
|
|
+ rotateDeg,
|
|
|
+ });
|
|
|
+ },
|
|
|
showConfirmChange(fn, record) {
|
|
|
confirm({
|
|
|
title: "确定取消本次变更吗?",
|
|
@@ -5408,6 +5481,81 @@ const NewService = Form.create()(
|
|
|
</div>
|
|
|
)}
|
|
|
</div>
|
|
|
+ {/* 服务内容 */}
|
|
|
+ <div class="clearfix" style={{display:"flex",margin:" 0 0 10px 80px"}}>
|
|
|
+ <div style={{marginRight:"6px"}}>
|
|
|
+ <div style={{display:"flex"}}><span style={{color:'red'}}>*</span><span style={{color:"#333"}}>服务内容:</span></div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ {this.state.processStatus == 0 ? <div> <PicturesWall
|
|
|
+ domId={"addServiceContent"}
|
|
|
+ fileList={this.getContentUrl}
|
|
|
+ pictureUrl={this.state.contentUrl}
|
|
|
+ url="/api/admin/order/uploadOrderImg"
|
|
|
+ sign=""
|
|
|
+ />
|
|
|
+ <p> <span style={{color:"red",display:"inline-block"}}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)</span>图片建议:要清晰。</p></div> : this.state.contentUrl.length>0 ? <div><ImgList
|
|
|
+ domId={"addService13"}
|
|
|
+ fileList={this.state.contentUrl}
|
|
|
+ ItemWidth={"96px"}
|
|
|
+ />
|
|
|
+ <Modal
|
|
|
+ maskClosable={false}
|
|
|
+ footer={null}
|
|
|
+ width={"50%"}
|
|
|
+ visible={this.state.previewVisibleCont}
|
|
|
+ onCancel={() => {
|
|
|
+ this.setState({
|
|
|
+ previewVisibleCont: false,
|
|
|
+ rotateDeg: 0,
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ alt=""
|
|
|
+ style={{
|
|
|
+ width: "100%",
|
|
|
+ transform: `rotate(${this.state.rotateDeg}deg)`,
|
|
|
+ }}
|
|
|
+ src={this.state.previewImage || ""}
|
|
|
+ />
|
|
|
+ <Button
|
|
|
+ onClick={this.rotateCont}
|
|
|
+ style={{
|
|
|
+ position: "relative",
|
|
|
+ left: "50%",
|
|
|
+ transform: "translateX(-50%)",
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 旋转
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ onClick={this.upImgCont}
|
|
|
+ style={{
|
|
|
+ position: "absolute",
|
|
|
+ left: -81,
|
|
|
+ top: "50%",
|
|
|
+ transform: "translateY(-50%)",
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 上一张
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ onClick={this.downImgCont}
|
|
|
+ style={{
|
|
|
+ position: "absolute",
|
|
|
+ right: -81,
|
|
|
+ top: "50%",
|
|
|
+ transform: "translateY(-50%)",
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 下一张
|
|
|
+ </Button>
|
|
|
+ </Modal>
|
|
|
+ </div>:"暂无附件!"}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ {/* 服务内容结束 */}
|
|
|
<div className="clearfix">
|
|
|
{this.state.processStatus == 0 ? (
|
|
|
<div className="clearfix">
|
|
@@ -6192,7 +6340,6 @@ const NewService = Form.create()(
|
|
|
});
|
|
|
}
|
|
|
}}
|
|
|
- value={this.state.typeChange}
|
|
|
>
|
|
|
<Option value={0}>退单退款</Option>
|
|
|
<Option value={1}>项目及金额变更</Option>
|