myTask.jsx 119 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568
  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(flag) {
  1216. if (flag) {
  1217. this.state.nameSearch = "";
  1218. this.state.orderNoSearch = "";
  1219. this.state.contractNoSearch = undefined;
  1220. this.state.taskNoSearch = "";
  1221. this.state.departmenttSearch = undefined;
  1222. this.state.projectStatusSearch = undefined; //项目状态
  1223. this.state.approvalSearch = undefined;
  1224. this.state.outsourceStatusSearch = [];
  1225. }
  1226. this.state.id = ""; //项目编号
  1227. this.state.orderNo = ""; //订单编号
  1228. this.state.projectStatus = undefined; //项目状态
  1229. this.state.taskStatuSearch = undefined; //项目状态
  1230. this.state.taskComment = ""; //说明
  1231. this.state.startDate = ""; //启动日期
  1232. this.state.endDate = ""; //结束日期
  1233. this.state.acceptDate = ""; //受理日期
  1234. this.state.reviewDate = ""; //评审日期
  1235. this.state.publicityDate = ""; //公示日期
  1236. this.state.licenceDate = ""; //发证日期
  1237. attachmentUrl: []; //附件
  1238. this.state.contacts = ""; //联系人
  1239. this.state.contactMobile = ""; //联系人电话
  1240. this.state.legalPerson = ""; //法人
  1241. this.state.legalPersonTel = ""; //法人电话
  1242. this.state.taskId = ""; //项目编号
  1243. this.state.hours = ""; //工时
  1244. this.state.remarks = ""; //说明
  1245. this.state.taskDate = ""; //日期
  1246. this.state.taskComment = ""; //说明
  1247. this.state.releaseDate = [];
  1248. this.state.outsourceName = "";
  1249. this.state.outsourcePrice = undefined;
  1250. this.state.distribution = undefined;
  1251. this.loadData(this.state.page);
  1252. this.state.companyName = undefined;
  1253. this.state.unitPrice = undefined;
  1254. this.state.unitNumber = undefined;
  1255. this.state.amount = undefined;
  1256. this.state.outsourceRemarks = undefined;
  1257. this.state.pictureUrl = [];
  1258. },
  1259. searchSwitch() {
  1260. this.setState({
  1261. searchMore: !this.state.searchMore
  1262. });
  1263. },
  1264. //部门
  1265. departmentList() {
  1266. this.setState({
  1267. loading: true
  1268. });
  1269. $.ajax({
  1270. method: "get",
  1271. dataType: "json",
  1272. crossDomain: false,
  1273. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  1274. data: {},
  1275. success: function(data) {
  1276. let thedata = data.data;
  1277. let theArr = [];
  1278. if (!thedata) {
  1279. if (data.error && data.error.length) {
  1280. message.warning(data.error[0].message);
  1281. }
  1282. thedata = {};
  1283. } else {
  1284. thedata.map(function(item, index) {
  1285. theArr.push({
  1286. key: index,
  1287. name: item.name,
  1288. id: item.id
  1289. });
  1290. });
  1291. }
  1292. this.setState({
  1293. departmentArr: theArr
  1294. });
  1295. }.bind(this)
  1296. }).always(
  1297. function() {
  1298. this.setState({
  1299. loading: false
  1300. });
  1301. }.bind(this)
  1302. );
  1303. },
  1304. changeList(arr) {
  1305. const newArr = [];
  1306. this.state.columns.forEach(item => {
  1307. arr.forEach(val => {
  1308. if (val === item.title) {
  1309. newArr.push(item);
  1310. }
  1311. });
  1312. });
  1313. this.setState({
  1314. changeList: newArr
  1315. });
  1316. },
  1317. timeClose() {
  1318. this.setState({
  1319. timeVisible: false
  1320. });
  1321. },
  1322. timeDetail(record) {
  1323. console.log(record);
  1324. this.setState({
  1325. loading: true,
  1326. recordHour: record.hours
  1327. });
  1328. $.ajax({
  1329. method: "get",
  1330. dataType: "json",
  1331. crossDomain: false,
  1332. url:
  1333. globalConfig.context + "/api/admin/orderProject/taskHoursDetailsList",
  1334. data: {
  1335. taskId: record.id
  1336. },
  1337. success: function(data) {
  1338. if (data.error && data.error.length) {
  1339. message.warning(data.error[0].message);
  1340. } else {
  1341. this.setState({
  1342. dataSourceTime: data.data
  1343. });
  1344. console.log(this.state.dataSourceTime);
  1345. }
  1346. }.bind(this)
  1347. }).always(
  1348. function() {
  1349. this.setState({
  1350. loading: false
  1351. });
  1352. }.bind(this)
  1353. );
  1354. },
  1355. showDeleteConfirm(num, fn) {
  1356. let text = getProjectStatus(num);
  1357. confirm({
  1358. title: <p style={{ fontSize: 16, fontWeight: 900 }}>注意</p>,
  1359. content: (
  1360. <p style={{ fontWeight: 900, color: "red" }}>
  1361. 当前的项目状态为{text},保存后将触发对应的催款节点!!!您确定保存?
  1362. </p>
  1363. ),
  1364. okText: "确定",
  1365. okType: "danger",
  1366. cancelText: "取消",
  1367. onOk() {
  1368. fn();
  1369. },
  1370. onCancel() {}
  1371. });
  1372. },
  1373. // 项目发起外包
  1374. sureOut() {
  1375. if (!this.state.companyName) {
  1376. message.warning("公司名称不能为空");
  1377. return;
  1378. }
  1379. if (!this.state.unitPrice) {
  1380. message.warning("单价不能为空");
  1381. return;
  1382. }
  1383. if (!this.state.unitNumber) {
  1384. message.warning("数量不能为空");
  1385. return;
  1386. }
  1387. if (!this.state.amount) {
  1388. message.warning("总金额不能为空");
  1389. return;
  1390. }
  1391. if (!this.state.outsourceRemarks) {
  1392. message.warning("备注不能为空");
  1393. return;
  1394. }
  1395. if (this.state.pictureUrl.length === 0) {
  1396. message.warning("合同扫描件不能为空");
  1397. return;
  1398. }
  1399. this.setState({
  1400. loading: true
  1401. });
  1402. $.ajax({
  1403. method: "POST",
  1404. dataType: "json",
  1405. crossDomain: false,
  1406. url:
  1407. globalConfig.context + "/api/admin/outsourceOrg/outsourceProjectAudit",
  1408. data: {
  1409. tid: this.state.id,
  1410. orderNo: this.state.orderNo,
  1411. type: 1,
  1412. companyName: this.state.companyName,
  1413. amount: this.state.amount,
  1414. pictureUrl: this.getUrl(this.state.pictureUrl).length
  1415. ? this.getUrl(this.state.pictureUrl)
  1416. : "",
  1417. outsourceRemarks: this.state.outsourceRemarks,
  1418. unitNumber: this.state.unitNumber,
  1419. unitPrice: this.state.unitPrice,
  1420. id: this.state.refundStatus == 2 ? this.state.mid : undefined
  1421. }
  1422. }).done(
  1423. function(data) {
  1424. this.setState({
  1425. loading: false
  1426. });
  1427. if (!data.error.length) {
  1428. message.success("提交成功!");
  1429. this.visitCancel();
  1430. } else {
  1431. message.warning(data.error[0].message);
  1432. }
  1433. }.bind(this)
  1434. );
  1435. },
  1436. callback(e) {
  1437. this.setState({
  1438. activeKey: e
  1439. });
  1440. },
  1441. getOrgCodeUrlWai(e) {
  1442. this.setState({ pictureUrl: e });
  1443. },
  1444. getUrl(url) {
  1445. let theorgCodeUrl = [];
  1446. if (url.length) {
  1447. let picArr = [];
  1448. url.map(function(item) {
  1449. if (item.response && item.response.data && item.response.data.length) {
  1450. picArr.push(item.response.data);
  1451. }
  1452. });
  1453. theorgCodeUrl = picArr.join(",");
  1454. }
  1455. return theorgCodeUrl;
  1456. },
  1457. waiDetail() {
  1458. let url = window.location.href.substring(7);
  1459. this.setState({
  1460. loading: true
  1461. });
  1462. $.ajax({
  1463. method: "get",
  1464. dataType: "json",
  1465. crossDomain: false,
  1466. url:
  1467. globalConfig.context + "/api/admin/outsourceOrg/orderOutsourceDtails",
  1468. data: {
  1469. tid: this.state.id,
  1470. orderNo: this.state.orderNo
  1471. }
  1472. }).done(
  1473. function(data) {
  1474. this.setState({
  1475. loading: false
  1476. });
  1477. if (!data.error.length && data.data) {
  1478. this.setState({
  1479. outsourceRemarks: data.data.outsourceRemarks,
  1480. remarks: data.data.remarks,
  1481. companyName: data.data.companyName,
  1482. amount: data.data.amount,
  1483. mid: data.data.id,
  1484. unitPrice: data.data.unitPrice,
  1485. refundStatus: data.data.refundStatus,
  1486. unitNumber: data.data.unitNumber,
  1487. pictureUrl: data.data.pictureUrl
  1488. ? splitUrl(
  1489. data.data.pictureUrl,
  1490. ",",
  1491. globalConfig.avatarHost + "/upload",
  1492. url
  1493. )
  1494. : [], //图片地址
  1495. createTimes: data.data.createTimes,
  1496. auditTimes: data.data.auditTimes
  1497. });
  1498. } else if (data.error && data.error.length) {
  1499. message.warning(data.error[0].message);
  1500. } else if (!data.data) {
  1501. this.setState({
  1502. refundStatus: undefined
  1503. });
  1504. }
  1505. }.bind(this)
  1506. );
  1507. },
  1508. render() {
  1509. const formItemLayout = {
  1510. labelCol: { span: 8 },
  1511. wrapperCol: { span: 14 }
  1512. };
  1513. let departmentArr = this.state.departmentArr || [];
  1514. return (
  1515. <div className="user-content">
  1516. {this.state.resVisible ? (
  1517. <ResolutionDetail
  1518. cancel={this.resCancel}
  1519. detail={this.state.resRecord}
  1520. visible={this.state.resVisible}
  1521. id={this.state.resRecord.orderNo}
  1522. />
  1523. ) : (
  1524. ""
  1525. )}
  1526. <ShowModalDiv ShowModal={this.state.showModal} />
  1527. <div className="content-title" style={{ marginBottom: 10 }}>
  1528. <span style={{ fontWeight: 900, fontSize: 16 }}>项目派单管理</span>
  1529. </div>
  1530. <Tabs
  1531. defaultActiveKey="2"
  1532. onChange={this.callback}
  1533. className="test"
  1534. bordered
  1535. >
  1536. <TabPane tab="更改表格显示数据" key="1">
  1537. <div style={{ marginLeft: 10 }}>
  1538. <ChooseList
  1539. columns={this.state.columns}
  1540. changeFn={this.changeList}
  1541. changeList={this.state.changeList}
  1542. top={55}
  1543. margin={11}
  1544. />
  1545. </div>
  1546. </TabPane>
  1547. <TabPane tab="搜索" key="2">
  1548. <div className="user-search" style={{ marginLeft: 10 }}>
  1549. <Input
  1550. placeholder="客户名称"
  1551. value={this.state.nameSearch}
  1552. onChange={e => {
  1553. this.setState({ nameSearch: e.target.value });
  1554. }}
  1555. />
  1556. <Input
  1557. placeholder="订单编号"
  1558. value={this.state.orderNoSearch}
  1559. onChange={e => {
  1560. this.setState({ orderNoSearch: e.target.value });
  1561. }}
  1562. />
  1563. <Input
  1564. placeholder="合同编号"
  1565. value={this.state.contractNoSearch}
  1566. onChange={e => {
  1567. this.setState({ contractNoSearch: e.target.value });
  1568. }}
  1569. />
  1570. <Input
  1571. placeholder="项目编号"
  1572. value={this.state.taskNoSearch}
  1573. onChange={e => {
  1574. this.setState({ taskNoSearch: e.target.value });
  1575. }}
  1576. />
  1577. <Select
  1578. placeholder="选择部门"
  1579. style={{ width: 150, marginRight: "10px" }}
  1580. value={this.state.departmenttSearch}
  1581. onChange={e => {
  1582. this.setState({ departmenttSearch: e });
  1583. }}
  1584. >
  1585. {departmentArr.map(function(item) {
  1586. return (
  1587. <Select.Option key={item.id}>{item.name}</Select.Option>
  1588. );
  1589. })}
  1590. </Select>
  1591. <Select
  1592. placeholder="项目状态"
  1593. style={{ width: 150, marginRight: "10px" }}
  1594. value={this.state.projectStatusSearch}
  1595. onChange={e => {
  1596. this.setState({ projectStatusSearch: e });
  1597. console.log(this.state.projectStatusSearch);
  1598. }}
  1599. >
  1600. {projectStatus.map(function(item) {
  1601. return (
  1602. <Select.Option key={item.value}>{item.key}</Select.Option>
  1603. );
  1604. })}
  1605. </Select>
  1606. <Select
  1607. placeholder="特批状态"
  1608. style={{ width: 150, marginRight: "10px" }}
  1609. value={this.state.approvalSearch}
  1610. onChange={e => {
  1611. this.setState({ approvalSearch: e });
  1612. console.log(this.state.approvalSearch);
  1613. }}
  1614. >
  1615. <Select.Option key={0}>非特批</Select.Option>
  1616. <Select.Option key={1}>特批</Select.Option>
  1617. </Select>
  1618. <Select
  1619. placeholder="外包状态"
  1620. style={{ width: 150, marginRight: "10px" }}
  1621. value={this.state.outsourceStatusSearch}
  1622. onChange={e => {
  1623. this.setState({ outsourceStatusSearch: e });
  1624. console.log(this.state.outsourceStatusSearch);
  1625. }}
  1626. >
  1627. <Select.Option key={0}>外包待审核</Select.Option>
  1628. {/* <Select.Option key={1}>外包审核通过</Select.Option> */}
  1629. <Select.Option key={2}>外包审核驳回</Select.Option>
  1630. <Select.Option key={999}>全部</Select.Option>
  1631. </Select>
  1632. <Button type="primary" onClick={this.search}>
  1633. 搜索
  1634. </Button>
  1635. <Button onClick={e => {
  1636. this.reset(true)
  1637. }}>重置</Button>
  1638. {/* <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch.bind(this)} /></span>
  1639. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  1640. <span>订单时间 :</span>
  1641. <RangePicker
  1642. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  1643. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  1644. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  1645. </div> */}
  1646. </div>
  1647. </TabPane>
  1648. <TabPane tab="导出Excel" key="3">
  1649. <Button
  1650. type="primary"
  1651. style={{ margin: "11px 0 10px 10px" }}
  1652. onClick={this.exportExec}
  1653. >
  1654. 导出Excel
  1655. </Button>
  1656. </TabPane>
  1657. {/* <TabPane tab="批量操作" key="6">
  1658. <Button
  1659. type="primary"
  1660. disabled={this.state.selectedRowKeys.length == 0}
  1661. style={{ margin: "0px 0px 10px 10px" }}
  1662. onClick={e => {
  1663. e.stopPropagation(),
  1664. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  1665. }}
  1666. >
  1667. 转交
  1668. </Button>
  1669. </TabPane> */}
  1670. </Tabs>
  1671. {/* <div className="user-search">
  1672. <Input
  1673. placeholder="客户名称"
  1674. value={this.state.nameSearch}
  1675. onChange={e => {
  1676. this.setState({ nameSearch: e.target.value });
  1677. }}
  1678. />
  1679. <Input
  1680. placeholder="订单编号"
  1681. value={this.state.orderNoSearch}
  1682. onChange={e => {
  1683. this.setState({ orderNoSearch: e.target.value });
  1684. }}
  1685. />
  1686. <Input
  1687. placeholder="项目编号"
  1688. value={this.state.taskNoSearch}
  1689. onChange={e => {
  1690. this.setState({ taskNoSearch: e.target.value });
  1691. }}
  1692. />
  1693. <Select
  1694. placeholder="选择部门"
  1695. style={{ width: 150, marginRight: "10px" }}
  1696. value={this.state.departmenttSearch}
  1697. onChange={e => {
  1698. this.setState({ departmenttSearch: e });
  1699. }}
  1700. >
  1701. {departmentArr.map(function(item) {
  1702. return <Select.Option key={item.id}>{item.name}</Select.Option>;
  1703. })}
  1704. </Select>
  1705. <Button type="primary" onClick={this.search}>
  1706. 搜索
  1707. </Button>
  1708. <Button onClick={this.reset}>重置</Button>
  1709. <Button
  1710. type="primary"
  1711. style={{ marginLeft: "10px" }}
  1712. onClick={this.exportExec}
  1713. >
  1714. 导出Excel
  1715. </Button>
  1716. <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch.bind(this)} /></span>
  1717. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  1718. <span>订单时间 :</span>
  1719. <RangePicker
  1720. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  1721. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  1722. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  1723. </div>
  1724. </div> */}
  1725. <div className="patent-table">
  1726. <Spin spinning={this.state.loading}>
  1727. <Table
  1728. columns={
  1729. this.state.changeList == undefined
  1730. ? this.state.columns
  1731. : this.state.changeList
  1732. }
  1733. dataSource={this.state.dataSource}
  1734. pagination={this.state.pagination}
  1735. scroll={{ x: "max-content", y: 0 }}
  1736. onRowClick={this.tableRowClick.bind(this)}
  1737. bordered
  1738. size={"small"}
  1739. />
  1740. </Spin>
  1741. </div>
  1742. <Assign
  1743. title="项目"
  1744. selApi={"/api/admin/orderProject/projectDistribution"}
  1745. data={this.state.assignData}
  1746. showDesc={this.state.assignVisible}
  1747. closeDesc={this.closeAssign.bind(this)}
  1748. fenpaiData={8}
  1749. specially={0}
  1750. roleName={this.state.nub}
  1751. requestMethod={"post"}
  1752. flag={this.state.flag}
  1753. all={this.state}
  1754. />
  1755. <Modal
  1756. className="customeDetails"
  1757. footer=""
  1758. title=""
  1759. width="900px"
  1760. visible={this.state.visible}
  1761. onOk={this.visitOk}
  1762. onCancel={this.visitCancel}
  1763. >
  1764. <Tabs
  1765. activeKey={this.state.activeKey}
  1766. onChange={e => {
  1767. this.callback(e);
  1768. if (e == 2) {
  1769. this.waiDetail();
  1770. }
  1771. }}
  1772. >
  1773. <TabPane tab="项目概况" key="1">
  1774. <Form
  1775. layout="horizontal"
  1776. onSubmit={this.handleSubmit}
  1777. id="demand-form"
  1778. style={{ paddingBottom: "00px" }}
  1779. >
  1780. <Spin spinning={this.state.loading}>
  1781. <div className="clearfix">
  1782. <div className="clearfix">
  1783. <FormItem
  1784. className="half-item"
  1785. {...formItemLayout}
  1786. label="当前项目情况"
  1787. >
  1788. <Radio.Group
  1789. value={this.state.status}
  1790. onChange={e => {
  1791. this.setState({ status: e.target.value });
  1792. }}
  1793. >
  1794. <Radio value={0}>开启</Radio>
  1795. <Radio value={1}>暂停</Radio>
  1796. </Radio.Group>
  1797. <Button
  1798. type="primary"
  1799. size="small"
  1800. style={{ marginTop: "5px", position: "absolute" }}
  1801. onClick={this.caozuorizhi}
  1802. >
  1803. 操作日志
  1804. </Button>
  1805. </FormItem>
  1806. <FormItem
  1807. className="half-item"
  1808. {...formItemLayout}
  1809. label="合同编号"
  1810. >
  1811. <span>{this.state.contractNo}</span>
  1812. </FormItem>
  1813. </div>
  1814. <div className="clearfix">
  1815. <FormItem
  1816. className="half-item"
  1817. {...formItemLayout}
  1818. label="项目状态"
  1819. >
  1820. <Select
  1821. placeholder="选择项目状态"
  1822. style={{ width: "200px" }}
  1823. value={this.state.projectStatus}
  1824. onChange={e => {
  1825. this.setState({ projectStatus: e });
  1826. }}
  1827. >
  1828. {projectStatus.map(function(item) {
  1829. return (
  1830. <Select.Option key={item.value}>
  1831. {item.key}
  1832. </Select.Option>
  1833. );
  1834. })}
  1835. </Select>
  1836. </FormItem>
  1837. <FormItem
  1838. className="half-item"
  1839. {...formItemLayout}
  1840. label="是否特批"
  1841. >
  1842. <span>{getApproval(this.state.approval)}</span>
  1843. </FormItem>
  1844. <FormItem
  1845. className="half-item"
  1846. {...formItemLayout}
  1847. label="结算状态"
  1848. >
  1849. <span>
  1850. {getLiquidationStatus(this.state.liquidationStatus)}
  1851. </span>
  1852. </FormItem>
  1853. <FormItem
  1854. className="half-item"
  1855. {...formItemLayout}
  1856. label="流程状态"
  1857. >
  1858. <span>
  1859. {getProcessStatus(this.state.processStatus)}
  1860. </span>
  1861. </FormItem>
  1862. <FormItem
  1863. className="half-item"
  1864. {...formItemLayout}
  1865. label="订单编号"
  1866. >
  1867. <span>{this.state.orderNo}</span>
  1868. </FormItem>
  1869. </div>
  1870. <div className="clearfix">
  1871. <FormItem
  1872. className="half-item"
  1873. {...formItemLayout}
  1874. label="满意度表格"
  1875. >
  1876. <Radio.Group
  1877. value={this.state.formRetrieve}
  1878. onChange={e => {
  1879. this.setState({ formRetrieve: e.target.value });
  1880. }}
  1881. >
  1882. <Radio value={0}>未收回</Radio>
  1883. <Radio value={1}>已收回</Radio>
  1884. <Radio value={2}>其他</Radio>
  1885. </Radio.Group>
  1886. </FormItem>
  1887. <FormItem
  1888. className="half-item"
  1889. {...formItemLayout}
  1890. label="退单"
  1891. >
  1892. <Radio.Group
  1893. value={this.state.taskRefund}
  1894. onChange={e => {
  1895. this.setState({ taskRefund: e.target.value });
  1896. }}
  1897. >
  1898. <Radio value={0}>已完成</Radio>
  1899. <Radio value={1}>未完成</Radio>
  1900. <Radio value={2}>其他</Radio>
  1901. </Radio.Group>
  1902. </FormItem>
  1903. </div>
  1904. <div className="clearfix">
  1905. {
  1906. <FormItem
  1907. className="half-item"
  1908. {...formItemLayout}
  1909. label="(满意度)备注"
  1910. >
  1911. <Input
  1912. type="textarea"
  1913. placeholder="请输入备注"
  1914. rows={2}
  1915. value={this.state.retrieveContent}
  1916. onChange={e => {
  1917. this.setState({
  1918. retrieveContent: e.target.value
  1919. });
  1920. }}
  1921. />
  1922. </FormItem>
  1923. }
  1924. {
  1925. <FormItem
  1926. className="half-item"
  1927. {...formItemLayout}
  1928. label="(退单)备注"
  1929. >
  1930. <Input
  1931. type="textarea"
  1932. placeholder="请输入备注"
  1933. rows={2}
  1934. value={this.state.refundContent}
  1935. onChange={e => {
  1936. this.setState({ refundContent: e.target.value });
  1937. }}
  1938. />
  1939. </FormItem>
  1940. }
  1941. </div>
  1942. <div className="clearfix">
  1943. <h3 className="sub-title">订单负责人信息</h3>
  1944. <FormItem
  1945. className="half-item"
  1946. {...formItemLayout}
  1947. label="负责人"
  1948. >
  1949. <span>
  1950. {this.state.salesmanName +
  1951. "(" +
  1952. this.state.depName +
  1953. ")"}
  1954. </span>
  1955. </FormItem>
  1956. <FormItem
  1957. className="half-item"
  1958. {...formItemLayout}
  1959. label="负责人电话"
  1960. >
  1961. <span>{this.state.salesmanMobile}</span>
  1962. </FormItem>
  1963. <FormItem
  1964. className="half-item"
  1965. {...formItemLayout}
  1966. label="当前财务负责人"
  1967. >
  1968. <span>{this.state.nowFinance}</span>
  1969. </FormItem>
  1970. <FormItem
  1971. className="half-item"
  1972. {...formItemLayout}
  1973. label="当前财务负责人电话"
  1974. >
  1975. <span>{this.state.nowFinanceMobile}</span>
  1976. </FormItem>
  1977. <FormItem
  1978. className="half-item"
  1979. {...formItemLayout}
  1980. style={{ opacity: ".5" }}
  1981. label="原负责人"
  1982. >
  1983. <span>{this.state.oldSalesmanName}</span>
  1984. </FormItem>
  1985. <FormItem
  1986. className="half-item"
  1987. {...formItemLayout}
  1988. style={{ opacity: ".5" }}
  1989. label="原负责人电话"
  1990. >
  1991. <span>{this.state.oldSalesmanMobile}</span>
  1992. </FormItem>
  1993. <FormItem
  1994. className="half-item"
  1995. {...formItemLayout}
  1996. style={{ opacity: ".5" }}
  1997. label="实际财务操作人"
  1998. >
  1999. <span>{this.state.financeName}</span>
  2000. </FormItem>
  2001. <FormItem
  2002. className="half-item"
  2003. {...formItemLayout}
  2004. style={{ opacity: ".5" }}
  2005. label="实际财务操作人电话"
  2006. >
  2007. <span>{this.state.financeMobile}</span>
  2008. </FormItem>
  2009. </div>
  2010. <div className="clearfix">
  2011. <h3 className="sub-title">外包信息</h3>
  2012. <FormItem
  2013. className="half-item"
  2014. {...formItemLayout}
  2015. label="外包公司"
  2016. >
  2017. <Input
  2018. value={this.state.outsourceName}
  2019. onChange={e => {
  2020. this.setState({
  2021. outsourceName: e.target.value
  2022. });
  2023. }}
  2024. placeholder="请输入外包公司"
  2025. style={{ width: "200px" }}
  2026. />
  2027. </FormItem>
  2028. <FormItem
  2029. className="half-item"
  2030. {...formItemLayout}
  2031. label="外包成本(万元)"
  2032. >
  2033. <Input
  2034. value={this.state.outsourcePrice}
  2035. onChange={e => {
  2036. this.setState({
  2037. outsourcePrice: e.target.value
  2038. });
  2039. }}
  2040. placeholder="请输入外包成本"
  2041. style={{ width: "200px" }}
  2042. />
  2043. </FormItem>
  2044. </div>
  2045. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  2046. <div className="clearfix">
  2047. <h3 className="sub-title">联系信息</h3>
  2048. <FormItem
  2049. className="half-item"
  2050. {...formItemLayout}
  2051. label="客户名称"
  2052. >
  2053. <span>{this.state.userName}</span>
  2054. </FormItem>
  2055. <FormItem
  2056. className="half-item"
  2057. {...formItemLayout}
  2058. label="企业法人"
  2059. >
  2060. <Input
  2061. placeholder="请输入法人名称"
  2062. value={this.state.legalPerson}
  2063. style={{ width: "200px" }}
  2064. onChange={e => {
  2065. this.setState({ legalPerson: e.target.value });
  2066. }}
  2067. ref="commodityQuantity"
  2068. />
  2069. </FormItem>
  2070. <FormItem
  2071. className="half-item"
  2072. {...formItemLayout}
  2073. label="法人电话"
  2074. >
  2075. <Input
  2076. placeholder="请输入法人电话"
  2077. value={this.state.legalPersonTel}
  2078. style={{ width: "200px" }}
  2079. onChange={e => {
  2080. this.setState({ legalPersonTel: e.target.value });
  2081. }}
  2082. ref="commodityQuantity"
  2083. />
  2084. </FormItem>
  2085. <FormItem
  2086. className="half-item"
  2087. {...formItemLayout}
  2088. label="客户联系人"
  2089. >
  2090. <Input
  2091. placeholder="请输入联系人名称"
  2092. value={this.state.contacts}
  2093. style={{ width: "200px" }}
  2094. onChange={e => {
  2095. this.setState({ contacts: e.target.value });
  2096. }}
  2097. ref="commodityQuantity"
  2098. />
  2099. </FormItem>
  2100. <FormItem
  2101. className="half-item"
  2102. {...formItemLayout}
  2103. label="联系人电话"
  2104. >
  2105. <Input
  2106. placeholder="请输入联系人电话"
  2107. value={this.state.contactMobile}
  2108. style={{ width: "200px" }}
  2109. onChange={e => {
  2110. this.setState({ contactMobile: e.target.value });
  2111. }}
  2112. ref="commodityQuantity"
  2113. />
  2114. </FormItem>
  2115. <FormItem
  2116. className="half-item"
  2117. {...formItemLayout}
  2118. label="企业地址"
  2119. >
  2120. <Cascader
  2121. options={areaSelect()}
  2122. value={this.state.ProvinceCity}
  2123. placeholder="选择城市"
  2124. style={{ width: "200px" }}
  2125. onChange={e => {
  2126. this.setState({ ProvinceCity: e });
  2127. }}
  2128. />
  2129. </FormItem>
  2130. <FormItem
  2131. className="half-item"
  2132. {...formItemLayout}
  2133. label=""
  2134. ></FormItem>
  2135. <FormItem
  2136. className="half-item"
  2137. {...formItemLayout}
  2138. label=""
  2139. >
  2140. <Input
  2141. placeholder="请输入详细地址"
  2142. value={this.state.postalAddress}
  2143. style={{ width: "200px", marginLeft: "12em" }}
  2144. onChange={e => {
  2145. this.setState({ postalAddress: e.target.value });
  2146. }}
  2147. ref="commodityQuantity"
  2148. />
  2149. </FormItem>
  2150. </div>
  2151. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  2152. <div className="clearfix">
  2153. <h3 className="sub-title">项目信息</h3>
  2154. <FormItem
  2155. className="half-item"
  2156. {...formItemLayout}
  2157. label="项目编号"
  2158. >
  2159. <span>
  2160. {this.state.splitStatus == 2
  2161. ? this.state.splitSuper + "-" + this.state.splitId
  2162. : this.state.id}
  2163. </span>
  2164. </FormItem>
  2165. <FormItem
  2166. className="half-item"
  2167. {...formItemLayout}
  2168. label="项目名称"
  2169. >
  2170. <span>{this.state.taskName}</span>
  2171. </FormItem>
  2172. <FormItem
  2173. className="half-item"
  2174. {...formItemLayout}
  2175. label="项目状态"
  2176. >
  2177. <Select
  2178. placeholder="选择项目状态"
  2179. style={{ width: "200px" }}
  2180. value={this.state.taskStatus}
  2181. onChange={e => {
  2182. this.setState({ taskStatus: e });
  2183. }}
  2184. >
  2185. {taskStatus.map(function(item) {
  2186. return (
  2187. <Select.Option key={item.value}>
  2188. {item.key}
  2189. </Select.Option>
  2190. );
  2191. })}
  2192. </Select>
  2193. </FormItem>
  2194. <FormItem
  2195. className="half-item"
  2196. {...formItemLayout}
  2197. label="项目类别"
  2198. >
  2199. <span>{this.state.cname}</span>
  2200. </FormItem>
  2201. <FormItem
  2202. className="half-item"
  2203. {...formItemLayout}
  2204. label="证书编号"
  2205. >
  2206. <Input
  2207. placeholder="请输入证书编号"
  2208. value={this.state.certificateNumber}
  2209. style={{ width: "200px" }}
  2210. onChange={e => {
  2211. this.setState({
  2212. certificateNumber: e.target.value
  2213. });
  2214. }}
  2215. ref="commodityQuantity"
  2216. />
  2217. </FormItem>
  2218. </div>
  2219. <div className="clearfix">
  2220. <h3 className="sub-title">申报系统账户信息</h3>
  2221. {/*<span style={{color:'red'}}>注:仅技术部可见</span>*/}
  2222. <FormItem
  2223. className="half-item"
  2224. {...formItemLayout}
  2225. label="用户名"
  2226. >
  2227. <Input
  2228. placeholder="请输入用户名"
  2229. value={this.state.declareUser}
  2230. style={{ width: "200px" }}
  2231. onChange={e => {
  2232. this.setState({ declareUser: e.target.value });
  2233. }}
  2234. />
  2235. </FormItem>
  2236. <FormItem
  2237. className="half-item"
  2238. {...formItemLayout}
  2239. label="密码"
  2240. >
  2241. <Input
  2242. placeholder="请输入密码"
  2243. value={this.state.declarePwd}
  2244. style={{ width: "200px" }}
  2245. onChange={e => {
  2246. this.setState({ declarePwd: e.target.value });
  2247. }}
  2248. />
  2249. </FormItem>
  2250. </div>
  2251. <div className="clearfix">
  2252. <h3 className="sub-title">项目申报进度</h3>
  2253. <FormItem
  2254. className="half-item"
  2255. {...formItemLayout}
  2256. label="启动时间"
  2257. >
  2258. <DatePicker
  2259. style={{
  2260. marginTop: "2px",
  2261. width: "200px",
  2262. height: "32px"
  2263. }}
  2264. showTime
  2265. format="YYYY-MM-DD"
  2266. onOk={() => {}}
  2267. value={
  2268. this.state.startDate
  2269. ? moment(this.state.startDate)
  2270. : null
  2271. }
  2272. onChange={(data, dataString) => {
  2273. this.setState({ startDate: dataString });
  2274. }}
  2275. />
  2276. </FormItem>
  2277. <FormItem
  2278. className="half-item"
  2279. {...formItemLayout}
  2280. label="完成时间"
  2281. >
  2282. <DatePicker
  2283. style={{
  2284. marginTop: "2px",
  2285. width: "200px",
  2286. height: "32px"
  2287. }}
  2288. showTime
  2289. format="YYYY-MM-DD"
  2290. onOk={() => {}}
  2291. value={
  2292. this.state.endDate
  2293. ? moment(this.state.endDate)
  2294. : null
  2295. }
  2296. onChange={(data, dataString) => {
  2297. this.setState({ endDate: dataString });
  2298. }}
  2299. />
  2300. </FormItem>
  2301. <FormItem
  2302. className="half-item"
  2303. {...formItemLayout}
  2304. label="受理时间"
  2305. >
  2306. <DatePicker
  2307. style={{
  2308. marginTop: "2px",
  2309. width: "200px",
  2310. height: "32px"
  2311. }}
  2312. showTime
  2313. format="YYYY-MM-DD"
  2314. onOk={() => {}}
  2315. value={
  2316. this.state.acceptDate
  2317. ? moment(this.state.acceptDate)
  2318. : null
  2319. }
  2320. onChange={(data, dataString) => {
  2321. this.setState({ acceptDate: dataString });
  2322. }}
  2323. />
  2324. </FormItem>
  2325. <FormItem
  2326. className="half-item"
  2327. {...formItemLayout}
  2328. label="评审时间"
  2329. >
  2330. <DatePicker
  2331. style={{
  2332. marginTop: "2px",
  2333. width: "200px",
  2334. height: "32px"
  2335. }}
  2336. showTime
  2337. format="YYYY-MM-DD"
  2338. onOk={() => {}}
  2339. value={
  2340. this.state.reviewDate
  2341. ? moment(this.state.reviewDate)
  2342. : null
  2343. }
  2344. onChange={(data, dataString) => {
  2345. this.setState({ reviewDate: dataString });
  2346. }}
  2347. />
  2348. </FormItem>
  2349. <FormItem
  2350. className="half-item"
  2351. {...formItemLayout}
  2352. label="公示时间"
  2353. >
  2354. <DatePicker
  2355. style={{
  2356. marginTop: "2px",
  2357. width: "200px",
  2358. height: "32px"
  2359. }}
  2360. showTime
  2361. format="YYYY-MM-DD"
  2362. onOk={() => {}}
  2363. value={
  2364. this.state.publicityDate
  2365. ? moment(this.state.publicityDate)
  2366. : null
  2367. }
  2368. onChange={(data, dataString) => {
  2369. this.setState({ publicityDate: dataString });
  2370. }}
  2371. />
  2372. </FormItem>
  2373. <FormItem
  2374. className="half-item"
  2375. {...formItemLayout}
  2376. label="发证时间"
  2377. >
  2378. <DatePicker
  2379. style={{
  2380. marginTop: "2px",
  2381. width: "200px",
  2382. height: "32px"
  2383. }}
  2384. showTime
  2385. format="YYYY-MM-DD"
  2386. onOk={() => {}}
  2387. value={
  2388. this.state.licenceDate
  2389. ? moment(this.state.licenceDate)
  2390. : null
  2391. }
  2392. onChange={(data, dataString) => {
  2393. this.setState({ licenceDate: dataString });
  2394. }}
  2395. />
  2396. </FormItem>
  2397. <FormItem
  2398. className="half-item"
  2399. {...formItemLayout}
  2400. label="立项金额(万元)"
  2401. >
  2402. <Input
  2403. placeholder="请输入立项金额"
  2404. value={this.state.setUpAmount}
  2405. style={{ width: "200px" }}
  2406. onChange={e => {
  2407. this.setState({ setUpAmount: e.target.value });
  2408. }}
  2409. ref="commodityQuantity"
  2410. />
  2411. </FormItem>
  2412. <FormItem
  2413. className="half-item"
  2414. {...formItemLayout}
  2415. label="是否到款"
  2416. >
  2417. <Radio.Group
  2418. value={this.state.arrivalMoney}
  2419. onChange={e => {
  2420. this.setState({ arrivalMoney: e.target.value });
  2421. }}
  2422. >
  2423. <Radio value={0}>未到企业</Radio>
  2424. <Radio value={1}>已到企业</Radio>
  2425. </Radio.Group>
  2426. </FormItem>
  2427. </div>
  2428. <div className="clearfix">
  2429. <FormItem
  2430. labelCol={{ span: 3 }}
  2431. wrapperCol={{ span: 16 }}
  2432. label="附件"
  2433. >
  2434. <Picture
  2435. fileList={e => {
  2436. this.setState({ attachmentUrl: e });
  2437. }}
  2438. pictureUrl={this.state.attachmentUrl}
  2439. visible={this.props.visible}
  2440. data={{
  2441. sign: "order_task_file",
  2442. url: "/api/admin/orderProject/uploadOrderTaskFile",
  2443. number: 8
  2444. }}
  2445. />
  2446. </FormItem>
  2447. </div>
  2448. <div className="clearfix">
  2449. <FormItem
  2450. labelCol={{ span: 3 }}
  2451. wrapperCol={{ span: 16 }}
  2452. label="备注"
  2453. >
  2454. <Input
  2455. type="textarea"
  2456. placeholder="请输入备注"
  2457. rows={4}
  2458. value={this.state.taskComment}
  2459. onChange={e => {
  2460. this.setState({ taskComment: e.target.value });
  2461. }}
  2462. />
  2463. </FormItem>
  2464. </div>
  2465. <div>
  2466. <h3 className="sub-title">项目业务</h3>
  2467. {this.state.processStatus == 0 ? (
  2468. <Button
  2469. type="primary"
  2470. onClick={this.addDetailed}
  2471. style={{
  2472. float: "right",
  2473. marginRight: "50px",
  2474. marginBottom: "15px"
  2475. }}
  2476. >
  2477. 添加项目明细
  2478. </Button>
  2479. ) : (
  2480. ""
  2481. )}
  2482. </div>
  2483. <div className="patent-table">
  2484. <Spin spinning={this.state.loading}>
  2485. <Table
  2486. columns={this.state.columnsX}
  2487. dataSource={this.state.dataSourceX}
  2488. pagination={this.state.paginations}
  2489. onRowClick={this.tableRowClickX}
  2490. bordered
  2491. size="small"
  2492. />
  2493. </Spin>
  2494. </div>
  2495. <div className="clearfix">
  2496. <Button
  2497. className="cancel"
  2498. type="primary"
  2499. // onClick={this.tijiaoOk}
  2500. onClick={() => {
  2501. let num = this.state.projectStatus;
  2502. if (
  2503. num != 0 &&
  2504. num != 10 &&
  2505. num != 11 &&
  2506. num != 12 &&
  2507. num != 2 &&
  2508. num != 5 &&
  2509. num != 6
  2510. ) {
  2511. this.showDeleteConfirm(num, this.tijiaoOk);
  2512. } else {
  2513. this.tijiaoOk();
  2514. }
  2515. }}
  2516. style={{ marginLeft: "200px", marginTop: "10px" }}
  2517. htmlType="submit"
  2518. >
  2519. 保存
  2520. </Button>
  2521. <Button
  2522. className="cancel"
  2523. type="ghost"
  2524. onClick={this.visitCancel}
  2525. style={{ marginLeft: "50px", marginTop: "10px" }}
  2526. >
  2527. 取消
  2528. </Button>
  2529. </div>
  2530. </div>
  2531. </Spin>
  2532. </Form>
  2533. </TabPane>
  2534. <TabPane tab="外包(不走本部)" key="2">
  2535. {this.state.refundStatus != 0 && this.state.refundStatus != 1 ? (
  2536. <div style={{ marginTop: 10 }}>
  2537. <div className="clearfix">
  2538. <FormItem
  2539. className="half-item"
  2540. {...formItemLayout}
  2541. label={
  2542. <span>
  2543. <strong style={{ color: "#f00" }}>*</strong>
  2544. 外包公司
  2545. </span>
  2546. }
  2547. >
  2548. <Input
  2549. value={this.state.companyName}
  2550. onChange={e => {
  2551. this.setState({
  2552. companyName: e.target.value
  2553. });
  2554. }}
  2555. placeholder="请填写外包公司名称"
  2556. />
  2557. </FormItem>
  2558. <span className="tip" style={{ color: "red" }}>
  2559. 如多个公司,请用间隔
  2560. </span>
  2561. </div>
  2562. <div className="clearfix">
  2563. <FormItem
  2564. className="half-item"
  2565. {...formItemLayout}
  2566. label={
  2567. <span>
  2568. <strong style={{ color: "#f00" }}>*</strong>
  2569. 单价(万元)
  2570. </span>
  2571. }
  2572. >
  2573. <Input
  2574. value={this.state.unitPrice}
  2575. onChange={e => {
  2576. this.setState({
  2577. unitPrice: e.target.value
  2578. });
  2579. }}
  2580. placeholder="请填写本次外包公司的价格"
  2581. />
  2582. </FormItem>
  2583. </div>
  2584. <div className="clearfix">
  2585. <FormItem
  2586. className="half-item"
  2587. {...formItemLayout}
  2588. label={
  2589. <span>
  2590. <strong style={{ color: "#f00" }}>*</strong>
  2591. 数量(个)
  2592. </span>
  2593. }
  2594. >
  2595. <Input
  2596. value={this.state.unitNumber}
  2597. onChange={e => {
  2598. this.setState({
  2599. unitNumber: e.target.value
  2600. });
  2601. }}
  2602. placeholder="请填写本次外包公司的价格"
  2603. />
  2604. </FormItem>
  2605. </div>
  2606. <div className="clearfix">
  2607. <FormItem
  2608. className="half-item"
  2609. {...formItemLayout}
  2610. label={
  2611. <span>
  2612. <strong style={{ color: "#f00" }}>*</strong>
  2613. 总金额(万元)
  2614. </span>
  2615. }
  2616. >
  2617. <Input
  2618. value={this.state.amount}
  2619. onChange={e => {
  2620. this.setState({
  2621. amount: e.target.value
  2622. });
  2623. }}
  2624. placeholder="请填写本次外包公司的价格"
  2625. />
  2626. </FormItem>
  2627. </div>
  2628. <div className="clearfix">
  2629. <FormItem
  2630. className="half-item"
  2631. {...formItemLayout}
  2632. label={
  2633. <span>
  2634. <strong style={{ color: "#f00" }}>*</strong>备注
  2635. </span>
  2636. }
  2637. >
  2638. <TextArea
  2639. rows={4}
  2640. value={this.state.outsourceRemarks}
  2641. onChange={e => {
  2642. this.setState({
  2643. outsourceRemarks: e.target.value
  2644. });
  2645. }}
  2646. placeholder="请输入备注"
  2647. />
  2648. </FormItem>
  2649. </div>
  2650. {/*<div className="clearfix">
  2651. <FormItem className="half-item"
  2652. {...formItemLayout}
  2653. label="上传协议文件" style={{height:"auto"}}>
  2654. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  2655. data={(e)=>{
  2656. return {
  2657. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  2658. }
  2659. }}
  2660. fileList={this.state.fileUrl}
  2661. onChange={(e)=>{
  2662. this.setState({
  2663. attachmentUrl:e.fileList,
  2664. fileUrl:e.fileList
  2665. })
  2666. }}>
  2667. {fileUrl.length>1?null:<Button>
  2668. <Icon type="upload" /> 点击上传
  2669. </Button>}
  2670. </Upload>
  2671. <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
  2672. </FormItem>
  2673. </div>*/}
  2674. <p
  2675. className="tip"
  2676. style={{
  2677. paddingBottom: "12px",
  2678. width: "240px",
  2679. marginLeft: "145px",
  2680. color: "red"
  2681. }}
  2682. >
  2683. 首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
  2684. </p>
  2685. <div className="clearfix">
  2686. <FormItem
  2687. labelCol={{ span: 4 }}
  2688. wrapperCol={{ span: 18 }}
  2689. label={
  2690. <span>
  2691. <strong style={{ color: "#f00" }}>*</strong>
  2692. 合同/协议扫描件
  2693. </span>
  2694. }
  2695. >
  2696. <PicturesWall
  2697. fileList={this.getOrgCodeUrlWai}
  2698. pictureUrl={this.state.pictureUrl}
  2699. />
  2700. <p style={{ color: "red" }}>图片建议:要清晰。</p>
  2701. </FormItem>
  2702. </div>
  2703. <div className="clearfix">
  2704. <div
  2705. style={{
  2706. display: "inline-black",
  2707. textAlign: "center"
  2708. }}
  2709. >
  2710. <Button
  2711. type="primary"
  2712. loading={this.state.loading}
  2713. onClick={this.sureOut}
  2714. >
  2715. 确认发起外包,不通过总部
  2716. </Button>
  2717. <p className="tip" style={{ color: "red" }}>
  2718. 提示:高于总部价格,费用个人承担
  2719. </p>
  2720. </div>
  2721. </div>
  2722. </div>
  2723. ) : (
  2724. <div>
  2725. <div className="clearfix">
  2726. <FormItem
  2727. className="half-item"
  2728. {...formItemLayout}
  2729. label="外包公司"
  2730. >
  2731. <span>{this.state.companyName}</span>
  2732. </FormItem>
  2733. </div>
  2734. <div className="clearfix">
  2735. <FormItem
  2736. className="half-item"
  2737. {...formItemLayout}
  2738. label="单价(万元)"
  2739. >
  2740. <span>{this.state.unitPrice}</span>
  2741. </FormItem>
  2742. </div>
  2743. <div className="clearfix">
  2744. <FormItem
  2745. className="half-item"
  2746. {...formItemLayout}
  2747. label="数量(个)"
  2748. >
  2749. <span>{this.state.unitNumber}</span>
  2750. </FormItem>
  2751. </div>
  2752. <div className="clearfix">
  2753. <FormItem
  2754. className="half-item"
  2755. {...formItemLayout}
  2756. label="总金额(万元)"
  2757. >
  2758. <span>{this.state.amount}</span>
  2759. </FormItem>
  2760. </div>
  2761. <div className="clearfix">
  2762. <FormItem
  2763. className="half-item"
  2764. {...formItemLayout}
  2765. label="备注"
  2766. >
  2767. <span>{this.state.outsourceRemarks}</span>
  2768. </FormItem>
  2769. </div>
  2770. {/*<div className="clearfix">
  2771. <FormItem className="half-item" style={{height:'auto'}}
  2772. {...formItemLayout}
  2773. label="上传协议文件" >
  2774. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  2775. data={(e)=>{
  2776. return {
  2777. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  2778. }
  2779. }}
  2780. fileList={this.state.fileUrl}
  2781. showUploadList={{showRemoveIcon:false}}
  2782. onPreview={(e)=>{
  2783. let url = window.location.href.substring(7)
  2784. window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data
  2785. }}
  2786. >
  2787. </Upload>
  2788. </FormItem>
  2789. </div>*/}
  2790. <div className="clearfix">
  2791. <FormItem
  2792. labelCol={{ span: 4 }}
  2793. wrapperCol={{ span: 18 }}
  2794. label="合同/协议扫描件"
  2795. >
  2796. <Upload
  2797. className="demandDetailShow-upload"
  2798. listType="picture-card"
  2799. fileList={this.state.pictureUrl}
  2800. onPreview={file => {
  2801. this.setState({
  2802. previewImage: file.url || file.thumbUrl,
  2803. previewVisible: true
  2804. });
  2805. }}
  2806. ></Upload>
  2807. <Modal
  2808. maskClosable={false}
  2809. footer={null}
  2810. visible={this.state.previewVisible}
  2811. onCancel={() => {
  2812. this.setState({ previewVisible: false });
  2813. }}
  2814. >
  2815. <img
  2816. alt=""
  2817. style={{ width: "100%" }}
  2818. src={this.state.previewImage || ""}
  2819. />
  2820. </Modal>
  2821. </FormItem>
  2822. </div>
  2823. </div>
  2824. )}
  2825. {this.state.refundStatus == 1 ||
  2826. this.state.refundStatus == 0 ||
  2827. this.state.refundStatus == 2 ? (
  2828. <div className="clearfix">
  2829. <hr className="division" />
  2830. <div
  2831. className="clearfix"
  2832. style={{
  2833. display: this.state.refundStatus == 0 ? "none" : "block"
  2834. }}
  2835. >
  2836. <FormItem
  2837. className="half-item"
  2838. {...formItemLayout}
  2839. label="审核意见"
  2840. >
  2841. <span>{this.state.remarks}</span>
  2842. </FormItem>
  2843. </div>
  2844. <div className="clearfix">
  2845. <FormItem
  2846. className="half-item"
  2847. {...formItemLayout}
  2848. label="审核结果"
  2849. >
  2850. <span>{getRefundStatus(this.state.refundStatus)}</span>
  2851. </FormItem>
  2852. </div>
  2853. <div
  2854. className="clearfix"
  2855. style={{
  2856. display: this.state.refundStatus == 0 ? "none" : "block"
  2857. }}
  2858. >
  2859. <FormItem
  2860. className="half-item"
  2861. {...formItemLayout}
  2862. label="审核时间"
  2863. >
  2864. <span>{this.state.auditTimes}</span>
  2865. </FormItem>
  2866. </div>
  2867. </div>
  2868. ) : (
  2869. ""
  2870. )}
  2871. </TabPane>
  2872. </Tabs>
  2873. </Modal>
  2874. <Modal
  2875. maskClosable={false}
  2876. visible={this.state.lookVisible}
  2877. onOk={this.noCancel}
  2878. onCancel={this.noCancel}
  2879. width="500px"
  2880. title={"添加工时"}
  2881. footer=""
  2882. className="admin-desc-content"
  2883. >
  2884. <Form layout="horizontal" id="demand-form">
  2885. <Spin spinning={this.state.loading}>
  2886. <div className="clearfix">
  2887. <FormItem {...formItemLayout} label="工作日期">
  2888. <DatePicker
  2889. style={{ marginTop: "2px", width: "200px", height: "32px" }}
  2890. showTime
  2891. format="YYYY-MM-DD"
  2892. onOk={() => {}}
  2893. value={
  2894. this.state.taskDate ? moment(this.state.taskDate) : null
  2895. }
  2896. onChange={(data, dataString) => {
  2897. this.setState({ taskDate: dataString });
  2898. }}
  2899. />
  2900. </FormItem>
  2901. </div>
  2902. <div className="clearfix">
  2903. <FormItem {...formItemLayout} label="工作时长">
  2904. <Input
  2905. placeholder="请输入工作时长"
  2906. value={this.state.hours}
  2907. style={{ width: "200px" }}
  2908. onChange={e => {
  2909. this.setState({ hours: e.target.value });
  2910. }}
  2911. ref="commodityQuantity"
  2912. />
  2913. </FormItem>
  2914. </div>
  2915. <div className="clearfix">
  2916. <FormItem {...formItemLayout} label="工作内容">
  2917. <Input
  2918. type="textarea"
  2919. placeholder="请输入备注"
  2920. rows={4}
  2921. value={this.state.remarks}
  2922. onChange={e => {
  2923. this.setState({ remarks: e.target.value });
  2924. }}
  2925. />
  2926. </FormItem>
  2927. </div>
  2928. <div className="clearfix">
  2929. <Button
  2930. className="cancel"
  2931. type="primary"
  2932. onClick={this.tianjiaOk}
  2933. style={{ marginLeft: "100px" }}
  2934. htmlType="submit"
  2935. >
  2936. 确定
  2937. </Button>
  2938. <Button
  2939. className="cancel"
  2940. type="ghost"
  2941. onClick={this.noCancel}
  2942. style={{ marginLeft: "50px" }}
  2943. >
  2944. 取消
  2945. </Button>
  2946. </div>
  2947. </Spin>
  2948. </Form>
  2949. </Modal>
  2950. <Modal
  2951. maskClosable={false}
  2952. visible={this.state.addnextVisible}
  2953. onOk={this.nextCancel}
  2954. onCancel={this.nextCancel}
  2955. width="800px"
  2956. title="项目详情"
  2957. footer=""
  2958. className="admin-desc-content"
  2959. >
  2960. <Form layout="horizontal" onSubmit={this.nextSubmit} id="demand-form">
  2961. <Spin spinning={this.state.loading}>
  2962. <div className="clearfix">
  2963. <FormItem
  2964. className="half-item"
  2965. {...formItemLayout}
  2966. label="项目名称"
  2967. >
  2968. <span>{this.state.commodityName}</span>
  2969. </FormItem>
  2970. <FormItem
  2971. className="half-item"
  2972. {...formItemLayout}
  2973. label="项目数量"
  2974. >
  2975. <span>{this.state.commodityQuantity}</span>
  2976. </FormItem>
  2977. <FormItem
  2978. className="half-item"
  2979. {...formItemLayout}
  2980. label="金额(万元)"
  2981. >
  2982. <span>{this.state.commodityPrice ? "***" : 0}</span>
  2983. </FormItem>
  2984. <FormItem
  2985. className="half-item"
  2986. {...formItemLayout}
  2987. label="主要项目"
  2988. >
  2989. <span>{getboutique(this.state.main)}</span>
  2990. </FormItem>
  2991. <div className="clearfix">
  2992. <FormItem
  2993. labelCol={{ span: 3 }}
  2994. wrapperCol={{ span: 18 }}
  2995. label="服务说明"
  2996. >
  2997. <span>{this.state.taskComment}</span>
  2998. </FormItem>
  2999. </div>
  3000. </div>
  3001. </Spin>
  3002. </Form>
  3003. </Modal>
  3004. <Modal
  3005. maskClosable={false}
  3006. visible={this.state.speVisible}
  3007. onOk={this.visitOk}
  3008. onCancel={this.visitCancel}
  3009. width="900px"
  3010. title="项目概况"
  3011. footer=""
  3012. className="admin-desc-content"
  3013. >
  3014. <div className="clearfix">
  3015. <FormItem
  3016. className="half-item"
  3017. {...formItemLayout}
  3018. label="当前项目情况"
  3019. >
  3020. <Radio.Group
  3021. value={this.state.status}
  3022. onChange={e => {
  3023. this.setState({ status: e.target.value });
  3024. }}
  3025. >
  3026. <Radio value={0}>开启</Radio>
  3027. <Radio value={1}>暂停</Radio>
  3028. </Radio.Group>
  3029. <Button
  3030. type="primary"
  3031. size="small"
  3032. style={{ marginTop: "5px", position: "absolute" }}
  3033. onClick={this.caozuorizhi}
  3034. >
  3035. 操作日志
  3036. </Button>
  3037. </FormItem>
  3038. <FormItem
  3039. className="half-item"
  3040. {...formItemLayout}
  3041. label="合同编号"
  3042. >
  3043. <span>{this.state.contractNo}</span>
  3044. </FormItem>
  3045. </div>
  3046. <div className="clearfix">
  3047. <FormItem
  3048. className="half-item"
  3049. {...formItemLayout}
  3050. label="项目状态"
  3051. >
  3052. <Select
  3053. placeholder="选择项目状态"
  3054. style={{ width: "200px" }}
  3055. value={this.state.projectStatus}
  3056. onChange={e => {
  3057. this.setState({ projectStatus: e });
  3058. }}
  3059. >
  3060. {projectStatus.map(function(item) {
  3061. return (
  3062. <Select.Option key={item.value}>{item.key}</Select.Option>
  3063. );
  3064. })}
  3065. </Select>
  3066. </FormItem>
  3067. <FormItem
  3068. className="half-item"
  3069. {...formItemLayout}
  3070. label="是否特批"
  3071. >
  3072. <span>{getApproval(this.state.approval)}</span>
  3073. </FormItem>
  3074. <FormItem
  3075. className="half-item"
  3076. {...formItemLayout}
  3077. label="结算状态"
  3078. >
  3079. <span>{getLiquidationStatus(this.state.liquidationStatus)}</span>
  3080. </FormItem>
  3081. <FormItem
  3082. className="half-item"
  3083. {...formItemLayout}
  3084. label="流程状态"
  3085. >
  3086. <span>{getProcessStatus(this.state.processStatus)}</span>
  3087. </FormItem>
  3088. <FormItem
  3089. className="half-item"
  3090. {...formItemLayout}
  3091. label="订单编号"
  3092. >
  3093. <span>{this.state.orderNo}</span>
  3094. </FormItem>
  3095. </div>
  3096. <div className="clearfix">
  3097. <FormItem
  3098. className="half-item"
  3099. {...formItemLayout}
  3100. label="满意度表格"
  3101. >
  3102. <Radio.Group
  3103. value={this.state.formRetrieve}
  3104. onChange={e => {
  3105. this.setState({ formRetrieve: e.target.value });
  3106. }}
  3107. >
  3108. <Radio value={0}>未收回</Radio>
  3109. <Radio value={1}>已收回</Radio>
  3110. <Radio value={2}>其他</Radio>
  3111. </Radio.Group>
  3112. </FormItem>
  3113. <FormItem className="half-item" {...formItemLayout} label="退单">
  3114. <Radio.Group
  3115. value={this.state.taskRefund}
  3116. onChange={e => {
  3117. this.setState({ taskRefund: e.target.value });
  3118. }}
  3119. >
  3120. <Radio value={0}>已完成</Radio>
  3121. <Radio value={1}>未完成</Radio>
  3122. <Radio value={2}>其他</Radio>
  3123. </Radio.Group>
  3124. </FormItem>
  3125. </div>
  3126. <div className="clearfix">
  3127. {
  3128. <FormItem
  3129. className="half-item"
  3130. {...formItemLayout}
  3131. label="(满意度)备注"
  3132. >
  3133. <Input
  3134. type="textarea"
  3135. placeholder="请输入备注"
  3136. rows={2}
  3137. value={this.state.retrieveContent}
  3138. onChange={e => {
  3139. this.setState({ retrieveContent: e.target.value });
  3140. }}
  3141. />
  3142. </FormItem>
  3143. }
  3144. {
  3145. <FormItem
  3146. className="half-item"
  3147. {...formItemLayout}
  3148. label="(退单)备注"
  3149. >
  3150. <Input
  3151. type="textarea"
  3152. placeholder="请输入备注"
  3153. rows={2}
  3154. value={this.state.refundContent}
  3155. onChange={e => {
  3156. this.setState({ refundContent: e.target.value });
  3157. }}
  3158. />
  3159. </FormItem>
  3160. }
  3161. </div>
  3162. <div className="clearfix">
  3163. <h3 className="sub-title">订单负责人信息</h3>
  3164. <FormItem className="half-item" {...formItemLayout} label="负责人">
  3165. <span>
  3166. {this.state.salesmanName + "(" + this.state.depName + ")"}
  3167. </span>
  3168. </FormItem>
  3169. <FormItem
  3170. className="half-item"
  3171. {...formItemLayout}
  3172. label="负责人电话"
  3173. >
  3174. <span>{this.state.salesmanMobile}</span>
  3175. </FormItem>
  3176. <FormItem
  3177. className="half-item"
  3178. {...formItemLayout}
  3179. label="当前财务负责人"
  3180. >
  3181. <span>{this.state.nowFinance}</span>
  3182. </FormItem>
  3183. <FormItem
  3184. className="half-item"
  3185. {...formItemLayout}
  3186. label="当前财务负责人电话"
  3187. >
  3188. <span>{this.state.nowFinanceMobile}</span>
  3189. </FormItem>
  3190. <FormItem
  3191. className="half-item"
  3192. {...formItemLayout}
  3193. style={{ opacity: ".5" }}
  3194. label="原负责人"
  3195. >
  3196. <span>{this.state.oldSalesmanName}</span>
  3197. </FormItem>
  3198. <FormItem
  3199. className="half-item"
  3200. {...formItemLayout}
  3201. style={{ opacity: ".5" }}
  3202. label="原负责人电话"
  3203. >
  3204. <span>{this.state.oldSalesmanMobile}</span>
  3205. </FormItem>
  3206. <FormItem
  3207. className="half-item"
  3208. {...formItemLayout}
  3209. style={{ opacity: ".5" }}
  3210. label="实际财务操作人"
  3211. >
  3212. <span>{this.state.financeName}</span>
  3213. </FormItem>
  3214. <FormItem
  3215. className="half-item"
  3216. {...formItemLayout}
  3217. style={{ opacity: ".5" }}
  3218. label="实际财务操作人电话"
  3219. >
  3220. <span>{this.state.financeMobile}</span>
  3221. </FormItem>
  3222. </div>
  3223. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  3224. <div className="clearfix">
  3225. <h3 className="sub-title">联系信息</h3>
  3226. <FormItem
  3227. className="half-item"
  3228. {...formItemLayout}
  3229. label="客户名称"
  3230. >
  3231. <span>{this.state.userName}</span>
  3232. </FormItem>
  3233. <FormItem
  3234. className="half-item"
  3235. {...formItemLayout}
  3236. label="企业法人"
  3237. >
  3238. <Input
  3239. placeholder="请输入法人名称"
  3240. value={this.state.legalPerson}
  3241. style={{ width: "200px" }}
  3242. onChange={e => {
  3243. this.setState({ legalPerson: e.target.value });
  3244. }}
  3245. ref="commodityQuantity"
  3246. />
  3247. </FormItem>
  3248. <FormItem
  3249. className="half-item"
  3250. {...formItemLayout}
  3251. label="法人电话"
  3252. >
  3253. <Input
  3254. placeholder="请输入法人电话"
  3255. value={this.state.legalPersonTel}
  3256. style={{ width: "200px" }}
  3257. onChange={e => {
  3258. this.setState({ legalPersonTel: e.target.value });
  3259. }}
  3260. ref="commodityQuantity"
  3261. />
  3262. </FormItem>
  3263. <FormItem
  3264. className="half-item"
  3265. {...formItemLayout}
  3266. label="客户联系人"
  3267. >
  3268. <Input
  3269. placeholder="请输入联系人名称"
  3270. value={this.state.contacts}
  3271. style={{ width: "200px" }}
  3272. onChange={e => {
  3273. this.setState({ contacts: e.target.value });
  3274. }}
  3275. ref="commodityQuantity"
  3276. />
  3277. </FormItem>
  3278. <FormItem
  3279. className="half-item"
  3280. {...formItemLayout}
  3281. label="联系人电话"
  3282. >
  3283. <Input
  3284. placeholder="请输入联系人电话"
  3285. value={this.state.contactMobile}
  3286. style={{ width: "200px" }}
  3287. onChange={e => {
  3288. this.setState({ contactMobile: e.target.value });
  3289. }}
  3290. ref="commodityQuantity"
  3291. />
  3292. </FormItem>
  3293. <FormItem
  3294. className="half-item"
  3295. {...formItemLayout}
  3296. label="企业地址"
  3297. >
  3298. <Cascader
  3299. options={areaSelect()}
  3300. value={this.state.ProvinceCity}
  3301. placeholder="选择城市"
  3302. style={{ width: "200px" }}
  3303. onChange={e => {
  3304. this.setState({ ProvinceCity: e });
  3305. }}
  3306. />
  3307. </FormItem>
  3308. <FormItem
  3309. className="half-item"
  3310. {...formItemLayout}
  3311. label=""
  3312. ></FormItem>
  3313. <FormItem className="half-item" {...formItemLayout} label="">
  3314. <Input
  3315. placeholder="请输入详细地址"
  3316. value={this.state.postalAddress}
  3317. style={{ width: "200px", marginLeft: "12em" }}
  3318. onChange={e => {
  3319. this.setState({ postalAddress: e.target.value });
  3320. }}
  3321. ref="commodityQuantity"
  3322. />
  3323. </FormItem>
  3324. </div>
  3325. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  3326. <div className="clearfix">
  3327. <h3 className="sub-title">项目信息</h3>
  3328. <FormItem
  3329. className="half-item"
  3330. {...formItemLayout}
  3331. label="项目编号"
  3332. >
  3333. <span>
  3334. {this.state.splitStatus == 2
  3335. ? this.state.splitSuper + "-" + this.state.splitId
  3336. : this.state.id}
  3337. </span>
  3338. </FormItem>
  3339. <FormItem
  3340. className="half-item"
  3341. {...formItemLayout}
  3342. label="项目名称"
  3343. >
  3344. <span>{this.state.taskName}</span>
  3345. </FormItem>
  3346. <FormItem
  3347. className="half-item"
  3348. {...formItemLayout}
  3349. label="项目状态"
  3350. >
  3351. <Select
  3352. placeholder="选择项目状态"
  3353. style={{ width: "200px" }}
  3354. value={this.state.taskStatus}
  3355. onChange={e => {
  3356. this.setState({ taskStatus: e });
  3357. }}
  3358. >
  3359. {taskStatus.map(function(item) {
  3360. return (
  3361. <Select.Option key={item.value}>{item.key}</Select.Option>
  3362. );
  3363. })}
  3364. </Select>
  3365. </FormItem>
  3366. <FormItem
  3367. className="half-item"
  3368. {...formItemLayout}
  3369. label="项目类别"
  3370. >
  3371. <span>{this.state.cname}</span>
  3372. </FormItem>
  3373. <FormItem
  3374. className="half-item"
  3375. {...formItemLayout}
  3376. label="证书编号"
  3377. >
  3378. <Input
  3379. placeholder="请输入证书编号"
  3380. value={this.state.certificateNumber}
  3381. style={{ width: "200px" }}
  3382. onChange={e => {
  3383. this.setState({ certificateNumber: e.target.value });
  3384. }}
  3385. ref="commodityQuantity"
  3386. />
  3387. </FormItem>
  3388. </div>
  3389. <div className="clearfix" style={{ marginTop: "10px" }}>
  3390. <FormItem
  3391. labelCol={{ span: 3 }}
  3392. wrapperCol={{ span: 14 }}
  3393. label="附件"
  3394. >
  3395. <Picture
  3396. fileList={e => {
  3397. this.setState({ attachmentUrl: e });
  3398. }}
  3399. pictureUrl={this.state.attachmentUrl}
  3400. visible={this.props.visible}
  3401. data={{
  3402. sign: "order_task_file",
  3403. url: "/api/admin/orderProject/uploadOrderTaskFile",
  3404. number: 8
  3405. }}
  3406. />
  3407. </FormItem>
  3408. </div>
  3409. <div className="clearfix">
  3410. <FormItem
  3411. labelCol={{ span: 3 }}
  3412. wrapperCol={{ span: 16 }}
  3413. label="备注"
  3414. >
  3415. <Input
  3416. type="textarea"
  3417. placeholder="请输入备注"
  3418. rows={4}
  3419. value={this.state.taskComment}
  3420. onChange={e => {
  3421. this.setState({ taskComment: e.target.value });
  3422. }}
  3423. />
  3424. </FormItem>
  3425. </div>
  3426. <div className="clearfix">
  3427. <h3 className="sub-title">项目申报进度</h3>
  3428. <FormItem
  3429. className="half-item"
  3430. {...formItemLayout}
  3431. label="启动时间"
  3432. >
  3433. <DatePicker
  3434. style={{ marginTop: "5px" }}
  3435. showTime
  3436. format="YYYY-MM-DD"
  3437. onOk={() => {}}
  3438. value={
  3439. this.state.startDate ? moment(this.state.startDate) : null
  3440. }
  3441. onChange={(data, dataString) => {
  3442. this.setState({ startDate: dataString });
  3443. }}
  3444. />
  3445. </FormItem>
  3446. <FormItem
  3447. className="half-item"
  3448. {...formItemLayout}
  3449. label="软著派单数量"
  3450. >
  3451. <span>{this.state.commodityQuantity}</span>
  3452. <Button
  3453. type="primary"
  3454. size="small"
  3455. style={{ marginLeft: "45px" }}
  3456. onClick={this.addcontact}
  3457. >
  3458. +增加下证信息
  3459. </Button>
  3460. </FormItem>
  3461. <div className="patent-table">
  3462. <Spin spinning={this.state.loading}>
  3463. <Table
  3464. columns={this.state.ContactsLists}
  3465. dataSource={this.state.contactList}
  3466. pagination={false}
  3467. bordered
  3468. size="small"
  3469. />
  3470. </Spin>
  3471. </div>
  3472. </div>
  3473. <div className="clearfix">
  3474. <h3 className="sub-title">项目业务</h3>
  3475. <div className="patent-table">
  3476. <Spin spinning={this.state.loading}>
  3477. <Table
  3478. columns={this.state.columnsX}
  3479. dataSource={this.state.dataSourceX}
  3480. pagination={this.state.paginations}
  3481. onRowClick={this.tableRowClickX}
  3482. bordered
  3483. size="small"
  3484. />
  3485. </Spin>
  3486. </div>
  3487. </div>
  3488. <div className="clearfix">
  3489. <Button
  3490. className="cancel"
  3491. type="primary"
  3492. onClick={this.tijiaoOk}
  3493. style={{ marginLeft: "200px", marginTop: "10px" }}
  3494. htmlType="submit"
  3495. >
  3496. 保存
  3497. </Button>
  3498. <Button
  3499. className="cancel"
  3500. type="ghost"
  3501. onClick={this.visitCancel}
  3502. style={{ marginLeft: "50px", marginTop: "10px" }}
  3503. >
  3504. 取消
  3505. </Button>
  3506. </div>
  3507. </Modal>
  3508. <Modal
  3509. width="800px"
  3510. visible={this.state.visibleA}
  3511. onCancel={this.visitCancelA}
  3512. title="操作日志"
  3513. footer=""
  3514. className="admin-desc-content"
  3515. >
  3516. <div className="patent-table patent-table-center">
  3517. <Spin spinning={this.state.loading}>
  3518. <Table
  3519. columns={this.state.columnsA}
  3520. dataSource={this.state.dataSourceA}
  3521. pagination={false}
  3522. bordered
  3523. size="small"
  3524. />
  3525. </Spin>
  3526. </div>
  3527. </Modal>
  3528. <Modal
  3529. title="工时记录"
  3530. visible={this.state.timeVisible}
  3531. onCancel={this.timeClose}
  3532. width={800}
  3533. footer={null}
  3534. >
  3535. <Spin spinning={this.state.loading}>
  3536. <Table
  3537. columns={this.state.columnsTime}
  3538. dataSource={this.state.dataSourceTime}
  3539. pagination={false}
  3540. scroll={{ x: "max-content", y: 0 }}
  3541. bordered
  3542. size={"small"}
  3543. />
  3544. <p style={{ marginTop: 10, color: "red" }}>
  3545. 累计工时(小时):{this.state.recordHour}
  3546. </p>
  3547. </Spin>
  3548. </Modal>
  3549. </div>
  3550. );
  3551. }
  3552. });
  3553. export default Task;