myTaskOutsource.jsx 110 KB

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