index.jsx 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864
  1. import React, { Component } from "react";
  2. import { View, Image, Button, Text } from "@tarojs/components";
  3. import Taro, { getCurrentInstance } from "@tarojs/taro";
  4. import {
  5. AtButton,
  6. AtCalendar,
  7. AtIcon,
  8. AtTextarea,
  9. AtModal,
  10. AtModalContent,
  11. AtModalAction,
  12. } from "taro-ui";
  13. import Skeleton from "taro-skeleton";
  14. import InquiryModal from "../../components/common/inquiryModal";
  15. import Modify from "./modify";
  16. import {
  17. examinePublicRelease,
  18. getReleasetDails,
  19. updatePublicRelease,
  20. addAssistant,
  21. deleteAssistant,
  22. } from "../../utils/servers/servers";
  23. import { resourceAddress } from "../../utils/config";
  24. import "./index.less";
  25. import "taro-ui/dist/style/components/icon.scss";
  26. import "taro-ui/dist/style/components/textarea.scss";
  27. import "taro-ui/dist/style/components/modal.scss";
  28. import "taro-ui/dist/style/components/timeline.scss";
  29. import "taro-ui/dist/style/components/icon.scss";
  30. import "taro-ui/dist/style/components/calendar.scss";
  31. import Rejected from "../../image/rejected.png";
  32. import Passed from "../../image/passed.png";
  33. import Reviewed from "../../image/reviewed.png";
  34. import Wx from "../../image/wx.png";
  35. import Revoke from "../../image/revoke.png";
  36. import ImagePicker from "../../components/common/imagePicker";
  37. import MessageNoticebar from "../../components/common/messageNoticebar";
  38. import { getClockState, unique } from "../../utils/tools";
  39. import HistoricalClock from "../../components/historicalClock";
  40. import UserQuery from "../../components/common/userquery"; //选择协单人弹窗
  41. class EgressDetails extends Component {
  42. $instance = getCurrentInstance();
  43. constructor(props) {
  44. super(props);
  45. this.state = {
  46. dtails: {},
  47. opinion: "",
  48. publicReleaseLog: [],
  49. isDetailedOpened: false,
  50. isModifyOpened: false,
  51. reasonsInvalidation: "",
  52. isVerify: false, //判断是否在审核中修改
  53. selectArrderLocation: {},
  54. current: "",
  55. isNo: true,
  56. foc: false,
  57. coorderList: [],
  58. cList: [],
  59. popup: false,
  60. selid: "",
  61. };
  62. this.examinePublicRelease = this.examinePublicRelease.bind(this);
  63. this.getReleasetDails = this.getReleasetDails.bind(this);
  64. this.oidApplication = this.oidApplication.bind(this);
  65. }
  66. componentDidMount() {
  67. this.setState({
  68. current: this.$instance.router.params.status || "",
  69. });
  70. this.getReleasetDails();
  71. }
  72. componentDidShow() {
  73. //获取地区选定数据
  74. const chooseLocation = requirePlugin("chooseLocation");
  75. const location = chooseLocation.getLocation();
  76. if (location) {
  77. this.setState({
  78. selectArrderLocation: location,
  79. });
  80. }
  81. }
  82. getReleasetDails() {
  83. getReleasetDails({
  84. id: this.$instance.router.params.id,
  85. })
  86. .then((v) => {
  87. if (v.error.length === 0) {
  88. if (v.data) {
  89. let list = [];
  90. for (let i of v.data.annexUrl.split(",")) {
  91. if (i) {
  92. list.push({ url: resourceAddress + i });
  93. }
  94. }
  95. v.data.annexUrl = list;
  96. this.setState({
  97. dtails: v.data,
  98. coorderList: v.data.assistantName != null && v.data.assistantName != "" ? v.data.assistantName.split(",") : [],
  99. cList: v.data.assistantAid != null && v.data.assistantName != "" ? v.data.assistantAid.split(",") : [],
  100. selectArrderLocation: {
  101. longitude: parseFloat(v.data.prdList[0]?.longitude),
  102. latitude: parseFloat(v.data.prdList[0]?.latitude),
  103. name: v.data.prdList[0]?.districtName,
  104. },
  105. });
  106. } else {
  107. setTimeout(() => {
  108. Taro.switchTab({
  109. url: "/pages/punchClock/index",
  110. });
  111. }, 1800);
  112. Taro.showToast({
  113. title: "您没有权限查看此公出详情",
  114. icon: "none",
  115. duration: 1800,
  116. });
  117. }
  118. } else {
  119. Taro.showToast({ title: v.error[0].message, icon: "none" });
  120. }
  121. })
  122. .catch((err) => {
  123. Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
  124. // console.log(err);
  125. });
  126. }
  127. // 同意/驳回
  128. agree(sta) {
  129. if (!this.state.opinion) {
  130. Taro.showToast({ title: "请填写审批意见", icon: "none" });
  131. return;
  132. }
  133. getReleasetDails({
  134. id: this.$instance.router.params.id,
  135. })
  136. .then((v) => {
  137. if (v.error.length === 0) {
  138. //如果在审核期间修改过
  139. if (
  140. v.data.updateTime != null &&
  141. this.state.dtails.updateTime !== v.data.updateTime
  142. ) {
  143. this.setState({
  144. isInquiryOpened: true,
  145. isNo: false,
  146. inquiryTitle: "提醒",
  147. inquiryContent: "当前公出申请已修改,请重新审核",
  148. });
  149. } else {
  150. sta === 2
  151. ? this.examinePublicRelease(2)
  152. : this.examinePublicRelease(0);
  153. }
  154. if (v.data) {
  155. let list = [];
  156. for (let i of v.data.annexUrl.split(",")) {
  157. if (i) {
  158. list.push({ url: resourceAddress + i });
  159. }
  160. }
  161. v.data.annexUrl = list;
  162. this.setState({
  163. dtails: v.data,
  164. selectArrderLocation: {
  165. longitude: parseFloat(v.data.prdList[0]?.longitude),
  166. latitude: parseFloat(v.data.prdList[0]?.latitude),
  167. name: v.data.prdList[0]?.districtName,
  168. },
  169. });
  170. } else {
  171. setTimeout(() => {
  172. Taro.switchTab({
  173. url: "/pages/punchClock/index",
  174. });
  175. }, 1800);
  176. Taro.showToast({
  177. title: "您没有权限查看此公出详情",
  178. icon: "none",
  179. duration: 1800,
  180. });
  181. }
  182. } else {
  183. Taro.showToast({ title: v.error[0].message, icon: "none" });
  184. }
  185. })
  186. .catch((err) => {
  187. Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
  188. // console.log(err);
  189. });
  190. }
  191. examinePublicRelease(status) {
  192. if (!this.state.opinion) {
  193. Taro.showToast({ title: "请填写审批意见", icon: "none" });
  194. return;
  195. }
  196. Taro.showLoading({ title: "加载中..." });
  197. let isSuperior = this.state.current == "他人公出" ? false : true
  198. examinePublicRelease(
  199. isSuperior,
  200. {
  201. status,
  202. remarks: this.state.opinion,
  203. id: this.state.dtails.id,
  204. }
  205. )
  206. .then((v) => {
  207. Taro.hideLoading();
  208. if (v.error.length === 0) {
  209. Taro.showToast({
  210. title: "操作成功",
  211. icon: "none",
  212. });
  213. this.getReleasetDails();
  214. // Taro.showToast({
  215. // title: status === 0 ? "驳回成功" : "通过成功",
  216. // icon: "none",
  217. // });
  218. // this.state.dtails.status = status;
  219. // this.setState({
  220. // dtails: this.state.dtails,
  221. // });
  222. // Taro.eventCenter.trigger("listOperation", {
  223. // type: this.state.dtails.permission,
  224. // index: this.$instance.router.params.index,
  225. // status: status === 0 ? 0 : 2,
  226. // });
  227. } else {
  228. Taro.showToast({ title: v.error[0].message, icon: "none" });
  229. }
  230. })
  231. .catch(() => {
  232. Taro.hideLoading();
  233. Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
  234. });
  235. }
  236. onShareAppMessage() {
  237. return {
  238. title:
  239. this.state.dtails.status === 3
  240. ? this.state.dtails.aname +
  241. "撤销了前往" +
  242. this.state.dtails.prdList[0]?.districtName +
  243. "的公出"
  244. : this.state.dtails.aname + "将要去" + this.state.dtails.prdList[0]?.districtName,
  245. path: "pages/egressDetails/index?id=" + this.$instance.router.params.id,
  246. };
  247. }
  248. oidApplication() {
  249. if (!this.state.reasonsInvalidation) {
  250. Taro.showToast({ title: "请填写撤销原因", icon: "none" });
  251. return;
  252. }
  253. this.setState({
  254. loading: true,
  255. });
  256. updatePublicRelease({
  257. id: this.$instance.router.params.id,
  258. status: 3,
  259. uids: this.state.dtails.uids,
  260. reason: this.state.reasonsInvalidation,
  261. })
  262. .then((v) => {
  263. this.setState({
  264. loading: false,
  265. });
  266. if (v.error.length === 0) {
  267. Taro.showToast({
  268. title: "修改成功",
  269. });
  270. this.setState({
  271. isInquiryOpened: false,
  272. inquiryTitle: "",
  273. inquiryContent: "",
  274. }, () => {
  275. this.getReleasetDails();
  276. });
  277. Taro.eventCenter.trigger("listOperation", {
  278. type: this.state.dtails.permission,
  279. index: this.$instance.router.params.index,
  280. status: 3,
  281. });
  282. } else {
  283. Taro.showToast({
  284. title: v.error[0].message,
  285. icon: "none",
  286. });
  287. }
  288. })
  289. .catch(() => {
  290. this.setState({
  291. loading: false,
  292. });
  293. });
  294. }
  295. // 弹窗开关
  296. popupClick(id) {
  297. !this.state.popup &&
  298. this.setState({
  299. selid: id
  300. })
  301. this.setState({
  302. popup: !this.state.popup
  303. })
  304. }
  305. //增加协单助力
  306. addA(aid) {
  307. const { selid } = this.state
  308. addAssistant({
  309. id: selid,
  310. aid,
  311. }).then((v) => {
  312. if (v.error.length === 0) {
  313. this.popupClick();
  314. this.getReleasetDails();
  315. } else {
  316. Taro.showToast({ title: v.error[0].message, icon: "none" });
  317. }
  318. }).catch((err) => {
  319. Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
  320. });
  321. }
  322. //删除协单助力
  323. deleteA(id, aid) {
  324. Taro.showLoading({
  325. title: '操作中...'
  326. })
  327. deleteAssistant({
  328. id,
  329. aid,
  330. }).then((v) => {
  331. Taro.hideLoading();
  332. if (v.error.length === 0) {
  333. this.getReleasetDails();
  334. } else {
  335. Taro.showToast({ title: v.error[0].message, icon: "none" });
  336. }
  337. }).catch((err) => {
  338. Taro.hideLoading();
  339. Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
  340. });
  341. }
  342. render() {
  343. const { dtails, current, cList, coorderList, popup } = this.state;
  344. return (
  345. <View className="egressDetails">
  346. <MessageNoticebar />
  347. <View
  348. className="titleContent"
  349. style={{
  350. padding: Object.keys(dtails).length === 0 ? "0 30px" : "20px 30px",
  351. }}
  352. >
  353. {Object.keys(dtails).length === 0 ? (
  354. <Skeleton
  355. title
  356. row={3}
  357. animateName="elastic"
  358. avatarShape="square"
  359. loading
  360. />
  361. ) : (
  362. <View>
  363. <View className="title">
  364. {dtails.type === 3 ? dtails.mainName : dtails.aname}提交的公出申请
  365. {dtails.updateStatus == 1 && <View className="titRight">改</View>}
  366. </View>
  367. <View className="address">申请时间: {dtails.createTimes}</View>
  368. <View
  369. className="state"
  370. style={{
  371. color: getClockState(dtails.status).color,
  372. }}
  373. >
  374. {getClockState(dtails.status).title}
  375. </View>
  376. {
  377. dtails.peList?.map(item =>
  378. <View style={{ fontSize: "15px", color: "#007AFF" }}>{item.aname + `(${["审核中", "已审核"][item.status]})`}</View>
  379. )
  380. }
  381. <View></View>
  382. <Image
  383. src={
  384. dtails.status === 0
  385. ? Rejected : dtails.status === 1
  386. ? Reviewed : dtails.status === 2
  387. ? Passed : dtails.status === 3
  388. ? Revoke : dtails.status === 4
  389. ? Rejected : ""
  390. }
  391. className="startIcon"
  392. />
  393. </View>
  394. )}
  395. </View>
  396. {Object.keys(dtails).length === 0 ? (
  397. <View style={{ margin: "20px" }}>
  398. <Skeleton title row={3} avatarShape="square" loading />
  399. </View>
  400. ) : (
  401. <View className="valueContent">
  402. {
  403. dtails.status != 3 && dtails.type == 3 && (current === "查看协单" || current === "我的协单")
  404. ? <View className="item">
  405. <View className="title" style={{ color: "red" }}>协单助手(助手无成本)</View>
  406. <View className="cassistant">
  407. {
  408. coorderList.length == 0
  409. ? <Text>无</Text>
  410. : coorderList.map((item, index) =>
  411. <View className="citems" key={index}>
  412. {item}
  413. <View className="cclose"
  414. onClick={() => {
  415. this.setState({
  416. isInquiryOpened: true,
  417. inquiryTitle: "温馨提示",
  418. inquiryContent: "您确定要移除此协单助手吗?",
  419. inquiryFn: () => {
  420. this.deleteA(dtails.id, cList[index])
  421. },
  422. });
  423. }}
  424. ><AtIcon value="close-circle" size="15" color="#bbbbbb" /></View>
  425. </View>
  426. )
  427. }
  428. {cList.length < 5 && <Button className="addbuttom" type='primary' onClick={this.popupClick.bind(this, dtails.id)}>添加协单助手</Button>}
  429. </View>
  430. </View>
  431. : coorderList.length != 0 &&
  432. <View className="item">
  433. <View className="title" style={{ color: "red" }}>协单助手(助手无成本)</View>
  434. <View className="cassistant">
  435. {
  436. coorderList.map((item, index) =>
  437. <View className="citems" style={{ paddingRight: 0 }} key={index}>
  438. {item}
  439. </View>
  440. )
  441. }
  442. </View>
  443. </View>
  444. }
  445. <View className="item">
  446. <View className="title">
  447. 公出地点:
  448. {current !== "审核" && dtails.permission === 0
  449. && dtails.type !== 3 && dtails.type !== 4 ? (
  450. <View
  451. className="edit"
  452. onClick={() => {
  453. Taro.pageScrollTo({ selector: "#reasons" })
  454. this.setState({
  455. foc: true,
  456. });
  457. }}
  458. >
  459. <View style={{ color: "#3864ef", fontSize: "15px" }}>
  460. 修改
  461. <AtIcon value="edit" size="18" color="#3864ef" />
  462. </View>
  463. </View>
  464. ) : null}
  465. </View>
  466. <View className="value">
  467. {/* {dtails.districtName} */}
  468. {
  469. unique(dtails.prdList, "districtName")?.map((item, index) =>
  470. <View key={index}>{item.districtName}</View>
  471. )
  472. }
  473. </View>
  474. <View className="timeContent">
  475. <View className="time">
  476. <View className="num">公出{dtails.duration}小时</View>
  477. <View
  478. className="journal"
  479. onClick={(e) => {
  480. e.stopPropagation();
  481. this.setState({
  482. isDetailedOpened: true,
  483. });
  484. }}
  485. >
  486. 明细
  487. </View>
  488. </View>
  489. <View className="timeAxis">
  490. <View className="startTime">
  491. <View className="circle" />
  492. {dtails.releaseStarts}
  493. </View>
  494. <View className="axis" />
  495. <View className="endTime">
  496. <View className="circle" />
  497. {dtails.releaseEnds}
  498. </View>
  499. </View>
  500. </View>
  501. </View>
  502. <AtModal
  503. onClose={() => {
  504. this.setState({
  505. isDetailedOpened: false,
  506. });
  507. }}
  508. isOpened={this.state.isDetailedOpened}
  509. >
  510. <AtModalContent>
  511. {dtails.validDate ? (
  512. <AtCalendar
  513. currentDate={JSON.parse(dtails.validDate)[0]["value"]}
  514. isSwiper={false}
  515. validDates={JSON.parse(dtails.validDate)}
  516. />
  517. ) : null}
  518. </AtModalContent>
  519. <AtModalAction>
  520. <Button
  521. onClick={() => {
  522. this.setState({
  523. isDetailedOpened: false,
  524. });
  525. }}
  526. >
  527. 确定
  528. </Button>
  529. </AtModalAction>
  530. </AtModal>
  531. <View className="item">
  532. <View className="title">公出类型</View>
  533. <View className="value">
  534. {dtails.type == 0
  535. ? "业务公出" : dtails.type == 1
  536. ? "技术公出" : dtails.type == 2
  537. ? "行政公出" : dtails.type == 3
  538. ? "技术协单" : dtails.type == 4
  539. ? "协单助手" : ""}
  540. </View>
  541. </View>
  542. {dtails.type == 1 ? (
  543. <View className="item">
  544. <View className="title">合同编号</View>
  545. <View className="value">{dtails.contractNo}</View>
  546. </View>
  547. ) : (
  548. ""
  549. )}
  550. <View className="item">
  551. <View className="title">公出企业</View>
  552. <View className="value">
  553. {/* {dtails.nickname} */}
  554. {
  555. !!dtails.userNames && dtails.userNames.indexOf(',') > -1
  556. ? dtails.userNames.split(',')?.map((item, index) => <View key={index}>{item}</View>)
  557. : dtails.userNames
  558. }
  559. </View>
  560. </View>
  561. {
  562. dtails.assistAidName != null && dtails.assistAidName != "" &&
  563. <View className="item">
  564. <View className="title" style={{ color: "red" }}>技术协单(技术协单,将统计相关的公出成本等)</View>
  565. <View className="value">{dtails.assistAidName.replace(/,/g, " ")}</View>
  566. </View>
  567. }
  568. {/* 公出目标 */}
  569. <View className="item">
  570. <View className="title">公出目标</View>
  571. <View className="value">{dtails.remarks}</View>
  572. </View>
  573. {/* 公出计划 */}
  574. {dtails.type != 2 && (
  575. <View className="item">
  576. <View className="title">公出计划</View>
  577. <View className="value">{dtails.plan}</View>
  578. </View>
  579. )}
  580. {/* 预计效果 */}
  581. {dtails.type != 2 && (
  582. <View className="item">
  583. <View className="title">预计效果</View>
  584. <View className="value">{dtails.expectedEffect}</View>
  585. </View>
  586. )}
  587. {dtails.annexUrl && dtails.annexUrl.length > 0 ? (
  588. <View className="item">
  589. <View className="title">附件</View>
  590. <View className="value">
  591. <ImagePicker files={dtails.annexUrl} showAddBtn={false} />
  592. </View>
  593. </View>
  594. ) : null}
  595. {((dtails.status === 1 && current === "审核") ||
  596. (dtails.publicType == 1 && current === "他人公出" && dtails.myExamine == 0)) &&
  597. <View className="item">
  598. <View className="title">
  599. 填写审批意见
  600. <View className="titleTips">
  601. 根据公出申请记录指导怎么沟通?并提出详细指导建议
  602. </View>
  603. </View>
  604. <AtTextarea
  605. value={this.state.opinion}
  606. onChange={(value) => {
  607. this.setState({
  608. opinion: value,
  609. });
  610. }}
  611. maxLength={20}
  612. placeholder="请填写审批意见"
  613. />
  614. <View className="operation">
  615. <AtButton
  616. type="secondary"
  617. circle
  618. loading={this.state.loading}
  619. onClick={() => {
  620. this.setState({
  621. isInquiryOpened: true,
  622. inquiryTitle: "提醒",
  623. inquiryContent: "您确定要驳回此申请吗?",
  624. inquiryFn: () => {
  625. this.agree(0);
  626. // this.examinePublicRelease(0);
  627. },
  628. });
  629. }}
  630. >
  631. 驳回
  632. </AtButton>
  633. <AtButton
  634. type="primary"
  635. loading={this.state.loading}
  636. circle
  637. onClick={() => {
  638. if (this.state.loading) {
  639. return;
  640. }
  641. this.setState({
  642. isInquiryOpened: true,
  643. inquiryTitle: "提醒",
  644. inquiryContent: "您确定要同意此申请吗?",
  645. inquiryFn: () => {
  646. this.agree(2);
  647. // this.examinePublicRelease(2);
  648. },
  649. });
  650. }}
  651. >
  652. 同意
  653. </AtButton>
  654. </View>
  655. </View>}
  656. {current !== "审核" && dtails.permission === 0
  657. && dtails.type !== 3 && dtails.type !== 4 ? (
  658. <View className="item" id={"reasons"}>
  659. <View className="title">修改/撤销</View>
  660. <AtTextarea
  661. value={this.state.reasonsInvalidation}
  662. focus={this.state.foc}
  663. onChange={(value) => {
  664. this.setState({
  665. reasonsInvalidation: value,
  666. });
  667. }}
  668. maxLength={20}
  669. placeholder="请填写修改或撤销的详细原因"
  670. />
  671. </View>
  672. ) : null}
  673. {current !== "审核" && dtails.permission === 0
  674. && dtails.type !== 3 && dtails.type !== 4 ? (
  675. <View className="operation">
  676. <Button
  677. type="warn"
  678. disabled={dtails.status === 3}
  679. loading={this.state.loading}
  680. onClick={() => {
  681. if (this.state.loading) {
  682. return;
  683. }
  684. this.setState({
  685. isInquiryOpened: true,
  686. inquiryTitle: "提醒",
  687. inquiryContent: dtails.assist == 1
  688. ? "请与技术协单同事协商后再修改,因未协商就个人修改公出内容,产生的影响由个人承担!"
  689. : "您确定要撤销此申请吗?",
  690. inquiryFn: () => {
  691. this.oidApplication();
  692. },
  693. });
  694. }}
  695. >
  696. 撤销申请
  697. </Button>
  698. <Button
  699. style={{ color: "#fff", background: "#4876FF" }}
  700. loading={this.state.loading}
  701. onClick={() => {
  702. if (this.state.loading) {
  703. return;
  704. }
  705. this.setState({
  706. isInquiryOpened: true,
  707. inquiryTitle: "提醒",
  708. inquiryContent: dtails.assist == 1
  709. ? "请与技术协单同事协商后再修改,因未协商就个人修改公出内容,产生的影响由个人承担!"
  710. : "您确定修改此公出申请吗?确定修改,已完成的审核,将自动解除,重新转化为待审核状态!!!",
  711. inquiryFn: () => {
  712. if (!this.state.reasonsInvalidation) {
  713. Taro.showToast({
  714. title: "请填写修改原因",
  715. icon: "none",
  716. });
  717. return;
  718. }
  719. this.setState({
  720. isModifyOpened: true,
  721. isVerify: true,
  722. foc: false,
  723. });
  724. },
  725. });
  726. }}
  727. >
  728. 修改申请
  729. </Button>
  730. </View>
  731. ) : null}
  732. </View>
  733. )}
  734. {Object.keys(dtails).length === 0 ? (
  735. <View style={{ margin: "20px" }}>
  736. <Skeleton title row={3} avatarShape="square" loading />
  737. </View>
  738. ) : (
  739. <View
  740. className="valueContent history"
  741. onClick={(e) => {
  742. e.stopPropagation();
  743. this.setState({
  744. historicalIsOpened: true,
  745. });
  746. }}
  747. >
  748. 查看公出申请日志
  749. <AtIcon value="chevron-right" size="20" color="#767272" />
  750. </View>
  751. )}
  752. {Object.keys(dtails).length === 0 ? (
  753. <View style={{ margin: "20px" }}>
  754. <Skeleton title row={3} avatarShape="square" loading />
  755. </View>
  756. ) : (
  757. <View className="valueContent history">
  758. <View className="shareContent">
  759. <Button open-type="share" className="share">
  760. <Image src={Wx} className="shareIcon" />
  761. </Button>
  762. <View className="shareTitle">微信分享</View>
  763. </View>
  764. </View>
  765. )}
  766. {this.state.isModifyOpened ? (
  767. <Modify
  768. permission={dtails.permission}
  769. index={this.$instance.router.params.index}
  770. dtails={dtails}
  771. locationInfor={this.state.selectArrderLocation}
  772. id={this.$instance.router.params.id}
  773. isOpened={this.state.isModifyOpened}
  774. isVerify={this.state.isVerify}
  775. reason={this.state.reasonsInvalidation}
  776. onModalClose={() => {
  777. this.setState({
  778. isModifyOpened: false,
  779. });
  780. }}
  781. onClose={() => {
  782. this.setState(
  783. {
  784. isModifyOpened: false,
  785. dtails: {},
  786. reasonsInvalidation: "",
  787. },
  788. () => {
  789. this.getReleasetDails();
  790. }
  791. );
  792. }}
  793. />
  794. ) : null}
  795. <InquiryModal
  796. isOpened={this.state.isInquiryOpened}
  797. title={this.state.inquiryTitle}
  798. content={this.state.inquiryContent}
  799. color={this.state.isNo ? "black" : "red"}
  800. isNo={this.state.isNo}
  801. onClose={() => {
  802. this.setState({
  803. isInquiryOpened: false,
  804. inquiryTitle: "",
  805. inquiryContent: "",
  806. isNo: true,
  807. });
  808. }}
  809. onDetermine={() => {
  810. this.state.inquiryFn();
  811. this.setState({
  812. isInquiryOpened: false,
  813. inquiryTitle: "",
  814. inquiryContent: "",
  815. isNo: true,
  816. inquiryFn: () => { },
  817. });
  818. }}
  819. />
  820. {this.state.historicalIsOpened ? (
  821. <HistoricalClock
  822. id={this.$instance.router.params.id}
  823. isOpened={this.state.historicalIsOpened}
  824. onClose={() => {
  825. this.setState({
  826. historicalIsOpened: false,
  827. });
  828. }}
  829. />
  830. ) : null}
  831. {popup &&
  832. <UserQuery
  833. isOpened={popup}
  834. onDesc={this.popupClick.bind(this)}
  835. coorderList={cList}
  836. selList={dtails.assistAid ? dtails.assistAid.split(",") : []}
  837. req={true}
  838. addClick={this.addA.bind(this)}
  839. />
  840. }
  841. </View>
  842. );
  843. }
  844. }
  845. export default EgressDetails;