order.jsx 216 KB

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