inquiry.jsx 151 KB

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