order.jsx 215 KB

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