reject.jsx 112 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247
  1. import React from 'react';
  2. import {
  3. Tooltip,
  4. Button,
  5. AutoComplete,
  6. Input,
  7. Select,
  8. Spin,
  9. Popconfirm,
  10. Table,
  11. message,
  12. DatePicker,
  13. Upload,
  14. Form,
  15. Modal,
  16. Col,
  17. Tag,
  18. Tabs,
  19. Radio,
  20. Checkbox,
  21. } from 'antd';
  22. import $ from 'jquery/src/ajax';
  23. import moment from 'moment';
  24. import { boutique, tepi, jiedian, salesList, cuiJieDian } from '@/dataDic.js';
  25. import {
  26. getLiquidationStatus,
  27. getProcessStatus,
  28. splitUrl,
  29. getCuikuan,
  30. moneyVerify,
  31. ShowModal,
  32. getProjectName,
  33. getApprovedType,
  34. compare,
  35. } from "@/tools.js";
  36. import './customer.less';
  37. import ShowModalDiv from "@/showModal.jsx"
  38. import OrderRiZi from "@/orderRiZi.jsx";
  39. import ResolutionDetail from "@/resolutionDetail";
  40. import ImgList from "../../../common/imgList";
  41. import { ChooseList } from "./chooseList";
  42. import OrderItemStatus from "../../../common/orderItemStatus";
  43. import EnterpriseNameChange from "../../../common/enterpriseNameChange";
  44. import OrderCoor from './changeComponent/orderCoor';
  45. import ProjectOperation from "../../../common/projectOperation";
  46. import NewAddProject from "../../../common/projectOperation/newAddProject"
  47. import NewEditProject from "../../../common/projectOperation/newEditProject"
  48. import ContentUrl from './contentUrl';
  49. import UpdateSales from './updatesales';//修改销售类型
  50. import PicturesWall from "./changeComponent/picturesWall.js";
  51. import FlowChart from '../../../common/flowchart'; // 流程图
  52. import Gxczx from '../../../common/orderDetail/gxczx' // 高新纯咨询合同说明详情
  53. import Property from '../../../common/orderDetail/property' // 知识产权情况
  54. import ApproveTypeTooltip from "../../../common/ApproveTypeTooltip/index.js";
  55. import ConfidenBreach from './confidenBreach.jsx';
  56. const CheckboxGroup = Checkbox.Group;
  57. const IntentionCustomer = Form.create()(
  58. React.createClass({
  59. loadData(pageNo) {
  60. this.setState({
  61. visitModul: false,
  62. loading: true,
  63. ispage: pageNo,
  64. modalVisible: false,
  65. });
  66. $.ajax({
  67. method: "get",
  68. dataType: "json",
  69. crossDomain: false,
  70. url: globalConfig.context + "/api/admin/newOrder/orderNewList",
  71. data: {
  72. pageNo: pageNo || 1,
  73. pageSize: this.state.pagination.pageSize,
  74. specially: 2, //审核列表
  75. name: this.state.customerName, //名称
  76. orderNo: this.state.orderNoSearch, //订单编号
  77. starTime: this.state.releaseDate[0], //开始时间
  78. endTime: this.state.releaseDate[1], //结束时间
  79. },
  80. success: function (data) {
  81. ShowModal(this);
  82. let theArr = [];
  83. if (data.error.length || data.data.list == "") {
  84. if (data.error && data.error.length) {
  85. message.warning(data.error[0].message);
  86. }
  87. } else {
  88. for (let i = 0; i < data.data.list.length; i++) {
  89. let thisdata = data.data.list[i];
  90. thisdata.key = i;
  91. thisdata.totalAmount = thisdata.totalAmount + ""; //签单金额
  92. theArr.push(thisdata);
  93. }
  94. this.state.pagination.total = data.data.totalCount;
  95. this.state.pagination.current = data.data.pageNo;
  96. }
  97. if (data.data && data.data.list && !data.data.list.length) {
  98. this.state.pagination.total = 0;
  99. }
  100. this.setState({
  101. dataSource: theArr,
  102. pageNo: pageNo,
  103. pagination: this.state.pagination,
  104. selectedRowKeys: [],
  105. });
  106. }.bind(this),
  107. }).always(
  108. function () {
  109. this.setState({
  110. loading: false,
  111. });
  112. }.bind(this)
  113. );
  114. },
  115. getInitialState() {
  116. return {
  117. confidenBreachData: {},
  118. approvaType: [],
  119. isShow: true, // 高新纯咨询合同默认填写
  120. page: 1,
  121. orderNos: '',
  122. patentTypeList: [],
  123. releaseDate: [],
  124. orderStatus: 0,
  125. processStatus: 0,
  126. selectedRowKeys: [],
  127. orgCodeUrl: [],
  128. replenishUrl: [],
  129. contentUrl: [],
  130. customerArr: [],
  131. resVisible: false,
  132. pagination: {
  133. defaultCurrent: 1,
  134. defaultPageSize: 10,
  135. showQuickJumper: true,
  136. pageSize: 10,
  137. onChange: function (page) {
  138. this.loadData(page);
  139. }.bind(this),
  140. showTotal: function (total) {
  141. return "共" + total + "条数据";
  142. },
  143. },
  144. columns: [
  145. {
  146. title: "驳回编号",
  147. dataIndex: "backId",
  148. key: "backId",
  149. },
  150. {
  151. title: "驳回日期",
  152. dataIndex: "backDate",
  153. key: "backDate",
  154. },
  155. {
  156. title: "下单时间",
  157. dataIndex: "createDate",
  158. key: "createDate",
  159. },
  160. {
  161. title: "订单编号",
  162. dataIndex: "orderNo",
  163. key: "orderNo",
  164. },
  165. {
  166. title: "客户名称",
  167. dataIndex: "userName",
  168. key: "userName",
  169. render: (text) => {
  170. return (
  171. <Tooltip title={text}>
  172. <div
  173. // style={{
  174. // maxWidth: '150px',
  175. // overflow: 'hidden',
  176. // textOverflow: "ellipsis",
  177. // whiteSpace: 'nowrap',
  178. // }}
  179. >{text}</div>
  180. </Tooltip>
  181. )
  182. },
  183. },
  184. {
  185. title: "驳回人",
  186. dataIndex: "initiateName",
  187. key: "initiateName",
  188. },
  189. {
  190. title: "驳回原因",
  191. dataIndex: "reason",
  192. key: "reason",
  193. render: (text) => {
  194. return text && text.length > 24
  195. ? text.substr(0, 24) + "..."
  196. : text;
  197. },
  198. },
  199. ],
  200. columnsrizhi: [
  201. {
  202. title: "流程",
  203. dataIndex: "processName",
  204. key: "processName",
  205. },
  206. {
  207. title: "操作人",
  208. dataIndex: "adminName",
  209. key: "adminName",
  210. },
  211. {
  212. title: "时间",
  213. dataIndex: "createDate",
  214. key: "createDate",
  215. },
  216. ],
  217. data: [],
  218. dataSource: [],
  219. columnsX: [
  220. {
  221. title: "业务项目名称",
  222. dataIndex: "commodityName",
  223. key: "commodityName",
  224. render: (text, record) => {
  225. return <span>
  226. {text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}
  227. <div>
  228. {record.cSort == 6 && record.projectType == 1 && <span>(含{record.htMember == 1 ? '高新会员&' : ''}{record.additionalDeduction == 1 ? '加计扣除&' : ''}{record.rdAwardsubsidy == 1 ? '研发奖补' : ''})</span>}
  229. {record.cSort == 6 && ([0, 3].indexOf(record.projectType) > -1) && <span>(仅提供单边会员服务)</span>}
  230. {record.cSort == 6 && record.projectType == 2 && <span>(仅填报表,仅咨询,不出备查资料)</span>}
  231. {record.cSort == 3 && <span>{record.technologyProjectType==0?'(简易项目)':record.technologyProjectType==1?'(市区级)':record.technologyProjectType==2?'(省级)':record.technologyProjectType==3?'(国家级)':''}</span>}
  232. {record.cSort == 8 ? (record.type != 2 && record.patentType == 1) ? <span>(变更)</span> : <span>{record.ordinaryRisk == 0 ? '(普通申请)' : record.ordinaryRisk == 1 ? '(风险代理)' : ''}</span> : ""}
  233. {record.type == 2 && <span>({record.days == 0 ? '普通' : record.days == 1 ? '加急' : ''}{record.scheme == 0 ? '&无方案' : record.scheme == 1 ? '&有方案' : ''})</span>}
  234. </div>
  235. </span>
  236. }
  237. },
  238. {
  239. title: "项目类别",
  240. dataIndex: "cname",
  241. key: "cname",
  242. },
  243. {
  244. title: "项目数量",
  245. dataIndex: "commodityQuantity",
  246. key: "commodityQuantity",
  247. render: (text, record) => {
  248. if (record.splitStatus == 1) {
  249. return (
  250. <span>
  251. {text}{" "}
  252. {/* <Tag
  253. color="#108ee9"
  254. onClick={(e) => {
  255. e.stopPropagation();
  256. this.showRes(record);
  257. }}
  258. >
  259. 已拆
  260. </Tag> */}
  261. </span>
  262. );
  263. } else {
  264. return text;
  265. }
  266. },
  267. },
  268. {
  269. title: "金额(万元)",
  270. dataIndex: "commodityPrice",
  271. key: "commodityPrice",
  272. },
  273. {
  274. title: "负责人",
  275. dataIndex: "contacts",
  276. key: "contacts",
  277. },
  278. {
  279. title: "负责人电话",
  280. dataIndex: "contactsMobile",
  281. key: "contactsMobile",
  282. },
  283. {
  284. title: "主要项目",
  285. dataIndex: "main",
  286. key: "main",
  287. render: (text) => {
  288. return text ? "是" : "否";
  289. },
  290. },
  291. {
  292. title: "总年限",
  293. dataIndex: "yearSum",
  294. key: "yearSum",
  295. render: (text, record) => {
  296. return (
  297. <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
  298. );
  299. }
  300. },
  301. {
  302. title: "年限",
  303. dataIndex: "serviceLife",
  304. key: "serviceLife",
  305. render: (text, record) => {
  306. return (
  307. <div>{!!text && JSON.parse(text).toString()}</div>
  308. );
  309. }
  310. },
  311. {
  312. title: "本次派单",
  313. dataIndex: "serviceYear",
  314. key: "serviceYear",
  315. render: (text, record) => {
  316. return (
  317. <div>{!text ? "" : text}</div>
  318. );
  319. }
  320. },
  321. {
  322. title: "项目说明",
  323. dataIndex: "taskComment",
  324. key: "taskComment",
  325. render: (text, record) => {
  326. let textStr = text;
  327. return (
  328. <Tooltip title={textStr}>
  329. <div
  330. style={{
  331. width: 100,
  332. overflow: "hidden",
  333. whiteSpace: "nowrap",
  334. textOverflow: "ellipsis",
  335. }}
  336. >{textStr}</div>
  337. </Tooltip>
  338. )
  339. },
  340. },
  341. {
  342. title: "操作",
  343. dataIndex: "ABC",
  344. key: "ABC",
  345. width: 80,
  346. render: (text, record) => {
  347. return (
  348. this.state.processStatus == 0 &&
  349. <div>
  350. <div>
  351. <Popconfirm
  352. title="是否要删除?如果删除此项目业务,对应的催款节点也会删除!"
  353. onConfirm={() => {
  354. this.delectRow(record);
  355. }}
  356. okText="是"
  357. cancelText="否"
  358. >
  359. <Button
  360. onClick={(e) => {
  361. e.stopPropagation();
  362. }}
  363. type="danger"
  364. >
  365. 删除
  366. </Button>
  367. </Popconfirm>
  368. </div>
  369. <div>
  370. <Button
  371. onClick={(e) => {
  372. e.stopPropagation();
  373. this.setState({
  374. editProjectOperationVisible: true,
  375. dataInfor: record,
  376. })
  377. }}
  378. >
  379. 编辑
  380. </Button>
  381. </div>
  382. </div>
  383. );
  384. },
  385. },
  386. ],
  387. dataSourceX: [],
  388. ContactsListsNew: [
  389. {
  390. title: "项目名称",
  391. dataIndex: "commodityName",
  392. key: "commodityName",
  393. render: (text, record, index) => {
  394. let dataArr = this.state.dataSourceX || [];
  395. if (text) {
  396. return <span>{text + "-" + record.tid}</span>;
  397. }
  398. return (
  399. <Select
  400. placeholder="请选择名称"
  401. style={{ width: "150px" }}
  402. disabled={
  403. this.state.getLoad && record.sortName ? true : false
  404. }
  405. onChange={(e) => {
  406. // record.sortName = e;
  407. // dataArr.forEach((item) => {
  408. // if (item.commodityName == record.sortName) {
  409. // record.cname = item.cname;
  410. // record.tid = item.id;
  411. // record.isSave = true;
  412. // record.sort = item.sort;
  413. // console.log(record);
  414. // cuiJieDian.forEach((item) => {
  415. // if (item.value == record.sort) {
  416. // record.arr = item.children;
  417. // let yearFlag = true;
  418. // if (record.sort == 6) {
  419. // yearFlag = false;
  420. // }
  421. // this.setState({
  422. // getLoad: true,
  423. // yearFlag,
  424. // });
  425. // }
  426. // });
  427. // }
  428. // });
  429. // console.log(e);
  430. let proData = dataArr[e];
  431. record.cname = proData.cname;
  432. record.tid = proData.id;
  433. record.isSave = true;
  434. record.sort = proData.sort;
  435. cuiJieDian.forEach((item) => {
  436. if (item.value == record.sort) {
  437. record.arr = item.children;
  438. let yearFlag = true;
  439. if (record.sort == 6) {
  440. yearFlag = false;
  441. }
  442. this.setState({
  443. getLoad: true,
  444. yearFlag,
  445. });
  446. }
  447. });
  448. }}
  449. >
  450. {dataArr.map((item) => {
  451. return (
  452. <Select.Option key={item.id} value={item.key}>
  453. {item.commodityName + "-" + item.id}
  454. </Select.Option>
  455. );
  456. })}
  457. </Select>
  458. );
  459. },
  460. },
  461. {
  462. title: "项目分类",
  463. dataIndex: "projectType",
  464. key: "projectType",
  465. render: (text, record) => {
  466. if (text) {
  467. let arr = this.state.dataSourceX || [];
  468. let str = "";
  469. for (let i = 0; i < arr.length; i++) {
  470. if (this.state.dataSourceX[i].sort == text) {
  471. str = this.state.dataSourceX[i].cname;
  472. return <span>{str}</span>;
  473. }
  474. }
  475. }
  476. if (this.state.getLoad) {
  477. return (
  478. <Select
  479. style={{ width: "150px" }}
  480. placeholder="请选择分类"
  481. value={record.cname}
  482. >
  483. <Select.Option key={record.sort} value={record.cname}>
  484. {record.cname}
  485. </Select.Option>
  486. </Select>
  487. );
  488. } else {
  489. return (
  490. <Select style={{ width: "150px" }} placeholder="请选择分类">
  491. <Select.Option key={record.sort} value={record.cname}>
  492. {record.cname}
  493. </Select.Option>
  494. </Select>
  495. );
  496. }
  497. },
  498. },
  499. {
  500. title: "催款科目",
  501. dataIndex: "dunTypeName",
  502. key: "dunTypeName",
  503. render: (text, record) => {
  504. if (text) {
  505. if (record.customizeName) {
  506. return record.customizeName;
  507. }
  508. return <span>{text}</span>;
  509. }
  510. if (this.state.getLoad) {
  511. let arr = record.arr || [];
  512. return (
  513. <div>
  514. <Select
  515. style={{ width: "150px" }}
  516. placeholder="请选择分类"
  517. onChange={(e) => {
  518. record.dunType = e;
  519. if (record.dunType == 0) {
  520. record.customizeTimes = "";
  521. record.customizeName = "";
  522. }
  523. if (e == 0) {
  524. record.dunTypeCustom = true;
  525. } else {
  526. record.dunTypeCustom = false;
  527. }
  528. if (e != 1) {
  529. this.setState({
  530. timeFlag: true,
  531. });
  532. } else {
  533. this.setState({
  534. timeFlag: false,
  535. });
  536. }
  537. if (e == 1 && record.sort == 6) {
  538. this.setState({
  539. yearFlag: true,
  540. });
  541. } else if (e != 1 && record.sort == 6) {
  542. this.setState({
  543. yearFlag: false,
  544. });
  545. }
  546. if (record.sort == 3 && e == 3) {
  547. this.setState({
  548. boFlag: true,
  549. });
  550. } else {
  551. this.setState({
  552. boFlag: false,
  553. });
  554. }
  555. }}
  556. >
  557. {arr.map((item) => {
  558. record;
  559. return (
  560. <Select.Option key={item.value} value={item.value}>
  561. {item.key}
  562. </Select.Option>
  563. );
  564. })}
  565. <Select.Option key={0} value={0}>
  566. 自定义
  567. </Select.Option>
  568. </Select>
  569. {record.dunType == 0 ? (
  570. <Input
  571. value={record.customizeName}
  572. placeholder="请输入自定义名称"
  573. required="required"
  574. onChange={(e) => {
  575. record.customizeName = e.target.value;
  576. this.setState({
  577. contactList: this.state.contactList,
  578. });
  579. }}
  580. style={{ width: "120px" }}
  581. />
  582. ) : (
  583. ""
  584. )}
  585. </div>
  586. );
  587. } else {
  588. return (
  589. <Select style={{ width: "150px" }} placeholder="请选择分类">
  590. <Select.Option
  591. key={0}
  592. value={"请选择上一项"}
  593. ></Select.Option>
  594. </Select>
  595. );
  596. }
  597. },
  598. },
  599. {
  600. title: "收款时间(特批需选择时间)",
  601. dataIndex: "waitDay",
  602. key: "waitDay",
  603. render: (text, record) => {
  604. if (record.dunTypeName) {
  605. if (record.customizeTimes) {
  606. return record.customizeTimes;
  607. }
  608. if (text == 0) {
  609. var str = "当天";
  610. } else if (!text) {
  611. var str = "";
  612. } else {
  613. var str = text + "天";
  614. }
  615. return <span>{str}</span>;
  616. }
  617. return (
  618. <div>
  619. {record.dunType == 0 ? (
  620. <DatePicker
  621. style={{ width: 150 }}
  622. onChange={(e, t) => {
  623. record.customizeTimes = t;
  624. }}
  625. />
  626. ) : (
  627. <Select
  628. placeholder="请选择时间"
  629. style={{ width: "160px" }}
  630. disabled={
  631. this.state.approval != 0 && !this.state.timeFlag
  632. ? false
  633. : true
  634. }
  635. onChange={(e) => {
  636. record.waitDay = e;
  637. }}
  638. >
  639. <Select.Option key={0}>当天</Select.Option>
  640. <Select.Option key={3}>3天</Select.Option>
  641. <Select.Option key={5}>5天</Select.Option>
  642. <Select.Option key={7}>7天</Select.Option>
  643. <Select.Option key={15}>15天</Select.Option>
  644. </Select>
  645. )}
  646. </div>
  647. );
  648. },
  649. },
  650. {
  651. title: "金额(万元)",
  652. dataIndex: "money",
  653. key: "money",
  654. render: (text, record) => {
  655. if (record.dunTypeName) {
  656. if (record.appropriationRatio) {
  657. let percent = Number(record.appropriationRatio * 100).toFixed(2);
  658. percent += "%";
  659. return <span>{percent}(拨款比例)</span>;
  660. } else {
  661. return <span>{text}</span>;
  662. }
  663. }
  664. return (
  665. <div>
  666. <div style={{ width: 70, float: "left", marginRight: 5 }}>
  667. <Select
  668. placeholder="选择"
  669. defaultValue={"金额"}
  670. onChange={(e) => {
  671. record.boStatus = e;
  672. }}
  673. >
  674. <Select.Option key={true}>比例</Select.Option>
  675. <Select.Option key={false}>金额</Select.Option>
  676. </Select>
  677. </div>
  678. <div style={{ float: "right" }}>
  679. <Input
  680. value={record.money}
  681. key={record.id}
  682. required="required"
  683. onChange={(e) => {
  684. record.money = e.target.value;
  685. this.setState({
  686. contactList: this.state.contactList,
  687. });
  688. }}
  689. style={{ width: "120px" }}
  690. />
  691. </div>
  692. </div>
  693. );
  694. // if (this.state.boFlag) {
  695. // return (
  696. // <div>
  697. // <div style={{ width: 70, float: "left", marginRight: 5 }}>
  698. // <Select
  699. // placeholder="选择"
  700. // defaultValue={"金额"}
  701. // onChange={(e) => {
  702. // record.boStatus = e;
  703. // }}
  704. // >
  705. // <Select.Option key={true}>比例</Select.Option>
  706. // <Select.Option key={false}>金额</Select.Option>
  707. // </Select>
  708. // </div>
  709. // <div style={{ float: "right" }}>
  710. // <Input
  711. // value={record.money}
  712. // key={record.id}
  713. // required="required"
  714. // onChange={(e) => {
  715. // record.money = e.target.value;
  716. // this.setState({
  717. // contactList: this.state.contactList,
  718. // });
  719. // }}
  720. // style={{ width: "120px" }}
  721. // />
  722. // </div>
  723. // </div>
  724. // );
  725. // } else {
  726. // return (
  727. // <div>
  728. // <Input
  729. // value={record.money}
  730. // placeholder="请输入金额(必填项)"
  731. // key={record.id}
  732. // required="required"
  733. // onChange={(e) => {
  734. // record.money = e.target.value;
  735. // this.setState({ contactList: this.state.contactList });
  736. // }}
  737. // style={{ width: "120px" }}
  738. // />
  739. // </div>
  740. // );
  741. // }
  742. },
  743. },
  744. {
  745. title: "服务年限",
  746. dataIndex: "startDate",
  747. key: "startDate",
  748. render: (text, record) => {
  749. if (record.dunTypeName) {
  750. return <span>{text}</span>;
  751. }
  752. return (
  753. <div>
  754. {
  755. record.dunType != 0 ?
  756. <Select
  757. placeholder="请选择年限"
  758. style={{ width: "150px" }}
  759. disabled={this.state.yearFlag ? true : false}
  760. onChange={(e) => {
  761. record.effectiveCount = e;
  762. }}
  763. >
  764. {/* <Select.Option key={null}>无</Select.Option> */}
  765. <Select.Option key={1}>一年</Select.Option>
  766. <Select.Option key={3}>两年</Select.Option>
  767. <Select.Option key={5}>三年</Select.Option>
  768. <Select.Option key={7}>四年</Select.Option>
  769. <Select.Option key={9}>五年</Select.Option>
  770. </Select> : <div />
  771. }
  772. </div>
  773. );
  774. },
  775. },
  776. {
  777. title: "催款状态",
  778. dataIndex: "status",
  779. key: "status",
  780. render: (text) => {
  781. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  782. },
  783. },
  784. {
  785. title: "操作",
  786. dataIndex: "dels",
  787. key: "dels",
  788. render: (text, record, index) => {
  789. return (
  790. <div>
  791. {this.state.processStatus == 0 ? (
  792. <Popconfirm
  793. title="是否删除?"
  794. onConfirm={() => {
  795. this.confirmDeletNew(record);
  796. }}
  797. okText="删除"
  798. cancelText="不删除"
  799. >
  800. <Button
  801. style={{
  802. marginRight: "10px",
  803. color: "#ffffff",
  804. background: "#f00",
  805. border: "none",
  806. }}
  807. >
  808. 删除
  809. </Button>
  810. </Popconfirm>
  811. ) : (
  812. ""
  813. )}
  814. {record.isSave ? (
  815. <Button
  816. type="primary"
  817. onClick={(e) => {
  818. this.contactSaveNew(record);
  819. this.setState({
  820. addFlag: false,
  821. });
  822. }}
  823. >
  824. 保存
  825. </Button>
  826. ) : (
  827. ""
  828. )}
  829. </div>
  830. );
  831. },
  832. },
  833. ],
  834. ContactsLists: [
  835. {
  836. title: "催款科目",
  837. dataIndex: "dunSubject",
  838. key: "dunSubject",
  839. render: (text, record) => {
  840. return (
  841. <Select
  842. placeholder="请选择催款科目"
  843. value={record.dunSubject}
  844. disabled
  845. style={{ width: "150px" }}
  846. onChange={(e) => {
  847. record.dunSubject = e;
  848. this.setState({ contactList: this.state.contactList });
  849. }}
  850. >
  851. {jiedian.map(function (item) {
  852. return (
  853. <Select.Option key={item.value}>{item.key}</Select.Option>
  854. );
  855. })}
  856. </Select>
  857. );
  858. },
  859. },
  860. {
  861. title: "金额(万元)",
  862. dataIndex: "money",
  863. key: "money",
  864. render: (text, record) => {
  865. return (
  866. <Input
  867. value={record.money}
  868. disabled
  869. placeholder="请输入金额(必填项)"
  870. key={record.id}
  871. required="required"
  872. onChange={(e) => {
  873. record.money = e.target.value;
  874. this.setState({ contactList: this.state.contactList });
  875. }}
  876. style={{ width: "120px" }}
  877. />
  878. );
  879. },
  880. },
  881. {
  882. title: "催款状态",
  883. dataIndex: "dunStatus",
  884. key: "dunStatus",
  885. render: (text) => {
  886. return getCuikuan(text);
  887. },
  888. },
  889. {
  890. title: "操作",
  891. dataIndex: "dels",
  892. key: "dels",
  893. render: (text, record) => {
  894. return (
  895. <div>
  896. {
  897. <Popconfirm
  898. title="是否删除?"
  899. onConfirm={() => {
  900. this.confirmDelet(record.key);
  901. }}
  902. okText="删除"
  903. cancelText="不删除"
  904. >
  905. <Button
  906. style={{
  907. marginRight: "10px",
  908. color: "#ffffff",
  909. background: "#f00",
  910. border: "none",
  911. }}
  912. >
  913. 删除
  914. </Button>
  915. </Popconfirm>
  916. }
  917. {record.id ? (
  918. ""
  919. ) : (
  920. <Button type="primary" onClick={this.contactSave} disabled>
  921. 保存
  922. </Button>
  923. )}
  924. </div>
  925. );
  926. },
  927. },
  928. ],
  929. updatas: {},
  930. };
  931. },
  932. //删除
  933. delectRow(record) {
  934. this.setState({
  935. loading: true,
  936. });
  937. $.ajax({
  938. method: "post",
  939. dataType: "json",
  940. crossDomain: false,
  941. url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
  942. data: {
  943. id: record.id,
  944. },
  945. }).done(
  946. function (data) {
  947. if (!data.error.length) {
  948. message.success("删除成功!");
  949. this.setState({
  950. loading: false,
  951. });
  952. this.xiangmu(this.state.orderNo);
  953. this.jiedianNew(this.state.orderNo);
  954. this.jiedian(this.state.orderNo);
  955. this.loadData(this.state.pageNo);
  956. } else {
  957. message.warning(data.error[0].message);
  958. }
  959. }.bind(this)
  960. );
  961. },
  962. //页面加载函数
  963. componentWillMount() {
  964. this.loadData();
  965. },
  966. //整行点击
  967. tableRowClick(record) {
  968. this.setState({
  969. visible: true,
  970. orderNos: record.orderNo,
  971. orderStatus: record.orderStatus,
  972. processStatus: record.orderStatus
  973. });
  974. this.xiangqing(record.orderNo);
  975. this.xiangmu(record.orderNo);
  976. this.jiedian(record.orderNo);
  977. this.jiedianNew(record.orderNo);
  978. this.departmentList();
  979. this.getpatentTypeList();
  980. },
  981. //点击打卡项目详情
  982. tableRowClickX(record) {
  983. this.setState({
  984. projectOperationVisible: true,
  985. dataInfor: record,
  986. })
  987. },
  988. //项目详情关闭
  989. nextCancel() {
  990. this.setState({
  991. projectOperationVisible: false,
  992. editProjectOperationVisible: false,
  993. gid: "",
  994. dataInfor: {},
  995. }, () => {
  996. this.xiangmu(this.state.orderNo);
  997. });
  998. },
  999. //订单详情
  1000. xiangqing(orderNos) {
  1001. $.ajax({
  1002. method: "get",
  1003. dataType: "json",
  1004. crossDomain: false,
  1005. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  1006. data: {
  1007. orderNo: orderNos,
  1008. },
  1009. success: function (data) {
  1010. if (data.error.length || data.data.list == "") {
  1011. if (data.error && data.error.length) {
  1012. message.warning(data.error[0].message);
  1013. }
  1014. } else {
  1015. let thisdata = data.data;
  1016. if (thisdata.approval == 0) {
  1017. thisdata.approval = 0;
  1018. } else {
  1019. thisdata.approval = 1;
  1020. }
  1021. // if (thisdata.approval == 2) {
  1022. // thisdata.approval = "特批通过";
  1023. // } else if (thisdata.approval == 3) {
  1024. // thisdata.approval = "特批驳回";
  1025. // }
  1026. this.setState({
  1027. id: thisdata.id,
  1028. orderUid: thisdata.uid,
  1029. kehuId: thisdata.buyerId,
  1030. orderNo: thisdata.orderNo, //订单编号
  1031. contractNo: thisdata.contractNo, //合同编号
  1032. userName: thisdata.userName, //客户名称
  1033. signDate: thisdata.signDate, //签单时间
  1034. examineName: thisdata.examineName,
  1035. processStatus: thisdata.processStatus, //流程状态
  1036. liquidationStatus: thisdata.liquidationStatus, //结算状态
  1037. contacts: thisdata.contacts, //企业联系人
  1038. contactMobile: thisdata.contactMobile, //联系人电话
  1039. legalPerson: thisdata.legalPerson, //法人
  1040. legalPersonTel: thisdata.legalPersonTel, //法人电话
  1041. firstAmount: thisdata.firstAmount + "", //签单金额
  1042. totalAmount: thisdata.totalAmount + "", //首付金额
  1043. settlementAmount: thisdata.settlementAmount, //已收款项
  1044. orderRemarks: thisdata.orderRemarks, //订单留言
  1045. orgCodeUrl: thisdata.contractPictureUrl
  1046. ? splitUrl(
  1047. thisdata.contractPictureUrl,
  1048. ",",
  1049. globalConfig.avatarHost + "/upload"
  1050. )
  1051. : [], //图片地址
  1052. replenishUrl: thisdata.agreementUrl
  1053. ? splitUrl(
  1054. thisdata.agreementUrl,
  1055. ",",
  1056. globalConfig.avatarHost + "/upload"
  1057. )
  1058. : [], //图片地址
  1059. contentUrl: thisdata.serviceContent
  1060. ? splitUrl(
  1061. thisdata.serviceContent,
  1062. ",",
  1063. globalConfig.avatarHost + "/upload"
  1064. )
  1065. : [], //图片地址
  1066. salesmanName: thisdata.salesmanName, //营销员名称
  1067. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  1068. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  1069. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  1070. financeName: thisdata.financeName, //财务名称
  1071. financeMobile: thisdata.financeMobile, //财务电话
  1072. nowFinance: thisdata.nowFinance, //财务名称
  1073. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  1074. initiateName: thisdata.initiateName, //驳回人
  1075. backDate: thisdata.backDate, //驳回时间
  1076. reason: thisdata.reason, //驳回原因
  1077. approval: thisdata.approval, //特批状态
  1078. organizationSearch: thisdata.orderDep,
  1079. //approval:thisdata.approval==0?thisdata.approval.toString():thisdata.approval,//特批状态
  1080. outsource: thisdata.outsource == 0 ? "否" : "是",
  1081. deleteSign: thisdata.deleteSign,
  1082. updatas: {
  1083. salesType: thisdata.salesType,//销售类型
  1084. userType: thisdata.userType,//客户所属类型
  1085. other: thisdata.other,//3渠道名 4,5描述
  1086. },
  1087. channelName: thisdata.salesType == "3" ? thisdata.other : "",//销售类型为渠道的时候给编辑出的渠道名称赋值
  1088. knowledgeServices: thisdata.knowledgeServices, //知识产权服务
  1089. auditServices: thisdata.auditServices, //审计服务
  1090. addDeductionServices: thisdata.addDeductionServices, //加计扣除服务
  1091. knowledgeOther: thisdata.knowledgeOther, //知识产权服务其他描述
  1092. auditOther: thisdata.auditOther, //审计服务其他描述
  1093. addDeductionOther: thisdata.addDeductionOther, //加计扣除服务其他描述
  1094. isShow: thisdata.knowledgeServices ? true : false, //无数据默认隐藏
  1095. patentStatus: thisdata.patentStatus, // 知识产权情况
  1096. isProperty: thisdata.patentStatus == null ? null : thisdata.patentStatus == 0 ? 1 : 2,
  1097. approvaType: thisdata.type ? thisdata.type.split(",").map(Number) : [], // 特批类型
  1098. typeExplain: thisdata.typeExplain,
  1099. confidenBreachData: this.setConfidenBreachFormData(thisdata) // 设置保密&违约说明表单默认数据
  1100. });
  1101. }
  1102. }.bind(this),
  1103. }).always(
  1104. function () {
  1105. this.setState({
  1106. loading: false,
  1107. });
  1108. }.bind(this)
  1109. );
  1110. },
  1111. // 拆分详细
  1112. showRes(record) {
  1113. this.setState({
  1114. resVisible: true,
  1115. resRecord: record,
  1116. });
  1117. },
  1118. resCancel() {
  1119. this.setState({
  1120. resVisible: false,
  1121. });
  1122. },
  1123. //项目列表
  1124. xiangmu(orderNos) {
  1125. $.ajax({
  1126. method: "get",
  1127. dataType: "json",
  1128. crossDomain: false,
  1129. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  1130. data: {
  1131. orderNo: orderNos,
  1132. },
  1133. success: function (data) {
  1134. let theArr = [];
  1135. if (data.error.length || data.data.list == "") {
  1136. if (data.error && data.error.length) {
  1137. message.warning(data.error[0].message);
  1138. }
  1139. } else {
  1140. for (let i = 0; i < data.data.length; i++) {
  1141. let thisdata = data.data[i];
  1142. thisdata.key = i;
  1143. thisdata.sort = thisdata.cSort;
  1144. theArr.push(thisdata);
  1145. }
  1146. }
  1147. this.setState({
  1148. dataSourceX: theArr,
  1149. paginations: false,
  1150. });
  1151. }.bind(this),
  1152. }).always(
  1153. function () {
  1154. this.setState({
  1155. loading: false,
  1156. });
  1157. }.bind(this)
  1158. );
  1159. },
  1160. //节点列表
  1161. jiedian(orderNos) {
  1162. $.ajax({
  1163. method: "get",
  1164. dataType: "json",
  1165. crossDomain: false,
  1166. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  1167. data: {
  1168. orderNo: orderNos,
  1169. },
  1170. success: function (data) {
  1171. let theArr = [];
  1172. let thisData = [];
  1173. if (data.error.length || data.data.list == "") {
  1174. if (data.error && data.error.length) {
  1175. message.warning(data.error[0].message);
  1176. }
  1177. } else {
  1178. for (let i = 0; i < data.data.length; i++) {
  1179. thisData = data.data[i];
  1180. theArr.push({
  1181. key: i,
  1182. dunSubject: thisData.dunSubject
  1183. ? thisData.dunSubject.toString()
  1184. : "", //催款科目
  1185. id: thisData.id, //节点Id
  1186. money: thisData.money, //催款金额
  1187. dunStatus: thisData.dunStatus, //催款状态
  1188. orderNo: thisData.orderNo,
  1189. });
  1190. }
  1191. this.setState({
  1192. contactList: theArr,
  1193. });
  1194. }
  1195. }.bind(this),
  1196. }).always(
  1197. function () {
  1198. this.setState({
  1199. loading: false,
  1200. });
  1201. }.bind(this)
  1202. );
  1203. },
  1204. //查看催款节点
  1205. jiedianNew(orderNos) {
  1206. $.ajax({
  1207. method: "get",
  1208. dataType: "json",
  1209. crossDomain: false,
  1210. url:
  1211. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  1212. data: {
  1213. orderNo: orderNos,
  1214. },
  1215. success: function (data) {
  1216. if (data.error && data.error.length) {
  1217. message.warning(data.error[0].message);
  1218. } else {
  1219. let theArr = [];
  1220. let thisData = [];
  1221. let arr = data.data || [];
  1222. let totalCui = 0;
  1223. for (let i = 0; i < arr.length; i++) {
  1224. thisData = arr[i];
  1225. totalCui += +thisData.money;
  1226. theArr.push({
  1227. key: i,
  1228. dunSubject: thisData.dunSubject
  1229. ? thisData.dunSubject.toString()
  1230. : "", //催款科目
  1231. id: thisData.id, //节点Id
  1232. money: thisData.money, //催款金额
  1233. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  1234. commodityName: thisData.commodityName,
  1235. projectType: thisData.projectType,
  1236. dunTypeName: thisData.dunTypeName,
  1237. status: thisData.status,
  1238. waitDay: thisData.waitDay,
  1239. effectiveCount: thisData.effectiveCount,
  1240. startDate: thisData.startDate,
  1241. dunType: thisData.dunType,
  1242. appropriationRatio: thisData.appropriationRatio,
  1243. customizeName: thisData.customizeName,
  1244. customizeTimes: thisData.customizeTimes,
  1245. tid: thisData.tid,
  1246. });
  1247. }
  1248. if (!totalCui) {
  1249. totalCui = 0;
  1250. }
  1251. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  1252. this.setState({
  1253. contactListNew: theArr,
  1254. totalCui: parseFloat(totalCui),
  1255. });
  1256. }
  1257. }.bind(this),
  1258. }).always(
  1259. function () {
  1260. this.setState({
  1261. loading: false,
  1262. });
  1263. }.bind(this)
  1264. );
  1265. },
  1266. //催款节点保存
  1267. contactSave() {
  1268. for (let i = 0; i < this.state.contactList.length; i++) {
  1269. if (moneyVerify(this.state.contactList[i].money)) {
  1270. return;
  1271. }
  1272. }
  1273. this.setState({
  1274. loading: true,
  1275. });
  1276. $.ajax({
  1277. url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
  1278. method: "post",
  1279. data: {
  1280. orderNo: this.state.orderNo,
  1281. orderDun: JSON.stringify(this.state.contactList),
  1282. },
  1283. }).done(
  1284. function (data) {
  1285. this.setState({
  1286. loading: false,
  1287. });
  1288. if (!data.error.length) {
  1289. message.success("保存成功!");
  1290. this.jiedian(this.state.orderNo);
  1291. } else {
  1292. message.warning(data.error[0].message);
  1293. }
  1294. }.bind(this)
  1295. );
  1296. },
  1297. //催款节点保存
  1298. contactSaveNew(record) {
  1299. if (record.dunType == 0) {
  1300. if (!record.customizeTimes) {
  1301. message.warning("请输入自定义时间");
  1302. return;
  1303. } else if (!record.customizeName) {
  1304. message.warning("请输入自定义科目");
  1305. return;
  1306. }
  1307. }
  1308. if (
  1309. this.state.approval == 1 &&
  1310. record.dunType == 1 &&
  1311. !record.waitDay
  1312. ) {
  1313. message.warning("请填写收款时间");
  1314. return
  1315. }
  1316. if (record.boStatus == "false") {
  1317. record.boStatus = false;
  1318. } else if (record.boStatus == "true") {
  1319. record.boStatus = true;
  1320. }
  1321. if (!this.state.yearFlag) {
  1322. if (!record.effectiveCount && !record.dunTypeCustom) {
  1323. message.warning("请选择服务年限");
  1324. return;
  1325. }
  1326. } else {
  1327. record.effectiveCount = "";
  1328. }
  1329. if (record.money == "") {
  1330. message.warning("请填写金额");
  1331. return;
  1332. }
  1333. if (record.boStatus) {
  1334. if (
  1335. typeof +record.money == "number" &&
  1336. +record.money >= 0 &&
  1337. +record.money <= 1
  1338. ) {
  1339. record.appropriationRatio = record.money;
  1340. } else {
  1341. message.warning("金额比例填写错误,比例范围0~1");
  1342. return;
  1343. }
  1344. }
  1345. if (!record.dunType && record.dunType != 0) {
  1346. message.warning("请选择对应科目");
  1347. return;
  1348. }
  1349. if (record.dunType != 1) {
  1350. record.waitDay = "";
  1351. }
  1352. this.setState({
  1353. loading: true,
  1354. });
  1355. if (record.boStatus) {
  1356. $.ajax({
  1357. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  1358. method: "post",
  1359. data: {
  1360. orderNo: record.orderNo,
  1361. tid: record.tid,
  1362. projectType: record.sort,
  1363. dunType: record.dunType,
  1364. appropriationRatio: record.appropriationRatio,
  1365. waitDay: record.waitDay,
  1366. effectiveCount: record.effectiveCount,
  1367. customizeTimes:
  1368. record.dunType == 0 ? record.customizeTimes : undefined,
  1369. customizeName:
  1370. record.dunType == 0 ? record.customizeName : undefined,
  1371. },
  1372. }).done(
  1373. function (data) {
  1374. this.setState({
  1375. loading: false,
  1376. });
  1377. if (!data.error.length) {
  1378. message.success("保存成功!");
  1379. this.setState({
  1380. cuiFlag: false,
  1381. boFlag: false,
  1382. });
  1383. this.jiedianNew(record.orderNo);
  1384. } else {
  1385. message.warning(data.error[0].message);
  1386. }
  1387. }.bind(this)
  1388. );
  1389. } else {
  1390. $.ajax({
  1391. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  1392. method: "post",
  1393. data: {
  1394. orderNo: record.orderNo,
  1395. tid: record.tid,
  1396. projectType: record.sort,
  1397. dunType: record.dunType,
  1398. money: record.money,
  1399. waitDay: record.waitDay,
  1400. effectiveCount: record.effectiveCount,
  1401. customizeTimes:
  1402. record.dunType == 0 ? record.customizeTimes : undefined,
  1403. customizeName:
  1404. record.dunType == 0 ? record.customizeName : undefined,
  1405. },
  1406. }).done(
  1407. function (data) {
  1408. this.setState({
  1409. loading: false,
  1410. });
  1411. if (!data.error.length) {
  1412. message.success("保存成功!");
  1413. this.setState({
  1414. cuiFlag: false,
  1415. boFlag: false,
  1416. });
  1417. this.jiedianNew(record.orderNo);
  1418. } else {
  1419. message.warning(data.error[0].message);
  1420. }
  1421. }.bind(this)
  1422. );
  1423. }
  1424. },
  1425. //点击新增催款节点
  1426. addcontact() {
  1427. this.state.contactList.push({
  1428. key: this.state.contactList.length,
  1429. money: "",
  1430. dunSubject: undefined,
  1431. orderNo: this.state.orderNo,
  1432. dunTarget: this.state.kehuId,
  1433. });
  1434. this.setState({
  1435. contactList: this.state.contactList,
  1436. });
  1437. },
  1438. //点击新增催款节点
  1439. addcontactNew() {
  1440. this.state.contactListNew.push({
  1441. key: this.state.contactListNew.length,
  1442. money: "",
  1443. dunSubject: undefined,
  1444. orderNo: this.state.orderNo,
  1445. dunTarget: this.state.kehuId,
  1446. });
  1447. this.setState({
  1448. contactListNew: this.state.contactListNew,
  1449. cuiFlag: true,
  1450. });
  1451. },
  1452. //删除收款节点
  1453. confirmDelet(index) {
  1454. this.state.contactList.splice(index, 1);
  1455. this.setState({
  1456. contactList: this.state.contactList,
  1457. });
  1458. this.contactSave();
  1459. },
  1460. //删除收款节点
  1461. confirmDeletNew(index) {
  1462. if (index.id) {
  1463. this.state.contactListNew.splice(index.key, 1);
  1464. this.setState({
  1465. contactListNew: this.state.contactListNew,
  1466. cuiFlag: false,
  1467. addFlag: false,
  1468. boFlag: false,
  1469. });
  1470. $.ajax({
  1471. url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
  1472. method: "post",
  1473. data: {
  1474. id: index.id,
  1475. },
  1476. }).done(
  1477. function (data) {
  1478. this.setState({
  1479. loading: false,
  1480. });
  1481. if (!data.error.length) {
  1482. message.success("删除成功!");
  1483. this.setState({
  1484. cuiFlag: false,
  1485. });
  1486. this.jiedianNew(this.state.orderNo);
  1487. } else {
  1488. message.warning(data.error[0].message);
  1489. }
  1490. }.bind(this)
  1491. );
  1492. } else {
  1493. this.state.contactListNew.splice(index.key, 1);
  1494. this.setState({
  1495. contactListNew: this.state.contactListNew,
  1496. cuiFlag: false,
  1497. addFlag: false,
  1498. boFlag: false,
  1499. });
  1500. }
  1501. },
  1502. validConfiderBreachForm(data) {
  1503. let flag = true;
  1504. let msg = '';
  1505. data.ndaUrl = data.ndaUrl || []
  1506. data.breachClauseUrl = data.breachClauseUrl || []
  1507. if (data.nda === undefined || data.nda === null || data.nda === '') {
  1508. flag = false;
  1509. msg = '请选择是否签订保密协议'
  1510. } else if (data.nda == '1' && !data.ndaUrl.length) {
  1511. flag = false;
  1512. msg = '请上传保密协议图片'
  1513. } else if (data.breachClause1 === undefined || data.breachClause1 === null || data.breachClause1 === '') {
  1514. flag = false;
  1515. msg = '请选择是否有违约条款'
  1516. } else if (data.breachClause1 != '0' && !data.breachClause2) {
  1517. flag = false;
  1518. msg = '请选择与技术有关/无关'
  1519. } else if (data.breachClause1 != '0' && !data.breachClauseUrl.length) {
  1520. flag = false;
  1521. msg = '请上传签约条款图片'
  1522. }
  1523. return { flag, msg }
  1524. },
  1525. // 获取保密&违约说明数据
  1526. getConfidenBreachFormData(data) {
  1527. const _data = Object.assign({}, data);
  1528. _data.ndaUrl = _data.ndaUrl || [];
  1529. _data.breachClauseUrl = _data.breachClauseUrl || [];
  1530. if (_data.breachClause1 == '0') {
  1531. _data.breachClause = '0'
  1532. } else if (_data.breachClause1 == '1' && _data.breachClause2 == '1') {
  1533. // 有限责任违约条款、与技术服务有关
  1534. _data.breachClause = '1'
  1535. } else if (_data.breachClause1 == '1' && _data.breachClause2 == '0') {
  1536. // 有限责任违约条款、与技术服务无关
  1537. _data.breachClause = '2'
  1538. } else if (_data.breachClause1 == '2' && _data.breachClause2 == '1') {
  1539. // 无限责任违约条款、与技术服务有关
  1540. _data.breachClause = '3'
  1541. } else if (_data.breachClause1 == '2' && _data.breachClause2 == '0') {
  1542. // 无限责任违约条款、与技术服务无关
  1543. _data.breachClause = '4'
  1544. }
  1545. _data.ndaUrl = _data.ndaUrl.map(item => item.response.data).join(',')
  1546. _data.breachClauseUrl = _data.breachClauseUrl.map(item => item.response.data).join(',')
  1547. delete _data.breachClause1
  1548. delete _data.breachClause2
  1549. return _data;
  1550. },
  1551. setConfidenBreachFormData(data) {
  1552. let breachClause1, breachClause2 = ''
  1553. if (data.breachClause == 0) {
  1554. breachClause1 = '0'
  1555. } else if (data.breachClause == 1) {
  1556. breachClause1 = '1'
  1557. breachClause2 = '1'
  1558. } else if (data.breachClause == 2) {
  1559. breachClause1 = '1'
  1560. breachClause2 = '0'
  1561. } else if (data.breachClause == 3) {
  1562. breachClause1 = '2'
  1563. breachClause2 = '1'
  1564. } else if (data.breachClause == 4) {
  1565. breachClause1 = '2'
  1566. breachClause2 = '0'
  1567. }
  1568. return {
  1569. nda: data.nda,
  1570. ndaUrl: data.ndaUrl ? splitUrl(
  1571. data.ndaUrl,
  1572. ",",
  1573. globalConfig.avatarHost + "/upload"
  1574. ) : [],
  1575. breachClause1,
  1576. breachClause2,
  1577. breachClauseUrl: data.breachClauseUrl ? splitUrl(
  1578. data.breachClauseUrl,
  1579. ",",
  1580. globalConfig.avatarHost + "/upload"
  1581. ) : []
  1582. }
  1583. },
  1584. //重新提交
  1585. examOk() {
  1586. let theorgCodeUrl = [];
  1587. if (this.state.orgCodeUrl.length) {
  1588. let picArr = [];
  1589. this.state.orgCodeUrl.map(function (item) {
  1590. if (
  1591. item.response &&
  1592. item.response.data &&
  1593. item.response.data.length
  1594. ) {
  1595. picArr.push(item.response.data);
  1596. }
  1597. });
  1598. theorgCodeUrl = picArr.join(",");
  1599. }
  1600. let theReplenishUrl = [];
  1601. if (this.state.replenishUrl.length) {
  1602. let picArr = [];
  1603. this.state.replenishUrl.map(function (item) {
  1604. if (
  1605. item.response &&
  1606. item.response.data &&
  1607. item.response.data.length
  1608. ) {
  1609. picArr.push(item.response.data);
  1610. }
  1611. });
  1612. theReplenishUrl = picArr.join(",");
  1613. }
  1614. // 服务内容上传图片
  1615. let contentUrl = [];
  1616. if (this.state.contentUrl.length) {
  1617. let picArr = [];
  1618. this.state.contentUrl.map(function (item) {
  1619. if (
  1620. item.response &&
  1621. item.response.data &&
  1622. item.response.data.length
  1623. ) {
  1624. picArr.push(item.response.data);
  1625. }
  1626. });
  1627. contentUrl = picArr.join(",");
  1628. } else {
  1629. message.warning("请上传服务内容图片")
  1630. return
  1631. }
  1632. if (moneyVerify(this.state.totalAmount)) {
  1633. return;
  1634. }
  1635. if (moneyVerify(this.state.firstAmount)) {
  1636. return;
  1637. }
  1638. if (!this.state.totalAmount) {
  1639. message.warning("签单金额不能为空");
  1640. this.refs.signFirstPayment.focus();
  1641. return false;
  1642. }
  1643. if (!this.state.firstAmount) {
  1644. message.warning("首付金额不能为空");
  1645. this.refs.signFirstPayment.focus();
  1646. return false;
  1647. }
  1648. if (!this.state.contacts) {
  1649. message.warning("企业联系人不能为空");
  1650. return
  1651. }
  1652. if (!this.state.contactMobile) {
  1653. message.warning("企业联系人电话不能为空");
  1654. return
  1655. }
  1656. var regeX1 = /^1[3456789]\d{9}$/;
  1657. var regex2 = /^((0\d{2,3})-)?(\d{7,8})$/;
  1658. if (regeX1.test(this.state.contactMobile) == false && regex2.test(this.state.contactMobile) == false) {
  1659. message.warning("请输入正确的企业联系人电话");
  1660. return false;
  1661. }
  1662. if (this.state.isShow) {
  1663. if (this.state.knowledgeServices == null ||
  1664. this.state.auditServices == null ||
  1665. this.state.addDeductionServices == null) {
  1666. message.warn("请完善高新纯咨询合同说明!")
  1667. return
  1668. }
  1669. }
  1670. if (!this.state.isProperty) {
  1671. message.warn("请完善知识产权情况!")
  1672. return
  1673. }
  1674. if (this.state.isProperty == 2 && !this.state.patentStatus) {
  1675. message.warn("请完善知识产权情况!")
  1676. return
  1677. }
  1678. if (!this.state.orderRemarks) {
  1679. message.warning("订单留言不能为空");
  1680. return false;
  1681. }
  1682. if (this.state.approval == 1) {
  1683. if (this.state.approvaType && this.state.approvaType.length == 0) {
  1684. message.warning("请勾选特批状态!");
  1685. return false;
  1686. }
  1687. if (this.state.approvaType.indexOf(0) !== -1 && !this.state.typeExplain) {
  1688. message.warning("请填写特批其他说明!");
  1689. return false;
  1690. }
  1691. }
  1692. // if (!theorgCodeUrl) {
  1693. // message.warning("图片过大,上传失败");
  1694. // this.refs.signFirstPayment.focus();
  1695. // return false;
  1696. // }
  1697. // if (
  1698. // this.state.approval == "特批通过" ||
  1699. // this.state.approval == "特批驳回"
  1700. // ) {
  1701. // message.warning("特批状态不正确,请重新填写");
  1702. // return false;
  1703. // }
  1704. const arr = this.state.contactListNew || [];
  1705. for (let i = 0; i < arr.length; i++) {
  1706. if (
  1707. arr[i].dunType == 1 &&
  1708. arr[i].waitDay != null &&
  1709. this.state.approval == 0
  1710. ) {
  1711. message.warning(
  1712. "非特批存在填写催款节点首付时间的情况,请删除后重新填写保存"
  1713. );
  1714. return false;
  1715. } else if (
  1716. arr[i].dunType == 1 &&
  1717. arr[i].waitDay == null &&
  1718. this.state.approval == 1
  1719. ) {
  1720. message.warning(
  1721. "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存"
  1722. );
  1723. return false;
  1724. }
  1725. if (!this.state.contactListNew[i].id) {
  1726. message.warning("请保存催款节点");
  1727. return false;
  1728. }
  1729. }
  1730. if (this.state.updatas.salesType == null) {
  1731. message.warning("请选择销售类型!");
  1732. return
  1733. }
  1734. let breachValid = this.validConfiderBreachForm(this.state.confidenBreachData)
  1735. if (!breachValid.flag) {
  1736. message.warning(breachValid.msg);
  1737. return false;
  1738. }
  1739. const confidenBreachData = this.getConfidenBreachFormData(this.state.confidenBreachData)
  1740. this.setState({
  1741. flag: true,
  1742. });
  1743. $.ajax({
  1744. method: "post",
  1745. dataType: "json",
  1746. crossDomain: false,
  1747. // url: globalConfig.context + "/api/admin/newOrder/updateServiceOrderNew",
  1748. url: globalConfig.context + "/api/admin/newOrder/submitOrder",
  1749. data: {
  1750. orderNo: this.state.orderNo, //订单编号
  1751. totalAmount: this.state.totalAmount, //总金额
  1752. firstAmount: this.state.firstAmount, //首付
  1753. isSubmit: 1, //保存草稿还是提交
  1754. signDate: this.state.signDate, //签单日期
  1755. contacts: this.state.contacts, //企业负责人
  1756. contactMobile: this.state.contactMobile, //负责人联系方式
  1757. legalPerson: this.state.legalPerson, //企业法人
  1758. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  1759. approval: this.state.approval, //特批状态
  1760. contractNo: this.state.contractNo, //合同编号
  1761. orderRemarks: this.state.orderRemarks, //订单备注
  1762. contractPictureUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  1763. agreementUrl: theReplenishUrl.length ? theReplenishUrl : "",
  1764. serviceContent: contentUrl.length ? contentUrl : "",
  1765. orderDep: this.state.organizationSearch,
  1766. knowledgeServices: this.state.isShow ? this.state.knowledgeServices : undefined, //知识产权服务
  1767. auditServices: this.state.isShow ? this.state.auditServices : undefined, //审计服务
  1768. addDeductionServices: this.state.isShow ? this.state.addDeductionServices : undefined, //加计扣除服务
  1769. knowledgeOther: this.state.isShow ? this.state.knowledgeOther : undefined, //知识产权服务其他描述
  1770. auditOther: this.state.isShow ? this.state.auditOther : undefined, //审计服务其他描述
  1771. addDeductionOther: this.state.isShow ? this.state.addDeductionOther : undefined, //加计扣除服务其他描述
  1772. patentStatus: this.state.patentStatus, //知识产权情况
  1773. type: this.state.approvaType.sort(compare).toString(), // 特批类型
  1774. typeExplain: this.state.approvaType.indexOf(0) === -1 ? "" : this.state.typeExplain, // 其他备注
  1775. nda: confidenBreachData.nda,
  1776. ndaUrl: confidenBreachData.ndaUrl,
  1777. breachClause: confidenBreachData.breachClause,
  1778. breachClauseUrl: confidenBreachData.breachClauseUrl,
  1779. },
  1780. success: function (data) {
  1781. if (data.error.length || data.data.list == "") {
  1782. if (data.error && data.error.length) {
  1783. message.warning(data.error[0].message);
  1784. this.setState({
  1785. flag: false,
  1786. });
  1787. }
  1788. } else {
  1789. message.success("该订单已重新提交~");
  1790. this.setState({
  1791. visible: false,
  1792. flag: false,
  1793. });
  1794. this.loadData(this.state.pageNo);
  1795. }
  1796. }.bind(this),
  1797. }).always(
  1798. function () {
  1799. this.setState({
  1800. loading: false,
  1801. });
  1802. }.bind(this)
  1803. );
  1804. },
  1805. //订单作废
  1806. examOks() {
  1807. this.setState({
  1808. flag: true,
  1809. });
  1810. $.ajax({
  1811. method: "post",
  1812. dataType: "json",
  1813. crossDomain: false,
  1814. url: globalConfig.context + "/api/admin/newOrder/deleteOrderNew",
  1815. data: {
  1816. orderNo: this.state.orderNo, //订单编号
  1817. },
  1818. success: function (data) {
  1819. if (data.error.length || data.data.list == "") {
  1820. if (data.error && data.error.length) {
  1821. message.warning(data.error[0].message);
  1822. }
  1823. } else {
  1824. message.success("该订单已作废~");
  1825. this.setState({
  1826. visible: false,
  1827. flag: false,
  1828. });
  1829. this.loadData(this.state.pageNo);
  1830. }
  1831. }.bind(this),
  1832. }).always(
  1833. function () {
  1834. this.setState({
  1835. loading: false,
  1836. flag: false,
  1837. });
  1838. }.bind(this)
  1839. );
  1840. },
  1841. departmentList() {
  1842. this.setState({
  1843. loading: true,
  1844. });
  1845. $.ajax({
  1846. method: "get",
  1847. dataType: "json",
  1848. crossDomain: false,
  1849. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  1850. data: {},
  1851. success: function (data) {
  1852. let thedata = data.data;
  1853. let theArr = [];
  1854. if (!thedata) {
  1855. if (data.error && data.error.length) {
  1856. message.warning(data.error[0].message);
  1857. }
  1858. thedata = {};
  1859. } else {
  1860. thedata.map(function (item, index) {
  1861. theArr.push({
  1862. key: index,
  1863. name: item.name,
  1864. id: item.id,
  1865. depNo: item.depNo,
  1866. });
  1867. });
  1868. }
  1869. this.setState({
  1870. departmentArr: theArr,
  1871. });
  1872. }.bind(this),
  1873. }).always(
  1874. function () {
  1875. this.setState({
  1876. loading: false,
  1877. });
  1878. }.bind(this)
  1879. );
  1880. },
  1881. rizhi() {
  1882. this.setState({
  1883. loading: true,
  1884. });
  1885. $.ajax({
  1886. method: "get",
  1887. dataType: "json",
  1888. crossDomain: false,
  1889. url: "/api/admin/newOrder/selectOrderLog",
  1890. data: {
  1891. orderNo: this.state.orderNo,
  1892. },
  1893. success: function (data) {
  1894. let theArr = [];
  1895. let thisData = data.data;
  1896. if (!thisData.length) {
  1897. if (data.error && data.error.length) {
  1898. message.warning(data.error[0].message);
  1899. }
  1900. thisData = {};
  1901. } else {
  1902. for (let i = 0; i < data.data.length; i++) {
  1903. let thisdata = data.data[i];
  1904. theArr.push({
  1905. processName: thisdata.processName,
  1906. adminName: thisdata.adminName,
  1907. createDate: thisdata.createDate,
  1908. remarks: thisdata.remarks,
  1909. });
  1910. }
  1911. }
  1912. this.setState({
  1913. dataSourcerizhi: theArr,
  1914. });
  1915. }.bind(this),
  1916. }).always(
  1917. function () {
  1918. this.setState({
  1919. loading: false,
  1920. });
  1921. }.bind(this)
  1922. );
  1923. },
  1924. //查看订单日志
  1925. getOrderLog() {
  1926. this.setState({
  1927. rizhivisible: true,
  1928. });
  1929. this.rizhi();
  1930. },
  1931. closeOrderLog() {
  1932. this.setState({
  1933. rizhivisible: false,
  1934. });
  1935. },
  1936. //点击签单
  1937. handleCancels() {
  1938. this.setState({
  1939. isSubmit: 1,
  1940. });
  1941. },
  1942. //点击签单
  1943. handleCancelq() {
  1944. this.setState({
  1945. isSubmit: 0,
  1946. });
  1947. },
  1948. resets() {
  1949. this.state.orderNoSearch = "";
  1950. this.state.customerName = "";
  1951. this.state.releaseDate[0] = undefined;
  1952. this.state.releaseDate[1] = undefined;
  1953. this.loadData();
  1954. },
  1955. //点击添加项目明细
  1956. addDetailed() {
  1957. const { dataSourceX = [] } = this.state
  1958. this.setState({
  1959. projectOperationVisible: true,
  1960. newData: dataSourceX,
  1961. });
  1962. },
  1963. //搜索
  1964. search() {
  1965. this.setState({
  1966. //signBillVisible:false
  1967. });
  1968. this.loadData();
  1969. },
  1970. getOrgCodeUrl(e) {
  1971. this.setState({ orgCodeUrl: e });
  1972. },
  1973. getReplenishUrl(e) {
  1974. this.setState({ replenishUrl: e });
  1975. },
  1976. getContentUrl(e) {
  1977. this.setState({ contentUrl: e });
  1978. },
  1979. //关闭详情
  1980. visitCancel() {
  1981. this.setState({
  1982. visible: false,
  1983. cuiFlag: false,
  1984. addFlag: false,
  1985. boFlag: false,
  1986. });
  1987. this.loadData(this.state.pageNo);
  1988. },
  1989. visitOk() {
  1990. this.setState({
  1991. visible: false,
  1992. });
  1993. this.resets();
  1994. },
  1995. //客户
  1996. selectAutoCUT(value) {
  1997. let autoIds;
  1998. let fwList = this.state.customerArr;
  1999. fwList.map(function (item) {
  2000. if (value == item.name) {
  2001. autoIds = item.id;
  2002. }
  2003. });
  2004. this.setState({
  2005. customerName: value,
  2006. autoId: autoIds,
  2007. });
  2008. },
  2009. getpatentTypeList() {
  2010. $.ajax({
  2011. method: "get",
  2012. dataType: "json",
  2013. crossDomain: false,
  2014. url: globalConfig.context + '/api/admin/orderProject/getPatentType',
  2015. success: function (data) {
  2016. if (data.error.length === 0) {
  2017. this.setState({
  2018. patentTypeList: data.data
  2019. })
  2020. } else {
  2021. message.warning(data.error[0].message);
  2022. };
  2023. }.bind(this)
  2024. });
  2025. },
  2026. //加载(自动补全)
  2027. supervisor(e, state) {
  2028. //客户名称与服务名称自动补全
  2029. let api = state
  2030. ? "/api/admin/customer/getCustomerByName"
  2031. : "/api/admin/order/getBusinessProjectByName";
  2032. $.ajax({
  2033. method: "get",
  2034. dataType: "json",
  2035. crossDomain: false,
  2036. url: globalConfig.context + api,
  2037. data: state
  2038. ? {
  2039. name: e,
  2040. type: this.state.customType,
  2041. }
  2042. : {
  2043. businessName: e,
  2044. },
  2045. success: function (data) {
  2046. let thedata = data.data;
  2047. if (!thedata) {
  2048. if (data.error && data.error.length) {
  2049. message.warning(data.error[0].message);
  2050. }
  2051. thedata = {};
  2052. }
  2053. this.setState({
  2054. states: state,
  2055. customerArr: thedata,
  2056. });
  2057. }.bind(this),
  2058. }).always(
  2059. function () {
  2060. this.setState({
  2061. loading: false,
  2062. });
  2063. }.bind(this)
  2064. );
  2065. },
  2066. //上级主管输入框失去焦点是判断客户是否存在
  2067. selectAuto(value) {
  2068. let kid = [];
  2069. let fwList = this.state.customerArr;
  2070. fwList.map(function (item) {
  2071. if (value == item.bname) {
  2072. kid = item;
  2073. }
  2074. });
  2075. if (kid.type == "1") {
  2076. this.setState({
  2077. displayFees: "block",
  2078. });
  2079. } else {
  2080. this.setState({
  2081. displayFees: "none",
  2082. });
  2083. }
  2084. this.setState({
  2085. commodityName: value,
  2086. gid: kid.id,
  2087. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  2088. commodityFirstPayment:
  2089. kid.firstPayment == 0
  2090. ? kid.firstPayment.toString()
  2091. : kid.firstPayment,
  2092. });
  2093. },
  2094. //服务值改变时请求客户名称
  2095. httpChange(e) {
  2096. this.state.gid = "";
  2097. if (e.length >= 1) {
  2098. this.supervisor(e, false);
  2099. }
  2100. this.setState({
  2101. commodityName: e,
  2102. });
  2103. },
  2104. changeList(arr) {
  2105. const newArr = [];
  2106. this.state.columns.forEach(item => {
  2107. arr.forEach(val => {
  2108. if (val === item.title) {
  2109. newArr.push(item);
  2110. }
  2111. });
  2112. });
  2113. this.setState({
  2114. changeList: newArr
  2115. });
  2116. },
  2117. addRowColor(record) {
  2118. if (!!record.splitList && record.splitList.length > 0) {
  2119. return 'light'
  2120. } else {
  2121. return 'dark'
  2122. }
  2123. },
  2124. render() {
  2125. const expandedRowRenderVip = (e) => {
  2126. const data = e.splitList;
  2127. let columns = [];
  2128. if (data instanceof Array && data.length) {
  2129. if (e.cSort == 6) {
  2130. columns = [
  2131. {
  2132. title: "负责人",
  2133. dataIndex: "receiverName",
  2134. key: "receiverName",
  2135. width: 140,
  2136. },
  2137. {
  2138. title: "负责人电话",
  2139. dataIndex: "receiverMobile",
  2140. key: "receiverMobile",
  2141. align: "center",
  2142. width: 120,
  2143. },
  2144. {
  2145. title: "会员负责人",
  2146. dataIndex: "projectMemberName",
  2147. key: "projectMemberName",
  2148. width: 140,
  2149. align: "center",
  2150. },
  2151. {
  2152. title: "项目状态",
  2153. dataIndex: "projectStatus",
  2154. key: "projectStatus",
  2155. align: "center",
  2156. width: 100,
  2157. render: (text) => {
  2158. return getProjectName(text);
  2159. },
  2160. },
  2161. {
  2162. title: "本次派单",
  2163. dataIndex: "serviceYear",
  2164. key: "serviceYear",
  2165. width: 80,
  2166. align: "center"
  2167. },
  2168. {
  2169. title: "项目说明",
  2170. dataIndex: "taskComment",
  2171. key: "taskComment",
  2172. render: (text, record) => {
  2173. let textStr = text;
  2174. let textArr = [];
  2175. if (record.htMember === 1) {
  2176. textArr.push("高新会员");
  2177. }
  2178. if (record.additionalDeduction === 1) {
  2179. textArr.push("加计扣除");
  2180. }
  2181. if (record.rdAwardsubsidy === 1) {
  2182. textArr.push("研发奖补");
  2183. }
  2184. if (textArr.length) {
  2185. textStr = `${textArr.join("&")} ${!!text ? `(${text})` : ''}`
  2186. }
  2187. return (
  2188. <Tooltip title={textStr}>
  2189. <div
  2190. // style={{
  2191. // width: 100,
  2192. // overflow: "hidden",
  2193. // whiteSpace: "nowrap",
  2194. // textOverflow: "ellipsis",
  2195. // }}
  2196. >{textStr}</div>
  2197. </Tooltip>
  2198. )
  2199. },
  2200. },
  2201. ];
  2202. } else {
  2203. columns = [
  2204. {
  2205. title: "子项目名称",
  2206. dataIndex: "taskName",
  2207. key: "taskName"
  2208. },
  2209. {
  2210. title: "子项目数量",
  2211. dataIndex: "commodityQuantity",
  2212. key: "commodityQuantity"
  2213. },
  2214. {
  2215. title: "拆分操作人",
  2216. dataIndex: "splitAname",
  2217. key: "splitAname"
  2218. },
  2219. {
  2220. title: "项目负责人",
  2221. dataIndex: "receiverName",
  2222. key: "receiverName"
  2223. },
  2224. {
  2225. title: "拆分时间",
  2226. dataIndex: "splitTimes",
  2227. key: "splitTimes"
  2228. }
  2229. ]
  2230. }
  2231. return (
  2232. <Table
  2233. columns={columns}
  2234. dataSource={data}
  2235. pagination={false}
  2236. />
  2237. );
  2238. } else {
  2239. columns = [];
  2240. return (
  2241. <p
  2242. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  2243. >
  2244. {e.cSort == 6 ? "暂无派单" : "此项目暂未拆分"}
  2245. </p>
  2246. );
  2247. }
  2248. };
  2249. const formItemLayout = {
  2250. labelCol: { span: 10 },
  2251. wrapperCol: { span: 14 },
  2252. };
  2253. const FormItem = Form.Item;
  2254. const { RangePicker } = DatePicker;
  2255. const rowSelection = {
  2256. selectedRowKeys: this.state.selectedRowKeys,
  2257. onChange: (selectedRowKeys, selectedRows) => {
  2258. this.setState({
  2259. modalVisible: false,
  2260. selectedRows: selectedRows.slice(-1),
  2261. selectedRowKeys: selectedRowKeys.slice(-1),
  2262. });
  2263. },
  2264. onSelect: (recordt) => {
  2265. this.setState({
  2266. modalVisible: false,
  2267. recordt: recordt.id,
  2268. });
  2269. },
  2270. };
  2271. const cuiDataList = this.state.contactList || [];
  2272. const dataSources = this.state.customerArr || [];
  2273. let departmentArr = this.state.departmentArr || [];
  2274. const options = this.state.states
  2275. ? dataSources.map((group) => (
  2276. <Select.Option key={group.id} value={group.name}>
  2277. {group.name}
  2278. </Select.Option>
  2279. ))
  2280. : dataSources.map((group, index) => (
  2281. <Select.Option key={index} value={group.bname}>
  2282. {group.bname}
  2283. </Select.Option>
  2284. ));
  2285. const { TabPane } = Tabs;
  2286. let approvalOptions = [
  2287. { label: '无前期款', value: 1 },
  2288. { label: '前期款已收到,合同未收到,且在派单前仍不能收到的,预估合同收回时间', value: 2 },
  2289. { label: '合同条款存在明显风险的,如涉及到违约金、赔偿或退款的', value: 3 },
  2290. { label: '所有新项目的首单合同', value: 4 },
  2291. { label: '所有通过率低于80%的科技项目合同', value: 5 },
  2292. { label: '合同签订金额每年低于3万的会员合同', value: 6 },
  2293. { label: '认证类项目的前期款低于5000元', value: 7 },
  2294. { label: '合同已收到,前期款延期支付,预估前期款收款时间', value: 8 },
  2295. { label: '合同与前期款均未收到,且在派单前仍不能收到的,预估收回时间', value: 9 },
  2296. { label: '收款与满意度关联', value: 11 },
  2297. { label: '非常规合同', value: 10 },
  2298. {
  2299. label: <span>
  2300. <span>其他&nbsp;&nbsp;</span>
  2301. <Input
  2302. type="text"
  2303. style={{ width: 150, borderStyle: "none none solid none" }}
  2304. value={this.state.typeExplain}
  2305. // disabled={this.state.approvaType.indexOf(0) === -1 ? true : false}
  2306. placeholder=""
  2307. onChange={e => {
  2308. this.setState({
  2309. typeExplain: e.target.value
  2310. })
  2311. }}
  2312. />
  2313. </span>, value: 0
  2314. },
  2315. ];
  2316. return (
  2317. <div className="user-content">
  2318. {this.state.resVisible ? (
  2319. <ResolutionDetail
  2320. cancel={this.resCancel}
  2321. detail={this.state.resRecord}
  2322. visible={this.state.resVisible}
  2323. id={this.state.resRecord.orderNo}
  2324. />
  2325. ) : (
  2326. ""
  2327. )}
  2328. <ShowModalDiv ShowModal={this.state.showModal} onClose={() => { this.setState({ showModal: false }) }} />
  2329. <div className="content-title" style={{ marginBottom: 10 }}>
  2330. <span style={{ fontWeight: 900, fontSize: 16 }}>驳回订单列表</span>
  2331. </div>
  2332. <div className="user-search">
  2333. <Tabs
  2334. defaultActiveKey="1"
  2335. onChange={this.callback}
  2336. className="test"
  2337. >
  2338. <TabPane tab="搜索" key="1">
  2339. <div style={{ marginLeft: 10 }}>
  2340. <Input
  2341. placeholder="订单编号"
  2342. style={{ width: "150px", marginRight: 10 }}
  2343. value={this.state.orderNoSearch}
  2344. onChange={(e) => {
  2345. this.setState({ orderNoSearch: e.target.value });
  2346. }}
  2347. />
  2348. <Input
  2349. placeholder="客户名称"
  2350. style={{
  2351. width: "150px",
  2352. marginBottom: "10px",
  2353. marginTop: 10,
  2354. marginLeft: 10,
  2355. marginRight: 10,
  2356. }}
  2357. value={this.state.customerName}
  2358. onChange={(e) => {
  2359. this.setState({ customerName: e.target.value });
  2360. }}
  2361. />
  2362. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  2363. <RangePicker
  2364. value={[
  2365. this.state.releaseDate[0]
  2366. ? moment(this.state.releaseDate[0])
  2367. : null,
  2368. this.state.releaseDate[1]
  2369. ? moment(this.state.releaseDate[1])
  2370. : null,
  2371. ]}
  2372. onChange={(data, dataString) => {
  2373. this.setState({ releaseDate: dataString });
  2374. }}
  2375. />
  2376. <Button
  2377. type="primary"
  2378. onClick={this.search}
  2379. style={{ marginLeft: "10px", marginRight: 10 }}
  2380. >
  2381. 搜索
  2382. </Button>
  2383. <Button onClick={this.resets}>重置</Button>
  2384. </div>
  2385. </TabPane>
  2386. <TabPane tab="更改表格显示数据" key="2">
  2387. <div style={{ marginLeft: 10 }}>
  2388. <ChooseList
  2389. columns={this.state.columns}
  2390. changeFn={this.changeList}
  2391. changeList={this.state.changeList}
  2392. top={55}
  2393. margin={11}
  2394. />
  2395. </div>
  2396. </TabPane>
  2397. </Tabs>
  2398. <div className="patent-table">
  2399. <Spin spinning={this.state.loading}>
  2400. <Table
  2401. columns={
  2402. this.state.changeList
  2403. ? this.state.changeList
  2404. : this.state.columns
  2405. }
  2406. dataSource={this.state.dataSource}
  2407. rowSelection={rowSelection}
  2408. pagination={this.state.pagination}
  2409. onRowClick={this.tableRowClick}
  2410. bordered
  2411. size="small"
  2412. />
  2413. </Spin>
  2414. </div>
  2415. {this.state.visible ? <Modal
  2416. maskClosable={false}
  2417. className="customeDetails"
  2418. footer=""
  2419. title="订单详情"
  2420. width="1200px"
  2421. visible={this.state.visible}
  2422. onOk={this.visitOk}
  2423. onCancel={this.visitCancel}
  2424. >
  2425. <Form
  2426. layout="horizontal"
  2427. onSubmit={this.handleSubmit}
  2428. id="demand-form"
  2429. style={{ paddingBottom: "40px" }}
  2430. >
  2431. <Spin spinning={this.state.loading}>
  2432. <div className="clearfix">
  2433. <div style={{ position: "absolute", top: '-52px', left: '81px', zIndex: 10000 }}>
  2434. <OrderItemStatus deleteSign={this.state.deleteSign} />
  2435. </div>
  2436. <FormItem
  2437. className="half-item"
  2438. {...formItemLayout}
  2439. label="订单编号"
  2440. >
  2441. <span>{this.state.orderNo}</span>
  2442. </FormItem>
  2443. <FormItem
  2444. className="half-item"
  2445. {...formItemLayout}
  2446. label="合同编号"
  2447. >
  2448. <span>{this.state.contractNo}</span>
  2449. </FormItem>
  2450. <FormItem
  2451. className="half-item"
  2452. {...formItemLayout}
  2453. label="客户名称"
  2454. >
  2455. <span>{this.state.userName}</span>
  2456. <EnterpriseNameChange
  2457. type='journal'
  2458. style={{ marginLeft: 10 }}
  2459. enterpriseId={this.state.orderUid} />
  2460. </FormItem>
  2461. <FormItem
  2462. className="half-item"
  2463. {...formItemLayout}
  2464. label="销售类型"
  2465. >
  2466. <span>
  2467. {(["私有客户-", "签单客户-"][this.state.updatas.userType] || " ") +
  2468. (salesList[this.state.updatas.salesType] || "")}
  2469. {/* {
  2470. this.state.updatas.other != null && this.state.updatas.other != "" &&
  2471. <Tooltip title={this.state.updatas.other}>
  2472. <span>
  2473. {"(" + this.state.updatas.other.toString().slice(0, 10) + (this.state.updatas.other.toString().length > 9 ? "...)" : ")")}
  2474. </span>
  2475. </Tooltip>
  2476. } */}
  2477. </span>
  2478. <UpdateSales
  2479. orderNo={this.state.orderNo}
  2480. updatas={this.state.updatas}
  2481. onRefresh={
  2482. e => {
  2483. let ups = this.state.updatas
  2484. ups.salesType = e.salesType
  2485. if (e.salesType == "3") {
  2486. ups.channelId = e.channelId
  2487. ups.other = e.other
  2488. } else if (e.salesType == "4" || e.salesType == "5") {
  2489. ups.other = e.other
  2490. }
  2491. this.setState({
  2492. updatas: ups
  2493. })
  2494. }
  2495. //this.xiangqing.bind(this, this.state.orderNo)
  2496. }
  2497. />
  2498. </FormItem>
  2499. <FormItem
  2500. className="half-item"
  2501. {...formItemLayout}
  2502. label="流程状态"
  2503. >
  2504. <span>{getProcessStatus(this.state.processStatus, this.state.examineName, this.state.approval)}</span>
  2505. <FlowChart
  2506. orderNo={this.state.orderNo}
  2507. />
  2508. </FormItem>
  2509. <FormItem
  2510. className="half-item"
  2511. {...formItemLayout}
  2512. label="结算状态"
  2513. >
  2514. <span>
  2515. {getLiquidationStatus(this.state.liquidationStatus)}
  2516. </span>
  2517. </FormItem>
  2518. <FormItem
  2519. className="half-item"
  2520. {...formItemLayout}
  2521. label="已收款项(万元)"
  2522. >
  2523. <span>{this.state.settlementAmount}</span>
  2524. </FormItem>
  2525. <FormItem
  2526. className="half-item"
  2527. {...formItemLayout}
  2528. label={
  2529. <span>
  2530. <strong style={{ color: "#f00" }}>*</strong>
  2531. 企业联系人
  2532. </span>
  2533. }
  2534. >
  2535. <Input
  2536. placeholder="请输入联系人"
  2537. ref="signTotalAmount"
  2538. value={this.state.contacts}
  2539. onChange={(e) => {
  2540. this.setState({ contacts: e.target.value });
  2541. }}
  2542. style={{ width: "240px" }}
  2543. />
  2544. </FormItem>
  2545. <FormItem
  2546. className="half-item"
  2547. {...formItemLayout}
  2548. label={
  2549. <span>
  2550. <strong style={{ color: "#f00" }}>*</strong>
  2551. 联系人电话
  2552. </span>
  2553. }
  2554. >
  2555. <Input
  2556. placeholder="请输入联系人电话"
  2557. ref="signTotalAmount"
  2558. value={this.state.contactMobile}
  2559. onChange={(e) => {
  2560. this.setState({ contactMobile: e.target.value });
  2561. }}
  2562. style={{ width: "240px" }}
  2563. />
  2564. </FormItem>
  2565. <FormItem
  2566. className="half-item"
  2567. {...formItemLayout}
  2568. label="企业法人"
  2569. >
  2570. <Input
  2571. placeholder="请输入法人"
  2572. ref="signTotalAmount"
  2573. value={this.state.legalPerson}
  2574. onChange={(e) => {
  2575. this.setState({ legalPerson: e.target.value });
  2576. }}
  2577. style={{ width: "240px" }}
  2578. />
  2579. </FormItem>
  2580. <FormItem
  2581. className="half-item"
  2582. {...formItemLayout}
  2583. label="法人电话"
  2584. >
  2585. <Input
  2586. placeholder="请输入法人电话"
  2587. ref="signTotalAmount"
  2588. value={this.state.legalPersonTel}
  2589. onChange={(e) => {
  2590. this.setState({ legalPersonTel: e.target.value });
  2591. }}
  2592. style={{ width: "240px" }}
  2593. />
  2594. </FormItem>
  2595. <FormItem
  2596. className="half-item"
  2597. {...formItemLayout}
  2598. label={
  2599. <span>
  2600. <strong style={{ color: "#f00" }}>*</strong>
  2601. 签单金额(万元)
  2602. </span>
  2603. }
  2604. >
  2605. <Input
  2606. placeholder="签单金额"
  2607. ref="signTotalAmount"
  2608. value={this.state.totalAmount}
  2609. onChange={(e) => {
  2610. this.setState({ totalAmount: e.target.value });
  2611. }}
  2612. style={{ width: "240px" }}
  2613. />
  2614. </FormItem>
  2615. <FormItem
  2616. className="half-item"
  2617. {...formItemLayout}
  2618. label={
  2619. <span>
  2620. <strong style={{ color: "#f00" }}>*</strong>
  2621. 首付金额(万元)
  2622. </span>
  2623. }
  2624. >
  2625. <Input
  2626. placeholder="请输入实签首款金额"
  2627. ref="signFirstPayment"
  2628. value={this.state.firstAmount}
  2629. onChange={(e) => {
  2630. this.setState({ firstAmount: e.target.value });
  2631. }}
  2632. style={{ width: "240px" }}
  2633. />
  2634. </FormItem>
  2635. <div className="clearfix">
  2636. <FormItem
  2637. labelCol={{ span: 5 }}
  2638. wrapperCol={{ span: 19 }}
  2639. label="特批立项"
  2640. >
  2641. <Select
  2642. placeholder="请选择客户所属类型"
  2643. style={{ width: "240px" }}
  2644. value={this.state.approval}
  2645. onChange={(e) => {
  2646. this.setState({ approval: e });
  2647. }}
  2648. >
  2649. {
  2650. [{ id: 0, name: "非特批" },
  2651. { id: 1, name: "特批" }].map(function (item) {
  2652. return (
  2653. <Select.Option key={item.id} value={item.id}>
  2654. {item.name}
  2655. </Select.Option>
  2656. );
  2657. })
  2658. }
  2659. </Select>
  2660. {
  2661. this.state.approval == 1 &&
  2662. <div>
  2663. <CheckboxGroup
  2664. options={approvalOptions}
  2665. value={this.state.approvaType}
  2666. onChange={e => {
  2667. this.setState({
  2668. approvaType: e
  2669. })
  2670. }}
  2671. />
  2672. </div>
  2673. }
  2674. </FormItem>
  2675. </div>
  2676. { this.state.approval > 0 && <div className="clearfix">
  2677. <FormItem
  2678. labelCol={{ span: 5 }}
  2679. wrapperCol={{ span: 19 }}
  2680. label={
  2681. <span className="mandatory" style={{fontSize: '12px'}}>
  2682. 提示
  2683. </span>
  2684. }
  2685. >
  2686. <ApproveTypeTooltip />
  2687. </FormItem>
  2688. </div>
  2689. }
  2690. <FormItem
  2691. className="half-item"
  2692. {...formItemLayout}
  2693. label="合同签订时间"
  2694. >
  2695. <DatePicker
  2696. style={{
  2697. marginTop: "2px",
  2698. width: "240px",
  2699. height: "27px",
  2700. }}
  2701. showTime
  2702. format="YYYY-MM-DD"
  2703. onOk={() => { }}
  2704. value={
  2705. this.state.signDate
  2706. ? moment(this.state.signDate)
  2707. : null
  2708. }
  2709. onChange={(data, dataString) => {
  2710. this.setState({ signDate: dataString });
  2711. }}
  2712. />
  2713. </FormItem>
  2714. <FormItem
  2715. className="half-item"
  2716. {...formItemLayout}
  2717. label="订单部门"
  2718. >
  2719. <Select
  2720. placeholder="请输入订单部门"
  2721. style={{ width: 240 }}
  2722. value={this.state.organizationSearch}
  2723. onChange={(e) => {
  2724. this.setState({ organizationSearch: e });
  2725. }}
  2726. >
  2727. {departmentArr.map(function (item) {
  2728. return (
  2729. <Select.Option key={item.id}>
  2730. {item.name}
  2731. </Select.Option>
  2732. );
  2733. })}
  2734. </Select>
  2735. </FormItem>
  2736. <FormItem
  2737. className="half-item"
  2738. {...formItemLayout}
  2739. label="是否外包"
  2740. >
  2741. {this.state.outsource}
  2742. </FormItem>
  2743. <div className="clearfix">
  2744. <FormItem
  2745. labelCol={{ span: 5 }}
  2746. wrapperCol={{ span: 19 }}
  2747. label={
  2748. <span>
  2749. <strong style={{ color: "#f00" }}>*</strong>
  2750. 合同扫描件
  2751. </span>
  2752. }
  2753. >
  2754. <PicturesWall
  2755. domId={'reject1'}
  2756. fileList={this.getOrgCodeUrl}
  2757. pictureUrl={this.state.orgCodeUrl}
  2758. url="/api/admin/order/uploadOrderImg"
  2759. orderNo={this.state.orderNo}
  2760. sign="contract"
  2761. deleteApi="/api/admin/order/deleteOrderImg"
  2762. />
  2763. <p>图片建议:要清晰。</p>
  2764. </FormItem>
  2765. <FormItem
  2766. labelCol={{ span: 5 }}
  2767. wrapperCol={{ span: 19 }}
  2768. label={
  2769. <span>
  2770. 补充协议
  2771. </span>
  2772. }
  2773. >
  2774. <PicturesWall
  2775. domId={'reject2'}
  2776. fileList={this.getReplenishUrl}
  2777. pictureUrl={this.state.replenishUrl}
  2778. url="/api/admin/order/uploadOrderImg"
  2779. orderNo={this.state.orderNo}
  2780. sign="supplement"
  2781. deleteApi="/api/admin/order/deleteOrderImg"
  2782. />
  2783. <p>图片建议:要清晰。</p>
  2784. <Button
  2785. style={{
  2786. float: "right",
  2787. marginRight: "140px",
  2788. marginTop: "20px",
  2789. }}
  2790. onClick={this.getOrderLog}
  2791. >
  2792. 查看订单日志
  2793. </Button>
  2794. </FormItem>
  2795. </div>
  2796. <div className="clearfix">
  2797. {/* 违约&保密说明 */}
  2798. <ConfidenBreach
  2799. orderNo={this.state.orderNo}
  2800. data={this.state.confidenBreachData}
  2801. onChange={(value, updateKey) => {
  2802. const { confidenBreachData } = this.state;
  2803. confidenBreachData[updateKey] = value;
  2804. this.setState({ confidenBreachData })
  2805. }}
  2806. />
  2807. </div>
  2808. <Gxczx
  2809. isShow={this.state.isShow}
  2810. isCreat={true}
  2811. knowledgeServices={this.state.knowledgeServices}
  2812. auditServices={this.state.auditServices}
  2813. addDeductionServices={this.state.addDeductionServices}
  2814. knowledgeOther={this.state.knowledgeOther}
  2815. auditOther={this.state.auditOther}
  2816. addDeductionOther={this.state.addDeductionOther}
  2817. selknowledge={e => { this.setState({ knowledgeServices: e.knowledgeServices, knowledgeOther: e.knowledgeOther }) }}
  2818. selaudit={e => { this.setState({ auditServices: e.auditServices, auditOther: e.auditOther }) }}
  2819. seladdDeduction={e => { this.setState({ addDeductionServices: e.addDeductionServices, addDeductionOther: e.addDeductionOther }) }}
  2820. onSwitch={e => { this.setState({ isShow: e }) }}
  2821. />
  2822. {/* 服务内容 */}
  2823. {/* <ContentUrl
  2824. processStatus={this.state.processStatus}
  2825. domId={"rejectContent"}
  2826. contentUrl={this.state.contentUrl}
  2827. getContentUrl={this.getContentUrl}
  2828. imgId={"rejectImg1"}
  2829. /> */}
  2830. <div className="clearfix">
  2831. <FormItem
  2832. labelCol={{ span: 5 }}
  2833. wrapperCol={{ span: 19 }}
  2834. label={
  2835. <span>
  2836. <strong style={{ color: "#f00" }}>*</strong>
  2837. 服务内容
  2838. </span>
  2839. }
  2840. >
  2841. <PicturesWall
  2842. domId={'rejectContent'}
  2843. fileList={this.getContentUrl}
  2844. pictureUrl={this.state.contentUrl}
  2845. url="/api/admin/order/uploadOrderImg"
  2846. orderNo={this.state.orderNo}
  2847. sign="content"
  2848. deleteApi="/api/admin/order/deleteOrderImg"
  2849. />
  2850. <p> <span style={{ color: "red", display: "inline-block" }}>(注:必需上传服务内容、服务年限、时间节点、乙方权利与责任、违约条款、保密条款!)</span>图片建议:要清晰。</p>
  2851. </FormItem>
  2852. <Property
  2853. isCreat={true}
  2854. isProperty={this.state.isProperty}
  2855. setProperty={e => { this.setState({ isProperty: e, patentStatus: e == 1 && 0 }) }}
  2856. patentStatus={this.state.patentStatus}
  2857. setPatentS={e => { this.setState({ patentStatus: e }) }}
  2858. />
  2859. <FormItem
  2860. labelCol={{ span: 5 }}
  2861. wrapperCol={{ span: 16 }}
  2862. label={
  2863. <span>
  2864. <strong style={{ color: "#f00" }}>*</strong>
  2865. 订单留言
  2866. </span>
  2867. }
  2868. >
  2869. <Input
  2870. type="textarea"
  2871. placeholder="请输入订单留言"
  2872. rows={4}
  2873. value={this.state.orderRemarks}
  2874. onChange={(e) => {
  2875. this.setState({ orderRemarks: e.target.value });
  2876. }}
  2877. />
  2878. </FormItem>
  2879. </div>
  2880. <div className="clearfix">
  2881. <FormItem
  2882. className="half-item"
  2883. {...formItemLayout}
  2884. label="订单负责人"
  2885. >
  2886. <span>{this.state.salesmanName}</span>
  2887. </FormItem>
  2888. <FormItem
  2889. className="half-item"
  2890. {...formItemLayout}
  2891. label="订单负责人电话"
  2892. >
  2893. <span>{this.state.salesmanMobile}</span>
  2894. </FormItem>
  2895. </div>
  2896. <div className="clearfix">
  2897. <FormItem
  2898. className="half-item"
  2899. {...formItemLayout}
  2900. label="当前财务负责人"
  2901. >
  2902. <span>{this.state.nowFinance}</span>
  2903. </FormItem>
  2904. <FormItem
  2905. className="half-item"
  2906. {...formItemLayout}
  2907. label="当前财务负责人电话"
  2908. >
  2909. <span>{this.state.nowFinanceMobile}</span>
  2910. </FormItem>
  2911. </div>
  2912. <div className="clearfix">
  2913. <FormItem
  2914. className="half-item"
  2915. {...formItemLayout}
  2916. style={{ opacity: ".5" }}
  2917. label="原订单负责人"
  2918. >
  2919. <span>{this.state.oldSalesmanName}</span>
  2920. </FormItem>
  2921. <FormItem
  2922. className="half-item"
  2923. {...formItemLayout}
  2924. style={{ opacity: ".5" }}
  2925. label="原订单负责人电话"
  2926. >
  2927. <span>{this.state.oldSalesmanMobile}</span>
  2928. </FormItem>
  2929. </div>
  2930. <div className="clearfix">
  2931. <FormItem
  2932. className="half-item"
  2933. style={{ opacity: ".5" }}
  2934. {...formItemLayout}
  2935. label="实际财务操作人"
  2936. >
  2937. <span>{this.state.financeName}</span>
  2938. </FormItem>
  2939. <FormItem
  2940. className="half-item"
  2941. {...formItemLayout}
  2942. style={{ opacity: ".5" }}
  2943. label="实际财务操作人电话"
  2944. >
  2945. <span>{this.state.financeMobile}</span>
  2946. </FormItem>
  2947. </div>
  2948. <div className="clearfix">
  2949. <FormItem
  2950. className="half-item"
  2951. {...formItemLayout}
  2952. label="驳回人"
  2953. >
  2954. <span>{this.state.initiateName}</span>
  2955. </FormItem>
  2956. <FormItem
  2957. className="half-item"
  2958. {...formItemLayout}
  2959. label="驳回时间"
  2960. >
  2961. <span>{this.state.backDate}</span>
  2962. </FormItem>
  2963. </div>
  2964. <div className="clearfix">
  2965. <FormItem
  2966. labelCol={{ span: 5 }}
  2967. wrapperCol={{ span: 16 }}
  2968. label="驳回原因"
  2969. >
  2970. <span>{this.state.reason}</span>
  2971. </FormItem>
  2972. </div>
  2973. {/* 协单人员 */}
  2974. <OrderCoor orderNo={this.state.orderNos} processStatus={this.state.processStatus} orderStatus={this.state.orderStatus} />
  2975. <div>
  2976. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2977. 项目业务
  2978. </span>
  2979. <Button
  2980. type="primary"
  2981. onClick={this.addDetailed}
  2982. style={{
  2983. float: "right",
  2984. marginRight: "50px",
  2985. marginBottom: "15px",
  2986. }}
  2987. >
  2988. 添加项目明细
  2989. </Button>
  2990. </div>
  2991. <div className="patent-table">
  2992. <Spin spinning={this.state.loading}>
  2993. <Table
  2994. columns={this.state.columnsX}
  2995. dataSource={this.state.dataSourceX}
  2996. pagination={this.state.paginations}
  2997. // onRowClick={this.tableRowClickX}
  2998. expandedRowRender={expandedRowRenderVip}
  2999. rowClassName={this.addRowColor}
  3000. bordered
  3001. size="small"
  3002. />
  3003. </Spin>
  3004. </div>
  3005. <div
  3006. style={{ display: cuiDataList.length ? "block" : "none" }}
  3007. >
  3008. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  3009. 旧催款节点
  3010. </span>
  3011. <Button
  3012. type="primary"
  3013. // onClick={this.addcontact}
  3014. disabled
  3015. onClick={(e) => {
  3016. cuiDataList.length
  3017. ? this.addcontact()
  3018. : this.addcontactNew();
  3019. }}
  3020. style={{
  3021. float: "right",
  3022. marginRight: "50px",
  3023. marginBottom: "15px",
  3024. }}
  3025. >
  3026. 添加催款节点
  3027. </Button>
  3028. </div>
  3029. <div
  3030. className="clearfix"
  3031. style={{ display: cuiDataList.length ? "block" : "none" }}
  3032. >
  3033. <Spin spinning={this.state.loading}>
  3034. <Form layout="horizontal" id="demand-form">
  3035. <Table
  3036. pagination={false}
  3037. columns={this.state.ContactsLists}
  3038. dataSource={this.state.contactList}
  3039. bordered
  3040. size="small"
  3041. scroll={{ x: "max-content", y: 0 }}
  3042. />
  3043. <Col
  3044. span={24}
  3045. offset={9}
  3046. style={{ marginTop: "15px" }}
  3047. ></Col>
  3048. </Form>
  3049. </Spin>
  3050. </div>
  3051. <div>
  3052. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  3053. 新催款节点
  3054. </span>
  3055. <span
  3056. style={{
  3057. display: cuiDataList.length ? "none" : "inline-block",
  3058. marginLeft: 10,
  3059. color: "red",
  3060. }}
  3061. >
  3062. 金额总计(万元): {this.state.totalCui}
  3063. </span>
  3064. <Button
  3065. type="primary"
  3066. disabled={
  3067. cuiDataList.length || this.state.addFlag
  3068. ? true
  3069. : false
  3070. }
  3071. // onClick={this.addcontact}
  3072. onClick={(e) => {
  3073. this.setState({ addFlag: true });
  3074. this.addcontactNew();
  3075. }}
  3076. style={{
  3077. float: "right",
  3078. marginRight: "50px",
  3079. marginBottom: "15px",
  3080. }}
  3081. >
  3082. 添加催款节点
  3083. </Button>
  3084. </div>
  3085. <div className="clearfix">
  3086. <Spin spinning={this.state.loading}>
  3087. <Form layout="horizontal" id="demand-form">
  3088. <Table
  3089. pagination={false}
  3090. columns={this.state.ContactsListsNew}
  3091. dataSource={this.state.contactListNew}
  3092. scroll={{ x: "max-content", y: 0 }}
  3093. bordered
  3094. size="small"
  3095. />
  3096. <Col
  3097. span={24}
  3098. offset={9}
  3099. style={{ marginTop: "15px" }}
  3100. />
  3101. </Form>
  3102. </Spin>
  3103. </div>
  3104. <div className="addSave" style={{ display: "flex", justifyContent: "center" }}>
  3105. {
  3106. // 新需求 除湖南和内蒙古外 不让其他省操作
  3107. (adminData.province == "21" || adminData.province == "11" || adminData.province == "2") &&
  3108. <Button
  3109. className="cancel"
  3110. type="primary"
  3111. onClick={this.examOk}
  3112. style={{ margin: 25 }}
  3113. htmlType="submit"
  3114. loading={this.state.flag}
  3115. >
  3116. 重新提交
  3117. </Button>
  3118. }
  3119. <Popconfirm
  3120. title="请确认您是否作废此订单??"
  3121. onConfirm={(e) => {
  3122. this.examOks()
  3123. }}
  3124. okText="确认"
  3125. cancelText="取消"
  3126. >
  3127. <Button
  3128. className="cancel"
  3129. type="danger"
  3130. style={{ margin: 25 }}
  3131. loading={this.state.flag}
  3132. >
  3133. 订单作废
  3134. </Button>
  3135. </Popconfirm>
  3136. <Button
  3137. className="cancel"
  3138. type="ghost"
  3139. onClick={this.visitCancel}
  3140. style={{ margin: 25 }}
  3141. >
  3142. 取消
  3143. </Button>
  3144. </div>
  3145. </div>
  3146. </Spin>
  3147. </Form>
  3148. </Modal> : <div />}
  3149. {/* <Modal
  3150. visible={this.state.rizhivisible}
  3151. className="admin-desc-content"
  3152. width="800px"
  3153. maskClosable={false}
  3154. title="订单日志"
  3155. footer={null}
  3156. onCancel={this.closeOrderLog}
  3157. >
  3158. <div className="patent-table">
  3159. <Spin spinning={this.state.loading}>
  3160. <Table
  3161. columns={this.state.columnsrizhi}
  3162. dataSource={this.state.dataSourcerizhi}
  3163. pagination={false}
  3164. />
  3165. </Spin>
  3166. </div>
  3167. </Modal> */}
  3168. <OrderRiZi
  3169. dataSourcerizhi={this.state.dataSourcerizhi}
  3170. closeOrderLog={this.closeOrderLog}
  3171. visible={this.state.rizhivisible}
  3172. loading={this.state.loading}
  3173. />
  3174. </div>
  3175. {
  3176. // 添加项目
  3177. this.state.projectOperationVisible &&
  3178. <NewAddProject
  3179. readOnly={this.state.dataInfor && Object.keys(this.state.dataInfor).length > 0 && this.state.processStatus !== 0}
  3180. orderNo={this.state.orderNo}
  3181. visible={this.state.projectOperationVisible}
  3182. newData={this.state.newData}
  3183. onCancel={this.nextCancel}
  3184. />
  3185. }
  3186. {
  3187. // 编辑项目
  3188. this.state.editProjectOperationVisible &&
  3189. <NewEditProject
  3190. readOnly={
  3191. this.state.dataInfor &&
  3192. Object.keys(this.state.dataInfor).length > 0 &&
  3193. this.state.processStatus !== 0
  3194. }
  3195. orderNo={this.state.orderNo}
  3196. visible={this.state.editProjectOperationVisible}
  3197. dataInfor={this.state.dataInfor}
  3198. newData={this.state.newData}
  3199. onCancel={this.nextCancel}
  3200. />
  3201. }
  3202. </div>
  3203. );
  3204. },
  3205. })
  3206. );
  3207. export default IntentionCustomer;