myTaskOutsource.jsx 114 KB

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