inquiry.jsx 141 KB

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