myTaskOutsource.jsx 111 KB

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