order.jsx 215 KB

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