order.jsx 214 KB

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