myTaskOutsource.jsx 112 KB

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