detailsPage.vue 106 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132
  1. <template>
  2. <div class="borderless" v-loading="pageLoading">
  3. <div class="customer-head" style="height: 82px;">
  4. <div class="customer-back">
  5. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
  6. @click="backToList">返回列表
  7. </el-button>
  8. </div>
  9. <div class="add-customer-btn" v-if="showBut">
  10. <el-button type="primary" size="small" v-if="detailData.status == 1" class="el-button--small-yh "
  11. @click.stop="openEdit">编辑
  12. </el-button>
  13. <el-button type="primary" size="small" :disabled="form.status > 0 || (!form.status && form.status !== 0)"
  14. @click.native="pleaseCheck">提交订单
  15. </el-button>
  16. <el-dropdown style="margin-right: 8px;margin-left: 8px;">
  17. <el-button type="primary" size="small">
  18. 审核处理<i class="el-icon-arrow-down el-icon--right"></i>
  19. </el-button>
  20. <el-dropdown-menu slot="dropdown">
  21. <el-dropdown-item :disabled="form.status > 0 || (!form.status && form.status !== 0)"
  22. @click.native="pleaseCheck">提交订单
  23. </el-dropdown-item>
  24. <el-dropdown-item :disabled="!form.status || form.status == 0"
  25. @click.native="checkScheduleDialog = true; checkId = form.id">审核进度
  26. </el-dropdown-item>
  27. <el-dropdown-item @click.native="checkDialog = true; checkData = detailData.check;"
  28. v-if="detailData.check">审批单据
  29. </el-dropdown-item>
  30. <!-- <el-dropdown-item disabled>撤销请核</el-dropdown-item>-->
  31. </el-dropdown-menu>
  32. </el-dropdown>
  33. <el-dropdown style="margin-right: 8px;">
  34. <el-button type="warning" size="small">
  35. 账单处理<i class="el-icon-arrow-down el-icon--right"></i>
  36. </el-button>
  37. <el-dropdown-menu slot="dropdown">
  38. <!-- <el-dropdown-item @click.native="generateBill" :disabled="!form.id">生成账单
  39. </el-dropdown-item> -->
  40. <el-dropdown-item @click.native="viewBill" :disabled="!form.id">查看账单</el-dropdown-item>
  41. </el-dropdown-menu>
  42. </el-dropdown>
  43. <el-dropdown style="margin-right: 8px;">
  44. <el-button type="success" size="small">
  45. 业务处理<i class="el-icon-arrow-down el-icon--right"></i>
  46. </el-button>
  47. <el-dropdown-menu slot="dropdown">
  48. <el-dropdown-item :disabled="!form.id" @click.native="copyDoc">复制单据</el-dropdown-item>
  49. <el-dropdown-item
  50. @click.native="orderNoVisible = true; orderForm.primaryOrdNo = form.orderNo">更改销售订单号</el-dropdown-item>
  51. </el-dropdown-menu>
  52. </el-dropdown>
  53. <el-button type="primary" :disabled="disabled" @click="editCustomer" :loading="subLoading"
  54. v-if="detailData.status != 1" size="small">保存数据
  55. </el-button>
  56. </div>
  57. <div class="content" style="height: 10px;margin-top: 10px">
  58. <div class="content-item">
  59. <div class="card">
  60. <div class="card-content">
  61. <span class="card-content-num selected">
  62. {{ form.fudaPurchaseStatus ? form.fudaPurchaseStatus : '录入' }}
  63. </span>
  64. </div>
  65. </div>
  66. </div>
  67. <div class="divider" />
  68. <div class="content-item">
  69. <div class="card">
  70. <div class="card-content">
  71. <span class="card-content-num" :class="form.depositReceived ? 'selected' : ''">
  72. {{ form.depositReceived ? form.depositReceived : '定金到账' }}
  73. </span>
  74. </div>
  75. </div>
  76. </div>
  77. <div class="divider" />
  78. <div class="content-item">
  79. <div class="card">
  80. <div class="card-content">
  81. <span class="card-content-num" :class="form.productionScheduling ? 'selected' : ''">
  82. {{ form.productionScheduling ? form.productionScheduling : '采购' }}
  83. </span>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="divider" />
  88. <div class="content-item">
  89. <div class="card">
  90. <div class="card-content">
  91. <span class="card-content-num" :class="form.documentaryStatus ? 'selected' : ''">
  92. {{ form.documentaryStatus ? form.documentaryStatus : '订舱' }}
  93. </span>
  94. </div>
  95. </div>
  96. </div>
  97. <div class="divider" />
  98. <div class="content-item">
  99. <div class="card">
  100. <div class="card-content">
  101. <span class="card-content-num" :class="form.balancePayment ? 'selected' : ''">
  102. {{ form.balancePayment ? form.balancePayment : '尾款' }}
  103. </span>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. <div class="customer-main" style="margin-top: 85px">
  110. <trade-card title="基础信息">
  111. <avue-form ref="form" class="trading-form" v-model="form" :option="option">
  112. <template slot="portOfLoad">
  113. <port-info v-model="form.portOfLoad" :disabled="detailData.status == 1" />
  114. </template>
  115. <template slot="portOfDestination">
  116. <port-info v-model="form.portOfDestination" :disabled="detailData.status == 1" />
  117. </template>
  118. <template slot-scope="{}" slot="corpIdLabel">
  119. <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('kh')">客户名称:</span>
  120. </template>
  121. <template slot-scope="{}" slot="belongToCorpIdLabel">
  122. <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('GS')">公司主体:</span>
  123. </template>
  124. <template slot-scope="{}" slot="portOfLoadLabel">
  125. <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('portOfLoad')">起运港:</span>
  126. </template>
  127. <template slot-scope="{}" slot="portOfDestinationLabel"> <span style="color: #409EFF;cursor: pointer"
  128. @click.stop="khEdit('portOfLoad')">目的港:</span>
  129. </template>
  130. <template slot-scope="{}" slot="transport">
  131. <el-select size="small" v-model="form.transport" placeholder="请选择" @change="transportChange" clearable
  132. :disabled="detailData.status == 1">
  133. <el-option v-for="item in transportOption" :key="item.id" :label="item.dictValue" :value="item.dictValue">
  134. </el-option>
  135. </el-select>
  136. </template>
  137. <template slot="corpId">
  138. <crop-select v-model="form.corpId" @getCorpData="getCorpData" corpType="KH"
  139. :disabled="detailData.status == 1"></crop-select>
  140. </template>
  141. <template slot="belongToCorpId">
  142. <crop-select v-model="form.belongToCorpId" @getCorpData="getCorpsBank" corpType="GS"
  143. :disabled="detailData.status == 1" source="销售"></crop-select>
  144. </template>
  145. <template slot="banks">
  146. <el-select size="small" v-model="form.banks" placeholder="请选择" @change="banksChange" clearable
  147. :disabled="detailData.status == 1 || !form.belongToCorpId">
  148. <el-option v-for="item in banksData" :key="item.id" :label="item.remarks + '-' + item.accountNo"
  149. :value="item.id" :disabled="form.currency != item.fcyno">
  150. </el-option>
  151. </el-select>
  152. </template>
  153. <template slot="corpAttn">
  154. <el-select size="small" v-model="form.corpAttn" placeholder="请选择" @change="corpAttnChange" clearable
  155. :disabled="detailData.status == 1">
  156. <el-option v-for="item in corpsattns" :key="item.id" :label="item.cname" :value="item.cname">
  157. </el-option>
  158. </el-select>
  159. </template>
  160. <template slot="priceTerms">
  161. <el-select size="small" v-model="form.priceTerms" placeholder="请选择" @change="priceTermsChange" clearable
  162. :disabled="detailData.status == 1">
  163. <el-option v-for="item in priceTermsList" :key="item.id" :label="item.dictValue" :value="item.dictValue">
  164. </el-option>
  165. </el-select>
  166. </template>
  167. <template slot="paymentType">
  168. <el-select size="small" v-model="form.paymentType" placeholder="请选择" @change="paymentTypeChange" clearable
  169. :disabled="detailData.status == 1">
  170. <el-option v-for="item in paymentTermList" :key="item.id" :label="item.dictValue" :value="item.dictValue">
  171. </el-option>
  172. </el-select>
  173. </template>
  174. <template slot="dateClause">
  175. <el-select size="small" v-model="form.dateClause" placeholder="请选择" @change="dateClauseChange"
  176. :disabled="detailData.status == 1" clearable>
  177. <el-option v-for="item in dateClauseList" :key="item.id" :label="item.dictValue" :value="item.dictValue">
  178. </el-option>
  179. </el-select>
  180. </template>
  181. <template slot="businesDate">
  182. <el-date-picker v-model="form.businesDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd 00:00:00"
  183. @change="businesDateChange" :disabled="detailData.status == 1">
  184. </el-date-picker>
  185. </template>
  186. <template slot="currency">
  187. <el-select size="small" v-model="form.currency" placeholder="请选择" @change="currencyChange"
  188. :disabled="detailData.status == 1" clearable>
  189. <el-option v-for="item in currencyList" :key="item.id" :label="item" :value="item">
  190. </el-option>
  191. </el-select>
  192. </template>
  193. <template slot="exchangeRate">
  194. <el-input size="small" v-model="form.exchangeRate"
  195. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  196. placeholder="请输入 汇率" :disabled="detailData.status == 1" @change="exchangeRateChange" />
  197. </template>
  198. <template slot="boxPile">
  199. <el-select size="small" v-model="form.boxPile" placeholder="请选择" clearable filterable
  200. :disabled="detailData.status == 1">
  201. <el-option v-for="item in allBoxs" :key="item.id" :label="item.name" :value="item.name">
  202. </el-option>
  203. </el-select>
  204. </template>
  205. <template slot="boxNumber">
  206. <el-input size="mini" v-model="form.boxNumber"
  207. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  208. placeholder="请输入 箱量" :disabled="detailData.status == 1" />
  209. </template>
  210. <template slot="minOrder">
  211. <el-input size="mini" v-model="form.minOrder"
  212. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  213. placeholder="请输入 起订量" :disabled="detailData.status == 1" />
  214. </template>
  215. <template slot="predictOceanFreight">
  216. <el-input size="mini" v-model="form.predictOceanFreight"
  217. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  218. placeholder="请输入 预计海运费" :disabled="detailData.status == 1" />
  219. </template>
  220. <template slot="referenceOceanFreight">
  221. <el-input size="mini" v-model="form.referenceOceanFreight"
  222. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  223. placeholder="请输入 参考海运费" :disabled="detailData.status == 1" />
  224. </template>
  225. <template slot="oceanFreight">
  226. <el-input size="mini" v-model="form.oceanFreight"
  227. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  228. placeholder="请输入 实际海运费" :disabled="detailData.status == 1" />
  229. </template>
  230. <template slot="orderNo">
  231. <el-input size="mini" v-model="form.orderNo" oninput="this.value=this.value.toUpperCase()" placeholder="请输入 "
  232. :disabled="detailData.status == 1" />
  233. <!--:disabled="detailData.status == 1"-->
  234. </template>
  235. </avue-form>
  236. </trade-card>
  237. <goods-info ref="goodsInfo" :form="form" :data="data" :detailData="detailData" :orderFeesList.sync="orderFeesList"
  238. @formGoodstoFees="formGoodstoFees" @backToList="getDetail" @oceanUSD="oceanUSD" @retrieve="retrieve"></goods-info>
  239. <!-- <trade-card title="商品信息">
  240. <avue-crud ref="crud" :data="data" :option="tableOption" @row-del="rowDel"
  241. @selection-change="goodsSelectionChange" @saveColumn="saveColumn" @resetColumn="resetColumn"
  242. :summary-method="summaryMethod" :cell-style="cellStyle" @row-dblclick="handleRowDBLClick">
  243. <template slot="menuLeft">
  244. <el-row>
  245. <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="newDetails"
  246. :disabled="detailData.status == 1">批量录入</el-button>
  247. <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="addLibrary"
  248. :disabled="detailData.status == 1">出口价格库</el-button>
  249. <el-button type="info" icon="el-icon-printer" size="small" @click.stop="openReport()">报表打印</el-button>
  250. <el-button type="warning" icon="el-icon-plus" size="small"
  251. :disabled="detailData.status == 1 || orderItemIds.length == 0" @click="getInvoice">生成发货单
  252. </el-button>
  253. <el-button v-if="goodsEditShow && detailData.status != 1" size="small" type="primary" @click="handleSave">
  254. 保存明细</el-button>
  255. <el-button v-if="goodsEditShow" size="small" @click="handleClose">关闭明细</el-button>
  256. <el-button type="info" size="small" @click="cnameData">刷新基础资料</el-button>
  257. </el-row>
  258. <el-row>
  259. <avue-form v-if="goodsEditShow" class="trading-form" v-model="goodsEditForm" :option="goodsEditOption">
  260. <template slot="ename">
  261. <el-input type="textarea" size="small" v-model="goodsEditForm.ename" placeholder="请输入"
  262. :disabled="detailData.status == 1" @change="formEditChange(goodsEditForm)" />
  263. </template>
  264. <template slot="itemProp">
  265. <el-input type="textarea" size="small" v-model="goodsEditForm.itemProp" placeholder="请输入"
  266. :disabled="detailData.status == 1" @change="formEditChange(goodsEditForm)" />
  267. </template>
  268. <template slot="itemDescription">
  269. <el-input type="textarea" size="small" v-model="goodsEditForm.itemDescription" placeholder="请输入"
  270. :disabled="detailData.status == 1" @change="formEditChange(goodsEditForm)" />
  271. </template>
  272. <template slot="partsDescribe">
  273. <el-input type="textarea" size="small" v-model="goodsEditForm.partsDescribe" placeholder="请输入"
  274. :disabled="detailData.status == 1" @change="formEditChange(goodsEditForm)" />
  275. </template>
  276. </avue-form>
  277. </el-row>
  278. </template>
  279. <template slot="headerSerial">
  280. <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
  281. :disabled="detailData.status == 1" circle></el-button>
  282. </template>
  283. <template slot="codeHeader" slot-scope="{column}"> <span style="color: #409EFF;cursor: pointer"
  284. @click.stop="khEdit('cname')">{{column.label}}</span>
  285. </template>
  286. <template slot="cname" slot-scope="{ row, index }">
  287. <span v-if="row.$cellEdit" style="display:flex">
  288. <el-select v-model="row.itemId" placeholder="请选择" size="small" style="width:60%"
  289. @change="cnameChange(row, index)">
  290. <el-option v-for="item in goodsoptions" :key="item.id" :label="item.cname" :value="item.id">
  291. </el-option>
  292. </el-select>
  293. <el-button icon="el-icon-search" size="small" @click="rePick(row, index)"></el-button>
  294. </span>
  295. <span v-else> {{ row.cname }}</span>
  296. </template>
  297. <template slot="ename" slot-scope="{ row, index }">
  298. <el-input v-if="row.$cellEdit" v-model="row.ename" size="small" placeholder="请点击右边按钮"
  299. @change="editChange(row)">
  300. </el-input>
  301. <span v-else>{{ row.ename }}</span>
  302. </template>
  303. <template slot="itemDescription" slot-scope="{ row, index }">
  304. <span v-if="row.$cellEdit" style="display:flex">
  305. <el-input v-model="row.itemDescription" size="small" placeholder="请输入" @change="editChange(row)">
  306. </el-input>
  307. </span>
  308. <span v-else>{{ row.itemDescription }}</span>
  309. </template>
  310. <template slot="partsDescribe" slot-scope="{ row, index }">
  311. <span v-if="row.$cellEdit" style="display:flex">
  312. <el-input v-model="row.partsDescribe" size="small" placeholder="请点击右边按钮" @change="editChange(row)">
  313. </el-input>
  314. <el-button icon="el-icon-edit" size="mini" @click="partrePick(row, index)"></el-button>
  315. </span>
  316. <span v-else>{{ row.partsDescribe }}</span>
  317. </template>
  318. <template slot="itemType" slot-scope="{ row }">
  319. <el-select v-if="row.$cellEdit" v-model="row.itemType" filterable allow-create default-first-option
  320. placeholder="请输入" size="small" @focus="itemTypeFocus(row)">
  321. <el-option v-for="(item, index) in itemtypeList" :key="index" :label="item.value" :value="item.value">
  322. </el-option>
  323. </el-select>
  324. <span v-else>{{ row.itemType }}</span>
  325. </template>
  326. <template slot="itemProp" slot-scope="{ row, index }">
  327. <span v-if="row.$cellEdit" style="display:flex">
  328. <el-input v-model="row.itemProp" size="small" placeholder="请点击右边按钮" @change="editChange(row)"></el-input>
  329. <el-button icon="el-icon-edit" size="mini" @click="openProperty(row, index)"></el-button>
  330. </span>
  331. <span v-else>{{ row.itemProp }}</span>
  332. </template>
  333. <template slot="priorityReferrer" slot-scope="{ row }">
  334. <el-checkbox :disabled="!row.$cellEdit" v-model="row.priorityReferrer" :true-label="1" :false-label="0" />
  335. </template>
  336. <template slot="corpId" slot-scope="{ row }">
  337. <span>{{ row.corpName }}</span>
  338. </template>
  339. <template slot="purchaseCost" slot-scope="{ row }">
  340. <el-input v-if="row.$cellEdit" v-model="row.purchaseCost" size="small" placeholder="请输入"
  341. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"></el-input>
  342. <span v-else>{{ row.purchaseCost | micrometerFormat2 }}</span>
  343. </template>
  344. <template slot="purchaseAmount" slot-scope="{ row }">
  345. <el-input v-if="row.$cellEdit" v-model="row.purchaseAmount" size="small" placeholder="请输入"
  346. @change="purchaseAmountChange(row)"
  347. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"></el-input>
  348. <span v-else>{{ row.purchaseAmount | micrometerFormat2 }}</span>
  349. </template>
  350. <template slot="price" slot-scope="{ row }">
  351. <el-input v-if="row.$cellEdit" v-model="row.price" size="small"
  352. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  353. @change="priceChange(row)">
  354. </el-input>
  355. <span v-else>{{ row.price | micrometerFormat2 }}</span>
  356. </template>
  357. <template slot="amount" slot-scope="{ row }">
  358. <span>{{ row.amount | micrometerFormat2 }}</span>
  359. </template>
  360. <template slot="orderQuantity" slot-scope="{ row }">
  361. <el-input v-if="row.$cellEdit" v-model="row.orderQuantity" size="small"
  362. oninput='this.value=this.value.replace(/[^(\d)]/g,"")' @change="priceChange(row)"></el-input>
  363. <span v-else>{{ row.orderQuantity | IntegerFormat }}</span>
  364. </template>
  365. <template slot="actualQuantity" slot-scope="{ row }">
  366. <span>{{ row.actualQuantity | IntegerFormat }}</span>
  367. </template>
  368. <template slot="discount" slot-scope="{ row }">
  369. <el-input v-if="row.$cellEdit" v-model="row.discount" size="small"
  370. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  371. @change="discountChange(row)"></el-input>
  372. <span v-else>{{ row.discount | isDiscount }}</span>
  373. </template>
  374. <template slot="insurance" slot-scope="{ row }">
  375. <el-input v-if="row.$cellEdit" v-model="row.insurance" size="small"
  376. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  377. @change="priceChange(row)">
  378. </el-input>
  379. <span v-else>{{ row.insurance | micrometerFormat2 }}</span>
  380. </template>
  381. <template slot="freight" slot-scope="{ row }">
  382. <el-input v-if="row.$cellEdit" v-model="row.freight" size="small"
  383. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  384. @change="priceChange(row)">
  385. </el-input>
  386. <span v-else>{{ row.freight | micrometerFormat2 }}</span>
  387. </template>
  388. <template slot="taxRate" slot-scope="{ row }">
  389. <el-input v-if="row.$cellEdit" v-model="row.taxRate" size="small"
  390. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  391. @change="taxRateChange(row)"></el-input>
  392. <span v-else>{{ row.taxRate | isPercentage }}</span>
  393. </template>
  394. <template slot="itemMargin" slot-scope="{ row }">
  395. <span>{{ row.itemMargin | isPercentage }}</span>
  396. </template>
  397. <template slot="menu" slot-scope="{ row, index }">
  398. <div style="display:flex;justify-content: center;">
  399. <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)"
  400. :disabled="disabled || detailData.status == 1">{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
  401. <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
  402. :disabled="detailData.status == 1">删除</el-button>
  403. <div v-if="!goodsEditShow"
  404. style="display:flex;flex-direction: column;justify-content: center;margin-left: 10px;">
  405. <el-tooltip effect="dark" content="向上移动" placement="top">
  406. <i v-if="index != 0" :disabled="detailData.status == 1" class="el-icon-arrow-up"
  407. @click="moveUp(row, index)" style="color:#409EFF;"></i>
  408. </el-tooltip>
  409. <el-tooltip effect="dark" content="向下移动" placement="bottom"> <i v-if="index != (data.length - 1)"
  410. :disabled="detailData.status == 1" class="el-icon-arrow-down" @click="moveDown(row, index)"
  411. style="color:#409EFF;"></i></el-tooltip>
  412. </div>
  413. </div>
  414. </template>
  415. </avue-crud>
  416. </trade-card> -->
  417. <fee-info ref="feeInfo" :tabShow="1" :orderFeesList="orderFeesList" :disabled="detailData.status == 1"
  418. feeUrl="/blade-purchase-sales/orderfees/update" optionType="CK" itemType="销售" :showBtn="false" @beforeFinance="beforeFinance"
  419. :inCropId="true" />
  420. <containerTitle title="合同附件"></containerTitle>
  421. <c-upload typeUpload="CK" :data="orderFilesList" :disabled="detailData.status == 1" :enumerationValue="76"
  422. deleteUrl="/blade-purchase-sales/orderfiles/update" display />
  423. <div>
  424. <trade-card title="银行信息">
  425. <avue-form class="trading-form" v-model="form" :option="bankOption" />
  426. </trade-card>
  427. </div>
  428. <div>
  429. <trade-card title="保险信息">
  430. <avue-form class="trading-form" v-model="form" :option="insuranceOption" />
  431. </trade-card>
  432. </div>
  433. <div>
  434. <trade-card title="唛头">
  435. <avue-form class="trading-form" v-model="form" :option="markOption" />
  436. </trade-card>
  437. </div>
  438. </div>
  439. <el-dialog title="账单" append-to-body class="el-dialogDeep" :visible.sync="financialAccountDialog" width="60%"
  440. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  441. <financial-account billType="收费" :billData="billData" itemType="销售" @choceFun="choceFun">
  442. </financial-account>
  443. </el-dialog>
  444. <el-dialog title="申请记录" append-to-body class="el-dialogDeep" :visible.sync="applicationDialog" width="60%"
  445. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  446. <bill-application :billId="form.id" @choceApplication="choceApplication">
  447. </bill-application>
  448. </el-dialog>
  449. <el-dialog title="导入商品" append-to-body class="el-dialogDeep" :visible.sync="dialogVisible" width="80%"
  450. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @close="closeGoods" top="5vh"
  451. v-dialog-drag>
  452. <span>
  453. <el-row>
  454. <el-col :span="4">
  455. <div>
  456. <el-scrollbar>
  457. <basic-container>
  458. <avue-tree :option="treeOption" @node-click="nodeClick" :style="treeStyle" />
  459. </basic-container>
  460. </el-scrollbar>
  461. </div>
  462. </el-col>
  463. <el-col :span="20">
  464. <avue-crud :option="goodsOption" :table-loading="loading" :data="goodsList" ref="goodsCrud"
  465. :search.sync="search" @search-change="searchChange" @refresh-change="refreshChange"
  466. @selection-change="selectionChange" @row-click="rowClick" :page.sync="page" @on-load="onLoad"
  467. @saveColumn="saveGoodsColumn" @resetColumn="resetGoodsColumn" :cell-style="cellStyle"></avue-crud>
  468. </el-col>
  469. </el-row>
  470. </span>
  471. <span slot="footer" class="dialog-footer">
  472. <el-button @click="dialogVisible = false">取 消</el-button>
  473. <el-button type="primary" @click="importGoods" :disabled="selectionList.length == 0">导入</el-button>
  474. </span>
  475. </el-dialog>
  476. <report-dialog :switchDialog="switchDialog" :reportId="form.id" reportName="销售明细(E)" @onClose="onClose()">
  477. </report-dialog>
  478. <part-dialog ref="part" :partList="partList" @importPart="importPart" @partClosed="partClosed" />
  479. <price-library ref="library" @importLibray="importLibray" />
  480. <property-dialog ref="property" @importProperty="importProperty" />
  481. <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
  482. v-if="checkScheduleDialog" :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false"
  483. v-dialog-drag>
  484. <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
  485. </el-dialog>
  486. <el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"
  487. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  488. <check :checkData="checkData" :checkDetail="false" :idList="[]" @choceCheckFun="choceCheckFun">
  489. </check>
  490. </el-dialog>
  491. <el-dialog title="更改销售订单号" :visible.sync="orderNoVisible" width="350px" size="small" @close="orderClose"
  492. append-to-body>
  493. <span>
  494. <avue-form v-model="orderForm" :option="orderoption"></avue-form>
  495. </span>
  496. <span slot="footer" class="dialog-footer">
  497. <el-button @click="orderNoVisible = false">取 消</el-button>
  498. <el-button type="primary" @click="upDateOrderNo">确 定</el-button>
  499. </span>
  500. </el-dialog>
  501. </div>
  502. </template>
  503. <script>
  504. import tableOption from "./config/customerContact.json";
  505. import goodsOption from "./config/commodity.json";
  506. import feeInfo from "@/components/fee-info/main";
  507. import uploadFile from "@/components/upload-file/main";
  508. import {
  509. detail,
  510. getCopy,
  511. submit,
  512. delItem,
  513. getDeptLazyTree,
  514. getGoods,
  515. deliverGoods,
  516. getPorts,
  517. getSpecification,
  518. saveSell,
  519. getPricedetail,
  520. pleaseCheck,
  521. getParities,
  522. getCode,
  523. generatePurchaseNews,
  524. synchronization
  525. } from "@/api/basicData/salesContract";
  526. import {
  527. getAllBoxs
  528. } from "@/api/basicData/portinformation";
  529. import _ from "lodash";
  530. import reportDialog from "@/components/report-dialog/main";
  531. import partDialog from "@/components/part-dialog/main";
  532. import {
  533. isDiscount,
  534. isPercentage,
  535. micrometerFormat2,
  536. IntegerFormat
  537. } from "@/util/validate";
  538. import {
  539. contrastObj,
  540. contrastList
  541. } from "@/util/contrastData";
  542. import customerDialog from "@/components/customer-dialog/main";
  543. import priceLibrary from "@/components/price-Library/main";
  544. import propertyDialog from "@/components/property-dialog/main";
  545. import {
  546. dateFormat, NdayDate
  547. } from "@/util/date";
  548. import financialAccount from "@/components/finance/financialAccount";
  549. import billApplication from "@/components/bill/billApplication";
  550. import {
  551. productCal,
  552. sellingCal,
  553. amountCal,
  554. transformCal,
  555. grossProfitCal,
  556. STGPCal,
  557. numCal,
  558. costsCal,
  559. costCal,
  560. multiply,
  561. sum,
  562. addPrice,
  563. goodsGrossProfitCal
  564. } from "@/util/calculate";
  565. import {
  566. getCorpsattn
  567. } from "@/api/basicData/customerInformation";
  568. import goodsInfo from "./components/goodsInfo.vue";
  569. import checkSchedule from "@/components/check/checkSchedule.vue";
  570. import check from "@/components/check/check.vue";
  571. import { getDictionary } from "@/api/system/dictbiz";
  572. import { getPricebankAll } from "@/api/basicData/customerInquiry";
  573. import { detail as customeDetail } from "@/api/basicData/customerInformation"
  574. export default {
  575. name: "detailsPageEdit",
  576. data() {
  577. return {
  578. orderForm: {},
  579. orderoption: {
  580. submitBtn: false,
  581. emptyBtn: false,
  582. column: [{
  583. label: "原销售订单号",
  584. prop: "primaryOrdNo",
  585. disabled: true,
  586. span: 24
  587. }, {
  588. label: "新销售订单号",
  589. prop: "ordNo",
  590. span: 24
  591. }]
  592. },
  593. orderNoVisible: false,
  594. // 开户银行list
  595. corpsBankList: [
  596. { id: 1, accountName: "a" }, { id: 2, accountName: "b" }
  597. ],
  598. goodsEditForm: {},
  599. billData: {}, //账单需要数据
  600. corpsattns: [],
  601. banksData: [], // 根据公司获取数据
  602. financialAccountDialog: false,
  603. applicationDialog: false,
  604. oldExchange: null,
  605. treeStyle: "height:" + (window.innerHeight - 315) + "px",
  606. configuration: {
  607. multipleChoices: false,
  608. multiple: false,
  609. collapseTags: false,
  610. placeholder: "请点击右边按钮选择",
  611. dicData: []
  612. },
  613. switchDialog: false,
  614. checkScheduleDialog: false,
  615. checkId: '',
  616. batchNo: '',
  617. form: {
  618. orderStatus: "录入",
  619. // cargoType: "普货",
  620. businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
  621. currency: "USD",
  622. dateValidity: NdayDate(7) + ' 00:00:00', // 有效日期 当天+7天
  623. transport: 'BY SEA', // 运输方式
  624. transportDescription: 'BY SEA', // 运输方式描述
  625. dateClause: '30 DAYS', // 日期条款
  626. priceTerms: 'FOB', // 价格条款
  627. paymentType: '预付50%,尾款发货前付清', // 收款方式
  628. boxPile: '20GP', // 箱型
  629. signingMethod: 'ORI', // 签单方式
  630. boxNumber: 1, // 箱量
  631. buyerId: '1705056126778851330', // 采购员 王亚文
  632. documenterId: '1597944227923324930', // 跟单员 张雪梅
  633. portOfLoad: 'QINGDAO, CHINA', // 起运港
  634. priceTermsDescription: 'QINGDAO, CHINA', // 条款说明
  635. dateDesc: 'ABOUT 30 DAYS AFTER DEPOSIT ARRIVE.', // 日期说明
  636. paymentTypeDescription: 'T/T 50% AS DEPOSIT, BALANCE BEFORE SHIPMENT.', // 收款说明
  637. },
  638. disabled: false,
  639. dialogVisible: false,
  640. tableOption: {},
  641. option: {
  642. menuBtn: false,
  643. labelWidth: 100,
  644. column: [{
  645. label: "客户名称",
  646. prop: "corpId",
  647. rules: [{
  648. required: true,
  649. message: "",
  650. trigger: "blur"
  651. }],
  652. span: 10,
  653. slot: true
  654. },
  655. {
  656. label: "公司主体",
  657. prop: "belongToCorpId",
  658. offset: 2,
  659. span: 6,
  660. rules: [
  661. {
  662. required: true,
  663. message: "",
  664. trigger: "blur"
  665. }
  666. ]
  667. },
  668. {
  669. label: "销售订单号",
  670. prop: "orderNo",
  671. span: 6
  672. },
  673. {
  674. label: "详情信息",
  675. prop: "clientMessage",
  676. type: "textarea",
  677. minRows: 2,
  678. span: 10
  679. },
  680. {
  681. label: "订单状态",
  682. prop: "orderStatus",
  683. span: 6,
  684. offset: 2,
  685. type: "select",
  686. dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
  687. props: {
  688. label: "dictValue",
  689. value: "dictValue"
  690. }
  691. },
  692. {
  693. label: "订单日期",
  694. prop: "businesDate",
  695. span: 6,
  696. rules: [{
  697. required: true,
  698. message: "",
  699. trigger: "blur"
  700. }]
  701. },
  702. {
  703. label: "联系人",
  704. prop: "corpAttn",
  705. span: 5
  706. }, {
  707. label: "电话",
  708. prop: "corpTel",
  709. span: 5
  710. }, {
  711. label: "预交日期",
  712. prop: "plannedDeliveryDate",
  713. span: 6,
  714. type: "date",
  715. format: "yyyy-MM-dd",
  716. valueFormat: "yyyy-MM-dd 00:00:00",
  717. offset: 2
  718. },
  719. {
  720. label: "有效日期",
  721. prop: "dateValidity",
  722. span: 6,
  723. type: "date",
  724. format: "yyyy-MM-dd",
  725. valueFormat: "yyyy-MM-dd 00:00:00",
  726. // row: true,
  727. // offset: 2,
  728. rules: [
  729. {
  730. required: true,
  731. message: "",
  732. trigger: "blur"
  733. }
  734. ]
  735. }, {
  736. label: "起运港",
  737. prop: "portOfLoad",
  738. span: 6,
  739. type: "select",
  740. filterable: true,
  741. rules: [{
  742. required: true,
  743. message: "",
  744. trigger: "blur"
  745. }],
  746. dicData: [],
  747. props: {
  748. label: "name",
  749. value: "name"
  750. }
  751. }, {
  752. label: "目的港",
  753. prop: "portOfDestination",
  754. span: 6,
  755. type: "select",
  756. filterable: true,
  757. rules: [{
  758. required: true,
  759. message: "",
  760. trigger: "blur"
  761. }],
  762. dicData: [],
  763. props: {
  764. label: "name",
  765. value: "name"
  766. }
  767. },
  768. {
  769. label: "银行信息",
  770. prop: "banks",
  771. span: 6,
  772. },
  773. {
  774. label: "币别",
  775. prop: "currency",
  776. span: 6,
  777. rules: [{
  778. required: true,
  779. message: "",
  780. trigger: "blur"
  781. }]
  782. },
  783. {
  784. label: "价格条款",
  785. prop: "priceTerms",
  786. span: 6,
  787. rules: [
  788. {
  789. required: true,
  790. message: "",
  791. trigger: "blur"
  792. }
  793. ]
  794. },
  795. {
  796. label: "条款说明",
  797. prop: "priceTermsDescription",
  798. type: "textarea",
  799. minRows: 1,
  800. span: 12,
  801. },
  802. {
  803. label: "汇率",
  804. prop: "exchangeRate",
  805. span: 6,
  806. rules: [{
  807. required: true,
  808. message: "",
  809. trigger: "blur"
  810. }]
  811. },
  812. {
  813. label: "日期条款",
  814. prop: "dateClause",
  815. span: 6,
  816. rules: [
  817. {
  818. required: true,
  819. message: "",
  820. trigger: "blur"
  821. }
  822. ]
  823. },
  824. {
  825. label: "日期说明",
  826. prop: "dateDesc",
  827. type: "textarea",
  828. minRows: 1,
  829. span: 12,
  830. },
  831. {
  832. label: "货物类型",
  833. prop: "cargoType",
  834. span: 6,
  835. type: "select",
  836. dicData: [],
  837. props: {
  838. label: "dictValue",
  839. value: "dictValue"
  840. },
  841. rules: [
  842. {
  843. required: true,
  844. message: "",
  845. trigger: "blur"
  846. }
  847. ]
  848. },
  849. {
  850. label: "运输方式",
  851. prop: "transport",
  852. span: 6,
  853. type: "select",
  854. dicUrl: "/api/blade-system/dict-biz/dictionary?code=mode_transport",
  855. dicData: [],
  856. props: {
  857. label: "dictValue",
  858. value: "dictValue"
  859. },
  860. rules: [
  861. {
  862. required: true,
  863. message: "",
  864. trigger: "blur"
  865. }
  866. ],
  867. change: ((e) => {
  868. // if (e.value == '') return
  869. // console.log(e,731)
  870. // e.column.dicData.forEach(item => {
  871. // if (e.value == item.dictValue) {
  872. // this.form.transport = item.dictValue
  873. // this.form.transportDescription = item.remark;
  874. // }
  875. // });
  876. })
  877. }, {
  878. label: "运输方式描述",
  879. prop: "transportDescription",
  880. span: 12,
  881. },
  882. {
  883. label: "箱型",
  884. prop: "boxPile",
  885. type: "select",
  886. dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
  887. props: {
  888. label: "dictValue",
  889. value: "dictValue"
  890. },
  891. span: 6,
  892. rules: [
  893. {
  894. required: true,
  895. message: "",
  896. trigger: "blur"
  897. }
  898. ]
  899. },
  900. {
  901. label: "收款方式",
  902. prop: "paymentType",
  903. span: 6,
  904. rules: [
  905. {
  906. required: true,
  907. message: "",
  908. trigger: "blur"
  909. }
  910. ]
  911. // type: "select",
  912. // dicUrl: "/api/blade-system/dict-biz/dictionary?code=payment_term",
  913. // props: {
  914. // label: "dictValue",
  915. // value: "dictValue"
  916. // }
  917. },
  918. {
  919. label: "收款说明",
  920. prop: "paymentTypeDescription",
  921. type: "textarea",
  922. minRows: 1,
  923. span: 12,
  924. },
  925. {
  926. label: "箱量",
  927. prop: "boxNumber",
  928. span: 6,
  929. rules: [
  930. {
  931. required: true,
  932. message: "",
  933. trigger: "blur"
  934. }
  935. ]
  936. },
  937. {
  938. label: "采购员",
  939. prop: "buyerId",
  940. span: 5,
  941. overHidden: true,
  942. filterable: true,
  943. remote: true,
  944. type: "select",
  945. dicUrl: "/api/blade-user/page?size=20&current=1&realName={{key}}",
  946. props: {
  947. label: "realName",
  948. value: "id",
  949. res: 'data.records'
  950. },
  951. rules: [
  952. {
  953. required: true,
  954. message: "",
  955. trigger: "blur"
  956. }
  957. ]
  958. }, {
  959. label: "跟单员",
  960. prop: "documenterId",
  961. span: 5,
  962. overHidden: true,
  963. filterable: true,
  964. remote: true,
  965. type: "select",
  966. dicUrl: "/api/blade-user/page?size=20&current=1&realName={{key}}",
  967. props: {
  968. label: "realName",
  969. value: "id",
  970. res: 'data.records'
  971. },
  972. rules: [
  973. {
  974. required: true,
  975. message: "",
  976. trigger: "blur"
  977. }
  978. ]
  979. }, {
  980. label: "船务员",
  981. prop: "shipkeeperId",
  982. span: 5,
  983. overHidden: true,
  984. filterable: true,
  985. remote: true,
  986. type: "select",
  987. dicUrl: "/api/blade-user/page?size=20&current=1&realName={{key}}",
  988. props: {
  989. label: "realName",
  990. value: "id",
  991. res: 'data.records'
  992. },
  993. },
  994. {
  995. label: "三方检验",
  996. prop: "tripartiteInspection",
  997. span: 5,
  998. type: "select",
  999. dicUrl: "/api/blade-system/dict-biz/dictionary?code=tripartite_inspection",
  1000. props: {
  1001. label: "dictValue",
  1002. value: "dictValue"
  1003. },
  1004. rules: [
  1005. {
  1006. required: false,
  1007. message: "",
  1008. trigger: "blur"
  1009. }
  1010. ]
  1011. },
  1012. {
  1013. label: '需产地证',
  1014. prop: 'certificateOriginRequired',
  1015. type: 'select',
  1016. span: 4,
  1017. dicData: [{
  1018. label: "是",
  1019. value: "1"
  1020. }, {
  1021. label: "否",
  1022. value: "0"
  1023. }],
  1024. value: "1"
  1025. },
  1026. {
  1027. label: "船名",
  1028. prop: "shipName",
  1029. span: 6,
  1030. disabled: true
  1031. }, {
  1032. label: "航次",
  1033. prop: "voyage",
  1034. span: 6,
  1035. disabled: true
  1036. },
  1037. {
  1038. label: "提单号",
  1039. prop: "billLadingNo",
  1040. span: 6,
  1041. },
  1042. {
  1043. label: "签单方式",
  1044. prop: "signingMethod",
  1045. span: 6,
  1046. type: "select",
  1047. dicUrl: "/api/blade-system/dict-biz/dictionary?code=signing_method",
  1048. props: {
  1049. label: "dictValue",
  1050. value: "dictValue"
  1051. },
  1052. rules: [{
  1053. required: false,
  1054. message: "",
  1055. trigger: "blur"
  1056. }]
  1057. },
  1058. {
  1059. label: "预计海运费",
  1060. prop: "predictOceanFreight",
  1061. span: 6
  1062. },
  1063. {
  1064. label: "参考海运费",
  1065. prop: "referenceOceanFreight",
  1066. span: 6
  1067. }, {
  1068. label: "实际海运费",
  1069. prop: "oceanFreight",
  1070. span: 6,
  1071. // offset: 0,
  1072. // row: true
  1073. },
  1074. {
  1075. label: "起订量",
  1076. prop: "minOrder",
  1077. span: 6
  1078. },
  1079. {
  1080. label: "账户",
  1081. prop: "corpsBank",
  1082. span: 6,
  1083. disabled: true,
  1084. // row: true
  1085. },
  1086. {
  1087. label: "产品利率",
  1088. prop: "grossProfitRate",
  1089. span: 6,
  1090. append: "%",
  1091. disabled: true
  1092. },
  1093. {
  1094. label: "产品毛利",
  1095. prop: "grossProfit",
  1096. span: 6,
  1097. disabled: true
  1098. },
  1099. {
  1100. label: "单票毛利",
  1101. prop: "singleTicketMargin",
  1102. span: 6,
  1103. disabled: true,
  1104. row: true
  1105. },
  1106. {
  1107. label: "备注",
  1108. prop: "orderRemark",
  1109. type: "textarea",
  1110. minRows: 2,
  1111. span: 8
  1112. },
  1113. {
  1114. label: "采购备注",
  1115. prop: "purchaseRemark",
  1116. type: "textarea",
  1117. minRows: 2,
  1118. span: 8
  1119. },
  1120. {
  1121. label: "船务备注",
  1122. prop: "shippingRemark",
  1123. type: "textarea",
  1124. minRows: 2,
  1125. span: 8
  1126. }
  1127. ]
  1128. },
  1129. goodsEditShow: false,
  1130. goodsEditOption: {
  1131. emptyBtn: false,
  1132. submitBtn: false,
  1133. labelWidth: 100,
  1134. column: [{
  1135. label: "英文名称",
  1136. prop: "ename",
  1137. type: "textarea",
  1138. minRows: 2,
  1139. span: 12,
  1140. },
  1141. {
  1142. label: "产品属性",
  1143. prop: "itemProp",
  1144. type: "textarea",
  1145. minRows: 2,
  1146. span: 12,
  1147. },
  1148. {
  1149. label: "产品描述",
  1150. prop: "itemDescription",
  1151. type: "textarea",
  1152. minRows: 2,
  1153. span: 12,
  1154. },
  1155. {
  1156. label: "配件信息",
  1157. prop: "partsDescribe",
  1158. type: "textarea",
  1159. minRows: 2,
  1160. span: 12,
  1161. },
  1162. {
  1163. label: "商品信息",
  1164. prop: "productRemark",
  1165. type: "textarea",
  1166. minRows: 2,
  1167. span: 24,
  1168. }
  1169. ]
  1170. },
  1171. treeOption: {
  1172. nodeKey: "id",
  1173. lazy: true,
  1174. treeLoad: function (node, resolve) {
  1175. const parentId = node.level === 0 ? 0 : node.data.id;
  1176. getDeptLazyTree(parentId).then(res => {
  1177. resolve(
  1178. res.data.data.map(item => {
  1179. return {
  1180. ...item,
  1181. leaf: !item.hasChildren
  1182. };
  1183. })
  1184. );
  1185. });
  1186. },
  1187. addBtn: false,
  1188. menu: false,
  1189. size: "small",
  1190. props: {
  1191. label: "title",
  1192. value: "value",
  1193. children: "children"
  1194. }
  1195. },
  1196. bankOption: {
  1197. menuBtn: false,
  1198. labelWidth: 100,
  1199. column: [{
  1200. label: "外币银行",
  1201. prop: "banks",
  1202. span: 8
  1203. },
  1204. {
  1205. label: "银行信息",
  1206. prop: "banksAccountName",
  1207. span: 16,
  1208. type: "textarea",
  1209. minRows: 2
  1210. }
  1211. ]
  1212. },
  1213. insuranceOption: {
  1214. menuBtn: false,
  1215. labelWidth: 100,
  1216. column: [{
  1217. label: "保险描述",
  1218. prop: "insuranceRemarks",
  1219. span: 24,
  1220. type: "textarea",
  1221. minRows: 2
  1222. }]
  1223. },
  1224. markOption: {
  1225. menuBtn: false,
  1226. labelWidth: 100,
  1227. column: [{
  1228. label: "唛头描述",
  1229. prop: "marks",
  1230. span: 24,
  1231. type: "textarea",
  1232. minRows: 2
  1233. }]
  1234. },
  1235. page: {
  1236. pageSize: 10,
  1237. currentPage: 1,
  1238. total: 0
  1239. },
  1240. loading: false,
  1241. goodsOption: {},
  1242. data: [],
  1243. goodsList: [],
  1244. selectionList: [],
  1245. treeDeptId: null,
  1246. orderFeesList: [],
  1247. orderFilesList: [],
  1248. orderItemIds: [],
  1249. itemtypeList: [],
  1250. reData: null,
  1251. oldform: {
  1252. orderStatus: "录入",
  1253. cargoType: "普货",
  1254. businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
  1255. currency: "USD"
  1256. },
  1257. olddata: [],
  1258. oldorderFeesList: [],
  1259. oldorderFilesList: [],
  1260. subLoading: false,
  1261. pageLoading: false,
  1262. showBut: true,
  1263. partType: false,
  1264. partList: [],
  1265. goodsoptions: [],
  1266. priceTermsList: [],
  1267. paymentTermList: [],
  1268. currencyList: [],
  1269. allBoxs: [],
  1270. search: {},
  1271. dateClauseList: [],
  1272. checkDialog: false,
  1273. checkData: {},
  1274. transportOption: []
  1275. };
  1276. },
  1277. props: {
  1278. detailData: {
  1279. type: Object
  1280. }
  1281. },
  1282. components: {
  1283. check,
  1284. checkSchedule,
  1285. reportDialog,
  1286. feeInfo,
  1287. uploadFile,
  1288. customerDialog,
  1289. partDialog,
  1290. priceLibrary,
  1291. propertyDialog,
  1292. financialAccount,
  1293. billApplication,
  1294. goodsInfo
  1295. },
  1296. async created() {
  1297. // 获取运输方式数据
  1298. this.getDictionaryfun()
  1299. if (this.detailData.id) {
  1300. this.getDetail(this.detailData.id);
  1301. }
  1302. this.tableOption = await this.getColumnData(
  1303. this.getColumnName(5),
  1304. tableOption
  1305. );
  1306. this.goodsOption = await this.getColumnData(
  1307. this.getColumnName(28),
  1308. goodsOption
  1309. );
  1310. if (this.detailData.status == 1) {
  1311. this.option.disabled = true;
  1312. this.goodsEditOption.disabled = true;
  1313. this.bankOption.disabled = true;
  1314. this.insuranceOption.disabled = true;
  1315. this.markOption.disabled = true;
  1316. }
  1317. if (localStorage.getItem("roleName") == "贸易") {
  1318. this.findObject(this.tableOption.column, "purchaseCost").hide = true;
  1319. this.findObject(
  1320. this.tableOption.column,
  1321. "purchaseCost"
  1322. ).showColumn = false;
  1323. this.findObject(this.option.column, "singleTicketMargin").display = false;
  1324. this.findObject(this.option.column, "oceanFreight").row = true;
  1325. }
  1326. getPorts().then(res => {
  1327. this.findObject(this.option.column, "portOfLoad").dicData = res.data;
  1328. this.findObject(this.option.column, "portOfDestination").dicData =
  1329. res.data;
  1330. });
  1331. this.getWorkDicts("product_properties").then(res => {
  1332. this.findObject(this.tableOption.column, "itemProp").dicData =
  1333. res.data.data;
  1334. });
  1335. this.getWorkDicts("unit").then(res => {
  1336. this.findObject(this.tableOption.column, "unit").dicData = res.data.data;
  1337. });
  1338. this.getWorkDicts("pricing_terms").then(res => {
  1339. this.priceTermsList = res.data.data;
  1340. });
  1341. this.getWorkDicts("payment_term").then(res => {
  1342. this.paymentTermList = res.data.data;
  1343. });
  1344. this.getWorkDicts("date_clause").then(res => {
  1345. this.dateClauseList = res.data.data;
  1346. });
  1347. this.getWorkDicts("cargo_type").then(res => {
  1348. this.findObject(this.option.column, "cargoType").dicData =
  1349. res.data.data;
  1350. });
  1351. getCode().then(res => {
  1352. this.currencyList = res.data.data;
  1353. });
  1354. if (!this.detailData.id) {
  1355. this.getParities();
  1356. }
  1357. // getGoods(1, 10).then(res => {
  1358. // if (res.data.data.total > 0) {
  1359. // this.goodsoptions = res.data.data.records;
  1360. // if (Math.ceil(res.data.data.total / 10) > 1) {
  1361. // for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
  1362. // getGoods(i, 10).then(e => {
  1363. // this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
  1364. // });
  1365. // }
  1366. // }
  1367. // }
  1368. // });
  1369. getAllBoxs().then(res => {
  1370. this.allBoxs = res.data.data;
  1371. });
  1372. },
  1373. filters: {
  1374. isDiscount(val) {
  1375. return isDiscount(val);
  1376. },
  1377. isPercentage(val) {
  1378. return isPercentage(val);
  1379. },
  1380. micrometerFormat2(val) {
  1381. return micrometerFormat2(val);
  1382. },
  1383. IntegerFormat(num) {
  1384. return IntegerFormat(num);
  1385. }
  1386. },
  1387. mounted() {
  1388. },
  1389. methods: {
  1390. retrieve() {
  1391. this.getDetail(this.form.id);
  1392. },
  1393. // 获取运输方式数据
  1394. getDictionaryfun() {
  1395. getDictionary({ code: 'mode_transport' }).then(res => {
  1396. // this.findObject(this.option.column, "transport").dicData = res.data.data
  1397. this.transportOption = res.data.data
  1398. })
  1399. },
  1400. // 运输方式的监听事件
  1401. transportChange() {
  1402. this.transportOption.forEach(item => {
  1403. if (this.form.transport == item.dictValue) {
  1404. this.form.transport = item.dictValue
  1405. this.form.transportDescription = item.remark;
  1406. }
  1407. });
  1408. // console.log(e,1334)
  1409. },
  1410. //审核关闭
  1411. choceScheduleFun() {
  1412. this.checkScheduleDialog = false
  1413. },
  1414. //关闭审核
  1415. choceCheckFun() {
  1416. this.checkDialog = false;
  1417. },
  1418. cellStyle() {
  1419. return "padding:0;height:40px;";
  1420. },
  1421. formGoodstoFees(rows, type) {
  1422. this.$refs.feeInfo.imporData(rows, type)
  1423. },
  1424. khEdit(staus) {
  1425. if (staus == 'kh') {
  1426. if (this.form.corpId) {
  1427. this.$router.push({
  1428. path: '/basicData/customerInformation/index',
  1429. query: {
  1430. corpId: this.form.corpId,
  1431. corpName: this.form.corpName
  1432. }
  1433. })
  1434. } else {
  1435. this.$router.push({
  1436. path: '/basicData/customerInformation/index',
  1437. })
  1438. }
  1439. } else if (staus == 'GS') {
  1440. if (this.form.corpId) {
  1441. this.$router.push({
  1442. path: '/basicData/customerManagement/companyMaterial/index',
  1443. query: {
  1444. corpId: this.form.corpId,
  1445. corpName: this.form.corpName
  1446. }
  1447. })
  1448. } else {
  1449. this.$router.push({
  1450. path: '/basicData/customerManagement/companyMaterial/index'
  1451. })
  1452. }
  1453. } else if (staus == 'portOfLoad') {
  1454. this.$router.push({
  1455. path: '/basicData/portinformation/index'
  1456. })
  1457. } else if (staus == 'cname') {
  1458. this.$router.push({
  1459. path: '/basicData/commodityType/index'
  1460. })
  1461. }
  1462. },
  1463. copyDoc() {
  1464. this.$emit("copyOrder", this.form.id);
  1465. },
  1466. upDateOrderNo() {
  1467. this.orderForm.billId = this.form.id
  1468. synchronization(this.orderForm).then(res => {
  1469. this.$message.success("更改成功");
  1470. this.getDetail(this.form.id);
  1471. this.orderNoVisible = false
  1472. })
  1473. },
  1474. orderClose() {
  1475. this.orderForm = {
  1476. primaryOrdNo: null,
  1477. ordNo: null
  1478. }
  1479. },
  1480. rowCorpData(row) {
  1481. this.data[row.index].corpName = row.code;
  1482. },
  1483. priceTermsChange(row) {
  1484. if (row == "FOB" || row == "EXW") {
  1485. this.form.priceTermsDescription = this.form.portOfLoad;
  1486. } else {
  1487. this.form.priceTermsDescription = this.form.portOfDestination;
  1488. }
  1489. },
  1490. corpAttnChange() {
  1491. this.corpsattns.forEach(e => {
  1492. if (this.form.corpId == e.pid) {
  1493. this.form.corpTel = e.tel;
  1494. }
  1495. });
  1496. },
  1497. paymentTypeChange(row) {
  1498. this.paymentTermList.forEach(e => {
  1499. if (row == e.dictValue) {
  1500. this.form.paymentTypeDescription = e.remark;
  1501. }
  1502. });
  1503. },
  1504. getParities(status) {
  1505. this.oldExchange = this.form.exchangeRate;
  1506. getParities({
  1507. currency: this.form.currency,
  1508. businesDate: this.form.businesDate
  1509. })
  1510. .then(res => {
  1511. const data = res.data.data;
  1512. this.form.exchangeRate = data.receivableParities;
  1513. this.oldform.exchangeRate = data.receivableParities;
  1514. })
  1515. .finally(() => {
  1516. if (this.data.length > 0 && status == "currency") {
  1517. this.data.forEach(e => {
  1518. e.freight = transformCal(
  1519. e.freight,
  1520. this.oldExchange,
  1521. this.form.exchangeRate
  1522. );
  1523. e.insurance = transformCal(
  1524. e.insurance,
  1525. this.oldExchange,
  1526. this.form.exchangeRate
  1527. );
  1528. e.shareAmount = transformCal(e.shareAmount, this.oldExchange, this.form.exchangeRate);
  1529. e.internationalAmount = transformCal(e.internationalAmount, this.oldExchange, this.form.exchangeRate);
  1530. e.outFactoryPrice = sellingCal(e.productPrice, this.form.exchangeRate);
  1531. e.price = addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount);
  1532. e.amount = amountCal(
  1533. e.price,
  1534. e.orderQuantity,
  1535. e.freight,
  1536. e.insurance,
  1537. e.discount
  1538. );
  1539. e.itemMargin = grossProfitCal(
  1540. e.purchaseAmount,
  1541. e.partsPrice,
  1542. e.price,
  1543. this.form.exchangeRate
  1544. );
  1545. e.exchangeRate = this.form.exchangeRate;
  1546. });
  1547. }
  1548. });
  1549. },
  1550. businesDateChange() {
  1551. if (this.form.currency && this.form.businesDate) {
  1552. this.getParities();
  1553. }
  1554. },
  1555. getCorpData(row) {
  1556. this.form.coefficient = row.coefficient;
  1557. this.form.corpsName = row.cname;
  1558. this.form.belongToCorpId = row.belongtocompany
  1559. this.getCorpsBank({ id: row.belongtocompany })
  1560. this.form.clientMessage = (row.cname ? row.cname : '') + '\r\n' + (row.addr ? row.addr : '')
  1561. if (this.data.length > 0) {
  1562. this.data.forEach(e => {
  1563. // e.productPrice = productCal(
  1564. // e.purchaseAmount,
  1565. // e.partsPrice,
  1566. // this.form.coefficient
  1567. // );
  1568. // e.price = sellingCal(e.productPrice, this.form.exchangeRate);
  1569. // e.amount = amountCal(
  1570. // e.price,
  1571. // e.orderQuantity,
  1572. // e.freight,
  1573. // e.insurance,
  1574. // e.discount
  1575. // );
  1576. // e.itemMargin = grossProfitCal(
  1577. // e.purchaseAmount,
  1578. // e.partsPrice,
  1579. // e.price,
  1580. // this.form.exchangeRate
  1581. // );
  1582. e.price = addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount)
  1583. e.amount = amountCal(
  1584. addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount),
  1585. e.orderQuantity,
  1586. e.freight,
  1587. e.insurance,
  1588. e.discount
  1589. );
  1590. e.itemMargin = grossProfitCal(
  1591. e.purchaseAmount,
  1592. e.partsPrice,
  1593. e.outFactoryPrice,
  1594. this.form.exchangeRate
  1595. );
  1596. e.goodsGrossProfit = goodsGrossProfitCal(
  1597. e.purchaseAmount,
  1598. e.partsPrice,
  1599. e.outFactoryPrice,
  1600. this.form.exchangeRate
  1601. );
  1602. });
  1603. }
  1604. },
  1605. // 公司下拉
  1606. getCorpsBank(row) {
  1607. // this.form.corpsBankId = row.corpsBankId;
  1608. // this.form.corpsBank = row.corpsBankName;
  1609. // 获取银行信息数据
  1610. customeDetail(row.id).then(res => {
  1611. this.banksData = res.data.data.corpsBankList.map(item => {
  1612. item.accountBank = item.accountBank + ' - ' + item.accountNo
  1613. return item
  1614. })
  1615. console.log(this.banksData)
  1616. if (this.banksData.length > 0) {
  1617. this.banksData.some(e => {
  1618. if (this.form.currency == e.fcyno) {
  1619. this.$set(this.form, 'banks', e.id)
  1620. this.$set(this.form, 'accountBank', e.accountBank.split(' - ')[0])
  1621. this.$set(this.form, 'banksAccountName', e.accountName)
  1622. return true
  1623. }
  1624. })
  1625. } else {
  1626. this.$set(this.form, 'banks', '')
  1627. this.$set(this.form, 'accountBank', '')
  1628. this.$set(this.form, 'banksAccountName', '')
  1629. }
  1630. })
  1631. },
  1632. // 银行信息下拉
  1633. banksChange(value) {
  1634. for (let item of this.banksData) {
  1635. if (value == item.accountNo) {
  1636. this.$set(this.form, 'banks', item.accountNo)
  1637. this.$set(this.form, 'accountBank', item.accountBank.split(' - ')[0])
  1638. this.$set(this.form, 'banksAccountName', item.accountName)
  1639. }
  1640. }
  1641. },
  1642. // cnameData() {
  1643. // this.goodsoptions = []
  1644. // getGoods(1, 10).then(res => {
  1645. // if (res.data.data.total > 0) {
  1646. // this.goodsoptions = res.data.data.records;
  1647. // if (Math.ceil(res.data.data.total / 10) > 1) {
  1648. // for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
  1649. // getGoods(i, 10).then(e => {
  1650. // this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
  1651. // });
  1652. // }
  1653. // }
  1654. // }
  1655. // });
  1656. // },
  1657. // cnameChange(row) {
  1658. // this.goodsoptions.forEach(e => {
  1659. // if (e.id == row.itemId) {
  1660. // row.cname = e.cname;
  1661. // row.code = e.code;
  1662. // row.corpId = e.corpId;
  1663. // row.corpName = e.corpCode;
  1664. // row.priceCategory = e.goodsTypeName;
  1665. // row.itemUrl = e.url;
  1666. // row.itemDescription = e.cnameDescription;
  1667. // row.unit = e.unit;
  1668. // row.purchaseAmount = 0;
  1669. // row.productPrice = productCal(
  1670. // 0,
  1671. // row.partsPrice,
  1672. // this.form.coefficient
  1673. // );
  1674. // row.price = sellingCal(
  1675. // productCal(0, row.partsPrice, this.form.coefficient),
  1676. // this.form.exchangeRate
  1677. // );
  1678. // row.amount = amountCal(
  1679. // sellingCal(
  1680. // productCal(0, row.partsPrice, this.form.coefficient),
  1681. // this.form.exchangeRate
  1682. // ),
  1683. // row.orderQuantity,
  1684. // row.freight,
  1685. // row.insurance,
  1686. // row.discount
  1687. // );
  1688. // row.itemMargin = grossProfitCal(
  1689. // 0,
  1690. // row.partsPrice,
  1691. // sellingCal(
  1692. // productCal(0, row.partsPrice, this.form.coefficient),
  1693. // this.form.exchangeRate
  1694. // ),
  1695. // this.form.exchangeRate
  1696. // );
  1697. // }
  1698. // });
  1699. // getPricedetail({
  1700. // itemId: row.itemId,
  1701. // corpId: row.corpId
  1702. // }).then(res => {
  1703. // if (res.data.data) {
  1704. // this.goodsoptions.forEach(e => {
  1705. // if (e.id == row.itemId) {
  1706. // row.purchaseAmount = res.data.data.purchaseAmount;
  1707. // row.productPrice = productCal(
  1708. // res.data.data.purchaseAmount,
  1709. // row.partsPrice,
  1710. // this.form.coefficient
  1711. // );
  1712. // row.price = sellingCal(
  1713. // productCal(
  1714. // res.data.data.purchaseAmount,
  1715. // row.partsPrice,
  1716. // this.form.coefficient
  1717. // ),
  1718. // this.form.exchangeRate
  1719. // );
  1720. // row.amount = amountCal(
  1721. // sellingCal(
  1722. // productCal(
  1723. // res.data.data.purchaseAmount,
  1724. // row.partsPrice,
  1725. // this.form.coefficient
  1726. // ),
  1727. // this.form.exchangeRate
  1728. // ),
  1729. // row.orderQuantity,
  1730. // row.freight,
  1731. // row.insurance,
  1732. // row.discount
  1733. // );
  1734. // row.itemMargin = grossProfitCal(
  1735. // res.data.data.purchaseAmount,
  1736. // row.partsPrice,
  1737. // sellingCal(
  1738. // productCal(
  1739. // res.data.data.purchaseAmount,
  1740. // row.partsPrice,
  1741. // this.form.coefficient
  1742. // ),
  1743. // this.form.exchangeRate
  1744. // ),
  1745. // this.form.exchangeRate
  1746. // );
  1747. // }
  1748. // });
  1749. // }
  1750. // });
  1751. // },
  1752. addLibrary() {
  1753. if (!this.form.corpId) {
  1754. return this.$message.error("请选择客户名称");
  1755. }
  1756. if (!this.form.currency) {
  1757. return this.$message.error("请选择币别");
  1758. }
  1759. this.$refs.library.init(false);
  1760. },
  1761. handleRowDBLClick(row) {
  1762. if (row.$cellEdit) {
  1763. return this.$message.error("请保存此行内容再操作");
  1764. }
  1765. this.goodsEditShow = true
  1766. this.goodsEditForm = row
  1767. },
  1768. handleSave() {
  1769. this.$set(this.data, this.goodsEditForm.$index, this.goodsEditForm)
  1770. this.goodsEditShow = false
  1771. this.goodsEditForm = this.$options.data().goodsEditForm
  1772. this.editCustomer()
  1773. },
  1774. handleClose() {
  1775. this.goodsEditShow = false
  1776. this.goodsEditForm = this.$options.data().goodsEditForm
  1777. },
  1778. partrePick(row, index) {
  1779. this.partList = row.partsList;
  1780. this.$refs.part.init(index);
  1781. },
  1782. importPart(rows, sum, index) {
  1783. this.data[index].partsList = rows;
  1784. this.data[index].partsPrice = sum;
  1785. // 销售价=(配件采购价格+产品价格)/汇率 *(1+客户FOB系数/100)
  1786. this.data[index].productPrice = productCal(
  1787. this.data[index].purchaseAmount,
  1788. this.data[index].partsPrice,
  1789. this.form.coefficient
  1790. );
  1791. this.data[index].price = sellingCal(
  1792. this.data[index].productPrice,
  1793. this.form.exchangeRate
  1794. );
  1795. this.data[index].amount = amountCal(
  1796. this.data[index].price,
  1797. this.data[index].orderQuantity,
  1798. this.data[index].freight,
  1799. this.data[index].insurance,
  1800. this.data[index].discount
  1801. );
  1802. this.data[index].itemMargin = grossProfitCal(
  1803. this.data[index].purchaseAmount,
  1804. this.data[index].partsPrice,
  1805. this.data[index].price,
  1806. this.form.exchangeRate
  1807. );
  1808. const names = [];
  1809. const namePrices = [];
  1810. let costsSum = 0;
  1811. rows.map(e => {
  1812. if (e.ename) {
  1813. names.push(e.ename);
  1814. }
  1815. namePrices.push((e.goodName ? e.goodName : "") + ":" + e.amout);
  1816. costsSum = costsCal(costsSum, e.partsCost, e.goodNumber);
  1817. });
  1818. this.data[index].partsDescribe = names.join(",");
  1819. this.data[index].partsPriceDescribe = namePrices.join(";");
  1820. this.data[index].partsCost = costsSum;
  1821. this.data[index].productRemark = this.getproductRemark(this.data[index])
  1822. this.priceChange(this.data[index]);
  1823. },
  1824. importProperty(row, index) {
  1825. const arr = [];
  1826. for (let key in row) {
  1827. if (row[key]) {
  1828. arr.push(row[key]);
  1829. }
  1830. }
  1831. this.data[index].itemProp = arr.join(",");
  1832. this.data[index].remarksOne = row.remarksOne;
  1833. this.data[index].customTwo = row.customTwo;
  1834. this.data[index].customThree = row.customThree;
  1835. this.data[index].customFour = row.customFour;
  1836. this.data[index].customFive = row.customFive;
  1837. this.data[index].customSix = row.customSix;
  1838. this.data[index].customSeven = row.customSeven;
  1839. this.data[index].customEight = row.customEight;
  1840. this.data[index].customNine = row.customNine;
  1841. this.data[index].customTen = row.customTen;
  1842. this.data[index].productRemark = this.getproductRemark(this.data[index])
  1843. },
  1844. partClosed() {
  1845. this.partList = [];
  1846. },
  1847. saveSell() {
  1848. if (!this.form.id) {
  1849. return this.$message.error("此单据没有提交记录,请先提交");
  1850. }
  1851. if (!this.form.buyerId) {
  1852. return this.$message.error("采购员必填");
  1853. }
  1854. this.$confirm("是否生成采购单?", {
  1855. confirmButtonText: "确定",
  1856. cancelButtonText: "取消",
  1857. type: "warning"
  1858. }).then(() => {
  1859. generatePurchaseNews(this.form.id).then(res => {
  1860. if (res.data.code == 200) {
  1861. this.$message.success("生成成功");
  1862. }
  1863. });
  1864. });
  1865. },
  1866. rePick(row, index) {
  1867. this.reData = {
  1868. ...row,
  1869. index: index
  1870. };
  1871. this.newDetails();
  1872. },
  1873. rowCell(row, index) {
  1874. if (this.goodsEditShow) {
  1875. return this.$message.error('请关闭表格上面的编辑')
  1876. }
  1877. if (row.$cellEdit == true) {
  1878. this.$set(row, "$cellEdit", false);
  1879. } else {
  1880. this.$set(row, "$cellEdit", true);
  1881. }
  1882. },
  1883. itemTypeFocus(row) {
  1884. this.itemtypeList = [];
  1885. getSpecification({
  1886. goodId: row.itemId
  1887. }).then(res => {
  1888. const data = res.data.data;
  1889. this.itemtypeList = data.map(item => ({
  1890. value: item
  1891. }));
  1892. });
  1893. },
  1894. purchaseAmountChange(row) {
  1895. row.productPrice = productCal(
  1896. row.purchaseAmount,
  1897. row.partsPrice,
  1898. this.form.coefficient
  1899. );
  1900. row.price = sellingCal(row.productPrice, this.form.exchangeRate);
  1901. row.amount = amountCal(
  1902. row.price,
  1903. row.orderQuantity,
  1904. row.freight,
  1905. row.insurance,
  1906. row.discount
  1907. );
  1908. row.itemMargin = grossProfitCal(
  1909. row.purchaseAmount,
  1910. row.partsPrice,
  1911. row.price,
  1912. this.form.exchangeRate
  1913. );
  1914. },
  1915. priceChange(row) {
  1916. row.amount = amountCal(
  1917. row.price,
  1918. row.orderQuantity,
  1919. row.freight,
  1920. row.insurance,
  1921. row.discount
  1922. );
  1923. row.itemMargin = grossProfitCal(
  1924. row.purchaseAmount,
  1925. row.partsPrice,
  1926. row.price,
  1927. this.form.exchangeRate
  1928. );
  1929. },
  1930. quantityChange(row) {
  1931. if (Number(row.orderQuantity) < Number(row.actualQuantity)) {
  1932. row.orderQuantity = row.actualQuantity;
  1933. this.$message.error("修改的数量不能低于发货数量");
  1934. }
  1935. if (!row.orderQuantity) {
  1936. row.orderQuantity = 0;
  1937. } else {
  1938. row.amount = amountCal(
  1939. row.price,
  1940. row.orderQuantity,
  1941. row.freight,
  1942. row.insurance,
  1943. row.discount
  1944. );
  1945. }
  1946. },
  1947. currencyChange() {
  1948. if (this.form.currency && this.form.businesDate) {
  1949. this.getParities("currency");
  1950. }
  1951. if (this.banksData.length > 0) {
  1952. this.banksData.some(e => {
  1953. if (this.form.currency == e.fcyno) {
  1954. this.$set(this.form, 'banks', e.accountNo)
  1955. this.$set(this.form, 'accountBank', e.accountBank.split(' - ')[0])
  1956. this.$set(this.form, 'banksAccountName', e.accountName)
  1957. return true
  1958. }
  1959. })
  1960. } else {
  1961. this.$set(this.form, 'banks', '')
  1962. this.$set(this.form, 'accountBank', '')
  1963. this.$set(this.form, 'banksAccountName', '')
  1964. }
  1965. },
  1966. dateClauseChange(row) {
  1967. this.dateClauseList.forEach(e => {
  1968. if (row == e.dictValue) {
  1969. this.form.dateDesc = e.remark;
  1970. }
  1971. });
  1972. },
  1973. exchangeRateChange(row) {
  1974. if (this.data.length > 0) {
  1975. this.data.forEach(e => {
  1976. e.freight = transformCal(e.freight, this.oldExchange, row);
  1977. e.insurance = transformCal(e.insurance, this.oldExchange, row);
  1978. e.shareAmount = transformCal(e.shareAmount, this.oldExchange, row);
  1979. e.internationalAmount = transformCal(e.internationalAmount, this.oldExchange, row);
  1980. e.outFactoryPrice = sellingCal(e.productPrice, row);
  1981. e.price = addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount);
  1982. e.amount = amountCal(
  1983. e.price,
  1984. e.orderQuantity,
  1985. e.freight,
  1986. e.insurance,
  1987. e.discount
  1988. );
  1989. e.itemMargin = grossProfitCal(
  1990. e.purchaseAmount,
  1991. e.partsPrice,
  1992. e.price,
  1993. this.form.exchangeRate
  1994. );
  1995. e.exchangeRate = this.form.exchangeRate;
  1996. });
  1997. }
  1998. this.oldExchange = this.deepClone(row);
  1999. },
  2000. discountChange(row) {
  2001. if (row.discount >= 10) {
  2002. row.discount = null;
  2003. this.$message.error("请正确输入折扣");
  2004. }
  2005. this.priceChange(row);
  2006. },
  2007. taxRateChange(row) {
  2008. if (Number(row.taxRate) >= 100) {
  2009. row.taxRate = 0;
  2010. this.$message.error("税率不能超过100%");
  2011. }
  2012. },
  2013. rowSave(row) {
  2014. this.$set(row, "$cellEdit", false);
  2015. },
  2016. rowDel(row) {
  2017. this.$confirm("确定删除数据?", {
  2018. confirmButtonText: "确定",
  2019. cancelButtonText: "取消",
  2020. type: "warning"
  2021. }).then(() => {
  2022. if (row.id) {
  2023. delItem(row.id).then(res => {
  2024. this.$message({
  2025. type: "success",
  2026. message: "删除成功!"
  2027. });
  2028. this.data.splice(row.$index, 1);
  2029. });
  2030. } else {
  2031. this.$message({
  2032. type: "success",
  2033. message: "删除成功!"
  2034. });
  2035. this.data.splice(row.$index, 1);
  2036. }
  2037. });
  2038. },
  2039. importGoods() {
  2040. if (this.reData) {
  2041. if (this.selectionList.length != 1) {
  2042. return this.$message.error("重新选择的时候只能选择一条数据");
  2043. } else {
  2044. this.selectionList.forEach(e => {
  2045. this.data.forEach((item, index) => {
  2046. if (index == this.reData.index) {
  2047. item.itemId = e.id;
  2048. item.code = e.code;
  2049. item.cname = e.cname;
  2050. item.ename = e.ename;
  2051. item.corpId = e.corpId;
  2052. item.corpName = e.corpCode;
  2053. item.priceCategory = e.goodsTypeName;
  2054. item.itemUrl = e.url;
  2055. item.itemProp = this.reData.itemProp;
  2056. item.remarksOne = this.reData.remarksOne;
  2057. item.customTwo = this.reData.customTwo;
  2058. item.customThree = this.reData.customThree;
  2059. item.customFour = this.reData.customFour;
  2060. item.customFive = this.reData.customFive;
  2061. item.customSix = this.reData.customSix;
  2062. item.customSeven = this.reData.customSeven;
  2063. item.customEight = this.reData.customEight;
  2064. item.customNine = this.reData.customNine;
  2065. item.customTen = this.reData.customTen;
  2066. item.item.partsList = this.reData.partsList;
  2067. item.partsPrice = this.reData.ppartsPrice;
  2068. item.itemDescription = e.cnameDescription;
  2069. item.itemType = this.reData.itemType;
  2070. item.tradeTerms = this.reData.tradeTerms;
  2071. item.partsDescribe = this.reData.partsDescribe;
  2072. item.attributeList = this.reData.attributeList;
  2073. item.purchaseCost = 0;
  2074. item.purchaseAmount = 0;
  2075. item.productPrice = productCal(
  2076. 0,
  2077. this.reData.partsPrice,
  2078. this.form.coefficient
  2079. );
  2080. item.price = sellingCal(
  2081. productCal(0, this.reData.partsPrice, this.form.coefficient),
  2082. this.form.exchangeRate
  2083. );
  2084. item.orderQuantity = this.reData.orderQuantity;
  2085. item.insurance = this.reData.insurance;
  2086. item.freight = this.reData.freight;
  2087. item.discount = this.reData.discount;
  2088. item.amount = amountCal(
  2089. sellingCal(
  2090. productCal(
  2091. 0,
  2092. this.reData.partsPrice,
  2093. this.form.coefficient
  2094. ),
  2095. this.form.exchangeRate
  2096. ),
  2097. this.reData.orderQuantity,
  2098. this.reData.freight,
  2099. this.reData.insurance,
  2100. this.reData.discount
  2101. );
  2102. item.taxRate = this.reData.taxRate;
  2103. item.itemMargin = grossProfitCal(
  2104. 0,
  2105. this.reData.partsPrice,
  2106. sellingCal(
  2107. productCal(
  2108. 0,
  2109. this.reData.partsPrice,
  2110. this.form.coefficient
  2111. ),
  2112. this.form.exchangeRate
  2113. ),
  2114. this.form.exchangeRate
  2115. );
  2116. item.unit = e.unit;
  2117. item.remarks = this.reData.remarks;
  2118. item.exchangeRate = this.reData.exchangeRate;
  2119. item.productRemark = e.ename + "\n" + (this.reData.itemProp ? this.reData.itemProp : '') +
  2120. " " + (this.reData.itemDescription ? this.reData.itemDescription : '') + " " + (this.reData
  2121. .partsDescribe ? (", " + this.reData.partsDescribe) : ''),
  2122. item.$cellEdit = true;
  2123. }
  2124. });
  2125. });
  2126. }
  2127. } else {
  2128. this.selectionList.forEach(e => {
  2129. this.data.push({
  2130. itemId: e.id,
  2131. code: e.code,
  2132. cname: e.cname,
  2133. ename: e.ename,
  2134. corpId: e.corpId,
  2135. corpName: e.corpCode,
  2136. priceCategory: e.goodsTypeName,
  2137. itemUrl: e.url,
  2138. itemProp: null,
  2139. remarksOne: null,
  2140. customTwo: null,
  2141. customThree: null,
  2142. customFour: null,
  2143. customFive: null,
  2144. customSix: null,
  2145. customSeven: null,
  2146. customEight: null,
  2147. customNine: null,
  2148. customTen: null,
  2149. itemDescription: e.cnameDescription,
  2150. partsList: [],
  2151. partsPrice: 0,
  2152. itemType: null,
  2153. tradeTerms: null,
  2154. price: 0,
  2155. orderQuantity: 0,
  2156. insurance: 0,
  2157. freight: 0,
  2158. discount: null,
  2159. amount: 0,
  2160. taxRate: 0,
  2161. unit: e.unit,
  2162. itemMargin: 0,
  2163. remarks: null,
  2164. purchaseCost: 0,
  2165. purchaseAmount: 0,
  2166. exchangeRate: this.form.exchangeRate,
  2167. partsDescribe: null,
  2168. productRemark: e.ename,
  2169. attributeList: this.getAttribute(e.goodsSpecificationList),
  2170. $cellEdit: true
  2171. });
  2172. this.importPart(this.transition(e.priceBankList), this.partsSum(this.transition(e.priceBankList)), Number(this.data.length - 1))
  2173. });
  2174. }
  2175. this.dialogVisible = false;
  2176. },
  2177. transition(rows) {
  2178. let data = []
  2179. rows.forEach(e => {
  2180. data.push({
  2181. goodId: e.itemId,
  2182. goodTypeId: e.goodTypeId,
  2183. goodTypeName: e.goodsTypeName,
  2184. ename: e.ename,
  2185. corpId: e.corpId,
  2186. corpName: e.corpName,
  2187. goodName: e.cname,
  2188. price: e.purchaseAmount,
  2189. goodNumber: 1,
  2190. amout: e.purchaseAmount,
  2191. partsCost: costCal(e.price, e.taxRate),
  2192. $cellEdit: true
  2193. })
  2194. })
  2195. return data
  2196. },
  2197. partsSum(rows) {
  2198. let qtySum = 0;
  2199. let amountSum = 0;
  2200. let amoutSum = 0;
  2201. rows.forEach(e => {
  2202. qtySum = _.add(qtySum, Number(e.goodNumber));
  2203. amountSum = _.add(amountSum, Number(e.amout));
  2204. amoutSum = Number(amountSum).toFixed(2);
  2205. });
  2206. return amoutSum
  2207. },
  2208. getAttribute(rows) {
  2209. let data = []
  2210. rows.forEach(e => {
  2211. data.push({
  2212. attributeData: JSON.parse(e.attributeData),
  2213. attributeName: e.attributeName,
  2214. attributeNo: e.attributeNo,
  2215. })
  2216. })
  2217. return JSON.stringify(data);
  2218. },
  2219. closeGoods() {
  2220. this.selectionList = [];
  2221. this.treeDeptId = "";
  2222. this.reData = null;
  2223. },
  2224. goodsSelectionChange(list) {
  2225. this.orderItemIds = [];
  2226. list.map(e => {
  2227. this.orderItemIds.push(e.id);
  2228. });
  2229. },
  2230. selectionChange(list) {
  2231. this.selectionList = list;
  2232. },
  2233. rowClick(row) {
  2234. this.$refs.goodsCrud.toggleSelection([this.goodsList[row.$index]]);
  2235. },
  2236. nodeClick(data) {
  2237. this.treeDeptId = data.id;
  2238. this.page.currentPage = 1;
  2239. this.onLoad(this.page);
  2240. },
  2241. searchChange(params, done) {
  2242. this.search = this.deepClone(params);
  2243. this.onLoad(this.page, params);
  2244. done();
  2245. },
  2246. //费用查询
  2247. onLoad(page, params = {}) {
  2248. let obj = this.deepClone(Object.assign(params, this.search));
  2249. this.loading = true;
  2250. getGoods(page.currentPage, page.pageSize, this.treeDeptId, obj).then(
  2251. res => {
  2252. const data = res.data.data;
  2253. this.page.total = data.total;
  2254. this.goodsList = data.records;
  2255. this.loading = false;
  2256. if (this.page.total) {
  2257. this.goodsOption.height = window.innerHeight - 350;
  2258. }
  2259. }
  2260. );
  2261. },
  2262. importLibray(rows) {
  2263. rows.forEach(e => {
  2264. this.data.push({
  2265. itemId: e.itemId,
  2266. code: e.code,
  2267. cname: e.cname,
  2268. ename: e.ename,
  2269. priceCategory: e.goodsTypeName,
  2270. purchaseCost: costCal(e.price, e.taxRate),
  2271. purchaseAmount: e.purchaseAmount,
  2272. itemProp: null,
  2273. remarksOne: null,
  2274. customTwo: null,
  2275. customThree: null,
  2276. customFour: null,
  2277. customFive: null,
  2278. customSix: null,
  2279. customSeven: null,
  2280. customEight: null,
  2281. customNine: null,
  2282. customTen: null,
  2283. corpId: e.corpId,
  2284. corpName: e.corpCode,
  2285. itemDescription: e.cnameDescription,
  2286. partsList: [],
  2287. partsPrice: 0,
  2288. itemType: e.specs,
  2289. tradeTerms: null,
  2290. productPrice: productCal(e.purchaseAmount, 0, this.form.coefficient),
  2291. price: sellingCal(
  2292. productCal(e.purchaseAmount, 0, this.form.coefficient),
  2293. this.form.exchangeRate
  2294. ),
  2295. orderQuantity: 1,
  2296. insurance: 0,
  2297. freight: 0,
  2298. discount: null,
  2299. amount: sellingCal(
  2300. productCal(e.purchaseAmount, 0, this.form.coefficient),
  2301. this.form.exchangeRate
  2302. ),
  2303. taxRate: 0,
  2304. unit: e.unit,
  2305. itemMargin: grossProfitCal(
  2306. e.purchaseAmount,
  2307. 0,
  2308. sellingCal(
  2309. productCal(e.purchaseAmount, 0, this.form.coefficient),
  2310. this.form.exchangeRate
  2311. ),
  2312. this.form.exchangeRate
  2313. ),
  2314. partsDescribe: null,
  2315. remarks: null,
  2316. exchangeRate: this.form.exchangeRate,
  2317. productRemark: e.ename,
  2318. $cellEdit: true
  2319. });
  2320. });
  2321. },
  2322. addRow() {
  2323. this.data.push({
  2324. $cellEdit: true
  2325. });
  2326. },
  2327. //商品明细导入
  2328. newDetails() {
  2329. if (!this.form.corpId) {
  2330. return this.$message.error("请选择客户名称");
  2331. }
  2332. this.dialogVisible = !this.dialogVisible;
  2333. },
  2334. oceanUSD() {
  2335. this.$refs.feeInfo.oceanUSD()
  2336. },
  2337. getDetail(id) {
  2338. this.showBut = false;
  2339. this.pageLoading = true;
  2340. if (this.detailData.status == "copy") {
  2341. // 获取商品数据,保存查询
  2342. getPricebankAll({ billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(res => {
  2343. this.goodsoptions = res.data.data
  2344. })
  2345. getCopy(id).then(res => {
  2346. // 获取银行信息数据
  2347. customeDetail(res.data.data.belongToCorpId).then(res => {
  2348. this.banksData = res.data.data.corpsBankList.map(item => {
  2349. item.accountBank = item.accountBank + ' - ' + item.accountNo
  2350. return item
  2351. })
  2352. })
  2353. delete res.data.data.id;
  2354. delete res.data.data.sysNo;
  2355. delete res.data.data.orderNo;
  2356. delete res.data.data.orgOrderNo;
  2357. delete res.data.data.createTime;
  2358. delete res.data.data.createUser;
  2359. delete res.data.data.createUserName;
  2360. delete res.data.data.updateTime;
  2361. delete res.data.data.updateUser;
  2362. delete res.data.data.updateUserName;
  2363. delete res.data.data.morderNo;
  2364. delete res.data.data.status;
  2365. delete res.data.data.ifEnquiry;
  2366. delete res.data.data.ifShipping;
  2367. delete res.data.data.fudaPurchaseStatus;
  2368. delete res.data.data.documentaryStatus;
  2369. res.data.data.orderStatus = "录入";
  2370. res.data.data.cargoType = "普货",
  2371. res.data.data.orderItemsList.forEach(e => {
  2372. delete e.id;
  2373. delete e.pid;
  2374. delete e.createTime;
  2375. delete e.createUser;
  2376. delete e.updateTime;
  2377. delete e.updateUser;
  2378. delete e.orgOrderNo;
  2379. delete e.srcId;
  2380. delete e.status;
  2381. delete e.isDeleted;
  2382. // getGoods(1, 10, null, { id: e.itemId }).then(res => {
  2383. // res.data.data.records.forEach(item => {
  2384. // if (e.itemId == item.id) {
  2385. // e.purchaseCost = costCal(item.price, item.taxRate);
  2386. // e.purchaseAmount = item.purchaseAmount;
  2387. // e.productPrice = productCal(
  2388. // item.purchaseAmount,
  2389. // e.partsPrice,
  2390. // res.data.data.coefficient
  2391. // );
  2392. // e.outFactoryPrice = sellingCal(productCal(
  2393. // item.purchaseAmount,
  2394. // e.partsPrice,
  2395. // res.data.data.coefficient
  2396. // ), res.data.data.exchangeRate);
  2397. // e.totalValue = multiply(sellingCal(productCal(
  2398. // item.purchaseAmount,
  2399. // e.partsPrice,
  2400. // res.data.data.coefficient
  2401. // ), res.data.data.exchangeRate), e.orderQuantity)
  2402. // e.price = addPrice(sellingCal(productCal(
  2403. // item.purchaseAmount,
  2404. // e.partsPrice,
  2405. // res.data.data.coefficient
  2406. // ), res.data.data.exchangeRate), e.shareAmount, e.internationalAmount)
  2407. // e.amount = amountCal(
  2408. // addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount),
  2409. // e.orderQuantity,
  2410. // e.freight,
  2411. // e.insurance,
  2412. // e.discount
  2413. // );
  2414. // e.itemMargin = grossProfitCal(
  2415. // e.purchaseAmount,
  2416. // e.partsPrice,
  2417. // e.outFactoryPrice,
  2418. // res.data.data.exchangeRate
  2419. // );
  2420. // // 处理单品毛利率是 -00.00 的问题
  2421. // if (Number(e.itemMargin) === 0) {
  2422. // e.itemMargin = Number(e.itemMargin) + ''
  2423. // }
  2424. // // 出厂价格为零,单品毛利润为零
  2425. // if (e.outFactoryPrice == 0) {
  2426. // e.itemMargin = 0
  2427. // }
  2428. // }
  2429. // })
  2430. // })
  2431. });
  2432. res.data.data.orderFeesList.forEach(e => {
  2433. delete e.id;
  2434. delete e.pid;
  2435. delete e.createTime;
  2436. delete e.createUser;
  2437. delete e.updateTime;
  2438. delete e.updateUser;
  2439. delete e.status;
  2440. delete e.isDeleted;
  2441. });
  2442. res.data.data.orderFilesList.forEach(e => {
  2443. delete e.id;
  2444. delete e.pid;
  2445. delete e.createTime;
  2446. delete e.createUser;
  2447. delete e.updateTime;
  2448. delete e.updateUser;
  2449. delete e.status;
  2450. delete e.isDeleted;
  2451. });
  2452. this.form = res.data.data;
  2453. this.data = res.data.data.orderItemsList;
  2454. this.orderFeesList = res.data.data.orderFeesList;
  2455. this.orderFilesList = res.data.data.orderFilesList;
  2456. this.oldform = res.data.data;
  2457. this.olddata = this.deepClone(res.data.data.orderItemsList);
  2458. this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
  2459. this.oldorderFilesList = this.deepClone(res.data.data.orderFilesList);
  2460. this.oldExchange = this.deepClone(this.form.exchangeRate);
  2461. }).finally(() => {
  2462. this.showBut = true;
  2463. this.pageLoading = false;
  2464. });
  2465. } else {
  2466. detail(id).then(res => {
  2467. this.form = res.data.data;
  2468. // 获取银行信息数据
  2469. customeDetail(this.form.belongToCorpId).then(res => {
  2470. this.banksData = res.data.data.corpsBankList.map(item => {
  2471. item.accountBank = item.accountBank + ' - ' + item.accountNo
  2472. return item
  2473. })
  2474. })
  2475. this.data = res.data.data.orderItemsList;
  2476. this.orderFeesList = res.data.data.orderFeesList;
  2477. this.orderFilesList = res.data.data.orderFilesList;
  2478. this.oldform = res.data.data;
  2479. this.olddata = this.deepClone(res.data.data.orderItemsList);
  2480. this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
  2481. this.oldorderFilesList = this.deepClone(res.data.data.orderFilesList);
  2482. this.oldExchange = this.deepClone(this.form.exchangeRate);
  2483. }).finally(() => {
  2484. this.showBut = true;
  2485. this.pageLoading = false;
  2486. });
  2487. }
  2488. },
  2489. getproductRemark(row) {
  2490. const ename = row.ename ? row.ename : "";
  2491. const itemDescription = row.itemDescription ?
  2492. row.itemDescription :
  2493. "";
  2494. const itemProp = row.itemProp ? row.itemProp : "";
  2495. const partsDescribe = row.partsDescribe ? (', ' + row.partsDescribe) : "";
  2496. const productRemark =
  2497. ename +
  2498. "\n" +
  2499. itemProp +
  2500. " " +
  2501. itemDescription +
  2502. " " +
  2503. partsDescribe;
  2504. return productRemark
  2505. },
  2506. formEditChange(row) {
  2507. row.productRemark = this.getproductRemark(row)
  2508. },
  2509. editChange(row) {
  2510. row.productRemark = this.getproductRemark(row)
  2511. },
  2512. //修改提交触发
  2513. editCustomer(status) {
  2514. this.$refs["form"].validate((valid, done) => {
  2515. done();
  2516. if (valid) {
  2517. let amountSum = 0;
  2518. let reSum = 0;
  2519. let costSum = 0;
  2520. let paySum = 0;
  2521. if (this.data.length > 0) {
  2522. for (let i = 0; i < this.data.length; i++) {
  2523. if (this.data[i].corpId == null) {
  2524. return this.$message.error(`请输入第${i + 1}行的供应商`);
  2525. }
  2526. if (this.detailData.status == 'copy') {
  2527. if (this.goodsoptions.length == 0) {
  2528. this.$message.warning('数据正在加载,请稍后重试!!');
  2529. return
  2530. }
  2531. // 复制的重新进行计算
  2532. // for (let item of this.goodsoptions) {
  2533. // if (item.itemId == this.data[i].itemId) {
  2534. // this.data[i].purchaseCost = costCal(item.price, item.taxRate);
  2535. // this.data[i].purchaseAmount = item.purchaseAmount
  2536. // this.data[i].productPrice = productCal(item.purchaseAmount, 0, item.coefficient);
  2537. // // 如果不是 true 说明没有修改还是走里面的
  2538. // if (!this.data[i].outFactoryChange) {
  2539. // // 出场价格
  2540. // this.data[i].outFactoryPrice = sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate);
  2541. // // 销售价
  2542. // this.data[i].price = sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate);
  2543. // }
  2544. // this.data[i].shareAmount = 0;
  2545. // this.data[i].internationalAmount = 0;
  2546. // this.data[i].totalValue = sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate);
  2547. // // this.data[i].orderQuantity = 1;
  2548. // this.data[i].insurance = 0;
  2549. // this.data[i].freight = 0;
  2550. // this.data[i].discount = null;
  2551. // this.data[i].amount = sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate);
  2552. // console.log(sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate),'出场价格')
  2553. // this.data[i].taxRate = 0;
  2554. // this.data[i].unit = item.unit;
  2555. // this.data[i].itemMargin = grossProfitCal(item.purchaseAmount, 0, sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate), this.form.exchangeRate);
  2556. // }
  2557. // }
  2558. // 处理金额
  2559. this.data[i].amount = amountCal(
  2560. this.data[i].price,
  2561. this.data[i].orderQuantity,
  2562. this.data[i].freight,
  2563. this.data[i].insurance,
  2564. this.data[i].discount
  2565. );
  2566. this.detailData.status = 1
  2567. }
  2568. // amountSum = _.add(
  2569. // amountSum,
  2570. // _.multiply(
  2571. // numCal(this.data[i].amount),
  2572. // numCal(this.data[i].exchangeRate)
  2573. // )
  2574. // );
  2575. // costSum = _.add(
  2576. // costSum,
  2577. // _.multiply(
  2578. // _.add(
  2579. // numCal(this.data[i].purchaseAmount),
  2580. // numCal(this.data[i].partsPrice)
  2581. // ),
  2582. // numCal(this.data[i].orderQuantity)
  2583. // )
  2584. // );
  2585. }
  2586. }
  2587. const orderFeesList = this.$refs.feeInfo.submitData();
  2588. for (let i = 0; i < orderFeesList.length; i++) {
  2589. // if (orderFeesList[i].corpId == null) {
  2590. // return this.$message.error(`请输入第${i + 1}行的结算中心`);
  2591. // }
  2592. if (orderFeesList[i].price == 0) {
  2593. return this.$message.error(`请正确输入第${i + 1}行的价格`);
  2594. }
  2595. if (orderFeesList[i].quantity == 0) {
  2596. return this.$message.error(`请正确输入第${i + 1}行的数量`);
  2597. }
  2598. if (!orderFeesList[i].currency) {
  2599. return this.$message.error(`请正确选择第${i + 1}行的币别`);
  2600. }
  2601. if (!orderFeesList[i].exchangeRate) {
  2602. return this.$message.error(`请正确输入第${i + 1}行的汇率`);
  2603. }
  2604. // if (orderFeesList[i].feesType == 1) {
  2605. // reSum = _.add(
  2606. // reSum,
  2607. // _.multiply(
  2608. // numCal(orderFeesList[i].amount),
  2609. // numCal(orderFeesList[i].exchangeRate)
  2610. // )
  2611. // );
  2612. // }
  2613. // if (orderFeesList[i].feesType == 2) {
  2614. // paySum = _.add(
  2615. // paySum,
  2616. // _.multiply(
  2617. // numCal(orderFeesList[i].amount),
  2618. // numCal(orderFeesList[i].exchangeRate)
  2619. // )
  2620. // );
  2621. // }
  2622. }
  2623. // this.form.singleTicketMargin = STGPCal(
  2624. // amountSum,
  2625. // reSum,
  2626. // costSum,
  2627. // paySum
  2628. // );
  2629. this.form.totalValue = 0
  2630. delete this.detailData.status
  2631. this.data.forEach(async (e, index) => {
  2632. e.sort = Number(index) + 1
  2633. this.form.totalValue = sum(multiply(e.outFactoryPrice, e.orderQuantity), this.form.totalValue)
  2634. })
  2635. this.subLoading = true;
  2636. // return
  2637. submit({
  2638. ...this.form,
  2639. orderItemsList: this.data,
  2640. orderFeesList: orderFeesList,
  2641. orderFilesList: this.orderFilesList
  2642. }).then(res => {
  2643. this.$message.success("保存成功");
  2644. if (status == "goBack") {
  2645. if (this.form.id) {
  2646. this.unLock({
  2647. moduleName: "xs",
  2648. tableName: "business_order",
  2649. billId: this.form.id,
  2650. billNo: this.form.orgOrderNo
  2651. });
  2652. }
  2653. this.$emit("goBack");
  2654. this.leaveDetailsKey(this.$route.name);
  2655. } else {
  2656. // this.showBut = false;
  2657. // this.pageLoading = true;
  2658. //暂时注释刷新数据
  2659. // detail(ress.data.data.id).then(res => {
  2660. // this.form = res.data.data;
  2661. // this.data = res.data.data.orderItemsList;
  2662. // this.orderFeesList = res.data.data.orderFeesList;
  2663. // this.orderFilesList = res.data.data.orderFilesList;
  2664. // this.oldform = res.data.data;
  2665. // this.olddata = this.deepClone(res.data.data.orderItemsList);
  2666. // this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
  2667. // this.oldorderFilesList = this.deepClone(res.data.data.orderFilesList);
  2668. // this.oldExchange = this.deepClone(this.form.exchangeRate);
  2669. // }).finally(() => {
  2670. // this.showBut = true;
  2671. // this.pageLoading = false;
  2672. // });
  2673. this.form = res.data.data;
  2674. this.data = res.data.data.orderItemsList;
  2675. this.orderFeesList = res.data.data.orderFeesList;
  2676. this.orderFilesList = res.data.data.orderFilesList;
  2677. this.oldform = res.data.data;
  2678. this.olddata = this.deepClone(res.data.data.orderItemsList);
  2679. this.oldorderFeesList = this.deepClone(
  2680. res.data.data.orderFeesList
  2681. );
  2682. this.oldorderFilesList = this.deepClone(
  2683. res.data.data.orderFilesList
  2684. );
  2685. this.oldExchange = this.deepClone(this.form.exchangeRate);
  2686. }
  2687. })
  2688. .finally(() => {
  2689. this.subLoading = false;
  2690. });
  2691. } else {
  2692. return false;
  2693. }
  2694. });
  2695. },
  2696. generateBill() {
  2697. this.financialAccountDialog = true;
  2698. this.billData = {
  2699. srcOrderno: this.form.orgOrderNo,
  2700. itemType: "销售",
  2701. corpsName: this.form.corpName,
  2702. corpId: this.form.corpId,
  2703. srcParentId: this.form.id,
  2704. currency: "CNY",
  2705. exchangeRate: "1",
  2706. taxRate: "0",
  2707. accDate: this.form.businesDate,
  2708. srcType: 1,
  2709. tradeType: "CK",
  2710. optionType: "CK"
  2711. };
  2712. },
  2713. choceFun() {
  2714. this.financialAccountDialog = false;
  2715. },
  2716. viewBill() {
  2717. this.applicationDialog = true;
  2718. },
  2719. //关闭记录
  2720. choceApplication() {
  2721. this.applicationDialog = false;
  2722. },
  2723. // 请核
  2724. pleaseCheck() {
  2725. this.$confirm("您确定提交此次申请吗?", {
  2726. confirmButtonText: "确定",
  2727. cancelButtonText: "取消",
  2728. type: "warning"
  2729. }).then(() => {
  2730. const data = {
  2731. id: this.form.id,
  2732. checkType: "xsqh",
  2733. url: "/exportTrade/salesContract/index",
  2734. pageStatus: "this.$store.getters.xsStatus",
  2735. pageLabel: "销售(E)",
  2736. checkFlag: 2
  2737. };
  2738. pleaseCheck(data).then(res => {
  2739. this.$message.success("请核成功");
  2740. this.getDetail(this.form.id);
  2741. });
  2742. });
  2743. },
  2744. //返回列表
  2745. backToList() {
  2746. let orderFeesList = this.$refs.feeInfo.submitData();
  2747. if (
  2748. contrastObj(this.form, this.oldform) ||
  2749. contrastList(this.data, this.olddata) ||
  2750. contrastList(orderFeesList, this.oldorderFeesList) ||
  2751. contrastList(this.orderFilesList, this.oldorderFilesList)
  2752. ) {
  2753. this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
  2754. confirmButtonText: "确定",
  2755. cancelButtonText: "取消",
  2756. type: "warning"
  2757. })
  2758. .then(() => {
  2759. this.editCustomer("goBack");
  2760. })
  2761. .catch(() => {
  2762. if (this.form.id) {
  2763. this.unLock({
  2764. moduleName: "xs",
  2765. tableName: "business_order",
  2766. billId: this.form.id,
  2767. billNo: this.form.orgOrderNo
  2768. });
  2769. }
  2770. this.$emit("goBack");
  2771. this.leaveDetailsKey(this.$route.name);
  2772. });
  2773. } else {
  2774. if (this.form.id) {
  2775. this.unLock({
  2776. moduleName: "xs",
  2777. tableName: "business_order",
  2778. billId: this.form.id,
  2779. billNo: this.form.orgOrderNo
  2780. });
  2781. }
  2782. this.$emit("goBack");
  2783. this.leaveDetailsKey(this.$route.name);
  2784. }
  2785. },
  2786. openReport() {
  2787. this.switchDialog = !this.switchDialog;
  2788. },
  2789. openProperty(row, index) {
  2790. this.$refs.property.init(row, index);
  2791. },
  2792. onClose(val) {
  2793. this.switchDialog = val;
  2794. },
  2795. getInvoice() {
  2796. if (this.$store.getters.outStatus) {
  2797. this.$alert("出口跟单存在,请保存发货单再进行操作", "温馨提示", {
  2798. confirmButtonText: "确定",
  2799. type: "warning",
  2800. callback: action => {
  2801. console.log(action);
  2802. }
  2803. });
  2804. } else {
  2805. this.inInvoice();
  2806. }
  2807. },
  2808. inInvoice() {
  2809. const data = {
  2810. id: this.form.id,
  2811. orderItemIds: this.orderItemIds
  2812. };
  2813. deliverGoods(data).then(res => {
  2814. if (res.data.code == 200) {
  2815. this.$message.success("生成成功");
  2816. if (data) {
  2817. const data = res.data.data;
  2818. data.orderItemsList.forEach(e => {
  2819. e.actualQuantity = e.orderQuantity;
  2820. e.contractAmount = e.amount;
  2821. e.srcId = e.id;
  2822. e.specificationAndModel = e.itemType;
  2823. e.productDesc = e.itemDescription;
  2824. e.exRate0 = e.exchangeRate;
  2825. delete e.id;
  2826. delete e.version;
  2827. delete e.status;
  2828. delete e.createUser;
  2829. delete e.createTime;
  2830. delete e.updateUser;
  2831. delete e.updateTime;
  2832. delete e.isDeleted;
  2833. });
  2834. const obj = {
  2835. corpId: data.corpId,
  2836. deliveryStatus: "录入",
  2837. srcOrderNo: data.sysNo,
  2838. orgOrderNo: data.orgOrderNo,
  2839. orderItemsList: data.orderItemsList,
  2840. orderFeesList: data.deliveryFeesList
  2841. };
  2842. this.$router.$avueRouter.closeTag("/exportTrade/invoice/index");
  2843. this.$router.push({
  2844. path: "/exportTrade/invoice/index",
  2845. query: {
  2846. pageType: "Generate",
  2847. data: JSON.stringify(obj)
  2848. }
  2849. });
  2850. }
  2851. }
  2852. });
  2853. },
  2854. //费用明细回调
  2855. beforeFinance(feesData, callback) {
  2856. this.advantageProjectData = feesData;
  2857. let params = {};
  2858. //暂时默认通过 之后优化
  2859. params.valid = true;
  2860. params.parentId = this.form.id;
  2861. params.srcOrderno = this.form.orderNo;
  2862. callback(params);
  2863. },
  2864. openEdit() {
  2865. const data = {
  2866. moduleName: "xs",
  2867. tableName: "business_order",
  2868. billId: this.form.id,
  2869. no: localStorage.getItem("browserID"),
  2870. billNo: this.form.orgOrderNo
  2871. };
  2872. this.inDetailsKey(this.$route.name, {
  2873. moduleName: "xs",
  2874. tableName: "business_order",
  2875. billId: this.form.id,
  2876. billNo: this.form.orgOrderNo
  2877. });
  2878. this.checkLock(data).then(res => {
  2879. if (res.data.code == 200) {
  2880. this.onLock(data).then(res => {
  2881. if (res.data.code == 200) {
  2882. this.detailData.status = 2;
  2883. this.option = this.$options.data().option;
  2884. this.goodsEditOption = this.$options.data().goodsEditOption;
  2885. this.getWorkDicts("cargo_type").then(res => {
  2886. this.findObject(this.option.column, "cargoType").dicData =
  2887. res.data.data;
  2888. });
  2889. // this.$refs.crud.refreshTable();
  2890. this.$refs.goodsInfo.refreshTable();
  2891. }
  2892. });
  2893. }
  2894. });
  2895. },
  2896. async saveColumn() {
  2897. const inSave = await this.saveColumnData(
  2898. this.getColumnName(5),
  2899. this.tableOption
  2900. );
  2901. if (inSave) {
  2902. this.$nextTick(() => {
  2903. this.$refs.crud.doLayout();
  2904. });
  2905. this.$message.success("保存成功");
  2906. //关闭窗口
  2907. this.$refs.crud.$refs.dialogColumn.columnBox = false;
  2908. }
  2909. },
  2910. async resetColumn() {
  2911. this.tableOption = tableOption;
  2912. const inSave = await this.delColumnData(
  2913. this.getColumnName(5),
  2914. tableOption
  2915. );
  2916. if (inSave) {
  2917. this.$nextTick(() => {
  2918. this.$refs.crud.doLayout();
  2919. });
  2920. this.getWorkDicts("cargo_type").then(res => {
  2921. this.findObject(this.tableOption.column, "cargoType").dicData =
  2922. res.data.data;
  2923. });
  2924. this.$message.success("重置成功");
  2925. this.$refs.crud.$refs.dialogColumn.columnBox = false;
  2926. }
  2927. },
  2928. summaryMethod({
  2929. columns,
  2930. data
  2931. }) {
  2932. const sums = [];
  2933. if (columns.length > 0) {
  2934. columns.forEach((item, index) => {
  2935. sums[0] = "合计";
  2936. if (item.property == "orderQuantity" || item.property == "amount") {
  2937. let qtySum = 0;
  2938. let amountSum = 0;
  2939. data.forEach(e => {
  2940. qtySum = _.add(qtySum, Number(e.orderQuantity));
  2941. amountSum = _.add(amountSum, Number(e.amount));
  2942. });
  2943. //数量总计
  2944. if (item.property == "orderQuantity") {
  2945. sums[index] = micrometerFormat2(qtySum);
  2946. }
  2947. //金额总计
  2948. if (item.property == "amount") {
  2949. sums[index] = micrometerFormat2(amountSum);
  2950. }
  2951. }
  2952. });
  2953. }
  2954. return sums;
  2955. },
  2956. moveUp(row, index) {
  2957. this.data[index] = this.data.splice(index - 1, 1, row)[0]
  2958. },
  2959. moveDown(row, index) {
  2960. this.data[index] = this.data.splice(index + 1, 1, row)[0]
  2961. },
  2962. async saveGoodsColumn() {
  2963. const inSave = await this.saveColumnData(
  2964. this.getColumnName(28),
  2965. this.goodsOption
  2966. );
  2967. if (inSave) {
  2968. this.$nextTick(() => {
  2969. this.$refs.goodsCrud.doLayout();
  2970. });
  2971. this.$message.success("保存成功");
  2972. //关闭窗口
  2973. this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
  2974. }
  2975. },
  2976. async resetGoodsColumn() {
  2977. this.goodsOption = goodsOption;
  2978. const inSave = await this.delColumnData(
  2979. this.getColumnName(28),
  2980. goodsOption
  2981. );
  2982. if (inSave) {
  2983. this.$nextTick(() => {
  2984. this.$refs.goodsCrud.doLayout();
  2985. });
  2986. this.$message.success("重置成功");
  2987. //关闭窗口
  2988. setTimeout(() => {
  2989. this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
  2990. }, 1000);
  2991. }
  2992. }
  2993. },
  2994. watch: {
  2995. "form.corpId": function (id) {
  2996. if (id) {
  2997. this.corpsattns = [];
  2998. getCorpsattn({
  2999. pid: id
  3000. }).then(res => {
  3001. this.corpsattns = res.data.data.records;
  3002. });
  3003. }
  3004. }
  3005. }
  3006. };
  3007. </script>
  3008. <style lang="scss" scoped>
  3009. .trading-form ::v-deep .el-form-item {
  3010. margin-bottom: 8px !important;
  3011. }
  3012. ::v-deep .el-form-item__error {
  3013. display: none !important;
  3014. }
  3015. ::v-deep .select-component {
  3016. display: flex !important;
  3017. }
  3018. .divider {
  3019. display: block;
  3020. height: 0px;
  3021. width: 100%;
  3022. border-top: 1px dashed #dcdfe6;
  3023. }
  3024. .content {
  3025. display: flex;
  3026. justify-content: center;
  3027. align-items: center;
  3028. height: 15vh;
  3029. width: 88vw;
  3030. .divider {
  3031. display: block;
  3032. height: 0px;
  3033. width: 100%;
  3034. border-top: 2px dashed #dcdfe6;
  3035. }
  3036. &-item {
  3037. margin-left: 1vw;
  3038. .card {
  3039. width: 130px;
  3040. display: flex;
  3041. align-items: center;
  3042. &-title {
  3043. width: 40px;
  3044. height: 40px;
  3045. text-align: center;
  3046. border-radius: 50%;
  3047. font-size: 20px;
  3048. font-weight: 600;
  3049. display: flex;
  3050. justify-content: center;
  3051. align-items: center;
  3052. span {
  3053. line-height: 20px;
  3054. }
  3055. }
  3056. &-title1 {
  3057. color: #037fe1;
  3058. background-color: rgba(3, 127, 225, 0.15);
  3059. }
  3060. &-title2 {
  3061. color: #ffa21e;
  3062. background-color: rgba(255, 162, 30, 0.15);
  3063. }
  3064. &-title3 {
  3065. color: #fb5b60;
  3066. background-color: rgba(251, 91, 96, 0.15);
  3067. }
  3068. &-title4 {
  3069. color: #42bc6f;
  3070. background-color: rgba(66, 188, 111, 0.15);
  3071. }
  3072. &-title5 {
  3073. color: #14cde1;
  3074. background-color: rgba(52, 149, 161, 0.15);
  3075. }
  3076. &-title6 {
  3077. color: rgba(4, 66, 31, 0.63);
  3078. background-color: rgba(66, 188, 111, 0.15);
  3079. }
  3080. &-content {
  3081. padding-left: 1vw;
  3082. display: flex;
  3083. flex-direction: column;
  3084. &-num {
  3085. font-size: 16px;
  3086. font-weight: 500;
  3087. text-align: center;
  3088. }
  3089. &-text {
  3090. color: #909399;
  3091. }
  3092. }
  3093. }
  3094. }
  3095. }
  3096. .selected {
  3097. color: #1e9fff !important;
  3098. }
  3099. </style>