myTask.jsx 119 KB

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