inquiry.jsx 142 KB

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