inquiry.jsx 151 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import {
  4. Form,
  5. Radio,
  6. Icon,
  7. Button,
  8. Input,
  9. Spin,
  10. Table,
  11. message,
  12. DatePicker,
  13. Modal,
  14. Upload,
  15. Tooltip,
  16. Cascader,
  17. Tabs,
  18. Select,
  19. Col,
  20. Tag
  21. } from "antd";
  22. import NewService from "./addService.jsx";
  23. import ResolutionDetail from "@/resolutionDetail";
  24. import moment from "moment";
  25. import "../userMangagement.less";
  26. import { areaSelect } from "@/NewDicProvinceList";
  27. import OrderRiZi from "@/orderRiZi.jsx";
  28. import {
  29. getApprovedState,
  30. getprovince,
  31. getProcessStatus,
  32. getLiquidationStatus,
  33. getNewOrderStatus,
  34. beforeUploadFile,
  35. getProvinceA,
  36. getInvoiceStatus,
  37. splitUrl,
  38. ShowModal,
  39. getProjectStatus,
  40. getboutique,
  41. getCuikuan,
  42. getjiedian, getProjectName
  43. } from "../../../tools.js";
  44. import ShowModalDiv from "@/showModal.jsx";
  45. import { ChooseList } from "../orderNew/chooseList";
  46. import ReactToPrint from "react-to-print";
  47. import Project from "../../../../component/project";
  48. import ImgList from "../../../common/imgList";
  49. import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
  50. import OrderItemStatus from "../../../common/orderItemStatus";
  51. import EnterpriseNameChange from "../../../common/enterpriseNameChange";
  52. const { Option } = Select;
  53. const { TabPane } = Tabs;
  54. const PicturesWall = React.createClass({
  55. getInitialState() {
  56. return {
  57. previewVisible: false,
  58. previewImage: "",
  59. fileList: this.props.pictureUrl,
  60. declarationBatch: 1,
  61. dataInfor: {},
  62. };
  63. },
  64. getDefaultProps() {
  65. return {
  66. changeClick: this.modifyChange
  67. };
  68. },
  69. handleCancel() {
  70. this.setState({ previewVisible: false });
  71. },
  72. handlePreview(file) {
  73. this.setState({
  74. previewImage: file.url || file.thumbUrl,
  75. previewVisible: true
  76. });
  77. },
  78. handleChange(info) {
  79. let fileList = info.fileList;
  80. this.setState({ fileList });
  81. this.props.fileList(fileList);
  82. },
  83. componentWillReceiveProps(nextProps) {
  84. this.state.fileList = nextProps.pictureUrl;
  85. },
  86. render() {
  87. const { previewVisible, previewImage, fileList } = this.state;
  88. const uploadButton = (
  89. <div>
  90. <Icon type="plus" />
  91. <div className="ant-upload-text">点击上传</div>
  92. </div>
  93. );
  94. return (
  95. <div style={{ display: "inline-block" }}>
  96. <Upload
  97. beforeUpload={beforeUploadFile}
  98. action={
  99. globalConfig.context +
  100. "/api/admin/orderInvoice/uploadOrderInvoiceFile"
  101. }
  102. multiple={true}
  103. data={{ sign: "order_invoice_file" }}
  104. listType="picture-card"
  105. fileList={fileList}
  106. onPreview={this.handlePreview}
  107. onChange={this.handleChange}
  108. >
  109. {uploadButton}
  110. </Upload>
  111. <Modal
  112. maskClosable={false}
  113. visible={previewVisible}
  114. footer={null}
  115. onCancel={this.handleCancel}
  116. >
  117. <img alt="example" style={{ width: "100%" }} src={previewImage} />
  118. </Modal>
  119. </div>
  120. );
  121. }
  122. });
  123. const IntentionCustomer = Form.create()(
  124. React.createClass({
  125. loadData(pageNo) {
  126. this.state.data = [];
  127. this.setState({
  128. loading: true,
  129. });
  130. $.ajax({
  131. method: "get",
  132. dataType: "json",
  133. crossDomain: false,
  134. url: globalConfig.context + "/api/admin/newOrder/orderNewList",
  135. data: {
  136. pageNo: pageNo || 1,
  137. pageSize: this.state.pagination.pageSize,
  138. specially: 5,
  139. name: this.state.customerName,
  140. orderNo: this.state.searchOrderNo,
  141. depId: this.state.departmenttSearch,
  142. starTime: this.state.releaseDate[0],
  143. endTime: this.state.releaseDate[1],
  144. liquidationStatus: this.state.liquidationStatusSearch,
  145. contractNo: this.state.contractNoSearch,
  146. depId: this.state.departmenttList,
  147. amountStatus: this.state.amountStatus,
  148. approval: this.state.approvalSearch,
  149. },
  150. success: function (data) {
  151. ShowModal(this);
  152. let theArr = [];
  153. if (!data.data) {
  154. if (data.error && data.error.length) {
  155. message.warning(data.error[0].message);
  156. }
  157. } else {
  158. for (let i = 0; i < data.data.list.length; i++) {
  159. let thisdata = data.data.list[i];
  160. theArr.push({
  161. key: thisdata.orderNo,
  162. id: thisdata.id,
  163. orderNo: thisdata.orderNo, //订单编号
  164. totalAmount: thisdata.totalAmount, //签单金额
  165. processStatus: thisdata.processStatus, //流程状态
  166. liquidationStatus: thisdata.liquidationStatus, //结算状态
  167. approval: thisdata.approval, //特批状态
  168. signDate: thisdata.signDate, //签单时间
  169. userName: thisdata.userName, //客户名称
  170. salesmanName: thisdata.salesmanName, //营销员名称
  171. financeName: thisdata.financeName, //财务名称
  172. createDate: thisdata.createDate, //下单时间
  173. orderStatus: thisdata.orderStatus, //订单状态
  174. depName: thisdata.depName, //部门名称
  175. contractNo: thisdata.contractNo, //合同编号
  176. invoiceAmount: thisdata.invoiceAmount, //开票金额
  177. settlementAmount: thisdata.settlementAmount, //已收款
  178. });
  179. }
  180. this.state.pagination.current = data.data.pageNo;
  181. this.state.pagination.total = data.data.totalCount;
  182. }
  183. if (!data.data.list.length) {
  184. this.state.pagination.current = 0;
  185. this.state.pagination.total = 0;
  186. }
  187. this.setState({
  188. pageNo: pageNo,
  189. dataSource: theArr,
  190. pagination: this.state.pagination,
  191. selectedRowKeys: [],
  192. });
  193. }.bind(this),
  194. }).always(
  195. function () {
  196. this.setState({
  197. loading: false,
  198. });
  199. }.bind(this)
  200. );
  201. },
  202. getInitialState() {
  203. return {
  204. rotateDeg: 0,
  205. kaiData: {
  206. remarks: "",
  207. type: undefined,
  208. orgCodeUrl: "",
  209. invoiceType: undefined,
  210. unitName: "",
  211. taxNumber: "",
  212. unitName: "",
  213. amount: "",
  214. banks: "",
  215. content: "",
  216. unitAddress: "",
  217. invoiceRemarks: "",
  218. unitMobile: "",
  219. post: undefined,
  220. addressee: "",
  221. addresseeMobile: "",
  222. addresseeProvince: "",
  223. addresseeCity: "",
  224. addresseeArea: "",
  225. recipientAddress: "",
  226. ordapproval: undefined,
  227. alreadyAmount: "0",
  228. ProvinceCity: [],
  229. },
  230. changeList: undefined,
  231. datauser: {},
  232. orgCodeUrl: [],
  233. selectedRowKeys: [],
  234. releaseDate: [],
  235. departmentArr: [],
  236. signBillState: false,
  237. signBillVisible: false,
  238. selectedRows: [],
  239. recordData: [],
  240. flag: false,
  241. searchMore: true,
  242. loading: false,
  243. alreadyAmount: 0,
  244. intentOrder: true,
  245. formalOrder: true,
  246. resVisible: false,
  247. pagination: {
  248. defaultCurrent: 1,
  249. defaultPageSize: 10,
  250. showQuickJumper: true,
  251. pageSize: 10,
  252. onChange: function (page) {
  253. this.loadData(page);
  254. }.bind(this),
  255. showTotal: function (total) {
  256. return "共" + total + "条数据";
  257. },
  258. },
  259. columnsX: [
  260. {
  261. title: "业务项目名称",
  262. dataIndex: "commodityName",
  263. key: "commodityName",
  264. render: (text, record) => {
  265. return text + "-" + record.id
  266. }
  267. },
  268. {
  269. title: "项目类别",
  270. dataIndex: "cname",
  271. key: "cname",
  272. },
  273. {
  274. title: "项目数量",
  275. dataIndex: "commodityQuantity",
  276. key: "commodityQuantity",
  277. render: (text, record) => {
  278. if (record.splitStatus == 1) {
  279. return (
  280. <span>
  281. {text}{" "}
  282. <Tag
  283. color="#108ee9"
  284. onClick={(e) => {
  285. e.stopPropagation();
  286. this.showRes(record);
  287. }}
  288. >
  289. 已拆
  290. </Tag>
  291. </span>
  292. );
  293. } else {
  294. return text;
  295. }
  296. },
  297. },
  298. {
  299. title: "金额(万元)",
  300. dataIndex: "commodityPrice",
  301. key: "commodityPrice",
  302. },
  303. {
  304. title: "负责人",
  305. dataIndex: "contacts",
  306. key: "contacts",
  307. },
  308. {
  309. title: "负责人电话",
  310. dataIndex: "contactsMobile",
  311. key: "contactsMobile",
  312. },
  313. {
  314. title: "主要项目",
  315. dataIndex: "main",
  316. key: "main",
  317. render: (text) => {
  318. return text ? "是" : "否";
  319. },
  320. },
  321. {
  322. title: "项目说明",
  323. dataIndex: "taskComment",
  324. key: "taskComment",
  325. render: (text) => {
  326. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  327. },
  328. },
  329. ],
  330. ContactsListsNew: [
  331. {
  332. title: "项目名称",
  333. dataIndex: "commodityName",
  334. key: "commodityName",
  335. render: (text, record) => {
  336. return <span>{text + "-" + record.tid}</span>;
  337. },
  338. },
  339. {
  340. title: "项目分类",
  341. dataIndex: "projectType",
  342. key: "projectType",
  343. render: (text) => {
  344. let arr = this.state.dataSourceX || [];
  345. let str = "";
  346. for (let i = 0; i < arr.length; i++) {
  347. if (this.state.dataSourceX[i].sort == text) {
  348. str = this.state.dataSourceX[i].cname;
  349. return <span>{str}</span>;
  350. }
  351. }
  352. },
  353. },
  354. {
  355. title: "催款科目",
  356. dataIndex: "dunTypeName",
  357. key: "dunTypeName",
  358. render: (text, record) => {
  359. if (record.customizeName) {
  360. return text + record.customizeName;
  361. }
  362. return <span>{text}</span>;
  363. },
  364. },
  365. {
  366. title: "时间(天)",
  367. dataIndex: "waitDay",
  368. key: "waitDay",
  369. render: (text, record) => {
  370. if (record.dunTypeName) {
  371. if (record.customizeTimes) {
  372. return record.customizeTimes;
  373. }
  374. return <span>{text}</span>;
  375. }
  376. },
  377. },
  378. {
  379. title: "金额(万元)",
  380. dataIndex: "money",
  381. key: "money",
  382. render: (text, record) => {
  383. if (record.dunTypeName) {
  384. if (record.appropriationRatio && !record.money) {
  385. return <span>{record.appropriationRatio}(拨款比例)</span>;
  386. } else if (record.appropriationRatio && record.money) {
  387. return (
  388. <span>
  389. {text}(比例:{record.appropriationRatio})
  390. </span>
  391. );
  392. } else {
  393. return <span>{text}</span>;
  394. }
  395. }
  396. },
  397. },
  398. {
  399. title: "服务年限",
  400. dataIndex: "startDate",
  401. key: "startDate",
  402. render: (text, record) => {
  403. if (record.dunTypeName) {
  404. return <span>{text}</span>;
  405. }
  406. },
  407. },
  408. {
  409. title: "催款状态",
  410. dataIndex: "status",
  411. key: "status",
  412. render: (text) => {
  413. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  414. },
  415. },
  416. ],
  417. ContactsLists: [
  418. {
  419. title: "催款科目",
  420. dataIndex: "dunSubject",
  421. key: "dunSubject",
  422. render: (text) => {
  423. return getjiedian(text);
  424. },
  425. },
  426. {
  427. title: "金额(万元)",
  428. dataIndex: "money",
  429. key: "money",
  430. },
  431. {
  432. title: "催款状态",
  433. dataIndex: "dunStatus",
  434. key: "dunStatus",
  435. render: (text) => {
  436. return getCuikuan(text);
  437. },
  438. },
  439. ],
  440. cuiColumns: [
  441. {
  442. title: "序号",
  443. dataIndex: "key",
  444. key: "key",
  445. },
  446. {
  447. title: "合同编号",
  448. dataIndex: "contractNo",
  449. key: "contractNo",
  450. },
  451. {
  452. title: "订单编号",
  453. dataIndex: "orderNo",
  454. key: "orderNo",
  455. },
  456. {
  457. title: "客户名称",
  458. dataIndex: "userName",
  459. key: "userName",
  460. width:100,
  461. render:text=>{
  462. return (
  463. <Tooltip title={text}>
  464. <div style={{
  465. maxWidth:'100px',
  466. overflow:'hidden',
  467. textOverflow: "ellipsis",
  468. whiteSpace:'nowrap',
  469. }}>{text}</div>
  470. </Tooltip>
  471. )
  472. }
  473. },
  474. {
  475. title: "订单负责人",
  476. dataIndex: "salesmanName",
  477. key: "salesmanName",
  478. },
  479. {
  480. title: "订单部门",
  481. dataIndex: "depName",
  482. key: "depName",
  483. },
  484. {
  485. title: "订单状态",
  486. dataIndex: "orderStatus",
  487. key: "orderStatus",
  488. render: (text) => {
  489. return getNewOrderStatus(text);
  490. },
  491. },
  492. {
  493. title: "项目状态",
  494. dataIndex: "projectStatus",
  495. key: "projectStatus",
  496. render: (text) => {
  497. return getProjectName(text);
  498. },
  499. },
  500. {
  501. title: "签单金额",
  502. dataIndex: "totalAmount",
  503. key: "totalAmount",
  504. },
  505. {
  506. title: "结算状态",
  507. dataIndex: "liquidationStatus",
  508. key: "liquidationStatus",
  509. render: (text) => {
  510. return getLiquidationStatus(text);
  511. },
  512. },
  513. {
  514. title: "已收款",
  515. dataIndex: "settlementAmount",
  516. key: "settlementAmount",
  517. },
  518. {
  519. title: "应收款",
  520. dataIndex: "accountsReceivable",
  521. key: "accountsReceivable",
  522. },
  523. {
  524. title: "催收科目",
  525. dataIndex: "dunSubject",
  526. key: "dunSubject",
  527. // render: text => {
  528. // return getjiedian(text);
  529. // }
  530. },
  531. {
  532. title: "催款状态",
  533. dataIndex: "dunStatus",
  534. key: "dunStatus",
  535. },
  536. {
  537. title: "催收启动时间",
  538. dataIndex: "startDate",
  539. key: "startDate",
  540. },
  541. ],
  542. proColumns: [
  543. {
  544. title: "序号",
  545. dataIndex: "key",
  546. key: "key",
  547. },
  548. {
  549. title: "合同编号",
  550. dataIndex: "contractNo",
  551. key: "contractNo",
  552. },
  553. {
  554. title: "订单编号",
  555. dataIndex: "orderNo",
  556. key: "orderNo",
  557. },
  558. // {
  559. // title: "项目编号",
  560. // dataIndex: "id",
  561. // key: "id"
  562. // },
  563. {
  564. title: "客户名称",
  565. dataIndex: "userName",
  566. key: "userName",
  567. width:100,
  568. render:text=>{
  569. return (
  570. <Tooltip title={text}>
  571. <div style={{
  572. maxWidth:'100px',
  573. overflow:'hidden',
  574. textOverflow: "ellipsis",
  575. whiteSpace:'nowrap',
  576. }}>{text}</div>
  577. </Tooltip>
  578. )
  579. }
  580. },
  581. {
  582. title: "订单负责人",
  583. dataIndex: "salesmanName",
  584. key: "salesmanName",
  585. },
  586. {
  587. title: "是否主项目",
  588. dataIndex: "main",
  589. key: "main",
  590. render: (text) => {
  591. return text == 0 ? "否" : "是";
  592. },
  593. },
  594. {
  595. title: "项目类别",
  596. dataIndex: "cname",
  597. key: "cname",
  598. },
  599. {
  600. title: "项目名称",
  601. dataIndex: "commodityName",
  602. key: "commodityName",
  603. },
  604. {
  605. title: "项目数量",
  606. dataIndex: "commodityQuantity",
  607. key: "commodityQuantity",
  608. render: (text, record) => {
  609. if (record.splitStatus == 1) {
  610. return (
  611. <span>
  612. {text}{" "}
  613. <Tag
  614. color="#108ee9"
  615. onClick={(e) => {
  616. e.stopPropagation();
  617. this.showRes(record);
  618. }}
  619. >
  620. 已拆
  621. </Tag>
  622. </span>
  623. );
  624. } else {
  625. return text;
  626. }
  627. },
  628. },
  629. {
  630. title: "服务市价",
  631. dataIndex: "commodityPrice",
  632. key: "commodityPrice",
  633. render: (text) => {
  634. return "****";
  635. },
  636. },
  637. {
  638. title: "证书编号",
  639. dataIndex: "certificateNumber",
  640. key: "certificateNumber",
  641. },
  642. {
  643. title: "项目状态",
  644. dataIndex: "projectStatus",
  645. key: "projectStatus",
  646. render: (text) => {
  647. return getProjectName(text);
  648. },
  649. },
  650. {
  651. title: "项目说明",
  652. dataIndex: "taskComment",
  653. key: "taskComment",
  654. },
  655. // {
  656. // title: "外包(内部)公司",
  657. // dataIndex: "outsourceName",
  658. // key: "outsourceName",
  659. // },
  660. // {
  661. // title: "外包(内部)价格",
  662. // dataIndex: "outsourcePrice",
  663. // key: "outsourcePrice",
  664. // render: (text) => {
  665. // return "****";
  666. // },
  667. // },
  668. ],
  669. columns: [
  670. {
  671. title: "合同编号",
  672. dataIndex: "contractNo",
  673. key: "contractNo",
  674. // fixed: 'left'
  675. },
  676. {
  677. title: "订单编号",
  678. dataIndex: "orderNo",
  679. key: "orderNo",
  680. // fixed: 'left'
  681. },
  682. {
  683. title: "客户名称",
  684. dataIndex: "userName",
  685. key: "userName",
  686. width:100,
  687. render:text=>{
  688. return (
  689. <Tooltip title={text}>
  690. <div style={{
  691. maxWidth:'100px',
  692. overflow:'hidden',
  693. textOverflow: "ellipsis",
  694. whiteSpace:'nowrap',
  695. }}>{text}</div>
  696. </Tooltip>
  697. )
  698. }
  699. },
  700. {
  701. title: "订单部门",
  702. dataIndex: "depName",
  703. key: "depName",
  704. // fixed: 'left'
  705. },
  706. {
  707. title: "下单时间",
  708. dataIndex: "createDate",
  709. key: "createTime",
  710. },
  711. {
  712. title: "合同签订时间",
  713. dataIndex: "signDate",
  714. key: "signDate",
  715. },
  716. {
  717. title: "流程状态",
  718. dataIndex: "processStatus",
  719. key: "processStatus",
  720. render: (text) => {
  721. return getProcessStatus(text);
  722. },
  723. },
  724. {
  725. title: "签单金额(万元)",
  726. dataIndex: "totalAmount",
  727. key: "totalAmount",
  728. },
  729. {
  730. title: "开票金额(万元)",
  731. dataIndex: "invoiceAmount",
  732. key: "invoiceAmount",
  733. },
  734. {
  735. title: "已收款(万元)",
  736. dataIndex: "settlementAmount",
  737. key: "settlementAmount",
  738. },
  739. {
  740. title: "结算状态",
  741. dataIndex: "liquidationStatus",
  742. key: "liquidationStatus",
  743. render: (text) => {
  744. return getLiquidationStatus(text);
  745. },
  746. },
  747. {
  748. title: "是否特批",
  749. dataIndex: "approval",
  750. key: "approval",
  751. render: (text) => {
  752. return getApprovedState(text);
  753. },
  754. },
  755. {
  756. title: "订单状态",
  757. dataIndex: "orderStatus",
  758. key: "orderStatus",
  759. render: (text) => {
  760. return getNewOrderStatus(text);
  761. },
  762. },
  763. {
  764. title: "财务负责人",
  765. dataIndex: "financeName",
  766. key: "financeName",
  767. },
  768. ],
  769. columnsDate: [
  770. {
  771. title: "编号",
  772. dataIndex: "id",
  773. key: "id",
  774. },
  775. {
  776. title: "订单编号",
  777. dataIndex: "orderno",
  778. key: "orderno",
  779. },
  780. {
  781. title: "开票金额(万元)",
  782. dataIndex: "amount",
  783. key: "amount",
  784. },
  785. {
  786. title: "申请时间",
  787. dataIndex: "createTime",
  788. key: "createTime",
  789. },
  790. {
  791. title: "开票状态",
  792. dataIndex: "status",
  793. key: "status",
  794. render: (text, record) => {
  795. return <div>{getInvoiceStatus(text, record)}</div>;
  796. },
  797. },
  798. ],
  799. dataSource: [],
  800. };
  801. },
  802. invoiceData(record) {
  803. if (this.state.flagA) return;
  804. this.setState({
  805. flagA: true,
  806. });
  807. let theorgCodeUrl = [];
  808. if (this.state.orgCodeUrl.length) {
  809. let picArr = [];
  810. this.state.orgCodeUrl.map(function (item) {
  811. if (
  812. item.response &&
  813. item.response.data &&
  814. item.response.data.length
  815. ) {
  816. picArr.push(item.response.data);
  817. }
  818. });
  819. theorgCodeUrl = picArr.join(",");
  820. }
  821. let api = "",
  822. api1 = "",
  823. method = "",
  824. fdata = {
  825. orderNo: this.state.orderNo3,
  826. type: this.state.type,
  827. status: this.state.status,
  828. approval: this.state.ordapproval,
  829. remarks: this.state.remarks,
  830. invoiceType: this.state.invoiceType,
  831. unitName: this.state.unitName,
  832. taxNumber: this.state.taxNumber,
  833. amount: parseFloat(this.state.amount),
  834. banks: this.state.banks,
  835. content: this.state.content,
  836. unitAddress: this.state.unitAddress,
  837. invoiceRemarks: this.state.invoiceRemarks,
  838. unitMobile: this.state.unitMobile,
  839. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  840. post: this.state.post,
  841. addressee: this.state.addressee,
  842. addresseeMobile: this.state.addresseeMobile,
  843. addresseeProvince:
  844. this.state.post === 0 ? this.state.ProvinceCity[0] : "",
  845. addresseeCity:
  846. this.state.post === 0 ? this.state.ProvinceCity[1] : "",
  847. addresseeArea:
  848. this.state.post === 0 ? this.state.ProvinceCity[2] : "",
  849. recipientAddress: this.state.recipientAddress,
  850. alreadyAmount: parseFloat(this.state.alreadyAmount),
  851. },
  852. sumData = {},
  853. sumData1 = {};
  854. switch (this.state.status) {
  855. case 0:
  856. api = "/api/admin/orderInvoice/createOrderInvoice";
  857. sumData = fdata;
  858. method = "post";
  859. break;
  860. case 1:
  861. api = "/api/admin/orderInvoice/createOrderInvoice";
  862. api1 = "/api/admin/orderInvoice/updateOrderInvoice";
  863. sumData = fdata;
  864. sumData1 = {
  865. orderNo: this.state.orderNo3,
  866. type: this.state.type,
  867. status: this.state.status,
  868. approval: this.state.ordapproval,
  869. remarks: this.state.remarks,
  870. invoiceType: this.state.invoiceType,
  871. unitName: this.state.unitName,
  872. taxNumber: this.state.taxNumber,
  873. amount: parseFloat(this.state.amount),
  874. banks: this.state.banks,
  875. content: this.state.content,
  876. unitAddress: this.state.unitAddress,
  877. invoiceRemarks: this.state.invoiceRemarks,
  878. unitMobile: this.state.unitMobile,
  879. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  880. post: this.state.post,
  881. addressee: this.state.addressee,
  882. addresseeMobile: this.state.addresseeMobile,
  883. addresseeProvince:
  884. this.state.post === 0 ? this.state.ProvinceCity[0] : "",
  885. addresseeCity:
  886. this.state.post === 0 ? this.state.ProvinceCity[1] : "",
  887. addresseeArea:
  888. this.state.post === 0 ? this.state.ProvinceCity[2] : "",
  889. recipientAddress: this.state.recipientAddress,
  890. alreadyAmount: parseFloat(this.state.alreadyAmount),
  891. };
  892. sumData1.id = this.state.id;
  893. method = "post";
  894. break;
  895. case 3:
  896. api = "/api/admin/orderInvoice/selectByIdOrderInvoice";
  897. sumData.id = record.id;
  898. method = "get";
  899. break;
  900. default:
  901. api = "";
  902. break;
  903. }
  904. if (this.state.status === 1 || this.state.status === 0) {
  905. if (typeof this.state.type !== "number") {
  906. message.warning("省内/外不能为空");
  907. this.setState({
  908. flagA: false,
  909. });
  910. return;
  911. }
  912. if (typeof this.state.invoiceType !== "number") {
  913. message.warning("发票类型不能为空");
  914. this.setState({
  915. flagA: false,
  916. });
  917. return;
  918. }
  919. if (typeof theorgCodeUrl !== "string") {
  920. message.warning("未上传图片");
  921. this.setState({
  922. flagA: false,
  923. });
  924. return;
  925. }
  926. if (!this.state.unitName) {
  927. message.warning("单位名称不能为空");
  928. this.setState({
  929. flagA: false,
  930. });
  931. return;
  932. }
  933. if (!this.state.taxNumber) {
  934. message.warning("税号不能为空");
  935. this.setState({
  936. flagA: false,
  937. });
  938. return;
  939. }
  940. if (!this.state.amount) {
  941. message.warning("金额不能为空");
  942. this.setState({
  943. flagA: false,
  944. });
  945. return;
  946. }
  947. if (isNaN(this.state.amount)) {
  948. message.warning("开票金额包含非法字符,请重新输入");
  949. this.setState({
  950. flagA: false,
  951. });
  952. return;
  953. }
  954. if (isNaN(this.state.alreadyAmount)) {
  955. message.warning("开票金额总计包含非法字符,请重新输入");
  956. this.setState({
  957. flagA: false,
  958. });
  959. return;
  960. }
  961. if (parseFloat(this.state.alreadyAmount) < 0) {
  962. message.warning("开票金额总计不能小于0,请重新输入");
  963. this.setState({
  964. flagA: false,
  965. });
  966. return;
  967. }
  968. if (!this.state.banks) {
  969. message.warning("开户行不能为空");
  970. this.setState({
  971. flagA: false,
  972. });
  973. return;
  974. }
  975. if (!this.state.content) {
  976. message.warning("开票内容及说明不能为空");
  977. this.setState({
  978. flagA: false,
  979. });
  980. return;
  981. }
  982. if (!this.state.unitAddress) {
  983. message.warning("单位地址不能为空");
  984. this.setState({
  985. flagA: false,
  986. });
  987. return;
  988. }
  989. if (!this.state.unitMobile) {
  990. message.warning("单位电话不能为空");
  991. this.setState({
  992. flagA: false,
  993. });
  994. return;
  995. }
  996. if (this.state.alreadyAmount === "") {
  997. message.warning("开票金额总计不能为空");
  998. this.setState({
  999. flagA: false,
  1000. });
  1001. return;
  1002. }
  1003. }
  1004. // console.log(this.state.flag,this.state.status)
  1005. this.setState({
  1006. loading: true,
  1007. });
  1008. $.ajax({
  1009. method: method,
  1010. dataType: "json",
  1011. crossDomain: false,
  1012. url: globalConfig.context + (this.state.flag ? api1 : api),
  1013. data: this.state.flag ? sumData1 : sumData,
  1014. success: function (data) {
  1015. if (this.state.status === 3 && typeof data.data === "object") {
  1016. let thisdata = data.data;
  1017. let ProvinceCityArr = [];
  1018. let ProvinceS = thisdata.addresseeProvince; //省
  1019. let citys = thisdata.addresseeCity; //市
  1020. let Areas = thisdata.addresseeArea; //区
  1021. ProvinceCityArr.push(ProvinceS, citys, Areas);
  1022. this.setState({
  1023. orderNo: thisdata.orderNo,
  1024. type: thisdata.type,
  1025. status: thisdata.status,
  1026. ordapproval: thisdata.approval,
  1027. remarks: thisdata.remarks,
  1028. invoiceType: thisdata.invoiceType,
  1029. unitName: thisdata.unitName,
  1030. taxNumber: thisdata.taxNumber,
  1031. amount: thisdata.amount + "",
  1032. banks: thisdata.banks,
  1033. content: thisdata.content,
  1034. unitAddress: thisdata.unitAddress,
  1035. invoiceRemarks: thisdata.invoiceRemarks,
  1036. unitMobile: thisdata.unitMobile,
  1037. post: thisdata.post,
  1038. addressee: thisdata.addressee,
  1039. addresseeMobile: thisdata.addresseeMobile,
  1040. addresseeProvince: thisdata.addresseeProvince,
  1041. addresseeCity: thisdata.addresseeCity,
  1042. addresseeArea: thisdata.addresseeArea,
  1043. alreadyAmount: thisdata.alreadyAmount + "",
  1044. ProvinceCity:
  1045. ProvinceCityArr[0] != null ? ProvinceCityArr : undefined, //省市区
  1046. recipientAddress: thisdata.recipientAddress,
  1047. orgCodeUrl: thisdata.voucherUrl
  1048. ? splitUrl(
  1049. thisdata.voucherUrl,
  1050. ",",
  1051. globalConfig.avatarHost + "/upload"
  1052. )
  1053. : [],
  1054. });
  1055. }
  1056. }.bind(this),
  1057. }).done(
  1058. function (data) {
  1059. this.setState({
  1060. loading: false,
  1061. });
  1062. if (!data.error.length) {
  1063. if (this.state.status === 1) {
  1064. message.success("提交成功!");
  1065. this.visitCancels();
  1066. if (this.state.flag) {
  1067. this.inRecordData();
  1068. }
  1069. this.setState({
  1070. flagA: false,
  1071. });
  1072. } else if (this.state.status === 0) {
  1073. message.success("保存成功!");
  1074. this.visitCancels();
  1075. this.setState({
  1076. flagA: false,
  1077. });
  1078. } else if (this.state.status === 3) {
  1079. this.setState({
  1080. flag: true,
  1081. flagA: false,
  1082. });
  1083. }
  1084. } else {
  1085. message.warning(data.error[0].message);
  1086. this.setState({
  1087. flagA: false,
  1088. });
  1089. }
  1090. }.bind(this)
  1091. );
  1092. },
  1093. areset() {
  1094. this.setState({
  1095. remarks: "",
  1096. type: undefined,
  1097. orgCodeUrl: "",
  1098. invoiceType: undefined,
  1099. unitName: "",
  1100. taxNumber: "",
  1101. amount: "",
  1102. banks: "",
  1103. content: "",
  1104. unitAddress: "",
  1105. invoiceRemarks: "",
  1106. unitMobile: "",
  1107. post: undefined,
  1108. addressee: "",
  1109. addresseeMobile: "",
  1110. addresseeProvince: "",
  1111. addresseeCity: "",
  1112. addresseeArea: "",
  1113. recipientAddress: "",
  1114. ordapproval: undefined,
  1115. alreadyAmount: "",
  1116. ProvinceCity: [],
  1117. });
  1118. },
  1119. recompose(record) {
  1120. // console.log(record)
  1121. this.setState({
  1122. avisible: true,
  1123. orderNo3: record.orderno,
  1124. id: record.id,
  1125. });
  1126. this.setState(
  1127. {
  1128. status: 3,
  1129. cvisible: true,
  1130. flag: false,
  1131. },
  1132. () => {
  1133. this.invoiceData(record);
  1134. }
  1135. );
  1136. },
  1137. submitApp() {
  1138. if (this.state.status === 3) {
  1139. this.setState({
  1140. flag: true,
  1141. });
  1142. }
  1143. this.setState(
  1144. {
  1145. status: 1,
  1146. },
  1147. () => {
  1148. this.invoiceData();
  1149. }
  1150. );
  1151. },
  1152. saveApp() {
  1153. this.setState(
  1154. {
  1155. status: 0,
  1156. },
  1157. () => {
  1158. this.invoiceData();
  1159. }
  1160. );
  1161. },
  1162. reject(record) {
  1163. this.setState({
  1164. visibleR: true,
  1165. reason: record.rejectReason,
  1166. });
  1167. },
  1168. rejectCancels() {
  1169. this.setState({
  1170. visibleR: false,
  1171. });
  1172. },
  1173. rizhi() {
  1174. console.log(this.state.orderNo);
  1175. this.setState({
  1176. loading: true,
  1177. });
  1178. $.ajax({
  1179. method: "get",
  1180. dataType: "json",
  1181. crossDomain: false,
  1182. url: "/api/admin/newOrder/selectOrderLog",
  1183. data: {
  1184. orderNo: this.state.orderNo,
  1185. },
  1186. success: function (data) {
  1187. let theArr = [];
  1188. let thisData = data.data;
  1189. if (!thisData.length) {
  1190. if (data.error && data.error.length) {
  1191. message.warning(data.error[0].message);
  1192. }
  1193. thisData = {};
  1194. } else {
  1195. for (let i = 0; i < data.data.length; i++) {
  1196. let thisdata = data.data[i];
  1197. theArr.push({
  1198. processName: thisdata.processName,
  1199. adminName: thisdata.adminName,
  1200. createDate: thisdata.createDate,
  1201. remarks: thisdata.remarks,
  1202. });
  1203. }
  1204. }
  1205. this.setState({
  1206. dataSourcerizhi: theArr,
  1207. });
  1208. }.bind(this),
  1209. }).always(
  1210. function () {
  1211. this.setState({
  1212. loading: false,
  1213. });
  1214. }.bind(this)
  1215. );
  1216. },
  1217. //查看订单日志
  1218. getOrderLog() {
  1219. this.setState({
  1220. rizhivisible: true,
  1221. });
  1222. this.rizhi();
  1223. },
  1224. closeOrderLog() {
  1225. this.setState({
  1226. rizhivisible: false,
  1227. });
  1228. },
  1229. //开票
  1230. visit(record, index) {
  1231. this.areset();
  1232. this.setState({
  1233. contractNo: this.state.dataSource[index].contractNo,
  1234. orderNo3: record.orderNo,
  1235. avisible: true,
  1236. flag: false,
  1237. invoiceType: 0,
  1238. alreadyAmount: 0,
  1239. unitName: this.state.dataSource[index].userName,
  1240. post: 1,
  1241. });
  1242. $.ajax({
  1243. method: "get",
  1244. dataType: "json",
  1245. crossDomain: false,
  1246. url: globalConfig.context + "/api/admin/orderInvoice/getInvoiceDetails",
  1247. data: {
  1248. orderNo: record.orderNo,
  1249. },
  1250. success: (data) => {
  1251. if (data.error.length) {
  1252. message.warning(data.error[0].message);
  1253. } else if (data.data) {
  1254. const thisdata = data.data;
  1255. this.setState({
  1256. contractNo: thisdata.contractNo,
  1257. orderNo: thisdata.orderNo,
  1258. ordapproval: thisdata.approval,
  1259. type: thisdata.type,
  1260. status: thisdata.status,
  1261. remarks: thisdata.remarks,
  1262. invoiceType: thisdata.invoiceType,
  1263. unitName: thisdata.unitName,
  1264. taxNumber: thisdata.taxNumber,
  1265. amount: thisdata.amount,
  1266. banks: thisdata.banks,
  1267. content: thisdata.content,
  1268. unitAddress: thisdata.unitAddress,
  1269. invoiceRemarks: thisdata.invoiceRemarks,
  1270. unitMobile: thisdata.unitMobile,
  1271. post: thisdata.post,
  1272. addressee: thisdata.addressee,
  1273. addresseeMobile: thisdata.addresseeMobile,
  1274. addresseeProvince: thisdata.addresseeProvince,
  1275. addresseeCity: thisdata.addresseeCity,
  1276. addresseeArea: thisdata.addresseeArea,
  1277. alreadyAmount: thisdata.alreadyAmount,
  1278. recipientAddress: thisdata.recipientAddress,
  1279. orgCodeUrl: thisdata.voucherUrl
  1280. ? splitUrl(
  1281. thisdata.voucherUrl,
  1282. ",",
  1283. globalConfig.avatarHost + "/upload"
  1284. )
  1285. : [],
  1286. });
  1287. }
  1288. },
  1289. });
  1290. },
  1291. visitCancels() {
  1292. this.setState({
  1293. avisible: false,
  1294. cvisible: false,
  1295. });
  1296. },
  1297. //查看开票历史记录详情
  1298. dtableRowClick(record) {
  1299. this.setState({
  1300. dvisible: true,
  1301. });
  1302. this.setState({
  1303. loading: true,
  1304. });
  1305. $.ajax({
  1306. method: "get",
  1307. dataType: "json",
  1308. crossDomain: false,
  1309. url:
  1310. globalConfig.context +
  1311. "/api/admin/orderInvoice/selectByIdOrderInvoice",
  1312. data: {
  1313. id: record.id,
  1314. },
  1315. success: function (data) {
  1316. let thisdata = data.data;
  1317. this.setState({
  1318. contractNo: thisdata.contractNo,
  1319. orderNo: thisdata.orderNo,
  1320. ordapproval: thisdata.approval,
  1321. type: thisdata.type,
  1322. status: thisdata.status,
  1323. remarks: thisdata.remarks,
  1324. invoiceType: thisdata.invoiceType,
  1325. unitName: thisdata.unitName,
  1326. taxNumber: thisdata.taxNumber,
  1327. amount: thisdata.amount,
  1328. banks: thisdata.banks,
  1329. content: thisdata.content,
  1330. unitAddress: thisdata.unitAddress,
  1331. invoiceRemarks: thisdata.invoiceRemarks,
  1332. unitMobile: thisdata.unitMobile,
  1333. post: thisdata.post,
  1334. addressee: thisdata.addressee,
  1335. addresseeMobile: thisdata.addresseeMobile,
  1336. addresseeProvince: thisdata.addresseeProvince,
  1337. addresseeCity: thisdata.addresseeCity,
  1338. addresseeArea: thisdata.addresseeArea,
  1339. alreadyAmount: thisdata.alreadyAmount,
  1340. recipientAddress: thisdata.recipientAddress,
  1341. orgCodeUrl: thisdata.voucherUrl
  1342. ? splitUrl(
  1343. thisdata.voucherUrl,
  1344. ",",
  1345. globalConfig.avatarHost + "/upload"
  1346. )
  1347. : [],
  1348. });
  1349. }.bind(this),
  1350. }).done(
  1351. function () {
  1352. this.setState({
  1353. loading: false,
  1354. });
  1355. }.bind(this)
  1356. );
  1357. },
  1358. //关闭开票历史记录详情
  1359. dvisitCancels() {
  1360. this.setState({
  1361. dvisible: false,
  1362. });
  1363. },
  1364. inRecordData() {
  1365. this.setState({
  1366. loading: true,
  1367. });
  1368. $.ajax({
  1369. method: "get",
  1370. dataType: "json",
  1371. crossDomain: false,
  1372. url:
  1373. globalConfig.context +
  1374. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  1375. data: {
  1376. orderNo: this.state.orderNo2,
  1377. },
  1378. success: function (data) {
  1379. let theArr = [];
  1380. let sum = 0;
  1381. if (!data.data) {
  1382. if (data.error && data.error.length) {
  1383. message.warning(data.error[0].message);
  1384. }
  1385. } else {
  1386. for (let i = 0; i < data.data.list.length; i++) {
  1387. let thisdata = data.data.list[i];
  1388. sum += parseFloat(thisdata.amount);
  1389. theArr.push({
  1390. id: thisdata.id,
  1391. orderno: thisdata.orderno, //订单编号
  1392. amount: thisdata.amount, //签单金额
  1393. createTime: thisdata.createTime, //流程状态
  1394. status: thisdata.status, //结算状态
  1395. rejectReason: thisdata.rejectReason,
  1396. approval: thisdata.approval,
  1397. });
  1398. }
  1399. }
  1400. this.setState({
  1401. recordData: theArr,
  1402. sum: sum.toFixed(6),
  1403. });
  1404. }.bind(this),
  1405. }).done(
  1406. function () {
  1407. this.setState({
  1408. loading: false,
  1409. });
  1410. }.bind(this)
  1411. );
  1412. },
  1413. inRecord(record) {
  1414. this.setState(
  1415. {
  1416. bvisible: true,
  1417. orderNo2: this.state.selectedRowKeys[0],
  1418. },
  1419. () => {
  1420. this.inRecordData();
  1421. }
  1422. );
  1423. },
  1424. inRecordCanl() {
  1425. this.setState({
  1426. bvisible: false,
  1427. });
  1428. },
  1429. // 拆分详细
  1430. showRes(record) {
  1431. this.setState({
  1432. resVisible: true,
  1433. resRecord: record,
  1434. });
  1435. },
  1436. resCancel() {
  1437. this.setState({
  1438. resVisible: false,
  1439. });
  1440. },
  1441. //结项
  1442. delectRow(record) {
  1443. this.setState({
  1444. loading: true,
  1445. });
  1446. $.ajax({
  1447. method: "get",
  1448. dataType: "json",
  1449. crossDomain: false,
  1450. url: globalConfig.context + "/api/admin/newOrder/OrderOver",
  1451. data: {
  1452. orderNo: record.orderNo,
  1453. },
  1454. }).done(
  1455. function (data) {
  1456. if (!data.error.length) {
  1457. message.success("该项目已成功结项!");
  1458. this.loadData();
  1459. } else {
  1460. message.warning(data.error[0].message);
  1461. }
  1462. this.setState({
  1463. loading: false,
  1464. });
  1465. }.bind(this)
  1466. );
  1467. },
  1468. //是否退款
  1469. refundCancel(record) {
  1470. this.refund(record, 0);
  1471. },
  1472. refundOk(record) {
  1473. this.refund(record, 1);
  1474. },
  1475. refund(record, index) {
  1476. this.setState({
  1477. signBillVisible: false,
  1478. selectedRowKeys: [],
  1479. loading: true,
  1480. userDetaile: false,
  1481. });
  1482. $.ajax({
  1483. method: "get",
  1484. dataType: "json",
  1485. crossDomain: false,
  1486. url: globalConfig.context + "/api/admin/order/confirmRefund",
  1487. data: {
  1488. orderNo: record.orderNo,
  1489. confirm: index,
  1490. },
  1491. }).done(
  1492. function (data) {
  1493. if (!data.error.length) {
  1494. message.success("操作成功!");
  1495. this.setState({
  1496. loading: false,
  1497. showDesc: false,
  1498. });
  1499. }
  1500. this.loadData(this.state.pageNo);
  1501. }.bind(this)
  1502. );
  1503. },
  1504. //受理订单
  1505. admissibleOrderOk(e) {
  1506. this.admissibleOrder(e, true);
  1507. },
  1508. admissibleOrderCancel(e) {
  1509. this.admissibleOrder(e, false);
  1510. },
  1511. admissibleOrder(record, index) {
  1512. this.setState({
  1513. signBillVisible: false,
  1514. selectedRowKeys: [],
  1515. loading: true,
  1516. userDetaile: false,
  1517. });
  1518. $.ajax({
  1519. method: "POST",
  1520. dataType: "json",
  1521. crossDomain: false,
  1522. url: globalConfig.context + "/api/admin/order/confirmIntention",
  1523. data: {
  1524. orderNo: record.orderNo,
  1525. confirm: index,
  1526. },
  1527. }).done(
  1528. function (data) {
  1529. if (!data.error.length) {
  1530. message.success("操作成功!");
  1531. this.setState({
  1532. loading: false,
  1533. showDesc: false,
  1534. });
  1535. } else {
  1536. message.warning(data.error[0].message);
  1537. this.setState({
  1538. showDesc: true,
  1539. });
  1540. }
  1541. this.loadData(this.state.pageNo);
  1542. }.bind(this)
  1543. );
  1544. },
  1545. //取消订单
  1546. cancelOrder(e) {
  1547. this.operation(e, 3);
  1548. },
  1549. //作废订单
  1550. scrapOrder(e) {
  1551. this.operation(e, 2);
  1552. },
  1553. //锁定订单
  1554. lockOrder(e) {
  1555. this.operation(e, 0);
  1556. },
  1557. //解锁订单
  1558. unlockOrder(e) {
  1559. this.operation(e, 1);
  1560. },
  1561. //签单
  1562. signBill(ids) {
  1563. this.setState({
  1564. uid: ids,
  1565. signBillVisible: true,
  1566. });
  1567. },
  1568. componentWillMount() {
  1569. this.departmentList();
  1570. this.loadData();
  1571. },
  1572. //整行点击
  1573. tableRowClick(record) {
  1574. this.setState({
  1575. visible: true,
  1576. });
  1577. this.xiangqing(record.orderNo);
  1578. this.xiangmu(record.orderNo);
  1579. this.jiedian(record.orderNo);
  1580. this.jiedianNew(record.orderNo);
  1581. },
  1582. //点击打卡项目详情
  1583. tableRowClickX(record) {
  1584. this.setState({
  1585. jid: record.id, //项目ID
  1586. kid: record.commodityId, //商品ID
  1587. commodityName: record.commodityName, //金额
  1588. commodityPrice: record.commodityPrice, //金额
  1589. commodityQuantity: record.commodityQuantity, //数量
  1590. taskComment: record.taskComment, //备注
  1591. main: record.main.toString(), //是否为主要
  1592. addnextVisible: true,
  1593. dataInfor:record,
  1594. addState: 0,
  1595. });
  1596. },
  1597. //项目详情关闭
  1598. nextCancel() {
  1599. this.setState({
  1600. addnextVisible: false,
  1601. });
  1602. },
  1603. visitCancel() {
  1604. this.setState({
  1605. visible: false,
  1606. });
  1607. },
  1608. //订单详情
  1609. xiangqing(orderNos) {
  1610. $.ajax({
  1611. method: "get",
  1612. dataType: "json",
  1613. crossDomain: false,
  1614. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  1615. data: {
  1616. orderNo: orderNos,
  1617. },
  1618. success: function (data) {
  1619. if (data.error.length || data.data.list == "") {
  1620. if (data.error && data.error.length) {
  1621. message.warning(data.error[0].message);
  1622. }
  1623. } else {
  1624. let thisdata = data.data;
  1625. this.setState({
  1626. orderUid: thisdata.uid,
  1627. orderNo: thisdata.orderNo, //订单编号
  1628. contractNo: thisdata.contractNo, //合同编号
  1629. userName: thisdata.userName, //客户名称
  1630. signDate: thisdata.signDate, //签单时间
  1631. processStatus: thisdata.processStatus, //流程状态
  1632. liquidationStatus: thisdata.liquidationStatus, //结算状态
  1633. contacts: thisdata.contacts, //企业联系人
  1634. contactMobile: thisdata.contactMobile, //联系人电话
  1635. legalPerson: thisdata.legalPerson, //法人
  1636. legalPersonTel: thisdata.legalPersonTel, //法人电话
  1637. firstAmount: thisdata.firstAmount, //签单金额
  1638. totalAmount: thisdata.totalAmount, //首付金额
  1639. approval: thisdata.approval, //特批状态
  1640. settlementAmount: thisdata.settlementAmount, //已收款项
  1641. orderRemarks: thisdata.orderRemarks, //订单留言
  1642. orgCodeUrl: thisdata.contractPictureUrl
  1643. ? splitUrl(
  1644. thisdata.contractPictureUrl,
  1645. ",",
  1646. globalConfig.avatarHost + "/upload"
  1647. )
  1648. : [], //图片地址
  1649. replenishUrl: thisdata.agreementUrl
  1650. ? splitUrl(
  1651. thisdata.agreementUrl,
  1652. ",",
  1653. globalConfig.avatarHost + "/upload"
  1654. )
  1655. : [], //图片地址
  1656. salesmanName: thisdata.salesmanName, //营销员名称
  1657. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  1658. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  1659. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  1660. financeName: thisdata.financeName, //财务名称
  1661. financeMobile: thisdata.financeMobile, //财务电话
  1662. nowFinance: thisdata.nowFinance, //财务名称
  1663. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  1664. depName: thisdata.depName,
  1665. outsource: thisdata.outsource == 0 ? "否" : "是",
  1666. deleteSign:thisdata.deleteSign,
  1667. });
  1668. }
  1669. }.bind(this),
  1670. }).always(
  1671. function () {
  1672. this.setState({
  1673. loading: false,
  1674. });
  1675. }.bind(this)
  1676. );
  1677. },
  1678. //项目列表
  1679. xiangmu(orderNos) {
  1680. $.ajax({
  1681. method: "get",
  1682. dataType: "json",
  1683. crossDomain: false,
  1684. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  1685. data: {
  1686. orderNo: orderNos,
  1687. },
  1688. success: function (data) {
  1689. let theArr = [];
  1690. if (data.error.length || data.data.list == "") {
  1691. if (data.error && data.error.length) {
  1692. message.warning(data.error[0].message);
  1693. }
  1694. } else {
  1695. for (let i = 0; i < data.data.length; i++) {
  1696. let thisdata = data.data[i];
  1697. thisdata.key = i;
  1698. thisdata.sort = thisdata.cSort;
  1699. theArr.push(thisdata);
  1700. }
  1701. }
  1702. this.setState({
  1703. dataSourceX: theArr,
  1704. });
  1705. }.bind(this),
  1706. }).always(
  1707. function () {
  1708. this.setState({
  1709. loading: false,
  1710. });
  1711. }.bind(this)
  1712. );
  1713. },
  1714. //节点列表
  1715. jiedian(orderNos) {
  1716. $.ajax({
  1717. method: "get",
  1718. dataType: "json",
  1719. crossDomain: false,
  1720. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  1721. data: {
  1722. orderNo: orderNos,
  1723. },
  1724. success: function (data) {
  1725. let theArr = [];
  1726. let thisData = [];
  1727. if (data.error.length || data.data.list == "") {
  1728. if (data.error && data.error.length) {
  1729. message.warning(data.error[0].message);
  1730. }
  1731. } else {
  1732. for (let i = 0; i < data.data.length; i++) {
  1733. thisData = data.data[i];
  1734. theArr.push({
  1735. key: i,
  1736. dunSubject: thisData.dunSubject
  1737. ? thisData.dunSubject.toString()
  1738. : "", //催款科目
  1739. id: thisData.id, //节点Id
  1740. money: thisData.money, //催款金额
  1741. dunStatus: thisData.dunStatus, //催款状态
  1742. });
  1743. }
  1744. this.setState({
  1745. contactList: theArr,
  1746. });
  1747. }
  1748. }.bind(this),
  1749. }).always(
  1750. function () {
  1751. this.setState({
  1752. loading: false,
  1753. });
  1754. }.bind(this)
  1755. );
  1756. },
  1757. //查看催款节点
  1758. jiedianNew(orderNos) {
  1759. $.ajax({
  1760. method: "get",
  1761. dataType: "json",
  1762. crossDomain: false,
  1763. url:
  1764. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  1765. data: {
  1766. orderNo: orderNos,
  1767. },
  1768. success: function (data) {
  1769. if (data.error && data.error.length) {
  1770. message.warning(data.error[0].message);
  1771. } else {
  1772. let theArr = [];
  1773. let thisData = [];
  1774. let arr = data.data || [];
  1775. let totalCui = 0;
  1776. for (let i = 0; i < arr.length; i++) {
  1777. thisData = arr[i];
  1778. totalCui += +thisData.money;
  1779. theArr.push({
  1780. key: i,
  1781. dunSubject: thisData.dunSubject
  1782. ? thisData.dunSubject.toString()
  1783. : "", //催款科目
  1784. id: thisData.id, //节点Id
  1785. money: thisData.money, //催款金额
  1786. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  1787. commodityName: thisData.commodityName,
  1788. projectType: thisData.projectType,
  1789. dunTypeName: thisData.dunTypeName,
  1790. status: thisData.status,
  1791. waitDay: thisData.waitDay,
  1792. effectiveCount: thisData.effectiveCount,
  1793. startDate: thisData.startDate,
  1794. dunType: thisData.dunType,
  1795. appropriationRatio: thisData.appropriationRatio,
  1796. customizeName: thisData.customizeName,
  1797. customizeTimes: thisData.customizeTimes,
  1798. tid: thisData.tid,
  1799. });
  1800. }
  1801. if (!totalCui) {
  1802. totalCui = 0;
  1803. }
  1804. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  1805. this.setState({
  1806. contactListNew: theArr,
  1807. totalCui,
  1808. });
  1809. }
  1810. }.bind(this),
  1811. }).always(
  1812. function () {
  1813. this.setState({
  1814. loading: false,
  1815. });
  1816. }.bind(this)
  1817. );
  1818. },
  1819. //列表各种骚操作
  1820. operation(record, index) {
  1821. this.setState({
  1822. selectedRowKeys: [],
  1823. loading: true,
  1824. showDesc: false,
  1825. });
  1826. $.ajax({
  1827. method: "get",
  1828. dataType: "json",
  1829. crossDomain: false,
  1830. url: globalConfig.context + "/api/admin/order/lockOrRevokeOrder",
  1831. data: {
  1832. orderNo: record.orderNo,
  1833. operatorType: index,
  1834. },
  1835. }).done(
  1836. function (data) {
  1837. if (!data.error.length) {
  1838. message.success("操作成功!");
  1839. this.setState({
  1840. loading: false,
  1841. });
  1842. } else {
  1843. message.warning(data.error[0].message);
  1844. }
  1845. this.loadData(this.state.pageNo);
  1846. }.bind(this)
  1847. );
  1848. },
  1849. addClick() {
  1850. this.state.userDetaile = false;
  1851. this.setState({
  1852. signBillVisible: false,
  1853. showDesc: true,
  1854. });
  1855. },
  1856. closeDesc(e, s) {
  1857. this.state.userDetaile = false;
  1858. this.state.signBillVisible = false;
  1859. this.state.showDesc = e;
  1860. if (s) {
  1861. this.loadData(this.state.pageNo);
  1862. }
  1863. },
  1864. searchSwitch() {
  1865. this.setState({
  1866. signBillVisible: false,
  1867. searchMore: !this.state.searchMore,
  1868. });
  1869. },
  1870. getOrgCodeUrl(e) {
  1871. this.setState({ orgCodeUrl: e });
  1872. },
  1873. search() {
  1874. this.setState({
  1875. signBillVisible: false,
  1876. });
  1877. this.loadData();
  1878. },
  1879. reset() {
  1880. this.setState({
  1881. signBillVisible: false,
  1882. });
  1883. this.state.searchOrderNo = undefined;
  1884. this.state.orderNo = "";
  1885. this.state.customerName = "";
  1886. this.state.departmenttSearch = undefined;
  1887. this.state.releaseDate[0] = undefined;
  1888. this.state.releaseDate[1] = undefined;
  1889. this.state.projectProgress = undefined;
  1890. this.state.approval = undefined;
  1891. this.state.formalOrder = true;
  1892. this.state.intentOrder = true;
  1893. (this.state.liquidationStatusSearch = []),
  1894. (this.state.contractNoSearch = "");
  1895. this.state.departmenttList = [];
  1896. this.state.amountStatus = undefined;
  1897. this.state.approvalSearch = undefined;
  1898. this.loadData();
  1899. },
  1900. //部门
  1901. departmentList() {
  1902. this.setState({
  1903. loading: true,
  1904. });
  1905. $.ajax({
  1906. method: "get",
  1907. dataType: "json",
  1908. crossDomain: false,
  1909. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  1910. data: {},
  1911. success: function (data) {
  1912. let thedata = data.data;
  1913. let theArr = [];
  1914. if (!thedata) {
  1915. if (data.error && data.error.length) {
  1916. message.warning(data.error[0].message);
  1917. }
  1918. thedata = {};
  1919. } else {
  1920. thedata.map(function (item, index) {
  1921. theArr.push({
  1922. key: index,
  1923. name: item.name,
  1924. id: item.id,
  1925. });
  1926. });
  1927. }
  1928. this.setState({
  1929. departmentArr: theArr,
  1930. });
  1931. }.bind(this),
  1932. }).always(
  1933. function () {
  1934. this.setState({
  1935. loading: false,
  1936. });
  1937. }.bind(this)
  1938. );
  1939. },
  1940. changeList(arr) {
  1941. const newArr = [];
  1942. this.state.columns.forEach((item) => {
  1943. arr.forEach((val) => {
  1944. if (val === item.title) {
  1945. newArr.push(item);
  1946. }
  1947. });
  1948. });
  1949. this.setState({
  1950. changeList: newArr,
  1951. });
  1952. },
  1953. onSelectChange(selectedRowKeys) {
  1954. this.setState({ selectedRowKeys });
  1955. console.log(selectedRowKeys);
  1956. },
  1957. // inRecordData() {
  1958. // this.setState({
  1959. // loading: true
  1960. // });
  1961. // $.ajax({
  1962. // method: "get",
  1963. // dataType: "json",
  1964. // crossDomain: false,
  1965. // url:
  1966. // globalConfig.context +
  1967. // "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  1968. // data: {
  1969. // orderNo: this.state.selectedRowKeys[0],
  1970. // pageSize: 9999
  1971. // },
  1972. // success: function(data) {
  1973. // let theArr = [];
  1974. // let sum = 0;
  1975. // if (!data.data) {
  1976. // if (data.error && data.error.length) {
  1977. // message.warning(data.error[0].message);
  1978. // }
  1979. // } else {
  1980. // for (let i = 0; i < data.data.list.length; i++) {
  1981. // let thisdata = data.data.list[i];
  1982. // sum += parseFloat(thisdata.amount);
  1983. // theArr.push({
  1984. // id: thisdata.id,
  1985. // orderno: thisdata.orderno, //订单编号
  1986. // amount: thisdata.amount, //签单金额
  1987. // createTime: thisdata.createTime, //流程状态
  1988. // status: thisdata.status, //结算状态
  1989. // rejectReason: thisdata.rejectReason
  1990. // });
  1991. // }
  1992. // }
  1993. // this.setState({
  1994. // recordData: theArr,
  1995. // sum: sum.toFixed(4)
  1996. // });
  1997. // }.bind(this)
  1998. // }).done(
  1999. // function() {
  2000. // this.setState({
  2001. // loading: false
  2002. // });
  2003. // }.bind(this)
  2004. // );
  2005. // },
  2006. cuiData() {
  2007. this.setState({
  2008. loading: true,
  2009. });
  2010. $.ajax({
  2011. method: "get",
  2012. dataType: "json",
  2013. crossDomain: false,
  2014. url: globalConfig.context + "/api/admin/newOrder/dunOrderNewList",
  2015. data: {
  2016. orderNo: this.state.selectedRowKeys[0],
  2017. pageSize: 9999,
  2018. },
  2019. success: function (data) {
  2020. let theArr = [];
  2021. if (!data.data || !data.data.list) {
  2022. if (data.error && data.error.length) {
  2023. message.warning(data.error[0].message);
  2024. }
  2025. } else {
  2026. for (let i = 0; i < data.data.list.length; i++) {
  2027. let thisdata = data.data.list[i];
  2028. theArr.push({
  2029. key: i + 1,
  2030. orderNo: thisdata.orderNo,
  2031. contractNo: thisdata.contractNo,
  2032. userName: thisdata.userName,
  2033. buyerName: thisdata.buyerName,
  2034. departmentName: thisdata.departmentName,
  2035. salesmanName: thisdata.salesmanName,
  2036. depName: thisdata.depName,
  2037. orderStatus: thisdata.orderStatus,
  2038. projectStatus: thisdata.projectStatus,
  2039. totalAmount: thisdata.totalAmount,
  2040. liquidationStatus: thisdata.liquidationStatus,
  2041. settlementAmount: thisdata.settlementAmount,
  2042. accountsReceivable: thisdata.accountsReceivable,
  2043. dunSubject: thisdata.dunSubject,
  2044. startDate: thisdata.startDate,
  2045. taskStatus: thisdata.taskStatus,
  2046. cname: thisdata.cname,
  2047. id: thisdata.id,
  2048. taskName: thisdata.taskName,
  2049. hours: thisdata.hours,
  2050. taskDistributionTime: thisdata.taskDistributionTime,
  2051. taskEndTime: thisdata.taskEndTime,
  2052. dunStatus: thisdata.dunStatus == 0 ? "未触发" : "已触发",
  2053. });
  2054. }
  2055. }
  2056. this.setState({
  2057. cuiDataList: theArr,
  2058. });
  2059. }.bind(this),
  2060. }).always(
  2061. function () {
  2062. this.setState({
  2063. loading: false,
  2064. });
  2065. }.bind(this)
  2066. );
  2067. },
  2068. proData() {
  2069. this.setState({
  2070. loading: true,
  2071. });
  2072. $.ajax({
  2073. method: "get",
  2074. dataType: "json",
  2075. crossDomain: false,
  2076. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  2077. data: {
  2078. orderNo: this.state.selectedRowKeys[0],
  2079. pageSize: 9999,
  2080. },
  2081. success: function (data) {
  2082. let theArr = [];
  2083. let totalWaibao = 0;
  2084. if (!data.data) {
  2085. if (data.error && data.error.length) {
  2086. message.warning(data.error[0].message);
  2087. }
  2088. } else {
  2089. for (let i = 0; i < data.data.length; i++) {
  2090. let thisdata = data.data[i];
  2091. totalWaibao += thisdata.outsourcePrice;
  2092. thisdata.key = i + 1;
  2093. theArr.push(thisdata);
  2094. }
  2095. }
  2096. totalWaibao = (Math.round(totalWaibao * 1000000) / 1000000).toFixed(6);
  2097. this.setState({
  2098. proDataList: theArr,
  2099. totalWaibao,
  2100. });
  2101. }.bind(this),
  2102. }).always(
  2103. function () {
  2104. this.setState({
  2105. loading: false,
  2106. });
  2107. }.bind(this)
  2108. );
  2109. },
  2110. tableRowClickPro(record) {
  2111. this.setState({
  2112. pvisible: true,
  2113. record,
  2114. });
  2115. },
  2116. downImg() {
  2117. let num = 0;
  2118. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  2119. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  2120. num = i;
  2121. }
  2122. }
  2123. if (num == this.state.orgCodeUrl.length - 1) {
  2124. return message.warning("已经是最后一张了哦");
  2125. }
  2126. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  2127. this.setState({
  2128. previewImage: this.state.previewImage,
  2129. rotateDeg: 0,
  2130. });
  2131. },
  2132. upImg() {
  2133. let num = 0;
  2134. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  2135. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  2136. num = i;
  2137. }
  2138. }
  2139. if (num == 0) {
  2140. return message.warning("已经是第一张了哦");
  2141. }
  2142. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  2143. this.setState({
  2144. previewImage: this.state.previewImage,
  2145. rotateDeg: 0,
  2146. });
  2147. },
  2148. rotate() {
  2149. let rotateDeg = this.state.rotateDeg + 90;
  2150. this.setState({
  2151. rotateDeg,
  2152. });
  2153. },
  2154. downImgs() {
  2155. let num = 0;
  2156. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  2157. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  2158. num = i;
  2159. }
  2160. }
  2161. if (num == this.state.replenishUrl.length - 1) {
  2162. return message.warning("已经是最后一张了哦");
  2163. }
  2164. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  2165. this.setState({
  2166. previewImage: this.state.previewImage,
  2167. rotateDeg: 0,
  2168. });
  2169. },
  2170. upImgs() {
  2171. let num = 0;
  2172. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  2173. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  2174. num = i;
  2175. }
  2176. }
  2177. if (num == 0) {
  2178. return message.warning("已经是第一张了哦");
  2179. }
  2180. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  2181. this.setState({
  2182. previewImage: this.state.previewImage,
  2183. rotateDeg: 0,
  2184. });
  2185. },
  2186. rotates() {
  2187. let rotateDeg = this.state.rotateDeg + 90;
  2188. this.setState({
  2189. rotateDeg,
  2190. });
  2191. },
  2192. render() {
  2193. const FormItem = Form.Item;
  2194. const formItemLayout = {
  2195. labelCol: { span: 8 },
  2196. wrapperCol: { span: 14 },
  2197. };
  2198. const RadioGroup = Radio.Group;
  2199. var departmentArr = this.state.departmentArr || [];
  2200. const cuiDataList = this.state.contactList || [];
  2201. const { RangePicker } = DatePicker;
  2202. const { loading, selectedRowKeys, visible } = this.state;
  2203. const rowSelection = {
  2204. selectedRowKeys,
  2205. onChange: this.onSelectChange,
  2206. hideDefaultSelections: true,
  2207. type: "radio",
  2208. };
  2209. return (
  2210. <div className="user-content">
  2211. {this.state.resVisible ? (
  2212. <ResolutionDetail
  2213. cancel={this.resCancel}
  2214. detail={this.state.resRecord}
  2215. visible={this.state.resVisible}
  2216. id={this.state.resRecord.orderNo}
  2217. />
  2218. ) : (
  2219. ""
  2220. )}
  2221. <ShowModalDiv ShowModal={this.state.showModal} />
  2222. <div className="content-title">
  2223. <span
  2224. style={{
  2225. fontWeight: 900,
  2226. fontSize: 16,
  2227. display: "block",
  2228. marginBottom: 10,
  2229. }}
  2230. >
  2231. 部门订单
  2232. </span>
  2233. <Tabs
  2234. defaultActiveKey="2"
  2235. onChange={this.callback}
  2236. className="test"
  2237. >
  2238. <TabPane tab="更改表格显示数据" key="1">
  2239. <div style={{ marginLeft: 10 }}>
  2240. <ChooseList
  2241. columns={this.state.columns}
  2242. changeFn={this.changeList}
  2243. changeList={this.state.changeList}
  2244. top={55}
  2245. margin={11}
  2246. />
  2247. </div>
  2248. </TabPane>
  2249. <TabPane tab="搜索" key="2">
  2250. <div className="user-search" style={{ marginLeft: 10 }}>
  2251. <Input
  2252. placeholder="订单编号"
  2253. style={{ width: "150px" }}
  2254. value={this.state.searchOrderNo}
  2255. onChange={(e) => {
  2256. this.setState({ searchOrderNo: e.target.value });
  2257. }}
  2258. />
  2259. <Input
  2260. placeholder="客户名称"
  2261. style={{ width: "150px" }}
  2262. value={this.state.customerName}
  2263. onChange={(e) => {
  2264. this.setState({ customerName: e.target.value });
  2265. }}
  2266. />
  2267. <Select
  2268. placeholder="订单部门"
  2269. style={{ width: 150, marginRight: 10 }}
  2270. value={this.state.departmenttList}
  2271. onChange={(e) => {
  2272. this.setState({ departmenttList: e });
  2273. }}
  2274. >
  2275. {departmentArr.map(function (item) {
  2276. return <Option key={item.id}>{item.name}</Option>;
  2277. })}
  2278. </Select>
  2279. <Input
  2280. placeholder="合同编号"
  2281. style={{ width: "150px" }}
  2282. value={this.state.contractNoSearch}
  2283. onChange={(e) => {
  2284. this.setState({
  2285. contractNoSearch: e.target.value,
  2286. });
  2287. }}
  2288. />
  2289. <Select
  2290. style={{ width: 120 }}
  2291. placeholder="结算状态"
  2292. value={this.state.liquidationStatusSearch}
  2293. onChange={(e) => {
  2294. this.setState({
  2295. liquidationStatusSearch: e,
  2296. });
  2297. }}
  2298. >
  2299. <Option value="0">首付待付请</Option>
  2300. <Option value="1">尾款待付清</Option>
  2301. <Option value="2">已付清</Option>
  2302. </Select>
  2303. <Select
  2304. style={{ width: 120 }}
  2305. placeholder="特批状态"
  2306. value={this.state.approvalSearch}
  2307. onChange={(e) => {
  2308. this.setState({
  2309. approvalSearch: e,
  2310. });
  2311. }}
  2312. >
  2313. <Option value="0">非特批</Option>
  2314. <Option value="1">特批</Option>
  2315. </Select>
  2316. <Select
  2317. style={{ width: 120 }}
  2318. placeholder="签单金额"
  2319. value={this.state.amountStatus}
  2320. onChange={(e) => {
  2321. this.setState({
  2322. amountStatus: e,
  2323. });
  2324. }}
  2325. >
  2326. <Option value="0">10万元以下</Option>
  2327. <Option value="1">10~20万元</Option>
  2328. <Option value="2">20~30万元</Option>
  2329. <Option value="3">30~40万元</Option>
  2330. <Option value="4">40万元以上</Option>
  2331. </Select>
  2332. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  2333. <RangePicker
  2334. value={[
  2335. this.state.releaseDate[0]
  2336. ? moment(this.state.releaseDate[0])
  2337. : null,
  2338. this.state.releaseDate[1]
  2339. ? moment(this.state.releaseDate[1])
  2340. : null,
  2341. ]}
  2342. onChange={(data, dataString) => {
  2343. this.setState({ releaseDate: dataString });
  2344. }}
  2345. />
  2346. <Button
  2347. type="primary"
  2348. onClick={this.search}
  2349. style={{ marginLeft: "10px" }}
  2350. >
  2351. 搜索
  2352. <Icon type="search" />
  2353. </Button>
  2354. <Button onClick={this.reset}>
  2355. 重置 <Icon type="reload" />
  2356. </Button>
  2357. </div>
  2358. </TabPane>
  2359. <TabPane tab="查看" key="3">
  2360. <Button
  2361. type="primary"
  2362. style={{ margin: "11px 0px 10px 10px" }}
  2363. onClick={() => {
  2364. this.inRecord();
  2365. this.setState({
  2366. bvisible: true,
  2367. });
  2368. }}
  2369. disabled={this.state.selectedRowKeys.length != 1}
  2370. >
  2371. 查看开票详情
  2372. </Button>
  2373. <Button
  2374. type="primary"
  2375. style={{ margin: "11px 0px 10px 10px" }}
  2376. onClick={() => {
  2377. this.cuiData();
  2378. this.setState({
  2379. cuiVisible: true,
  2380. });
  2381. }}
  2382. disabled={this.state.selectedRowKeys.length != 1}
  2383. >
  2384. 查看催款详情
  2385. </Button>
  2386. <Button
  2387. type="primary"
  2388. style={{ margin: "11px 0px 10px 10px" }}
  2389. onClick={() => {
  2390. this.proData();
  2391. this.setState({
  2392. proVisible: true,
  2393. });
  2394. }}
  2395. disabled={this.state.selectedRowKeys.length != 1}
  2396. >
  2397. 查看项目进度
  2398. </Button>
  2399. </TabPane>
  2400. </Tabs>
  2401. <div className="patent-table">
  2402. <Spin spinning={this.state.loading}>
  2403. <Table
  2404. columns={
  2405. this.state.changeList == undefined
  2406. ? this.state.columns
  2407. : this.state.changeList
  2408. }
  2409. dataSource={this.state.dataSource}
  2410. scroll={{ x: 1500, y: 0 }}
  2411. pagination={this.state.pagination}
  2412. rowSelection={rowSelection}
  2413. onRowClick={this.tableRowClick}
  2414. bordered
  2415. size="small"
  2416. />
  2417. </Spin>
  2418. </div>
  2419. <NewService
  2420. uid={this.state.uid}
  2421. signBillVisible={this.state.signBillVisible}
  2422. signBillState={this.state.signBillState}
  2423. operation={this.operation}
  2424. admissibleOrder={this.admissibleOrder}
  2425. userDetaile={this.state.userDetaile}
  2426. datauser={this.state.datauser}
  2427. showDesc={this.state.showDesc}
  2428. closeDesc={this.closeDesc}
  2429. />
  2430. <Modal
  2431. maskClosable={false}
  2432. className="admin-desc-content"
  2433. footer=""
  2434. title="开具发票申请单"
  2435. width="1000px"
  2436. visible={this.state.avisible}
  2437. onOk={this.visitOks}
  2438. onCancel={this.visitCancels}
  2439. style={{ zIndex: 999 }}
  2440. >
  2441. <Form
  2442. layout="horizontal"
  2443. // id="demand-form"
  2444. style={{ paddingBottom: "40px" }}
  2445. >
  2446. <Spin spinning={this.state.loading}>
  2447. <div className="clearfix">
  2448. <div className="clearfix">
  2449. <FormItem
  2450. className="half-item"
  2451. {...formItemLayout}
  2452. label="合同编号"
  2453. >
  2454. <span>{this.state.contractNo}</span>
  2455. </FormItem>
  2456. <FormItem
  2457. className="half-item"
  2458. {...formItemLayout}
  2459. label="备注"
  2460. >
  2461. {
  2462. <Input
  2463. placeholder="填写申请发票原因"
  2464. value={this.state.remarks}
  2465. onChange={(e) => {
  2466. this.setState({ remarks: e.target.value });
  2467. }}
  2468. style={{ width: "240px" }}
  2469. />
  2470. }
  2471. </FormItem>
  2472. </div>
  2473. <div className="clearfix">
  2474. <FormItem
  2475. className="half-item"
  2476. {...formItemLayout}
  2477. label="省内/外:"
  2478. >
  2479. <RadioGroup
  2480. value={this.state.type}
  2481. onChange={(e) => {
  2482. this.setState({ type: e.target.value });
  2483. }}
  2484. >
  2485. <Radio value={0}>省内</Radio>
  2486. <Radio value={1}>省外</Radio>
  2487. </RadioGroup>
  2488. <span
  2489. style={{
  2490. position: "absolute",
  2491. color: "red",
  2492. fontSize: "10px",
  2493. lineHeight: "20px",
  2494. }}
  2495. >
  2496. 省内:湖南省<br></br>省外:除湖南省以外
  2497. </span>
  2498. </FormItem>
  2499. <FormItem
  2500. className="half-item"
  2501. {...formItemLayout}
  2502. label="特批:"
  2503. >
  2504. <RadioGroup
  2505. value={!this.state.ordapproval ? 0 : 1}
  2506. onChange={(e) => {
  2507. this.setState({ ordapproval: e.target.value });
  2508. }}
  2509. >
  2510. <Radio value={0}>否</Radio>
  2511. <Radio value={1}>是</Radio>
  2512. </RadioGroup>
  2513. <span
  2514. style={{
  2515. position: "absolute",
  2516. color: "red",
  2517. fontSize: "10px",
  2518. lineHeight: "15px",
  2519. }}
  2520. >
  2521. 注:特批单,省内省外,<br></br>分别由周总,省外总经理
  2522. <br></br>特批后,方可至开票流程
  2523. </span>
  2524. </FormItem>
  2525. </div>
  2526. <hr
  2527. style={{
  2528. border: "1px dashed #aaa",
  2529. width: "90%",
  2530. margin: "auto",
  2531. }}
  2532. />
  2533. <div style={{ marginTop: "13px", marginLeft: "16px" }}>
  2534. <span style={{ fontSize: "14px" }}>发票内容</span>
  2535. </div>
  2536. <div className="clearfix">
  2537. <FormItem
  2538. className="half-item"
  2539. {...formItemLayout}
  2540. label={
  2541. <span>
  2542. <strong style={{ color: "#f00" }}>*</strong>
  2543. 发票类型
  2544. </span>
  2545. }
  2546. >
  2547. <RadioGroup
  2548. style={{ width: "160%" }}
  2549. onChange={(e) => {
  2550. this.setState({ invoiceType: e.target.value });
  2551. }}
  2552. value={this.state.invoiceType}
  2553. >
  2554. <Radio value={0}>增值税专用发票</Radio>
  2555. <Radio value={1}>增值税普通发票</Radio>
  2556. <Radio value={2}>其他</Radio>
  2557. </RadioGroup>
  2558. </FormItem>
  2559. </div>
  2560. <div className="clearfix">
  2561. <FormItem
  2562. className="half-item"
  2563. {...formItemLayout}
  2564. label={
  2565. <span>
  2566. <strong style={{ color: "#f00" }}>*</strong>
  2567. 单位名称
  2568. </span>
  2569. }
  2570. >
  2571. {
  2572. <Input
  2573. placeholder="请输入单位名称"
  2574. value={this.state.unitName}
  2575. onChange={(e) => {
  2576. this.setState({ unitName: e.target.value });
  2577. }}
  2578. style={{ width: "240px" }}
  2579. />
  2580. }
  2581. <span
  2582. style={{
  2583. position: "absolute",
  2584. color: "red",
  2585. fontSize: "10px",
  2586. lineHeight: "15px",
  2587. width: "30%",
  2588. }}
  2589. >
  2590. 系统读取单位<br></br>名称,可修改
  2591. </span>
  2592. </FormItem>
  2593. <FormItem
  2594. className="half-item"
  2595. {...formItemLayout}
  2596. label={
  2597. <span>
  2598. <strong style={{ color: "#f00" }}>*</strong>税号
  2599. </span>
  2600. }
  2601. >
  2602. {
  2603. <Input
  2604. placeholder="请输入税号"
  2605. value={this.state.taxNumber}
  2606. onChange={(e) => {
  2607. this.setState({ taxNumber: e.target.value });
  2608. }}
  2609. style={{ width: "240px" }}
  2610. />
  2611. }
  2612. </FormItem>
  2613. <FormItem
  2614. className="half-item"
  2615. {...formItemLayout}
  2616. label={
  2617. <span>
  2618. <strong style={{ color: "#f00" }}>*</strong>
  2619. 开票金额(万元)
  2620. </span>
  2621. }
  2622. >
  2623. {
  2624. <Input
  2625. placeholder="请输入开票金额"
  2626. value={this.state.amount}
  2627. onChange={(e) => {
  2628. this.setState({ amount: e.target.value });
  2629. }}
  2630. style={{ width: "240px" }}
  2631. />
  2632. }
  2633. <span
  2634. style={{
  2635. position: "absolute",
  2636. color: "red",
  2637. fontSize: "10px",
  2638. lineHeight: "15px",
  2639. width: "30%",
  2640. }}
  2641. >
  2642. 填写本次开票<br></br>金额
  2643. </span>
  2644. </FormItem>
  2645. <FormItem
  2646. className="half-item"
  2647. {...formItemLayout}
  2648. label={
  2649. <span>
  2650. <strong style={{ color: "#f00" }}>*</strong>
  2651. 开户行及银行账号
  2652. </span>
  2653. }
  2654. >
  2655. {
  2656. <Input
  2657. placeholder="请输入开户行及银行账号"
  2658. value={this.state.banks}
  2659. onChange={(e) => {
  2660. this.setState({ banks: e.target.value });
  2661. }}
  2662. style={{ width: "240px" }}
  2663. />
  2664. }
  2665. </FormItem>
  2666. <FormItem
  2667. className="half-item"
  2668. {...formItemLayout}
  2669. label={
  2670. <span>
  2671. <strong style={{ color: "#f00" }}>*</strong>
  2672. 开票内容及说明
  2673. </span>
  2674. }
  2675. >
  2676. {
  2677. <Input
  2678. placeholder="请输入开票内容及说明"
  2679. value={this.state.content}
  2680. onChange={(e) => {
  2681. this.setState({ content: e.target.value });
  2682. }}
  2683. style={{ width: "240px" }}
  2684. />
  2685. }
  2686. </FormItem>
  2687. <FormItem
  2688. className="half-item"
  2689. {...formItemLayout}
  2690. label={
  2691. <span>
  2692. <strong style={{ color: "#f00" }}>*</strong>
  2693. 单位地址
  2694. </span>
  2695. }
  2696. >
  2697. {
  2698. <Input
  2699. placeholder="请输入单位地址"
  2700. value={this.state.unitAddress}
  2701. onChange={(e) => {
  2702. this.setState({ unitAddress: e.target.value });
  2703. }}
  2704. style={{ width: "240px" }}
  2705. />
  2706. }
  2707. </FormItem>
  2708. <FormItem
  2709. className="half-item"
  2710. {...formItemLayout}
  2711. label="备注"
  2712. >
  2713. {
  2714. <Input
  2715. placeholder="请备注开票公司名称"
  2716. value={this.state.invoiceRemarks}
  2717. onChange={(e) => {
  2718. this.setState({
  2719. invoiceRemarks: e.target.value,
  2720. });
  2721. }}
  2722. style={{ width: "240px" }}
  2723. />
  2724. }
  2725. <span
  2726. style={{
  2727. position: "absolute",
  2728. color: "red",
  2729. fontSize: "10px",
  2730. lineHeight: "15px",
  2731. width: "30%",
  2732. }}
  2733. >
  2734. 开票公司名称,<br></br>如:科德集团
  2735. </span>
  2736. </FormItem>
  2737. <FormItem
  2738. className="half-item"
  2739. {...formItemLayout}
  2740. label={
  2741. <span>
  2742. <strong style={{ color: "#f00" }}>*</strong>
  2743. 单位电话
  2744. </span>
  2745. }
  2746. >
  2747. {
  2748. <Input
  2749. placeholder="请输入单位电话"
  2750. value={this.state.unitMobile}
  2751. onChange={(e) => {
  2752. this.setState({ unitMobile: e.target.value });
  2753. }}
  2754. style={{ width: "240px" }}
  2755. />
  2756. }
  2757. </FormItem>
  2758. </div>
  2759. <div className="clearfix">
  2760. <FormItem
  2761. labelCol={{ span: 4 }}
  2762. wrapperCol={{ span: 18 }}
  2763. label={
  2764. <span>
  2765. <strong style={{ color: "#f00" }}>*</strong>
  2766. 上传附件
  2767. </span>
  2768. }
  2769. >
  2770. <PicturesWall
  2771. fileList={this.getOrgCodeUrl}
  2772. pictureUrl={this.state.orgCodeUrl}
  2773. />
  2774. <span
  2775. style={{
  2776. paddingTop: "10px",
  2777. paddingLeft: "10px",
  2778. color: "red",
  2779. fontSize: "14px",
  2780. }}
  2781. >
  2782. 注:请上传带"公司盖章"的开票申请纸质凭证
  2783. </span>
  2784. <p>图片建议:要清晰。</p>
  2785. </FormItem>
  2786. </div>
  2787. <hr
  2788. style={{
  2789. border: "1px dashed #aaa",
  2790. width: "90%",
  2791. margin: "auto",
  2792. }}
  2793. />
  2794. <div className="clearfix" style={{ marginTop: "10px" }}>
  2795. <FormItem
  2796. className="half-item"
  2797. {...formItemLayout}
  2798. label="发票是否邮寄:"
  2799. >
  2800. <RadioGroup
  2801. value={this.state.post}
  2802. onChange={(e) => {
  2803. this.setState({ post: e.target.value });
  2804. }}
  2805. >
  2806. <Radio value={0}>是</Radio>
  2807. <Radio value={1}>否</Radio>
  2808. </RadioGroup>
  2809. </FormItem>
  2810. </div>
  2811. {this.state.post === 0 ? (
  2812. <div className="clearfix">
  2813. <FormItem
  2814. className="half-item"
  2815. {...formItemLayout}
  2816. label="收信人姓名"
  2817. >
  2818. {
  2819. <Input
  2820. placeholder="请输入收信人姓名"
  2821. value={this.state.addressee}
  2822. onChange={(e) => {
  2823. this.setState({ addressee: e.target.value });
  2824. }}
  2825. style={{ width: "240px" }}
  2826. />
  2827. }
  2828. </FormItem>
  2829. <FormItem
  2830. className="half-item"
  2831. {...formItemLayout}
  2832. label="电话"
  2833. >
  2834. {
  2835. <Input
  2836. placeholder="请输入电话"
  2837. value={this.state.addresseeMobile}
  2838. onChange={(e) => {
  2839. this.setState({
  2840. addresseeMobile: e.target.value,
  2841. });
  2842. }}
  2843. style={{ width: "240px" }}
  2844. />
  2845. }
  2846. </FormItem>
  2847. </div>
  2848. ) : (
  2849. ""
  2850. )}
  2851. {this.state.post === 0 ? (
  2852. <div className="clearfix">
  2853. <FormItem
  2854. className="half-item"
  2855. {...formItemLayout}
  2856. label="省-市-区"
  2857. >
  2858. <Cascader
  2859. options={areaSelect()}
  2860. value={this.state.ProvinceCity}
  2861. placeholder="选择城市"
  2862. style={{ width: "95%" }}
  2863. onChange={(e) => {
  2864. this.setState({ ProvinceCity: e });
  2865. }}
  2866. />
  2867. </FormItem>
  2868. </div>
  2869. ) : (
  2870. ""
  2871. )}
  2872. {this.state.post === 0 ? (
  2873. <div className="clearfix">
  2874. <FormItem
  2875. className="half-item"
  2876. {...formItemLayout}
  2877. label="详细地址"
  2878. >
  2879. {
  2880. <Input
  2881. placeholder="请输入详细地址"
  2882. value={this.state.recipientAddress}
  2883. onChange={(e) => {
  2884. this.setState({
  2885. recipientAddress: e.target.value,
  2886. });
  2887. }}
  2888. style={{ width: "240px" }}
  2889. />
  2890. }
  2891. </FormItem>
  2892. </div>
  2893. ) : (
  2894. ""
  2895. )}
  2896. <FormItem
  2897. className="half-item"
  2898. {...formItemLayout}
  2899. label={
  2900. <span>
  2901. <strong style={{ color: "#f00" }}>*</strong>
  2902. 开票金额总计
  2903. </span>
  2904. }
  2905. >
  2906. {
  2907. <Input
  2908. value={this.state.alreadyAmount}
  2909. onChange={(e) => {
  2910. this.setState({ alreadyAmount: e.target.value });
  2911. }}
  2912. style={{ width: "40px" }}
  2913. />
  2914. }
  2915. 万元
  2916. <span
  2917. style={{
  2918. position: "absolute",
  2919. color: "red",
  2920. fontSize: "10px",
  2921. lineHeight: "15px",
  2922. marginLeft: "20px",
  2923. }}
  2924. >
  2925. 默认值为0.新开票订单此项不用填.<br></br>
  2926. 以前已开票订单,请填写已开票的总计<br></br>
  2927. 金额,便于审核核对!
  2928. </span>
  2929. </FormItem>
  2930. </div>
  2931. <Button
  2932. className="cancel"
  2933. type="primary"
  2934. style={{ marginRight: "50px", float: "right" }}
  2935. size="large"
  2936. onClick={this.submitApp}
  2937. >
  2938. 提交申请
  2939. </Button>
  2940. {/*<Button className="cancel" type="primary" style={{marginRight:"50px",float:'right',background:'deepskyblue',border:'none'}} size="large" onClick={this.saveApp}>保存</Button>*/}
  2941. </Spin>
  2942. </Form>
  2943. </Modal>
  2944. <Modal
  2945. maskClosable={false}
  2946. visible={this.state.bvisible}
  2947. footer=""
  2948. title="开票历史记录"
  2949. className="admin-desc-content"
  2950. width="900px"
  2951. onCancel={(e) => {
  2952. this.setState({
  2953. bvisible: false,
  2954. });
  2955. }}
  2956. style={{ zIndex: 5 }}
  2957. >
  2958. <Spin spinning={this.state.loading}>
  2959. <div className="patent-table">
  2960. <Table
  2961. columns={this.state.columnsDate}
  2962. onRowClick={this.dtableRowClick}
  2963. dataSource={this.state.recordData}
  2964. pagination={false}
  2965. />
  2966. <div className="clearfix" style={{ marginTop: "20px" }}>
  2967. <FormItem
  2968. className="half-item"
  2969. {...formItemLayout}
  2970. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  2971. >
  2972. <span>{this.state.sum + "(万元)"}</span>
  2973. </FormItem>
  2974. </div>
  2975. </div>
  2976. </Spin>
  2977. </Modal>
  2978. <Modal
  2979. maskClosable={false}
  2980. visible={this.state.visibleR}
  2981. className="admin-desc-content"
  2982. footer=""
  2983. title="拒绝理由"
  2984. width="400px"
  2985. onCancel={this.rejectCancels}
  2986. >
  2987. <Input.TextArea
  2988. disabled={true}
  2989. rows={4}
  2990. value={this.state.reason}
  2991. style={{ color: "black" }}
  2992. ></Input.TextArea>
  2993. </Modal>
  2994. <Modal
  2995. maskClosable={false}
  2996. className="admin-desc-content"
  2997. footer=""
  2998. title="开具发票申请单"
  2999. width="1000px"
  3000. visible={this.state.cvisible}
  3001. onOk={this.visitOks}
  3002. onCancel={this.visitCancels}
  3003. style={{ zIndex: 999 }}
  3004. >
  3005. <Form
  3006. layout="horizontal"
  3007. // id="demand-form"
  3008. style={{ paddingBottom: "40px" }}
  3009. >
  3010. <Spin spinning={this.state.loading}>
  3011. <div className="clearfix">
  3012. <div className="clearfix">
  3013. <FormItem
  3014. className="half-item"
  3015. {...formItemLayout}
  3016. label="合同编号"
  3017. >
  3018. <span>{this.state.contractNo}</span>
  3019. </FormItem>
  3020. <FormItem
  3021. className="half-item"
  3022. {...formItemLayout}
  3023. label="备注"
  3024. >
  3025. {
  3026. <Input
  3027. placeholder="填写申请发票原因"
  3028. value={this.state.remarks}
  3029. onChange={(e) => {
  3030. this.setState({ remarks: e.target.value });
  3031. }}
  3032. style={{ width: "240px" }}
  3033. />
  3034. }
  3035. </FormItem>
  3036. </div>
  3037. <div className="clearfix">
  3038. <FormItem
  3039. className="half-item"
  3040. {...formItemLayout}
  3041. label="省内/外:"
  3042. >
  3043. <RadioGroup
  3044. value={this.state.type}
  3045. onChange={(e) => {
  3046. this.setState({ type: e.target.value });
  3047. }}
  3048. >
  3049. <Radio value={0}>省内</Radio>
  3050. <Radio value={1}>省外</Radio>
  3051. </RadioGroup>
  3052. <span
  3053. style={{
  3054. position: "absolute",
  3055. color: "red",
  3056. fontSize: "10px",
  3057. lineHeight: "20px",
  3058. }}
  3059. >
  3060. 省内:湖南省<br></br>省外:除湖南省以外
  3061. </span>
  3062. </FormItem>
  3063. <FormItem
  3064. className="half-item"
  3065. {...formItemLayout}
  3066. label="特批:"
  3067. >
  3068. <RadioGroup
  3069. value={!this.state.ordapproval ? 0 : 1}
  3070. onChange={(e) => {
  3071. this.setState({ ordapproval: e.target.value });
  3072. }}
  3073. >
  3074. <Radio value={0}>否</Radio>
  3075. <Radio value={1}>是</Radio>
  3076. </RadioGroup>
  3077. <span
  3078. style={{
  3079. position: "absolute",
  3080. color: "red",
  3081. fontSize: "10px",
  3082. lineHeight: "15px",
  3083. }}
  3084. >
  3085. 注:特批单,省内省外,<br></br>分别由周总,省外总经理
  3086. <br></br>特批后,方可至开票流程
  3087. </span>
  3088. </FormItem>
  3089. </div>
  3090. <hr
  3091. style={{
  3092. border: "1px dashed #aaa",
  3093. width: "90%",
  3094. margin: "auto",
  3095. }}
  3096. />
  3097. <div style={{ marginTop: "13px", marginLeft: "16px" }}>
  3098. <span style={{ fontSize: "14px" }}>发票内容</span>
  3099. </div>
  3100. <div className="clearfix">
  3101. <FormItem
  3102. className="half-item"
  3103. {...formItemLayout}
  3104. label={
  3105. <span>
  3106. <strong style={{ color: "#f00" }}>*</strong>
  3107. 发票类型
  3108. </span>
  3109. }
  3110. >
  3111. <RadioGroup
  3112. style={{ width: "160%" }}
  3113. onChange={(e) => {
  3114. this.setState({ invoiceType: e.target.value });
  3115. }}
  3116. value={this.state.invoiceType}
  3117. >
  3118. <Radio value={0}>增值税专用发票</Radio>
  3119. <Radio value={1}>增值税普通发票</Radio>
  3120. <Radio value={2}>其他</Radio>
  3121. </RadioGroup>
  3122. </FormItem>
  3123. </div>
  3124. <div className="clearfix">
  3125. <FormItem
  3126. className="half-item"
  3127. {...formItemLayout}
  3128. label={
  3129. <span>
  3130. <strong style={{ color: "#f00" }}>*</strong>
  3131. 单位名称
  3132. </span>
  3133. }
  3134. >
  3135. {
  3136. <Input
  3137. placeholder="请输入单位名称"
  3138. value={this.state.unitName}
  3139. onChange={(e) => {
  3140. this.setState({ unitName: e.target.value });
  3141. }}
  3142. style={{ width: "240px" }}
  3143. />
  3144. }
  3145. <span
  3146. style={{
  3147. position: "absolute",
  3148. color: "red",
  3149. fontSize: "10px",
  3150. lineHeight: "15px",
  3151. width: "30%",
  3152. }}
  3153. >
  3154. 系统读取单位<br></br>名称,可修改
  3155. </span>
  3156. </FormItem>
  3157. <FormItem
  3158. className="half-item"
  3159. {...formItemLayout}
  3160. label={
  3161. <span>
  3162. <strong style={{ color: "#f00" }}>*</strong>税号
  3163. </span>
  3164. }
  3165. >
  3166. {
  3167. <Input
  3168. placeholder="请输入税号"
  3169. value={this.state.taxNumber}
  3170. onChange={(e) => {
  3171. this.setState({ taxNumber: e.target.value });
  3172. }}
  3173. style={{ width: "240px" }}
  3174. />
  3175. }
  3176. </FormItem>
  3177. <FormItem
  3178. className="half-item"
  3179. {...formItemLayout}
  3180. label={
  3181. <span>
  3182. <strong style={{ color: "#f00" }}>*</strong>
  3183. 开票金额(万元)
  3184. </span>
  3185. }
  3186. >
  3187. {
  3188. <Input
  3189. placeholder="请输入开票金额"
  3190. value={this.state.amount}
  3191. onChange={(e) => {
  3192. this.setState({ amount: e.target.value });
  3193. }}
  3194. style={{ width: "240px" }}
  3195. />
  3196. }
  3197. <span
  3198. style={{
  3199. position: "absolute",
  3200. color: "red",
  3201. fontSize: "10px",
  3202. lineHeight: "15px",
  3203. width: "30%",
  3204. }}
  3205. >
  3206. 填写本次开票<br></br>金额
  3207. </span>
  3208. </FormItem>
  3209. <FormItem
  3210. className="half-item"
  3211. {...formItemLayout}
  3212. label={
  3213. <span>
  3214. <strong style={{ color: "#f00" }}>*</strong>
  3215. 开户行及银行账号
  3216. </span>
  3217. }
  3218. >
  3219. {
  3220. <Input
  3221. placeholder="请输入开户行及银行账号"
  3222. value={this.state.banks}
  3223. onChange={(e) => {
  3224. this.setState({ banks: e.target.value });
  3225. }}
  3226. style={{ width: "240px" }}
  3227. />
  3228. }
  3229. </FormItem>
  3230. <FormItem
  3231. className="half-item"
  3232. {...formItemLayout}
  3233. label={
  3234. <span>
  3235. <strong style={{ color: "#f00" }}>*</strong>
  3236. 开票内容及说明
  3237. </span>
  3238. }
  3239. >
  3240. {
  3241. <Input
  3242. placeholder="请输入开票内容及说明"
  3243. value={this.state.content}
  3244. onChange={(e) => {
  3245. this.setState({ content: e.target.value });
  3246. }}
  3247. style={{ width: "240px" }}
  3248. />
  3249. }
  3250. </FormItem>
  3251. <FormItem
  3252. className="half-item"
  3253. {...formItemLayout}
  3254. label={
  3255. <span>
  3256. <strong style={{ color: "#f00" }}>*</strong>
  3257. 单位地址
  3258. </span>
  3259. }
  3260. >
  3261. {
  3262. <Input
  3263. placeholder="请输入单位地址"
  3264. value={this.state.unitAddress}
  3265. onChange={(e) => {
  3266. this.setState({ unitAddress: e.target.value });
  3267. }}
  3268. style={{ width: "240px" }}
  3269. />
  3270. }
  3271. </FormItem>
  3272. <FormItem
  3273. className="half-item"
  3274. {...formItemLayout}
  3275. label="备注"
  3276. >
  3277. {
  3278. <Input
  3279. placeholder="请备注开票公司名称"
  3280. value={this.state.invoiceRemarks}
  3281. onChange={(e) => {
  3282. this.setState({
  3283. invoiceRemarks: e.target.value,
  3284. });
  3285. }}
  3286. style={{ width: "240px" }}
  3287. />
  3288. }
  3289. <span
  3290. style={{
  3291. position: "absolute",
  3292. color: "red",
  3293. fontSize: "10px",
  3294. lineHeight: "15px",
  3295. width: "30%",
  3296. }}
  3297. >
  3298. 开票公司名称,<br></br>如:科德集团
  3299. </span>
  3300. </FormItem>
  3301. <FormItem
  3302. className="half-item"
  3303. {...formItemLayout}
  3304. label={
  3305. <span>
  3306. <strong style={{ color: "#f00" }}>*</strong>
  3307. 单位电话
  3308. </span>
  3309. }
  3310. >
  3311. {
  3312. <Input
  3313. placeholder="请输入单位电话"
  3314. value={this.state.unitMobile}
  3315. onChange={(e) => {
  3316. this.setState({ unitMobile: e.target.value });
  3317. }}
  3318. style={{ width: "240px" }}
  3319. />
  3320. }
  3321. </FormItem>
  3322. </div>
  3323. <div className="clearfix">
  3324. <FormItem
  3325. labelCol={{ span: 4 }}
  3326. wrapperCol={{ span: 18 }}
  3327. label={
  3328. <span>
  3329. <strong style={{ color: "#f00" }}>*</strong>
  3330. 上传附件
  3331. </span>
  3332. }
  3333. >
  3334. <PicturesWall
  3335. fileList={this.getOrgCodeUrl}
  3336. pictureUrl={this.state.orgCodeUrl}
  3337. />
  3338. <span
  3339. style={{
  3340. paddingTop: "10px",
  3341. paddingLeft: "10px",
  3342. color: "red",
  3343. fontSize: "14px",
  3344. }}
  3345. >
  3346. 注:请上传带"公司盖章"的开票申请纸质凭证
  3347. </span>
  3348. <p>图片建议:要清晰。</p>
  3349. </FormItem>
  3350. </div>
  3351. <hr
  3352. style={{
  3353. border: "1px dashed #aaa",
  3354. width: "90%",
  3355. margin: "auto",
  3356. }}
  3357. />
  3358. <div className="clearfix" style={{ marginTop: "10px" }}>
  3359. <FormItem
  3360. className="half-item"
  3361. {...formItemLayout}
  3362. label="发票是否邮寄:"
  3363. >
  3364. <RadioGroup
  3365. value={this.state.post}
  3366. onChange={(e) => {
  3367. this.setState({ post: e.target.value });
  3368. }}
  3369. >
  3370. <Radio value={0}>是</Radio>
  3371. <Radio value={1}>否</Radio>
  3372. </RadioGroup>
  3373. </FormItem>
  3374. </div>
  3375. {this.state.post === 0 ? (
  3376. <div className="clearfix">
  3377. <FormItem
  3378. className="half-item"
  3379. {...formItemLayout}
  3380. label="收信人姓名"
  3381. >
  3382. {
  3383. <Input
  3384. placeholder="请输入收信人姓名"
  3385. value={this.state.addressee}
  3386. onChange={(e) => {
  3387. this.setState({ addressee: e.target.value });
  3388. }}
  3389. style={{ width: "240px" }}
  3390. />
  3391. }
  3392. </FormItem>
  3393. <FormItem
  3394. className="half-item"
  3395. {...formItemLayout}
  3396. label="电话"
  3397. >
  3398. {
  3399. <Input
  3400. placeholder="请输入电话"
  3401. value={this.state.addresseeMobile}
  3402. onChange={(e) => {
  3403. this.setState({
  3404. addresseeMobile: e.target.value,
  3405. });
  3406. }}
  3407. style={{ width: "240px" }}
  3408. />
  3409. }
  3410. </FormItem>
  3411. </div>
  3412. ) : (
  3413. ""
  3414. )}
  3415. {this.state.post === 0 ? (
  3416. <div className="clearfix">
  3417. <FormItem
  3418. className="half-item"
  3419. {...formItemLayout}
  3420. label="省-市-区"
  3421. >
  3422. <Cascader
  3423. options={areaSelect()}
  3424. value={this.state.ProvinceCity}
  3425. placeholder="选择城市"
  3426. style={{ width: "95%" }}
  3427. onChange={(e) => {
  3428. this.setState({ ProvinceCity: e });
  3429. }}
  3430. />
  3431. </FormItem>
  3432. </div>
  3433. ) : (
  3434. ""
  3435. )}
  3436. {this.state.post === 0 ? (
  3437. <div className="clearfix">
  3438. <FormItem
  3439. className="half-item"
  3440. {...formItemLayout}
  3441. label="详细地址"
  3442. >
  3443. {
  3444. <Input
  3445. placeholder="请输入详细地址"
  3446. value={this.state.recipientAddress}
  3447. onChange={(e) => {
  3448. this.setState({
  3449. recipientAddress: e.target.value,
  3450. });
  3451. }}
  3452. style={{ width: "240px" }}
  3453. />
  3454. }
  3455. </FormItem>
  3456. </div>
  3457. ) : (
  3458. ""
  3459. )}
  3460. <FormItem
  3461. className="half-item"
  3462. {...formItemLayout}
  3463. label={
  3464. <span>
  3465. <strong style={{ color: "#f00" }}>*</strong>
  3466. 开票金额总计
  3467. </span>
  3468. }
  3469. >
  3470. {
  3471. <Input
  3472. value={this.state.alreadyAmount}
  3473. onChange={(e) => {
  3474. this.setState({ alreadyAmount: e.target.value });
  3475. }}
  3476. style={{ width: "40px" }}
  3477. />
  3478. }
  3479. 万元
  3480. <span
  3481. style={{
  3482. position: "absolute",
  3483. color: "red",
  3484. fontSize: "10px",
  3485. lineHeight: "15px",
  3486. marginLeft: "20px",
  3487. }}
  3488. >
  3489. 默认值为0.新开票订单此项不用填.<br></br>
  3490. 以前已开票订单,请填写已开票的总计<br></br>
  3491. 金额,便于审核核对!
  3492. </span>
  3493. </FormItem>
  3494. </div>
  3495. <Button
  3496. className="cancel"
  3497. type="primary"
  3498. style={{ marginRight: "50px", float: "right" }}
  3499. size="large"
  3500. onClick={this.submitApp}
  3501. >
  3502. 提交申请
  3503. </Button>
  3504. {/*<Button className="cancel" type="primary" style={{marginRight:"50px",float:'right',background:'deepskyblue',border:'none'}} size="large" onClick={this.saveApp}>保存</Button>*/}
  3505. </Spin>
  3506. </Form>
  3507. </Modal>
  3508. <Modal
  3509. maskClosable={false}
  3510. className="admin-desc-content"
  3511. footer=""
  3512. title="开具发票申请单"
  3513. width="900px"
  3514. visible={this.state.dvisible}
  3515. onOk={this.visitOks}
  3516. onCancel={this.dvisitCancels}
  3517. >
  3518. <Form
  3519. layout="horizontal"
  3520. // id="demand-form"
  3521. style={{ paddingBottom: "40px" }}
  3522. >
  3523. <Spin spinning={this.state.loading}>
  3524. <div className="clearfix">
  3525. <div className="clearfix">
  3526. <FormItem
  3527. className="half-item"
  3528. {...formItemLayout}
  3529. label="合同编号"
  3530. >
  3531. <span>{this.state.contractNo}</span>
  3532. </FormItem>
  3533. <FormItem
  3534. className="half-item"
  3535. {...formItemLayout}
  3536. label="备注"
  3537. >
  3538. <span>{this.state.remarks}</span>
  3539. </FormItem>
  3540. </div>
  3541. <div className="clearfix">
  3542. <FormItem
  3543. className="half-item"
  3544. {...formItemLayout}
  3545. label={
  3546. <span>
  3547. <strong style={{ color: "#f00" }}>*</strong>
  3548. 省内/外
  3549. </span>
  3550. }
  3551. >
  3552. <span>{getProvinceA(this.state.type)}</span>
  3553. </FormItem>
  3554. <FormItem
  3555. className="half-item"
  3556. {...formItemLayout}
  3557. label={
  3558. <span>
  3559. <strong style={{ color: "#f00" }}>*</strong>特批
  3560. </span>
  3561. }
  3562. >
  3563. <span>
  3564. {this.state.ordapproval === 0 ? "否" : "是"}
  3565. </span>
  3566. </FormItem>
  3567. </div>
  3568. <hr
  3569. style={{
  3570. border: "1px dashed #aaa",
  3571. width: "90%",
  3572. margin: "auto",
  3573. }}
  3574. />
  3575. <div style={{ marginTop: "13px", marginLeft: "16px" }}>
  3576. <span style={{ fontSize: "14px" }}>发票内容</span>
  3577. </div>
  3578. <div className="clearfix">
  3579. <FormItem
  3580. className="half-item"
  3581. {...formItemLayout}
  3582. label={
  3583. <span>
  3584. <strong style={{ color: "#f00" }}>*</strong>
  3585. 发票类型
  3586. </span>
  3587. }
  3588. >
  3589. <span>
  3590. {this.state.invoiceType === 0
  3591. ? "增值税专用发票"
  3592. : this.state.invoiceType === 1
  3593. ? "增值税普通发票"
  3594. : "其他"}
  3595. </span>
  3596. </FormItem>
  3597. </div>
  3598. <div className="clearfix">
  3599. <FormItem
  3600. className="half-item"
  3601. {...formItemLayout}
  3602. label={
  3603. <span>
  3604. <strong style={{ color: "#f00" }}>*</strong>
  3605. 单位名称
  3606. </span>
  3607. }
  3608. >
  3609. <span>{this.state.unitName}</span>
  3610. </FormItem>
  3611. <FormItem
  3612. className="half-item"
  3613. {...formItemLayout}
  3614. label={
  3615. <span>
  3616. <strong style={{ color: "#f00" }}>*</strong>税号
  3617. </span>
  3618. }
  3619. >
  3620. <span>{this.state.taxNumber}</span>
  3621. </FormItem>
  3622. <FormItem
  3623. className="half-item"
  3624. {...formItemLayout}
  3625. label={
  3626. <span>
  3627. <strong style={{ color: "#f00" }}>*</strong>
  3628. 开票金额(万元)
  3629. </span>
  3630. }
  3631. >
  3632. <span>{this.state.amount}</span>
  3633. </FormItem>
  3634. <FormItem
  3635. className="half-item"
  3636. {...formItemLayout}
  3637. label={
  3638. <span>
  3639. <strong style={{ color: "#f00" }}>*</strong>
  3640. 开户行银行账号
  3641. </span>
  3642. }
  3643. >
  3644. <span>{this.state.banks}</span>
  3645. </FormItem>
  3646. <FormItem
  3647. className="half-item"
  3648. {...formItemLayout}
  3649. label={
  3650. <span>
  3651. <strong style={{ color: "#f00" }}>*</strong>
  3652. 开票内容及说明
  3653. </span>
  3654. }
  3655. >
  3656. <span>{this.state.content}</span>
  3657. </FormItem>
  3658. <FormItem
  3659. className="half-item"
  3660. {...formItemLayout}
  3661. label={
  3662. <span>
  3663. <strong style={{ color: "#f00" }}>*</strong>
  3664. 单位地址
  3665. </span>
  3666. }
  3667. >
  3668. <span>{this.state.unitAddress}</span>
  3669. </FormItem>
  3670. <FormItem
  3671. className="half-item"
  3672. {...formItemLayout}
  3673. label="备注"
  3674. >
  3675. <span>{this.state.invoiceRemarks}</span>
  3676. </FormItem>
  3677. <FormItem
  3678. className="half-item"
  3679. {...formItemLayout}
  3680. label={
  3681. <span>
  3682. <strong style={{ color: "#f00" }}>*</strong>
  3683. 单位电话
  3684. </span>
  3685. }
  3686. >
  3687. <span>{this.state.unitMobile}</span>
  3688. </FormItem>
  3689. </div>
  3690. <div className="clearfix">
  3691. <FormItem
  3692. labelCol={{ span: 4 }}
  3693. wrapperCol={{ span: 18 }}
  3694. label={
  3695. <span>
  3696. <strong style={{ color: "#f00" }}>*</strong>附件
  3697. </span>
  3698. }
  3699. >
  3700. {/*<Upload*/}
  3701. {/* className="demandDetailShow-upload"*/}
  3702. {/* listType="picture-card"*/}
  3703. {/* fileList={this.state.orgCodeUrl}*/}
  3704. {/* onPreview={(file) => {*/}
  3705. {/* this.setState({*/}
  3706. {/* previewImage: file.url || file.thumbUrl,*/}
  3707. {/* previewVisible: true,*/}
  3708. {/* });*/}
  3709. {/* }}*/}
  3710. {/*/>*/}
  3711. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  3712. {this.state.visible && this.state.orgCodeUrl ? <ImgList domId={'inquiry2'} fileList={this.state.orgCodeUrl} ItemWidth={'96px'}/> : <div/>}
  3713. </div>
  3714. <Modal
  3715. maskClosable={false}
  3716. footer={null}
  3717. visible={this.state.previewVisible}
  3718. onCancel={() => {
  3719. this.setState({ previewVisible: false });
  3720. }}
  3721. >
  3722. <img
  3723. alt=""
  3724. style={{ width: "100%" }}
  3725. src={this.state.previewImage || ""}
  3726. />
  3727. </Modal>
  3728. </FormItem>
  3729. </div>
  3730. <hr
  3731. style={{
  3732. border: "1px dashed #aaa",
  3733. width: "90%",
  3734. margin: "auto",
  3735. }}
  3736. />
  3737. <div className="clearfix" style={{ marginTop: "10px" }}>
  3738. <FormItem
  3739. className="half-item"
  3740. {...formItemLayout}
  3741. label="发票是否邮寄:"
  3742. >
  3743. <span>{this.state.post === 0 ? "是" : "否"}</span>
  3744. </FormItem>
  3745. </div>
  3746. {this.state.post === 0 ? (
  3747. <div>
  3748. <div className="clearfix">
  3749. <FormItem
  3750. className="half-item"
  3751. {...formItemLayout}
  3752. label="收信人姓名"
  3753. >
  3754. <span>{this.state.addressee}</span>
  3755. </FormItem>
  3756. <FormItem
  3757. className="half-item"
  3758. {...formItemLayout}
  3759. label="电话"
  3760. >
  3761. <span>{this.state.addresseeMobile}</span>
  3762. </FormItem>
  3763. </div>
  3764. <div className="clearfix">
  3765. <FormItem
  3766. className="half-item"
  3767. {...formItemLayout}
  3768. label="省-市-区"
  3769. >
  3770. <span>
  3771. {getprovince(this.state.addresseeProvince)}/
  3772. {getprovince(this.state.addresseeCity)}/
  3773. {getprovince(this.state.addresseeArea)}
  3774. </span>
  3775. </FormItem>
  3776. </div>
  3777. <div className="clearfix">
  3778. <FormItem
  3779. className="half-item"
  3780. {...formItemLayout}
  3781. label="详细地址"
  3782. >
  3783. <span>{this.state.recipientAddress}</span>
  3784. </FormItem>
  3785. </div>
  3786. </div>
  3787. ) : (
  3788. ""
  3789. )}
  3790. </div>
  3791. <FormItem
  3792. className="half-item"
  3793. {...formItemLayout}
  3794. label={
  3795. <span>
  3796. <strong style={{ color: "#f00" }}>*</strong>
  3797. 开票金额总计
  3798. </span>
  3799. }
  3800. >
  3801. <span>{this.state.alreadyAmount}万元</span>
  3802. </FormItem>
  3803. </Spin>
  3804. </Form>
  3805. </Modal>
  3806. {/* <Modal
  3807. visible={this.state.bvisible}
  3808. footer=""
  3809. title="开票历史记录"
  3810. className="admin-desc-content"
  3811. width="900px"
  3812. onCancel={this.inRecordCanl}
  3813. >
  3814. <Spin spinning={this.state.loading}>
  3815. <div
  3816. className="patent-table"
  3817. ref={e => {
  3818. this.refs.kaiPiao = e;
  3819. }}
  3820. >
  3821. <Table
  3822. columns={this.state.columnsDate}
  3823. dataSource={this.state.recordData}
  3824. pagination={false}
  3825. bordered
  3826. />
  3827. <div className="clearfix" style={{ marginTop: "20px" }}>
  3828. <FormItem
  3829. className="half-item"
  3830. {...formItemLayout}
  3831. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  3832. >
  3833. <span>{this.state.sum + "(万元)"}</span>
  3834. </FormItem>
  3835. </div>
  3836. <ReactToPrint
  3837. trigger={() => (
  3838. <Button
  3839. type="primary"
  3840. style={{
  3841. float: "right",
  3842. // marginTop: 10,
  3843. position: "absolute",
  3844. top: -54,
  3845. right: 30
  3846. }}
  3847. >
  3848. 打印
  3849. </Button>
  3850. )}
  3851. content={() => this.refs.kaiPiao}
  3852. />
  3853. </div>
  3854. </Spin>
  3855. </Modal> */}
  3856. <Modal
  3857. maskClosable={false}
  3858. visible={this.state.cuiVisible}
  3859. footer=""
  3860. title="催款详情"
  3861. className="admin-desc-content"
  3862. width="1300px"
  3863. pagination={false}
  3864. onCancel={() => {
  3865. // this.loadData();
  3866. this.setState({
  3867. cuiVisible: false,
  3868. });
  3869. }}
  3870. >
  3871. <Spin spinning={this.state.loading}>
  3872. <div
  3873. className="patent-table"
  3874. style={
  3875. {
  3876. // width: 900,
  3877. // position: "relative",
  3878. // left: "50%",
  3879. // transform: "translate(-50%)",
  3880. // padding: "25px 0 30px 30px"
  3881. }
  3882. }
  3883. ref={(e) => {
  3884. this.refs.all = e;
  3885. }}
  3886. >
  3887. <Table
  3888. columns={this.state.cuiColumns}
  3889. dataSource={this.state.cuiDataList}
  3890. scroll={{ x: "max-content", y: 0 }}
  3891. pagination={false}
  3892. bordered
  3893. size="small"
  3894. />
  3895. </div>
  3896. </Spin>
  3897. <ReactToPrint
  3898. trigger={() => (
  3899. <Button
  3900. type="primary"
  3901. style={{
  3902. float: "right",
  3903. marginTop: 10,
  3904. position: "absolute",
  3905. top: 0,
  3906. right: 30,
  3907. }}
  3908. >
  3909. 打印
  3910. </Button>
  3911. )}
  3912. content={() => this.refs.all}
  3913. />
  3914. </Modal>
  3915. <Modal
  3916. maskClosable={false}
  3917. visible={this.state.proVisible}
  3918. footer=""
  3919. title="项目详情"
  3920. className="admin-desc-content"
  3921. width="1300px"
  3922. pagination={false}
  3923. onCancel={() => {
  3924. // this.loadData();
  3925. this.setState({
  3926. proVisible: false,
  3927. });
  3928. }}
  3929. >
  3930. <Spin spinning={this.state.loading}>
  3931. <Project
  3932. record={this.state.record}
  3933. visible={this.state.pvisible}
  3934. cancel={() => {
  3935. this.setState({ pvisible: false });
  3936. }}
  3937. />
  3938. <div
  3939. className="patent-table"
  3940. ref={(e) => {
  3941. this.refs.all = e;
  3942. }}
  3943. >
  3944. <Table
  3945. columns={this.state.proColumns}
  3946. dataSource={this.state.proDataList}
  3947. onRowClick={this.tableRowClickPro}
  3948. pagination={false}
  3949. bordered
  3950. size="small"
  3951. />
  3952. </div>
  3953. {/* <span style={{ display: "block", marginTop: 10, color: "red" }}>
  3954. 外包(内部)价格总计(万元):{this.state.totalWaibao}
  3955. </span> */}
  3956. </Spin>
  3957. <ReactToPrint
  3958. trigger={() => (
  3959. <Button
  3960. type="primary"
  3961. style={{
  3962. float: "right",
  3963. marginTop: 10,
  3964. position: "absolute",
  3965. top: 0,
  3966. right: 30,
  3967. }}
  3968. >
  3969. 打印
  3970. </Button>
  3971. )}
  3972. content={() => this.refs.all}
  3973. />
  3974. </Modal>
  3975. {this.state.visible ? <Modal
  3976. className="customeDetails"
  3977. footer=""
  3978. title="订单详情"
  3979. width="900px"
  3980. visible={this.state.visible}
  3981. onOk={this.visitOk}
  3982. onCancel={this.visitCancel}
  3983. >
  3984. <Form
  3985. layout="horizontal"
  3986. onSubmit={this.handleSubmit}
  3987. id="demand-form"
  3988. style={{ paddingBottom: "40px" }}
  3989. >
  3990. <Spin spinning={this.state.loading}>
  3991. <div className="clearfix">
  3992. <div style={{position:"absolute",top:'-52px',left:'81px',zIndex:10000}}>
  3993. <OrderItemStatus deleteSign={this.state.deleteSign}/>
  3994. </div>
  3995. <FormItem
  3996. className="half-item"
  3997. {...formItemLayout}
  3998. label="订单编号"
  3999. >
  4000. <span>{this.state.orderNo}</span>
  4001. </FormItem>
  4002. <FormItem
  4003. className="half-item"
  4004. {...formItemLayout}
  4005. label="合同编号"
  4006. >
  4007. <span>{this.state.contractNo}</span>
  4008. </FormItem>
  4009. <FormItem
  4010. className="half-item"
  4011. {...formItemLayout}
  4012. label="客户名称"
  4013. >
  4014. <span>{this.state.userName}</span>
  4015. <EnterpriseNameChange
  4016. type='journal'
  4017. style={{ marginLeft: 10 }}
  4018. enterpriseId={this.state.orderUid}/>
  4019. </FormItem>
  4020. <FormItem
  4021. className="half-item"
  4022. {...formItemLayout}
  4023. label="合同签订时间"
  4024. >
  4025. <span>{this.state.signDate}</span>
  4026. </FormItem>
  4027. <FormItem
  4028. className="half-item"
  4029. {...formItemLayout}
  4030. label="流程状态"
  4031. >
  4032. <span>{getProcessStatus(this.state.processStatus)}</span>
  4033. </FormItem>
  4034. <FormItem
  4035. className="half-item"
  4036. {...formItemLayout}
  4037. label="结算状态"
  4038. >
  4039. <span>
  4040. {getLiquidationStatus(this.state.liquidationStatus)}
  4041. </span>
  4042. </FormItem>
  4043. <FormItem
  4044. className="half-item"
  4045. {...formItemLayout}
  4046. label="企业联系人"
  4047. >
  4048. <span>{this.state.contacts}</span>
  4049. </FormItem>
  4050. <FormItem
  4051. className="half-item"
  4052. {...formItemLayout}
  4053. label="联系人电话"
  4054. >
  4055. <span>{this.state.contactMobile}</span>
  4056. </FormItem>
  4057. <FormItem
  4058. className="half-item"
  4059. {...formItemLayout}
  4060. label="企业法人"
  4061. >
  4062. <span>{this.state.legalPerson}</span>
  4063. </FormItem>
  4064. <FormItem
  4065. className="half-item"
  4066. {...formItemLayout}
  4067. label="法人电话"
  4068. >
  4069. <span>{this.state.legalPersonTel}</span>
  4070. </FormItem>
  4071. <FormItem
  4072. className="half-item"
  4073. {...formItemLayout}
  4074. label="签单金额(万元)"
  4075. >
  4076. <span>{this.state.totalAmount}</span>
  4077. </FormItem>
  4078. <FormItem
  4079. className="half-item"
  4080. {...formItemLayout}
  4081. label="首付金额(万元)"
  4082. >
  4083. <span>{this.state.firstAmount}</span>
  4084. </FormItem>
  4085. <FormItem
  4086. className="half-item"
  4087. {...formItemLayout}
  4088. label="特批立项"
  4089. >
  4090. <span>{getApprovedState(this.state.approval)}</span>
  4091. </FormItem>
  4092. <FormItem
  4093. className="half-item"
  4094. {...formItemLayout}
  4095. label="已收款项(万元)"
  4096. >
  4097. <span>{this.state.settlementAmount}</span>
  4098. </FormItem>
  4099. <FormItem
  4100. className="half-item"
  4101. {...formItemLayout}
  4102. label="订单部门"
  4103. >
  4104. <span>{this.state.depName}</span>
  4105. </FormItem>
  4106. <FormItem
  4107. className="half-item"
  4108. {...formItemLayout}
  4109. label="是否外包"
  4110. >
  4111. {this.state.outsource}
  4112. </FormItem>
  4113. <div className="clearfix">
  4114. <FormItem
  4115. labelCol={{ span: 4 }}
  4116. wrapperCol={{ span: 16 }}
  4117. label="订单留言"
  4118. >
  4119. <span>{this.state.orderRemarks}</span>
  4120. </FormItem>
  4121. </div>
  4122. <div className="clearfix">
  4123. <FormItem
  4124. labelCol={{ span: 4 }}
  4125. wrapperCol={{ span: 18 }}
  4126. label={"合同扫描件"}
  4127. >
  4128. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  4129. {this.state.visible && this.state.orgCodeUrl ? <ImgList fileList={this.state.orgCodeUrl} ItemWidth={'96px'}/> : <div/>}
  4130. </div>
  4131. {/*<Upload*/}
  4132. {/* className="demandDetailShow-upload"*/}
  4133. {/* listType="picture-card"*/}
  4134. {/* fileList={this.state.orgCodeUrl}*/}
  4135. {/* onPreview={(file) => {*/}
  4136. {/* this.setState({*/}
  4137. {/* previewImage: file.url || file.thumbUrl,*/}
  4138. {/* previewVisible: true,*/}
  4139. {/* });*/}
  4140. {/* }}*/}
  4141. {/*/>*/}
  4142. <Modal
  4143. maskClosable={false}
  4144. footer={null}
  4145. width={"50%"}
  4146. visible={this.state.previewVisible}
  4147. onCancel={() => {
  4148. this.setState({
  4149. previewVisible: false,
  4150. rotateDeg: 0,
  4151. });
  4152. }}
  4153. >
  4154. <img
  4155. alt=""
  4156. style={{
  4157. width: "100%",
  4158. transform: `rotate(${this.state.rotateDeg}deg)`,
  4159. }}
  4160. src={this.state.previewImage || ""}
  4161. />
  4162. <Button
  4163. onClick={this.rotate}
  4164. style={{
  4165. position: "relative",
  4166. left: "50%",
  4167. transform: "translateX(-50%)",
  4168. }}
  4169. >
  4170. 旋转
  4171. </Button>
  4172. <Button
  4173. onClick={this.upImg}
  4174. style={{
  4175. position: "absolute",
  4176. left: -81,
  4177. top: "50%",
  4178. transform: "translateY(-50%)",
  4179. }}
  4180. >
  4181. 上一张
  4182. </Button>
  4183. <Button
  4184. onClick={this.downImg}
  4185. style={{
  4186. position: "absolute",
  4187. right: -81,
  4188. top: "50%",
  4189. transform: "translateY(-50%)",
  4190. }}
  4191. >
  4192. 下一张
  4193. </Button>
  4194. </Modal>
  4195. <Button
  4196. style={{
  4197. float: "right",
  4198. marginRight: "140px",
  4199. marginTop: "20px",
  4200. }}
  4201. onClick={this.getOrderLog}
  4202. >
  4203. 查看订单 日志
  4204. </Button>
  4205. </FormItem>
  4206. <FormItem
  4207. labelCol={{ span: 4 }}
  4208. wrapperCol={{ span: 18 }}
  4209. label="补充协议"
  4210. >
  4211. {/*<Upload*/}
  4212. {/* className="demandDetailShow-upload"*/}
  4213. {/* listType="picture-card"*/}
  4214. {/* fileList={this.state.replenishUrl}*/}
  4215. {/* onPreview={(file) => {*/}
  4216. {/* this.setState({*/}
  4217. {/* previewImage: file.url || file.thumbUrl,*/}
  4218. {/* previewVisibles: true,*/}
  4219. {/* });*/}
  4220. {/* }}*/}
  4221. {/*/>*/}
  4222. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  4223. {this.state.visible && this.state.replenishUrl ? <ImgList domId={'inquiry1'} fileList={this.state.replenishUrl} ItemWidth={'96px'}/> : <div/>}
  4224. </div>
  4225. <Modal
  4226. maskClosable={false}
  4227. footer={null}
  4228. width={"50%"}
  4229. visible={this.state.previewVisibles}
  4230. onCancel={() => {
  4231. this.setState({ previewVisibles: false,rotateDeg: 0 });
  4232. }}
  4233. >
  4234. <img
  4235. alt=""
  4236. style={{
  4237. width: "100%",
  4238. transform: `rotate(${this.state.rotateDeg}deg)`,
  4239. }}
  4240. src={this.state.previewImage || ""}
  4241. />
  4242. <Button
  4243. onClick={this.rotate}
  4244. style={{
  4245. position: "relative",
  4246. left: "50%",
  4247. transform: "translateX(-50%)",
  4248. }}
  4249. >
  4250. 旋转
  4251. </Button>
  4252. <Button
  4253. onClick={this.upImgs}
  4254. style={{
  4255. position: "absolute",
  4256. left: -81,
  4257. top: "50%",
  4258. transform: "translateY(-50%)",
  4259. }}
  4260. >
  4261. 上一张
  4262. </Button>
  4263. <Button
  4264. onClick={this.downImgs}
  4265. style={{
  4266. position: "absolute",
  4267. right: -81,
  4268. top: "50%",
  4269. transform: "translateY(-50%)",
  4270. }}
  4271. >
  4272. 下一张
  4273. </Button>
  4274. </Modal>
  4275. </FormItem>
  4276. </div>
  4277. <div className="clearfix">
  4278. <FormItem
  4279. className="half-item"
  4280. {...formItemLayout}
  4281. label="订单负责人"
  4282. >
  4283. <span>{this.state.salesmanName}</span>
  4284. </FormItem>
  4285. <FormItem
  4286. className="half-item"
  4287. {...formItemLayout}
  4288. label="订单负责人电话"
  4289. >
  4290. <span>{this.state.salesmanMobile}</span>
  4291. </FormItem>
  4292. </div>
  4293. <div className="clearfix">
  4294. <FormItem
  4295. className="half-item"
  4296. {...formItemLayout}
  4297. label="当前财务负责人"
  4298. >
  4299. <span>{this.state.nowFinance}</span>
  4300. </FormItem>
  4301. <FormItem
  4302. className="half-item"
  4303. {...formItemLayout}
  4304. label="当前财务负责人电话"
  4305. >
  4306. <span>{this.state.nowFinanceMobile}</span>
  4307. </FormItem>
  4308. </div>
  4309. <div className="clearfix">
  4310. <FormItem
  4311. className="half-item"
  4312. {...formItemLayout}
  4313. style={{ opacity: ".5" }}
  4314. label="原订单负责人"
  4315. >
  4316. <span>{this.state.oldSalesmanName}</span>
  4317. </FormItem>
  4318. <FormItem
  4319. className="half-item"
  4320. {...formItemLayout}
  4321. style={{ opacity: ".5" }}
  4322. label="原订单负责人电话"
  4323. >
  4324. <span>{this.state.oldSalesmanMobile}</span>
  4325. </FormItem>
  4326. </div>
  4327. <div className="clearfix">
  4328. <FormItem
  4329. className="half-item"
  4330. style={{ opacity: ".5" }}
  4331. {...formItemLayout}
  4332. label="实际财务操作人"
  4333. >
  4334. <span>{this.state.financeName}</span>
  4335. </FormItem>
  4336. <FormItem
  4337. className="half-item"
  4338. {...formItemLayout}
  4339. style={{ opacity: ".5" }}
  4340. label="实际财务操作人电话"
  4341. >
  4342. <span>{this.state.financeMobile}</span>
  4343. </FormItem>
  4344. </div>
  4345. <div>
  4346. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  4347. 项目业务
  4348. </span>
  4349. </div>
  4350. <div className="patent-table">
  4351. <Spin spinning={this.state.loading}>
  4352. <Table
  4353. columns={this.state.columnsX}
  4354. dataSource={this.state.dataSourceX}
  4355. pagination={false}
  4356. onRowClick={this.tableRowClickX}
  4357. bordered
  4358. size="small"
  4359. />
  4360. </Spin>
  4361. </div>
  4362. <div>
  4363. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  4364. 催款节点
  4365. </span>
  4366. <span
  4367. style={{
  4368. display: cuiDataList.length ? "none" : "inline-block",
  4369. marginLeft: 10,
  4370. color: "red",
  4371. }}
  4372. >
  4373. 金额总计(万元): {this.state.totalCui}
  4374. </span>
  4375. </div>
  4376. <div className="clearfix">
  4377. <Spin spinning={this.state.loading}>
  4378. <Form layout="horizontal" id="demand-form">
  4379. <Table
  4380. pagination={false}
  4381. bordered
  4382. size="small"
  4383. columns={
  4384. cuiDataList.length
  4385. ? this.state.ContactsLists
  4386. : this.state.ContactsListsNew
  4387. }
  4388. dataSource={
  4389. cuiDataList.length
  4390. ? this.state.contactList
  4391. : this.state.contactListNew
  4392. }
  4393. />
  4394. <Col
  4395. span={24}
  4396. offset={9}
  4397. style={{ marginTop: "15px" }}
  4398. ></Col>
  4399. </Form>
  4400. </Spin>
  4401. </div>
  4402. </div>
  4403. </Spin>
  4404. </Form>
  4405. </Modal> : <div/>}
  4406. <OrderRiZi
  4407. dataSourcerizhi={this.state.dataSourcerizhi}
  4408. closeOrderLog={this.closeOrderLog}
  4409. visible={this.state.rizhivisible}
  4410. loading={this.state.loading}
  4411. />
  4412. </div>
  4413. {this.state.addnextVisible && <ProjectDetailsReadOnly
  4414. infor={this.state.dataInfor}
  4415. visible={this.state.addnextVisible}
  4416. onCancel={this.nextCancel}
  4417. />}
  4418. </div>
  4419. );
  4420. },
  4421. })
  4422. );
  4423. export default IntentionCustomer;