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