billsDetails.vue 134 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726
  1. <template>
  2. <div class="borderless" v-loading="pageLoading">
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <!-- <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
  6. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
  7. @click="backToList">返回列表
  8. </el-button>
  9. </div>
  10. <div class="add-customer-btn">
  11. <!--<el-popover-->
  12. <!-- placement="bottom-end"-->
  13. <!-- width="100"-->
  14. <!-- trigger="hover">-->
  15. <!-- <div>-->
  16. <!-- </div>-->
  17. <el-button size="small" type="primary" @click="addEdit">新 建
  18. </el-button>
  19. <el-button type="success" size="small" style="margin-right: 8px" @click="CopyDocumentsfun">复制单据
  20. </el-button>
  21. <el-dropdown style="line-height: 0" v-if="importTemplate == 1">
  22. <el-button size="small" type="warning" style="margin-right: 8px"
  23. :disabled="form.status > 0 || showLock || !form.id">
  24. 导入模板<i class="el-icon-arrow-down el-icon--right"></i>
  25. </el-button>
  26. <el-dropdown-menu slot="dropdown">
  27. <el-dropdown-item v-for="item in imporiData" :key="item.id"
  28. @click.native="importData(item)">{{
  29. item.name }}
  30. </el-dropdown-item>
  31. </el-dropdown-menu>
  32. </el-dropdown>
  33. <el-dropdown style="line-height: 0">
  34. <el-button size="small" type="success" style="margin-right: 8px" :loading="saveLoading"
  35. :disabled="!form.id || showLock">
  36. 发送 SO EDI<i class="el-icon-arrow-down el-icon--right"></i>
  37. </el-button>
  38. <el-dropdown-menu slot="dropdown">
  39. <el-dropdown-item v-for="item in ediData_SO" :key="item.id" class="dropdown-max"
  40. @click.native="editypesSendingEdifun(item)">{{ item.cnName }}
  41. </el-dropdown-item>
  42. </el-dropdown-menu>
  43. </el-dropdown>
  44. <el-dropdown style="line-height: 0">
  45. <el-button size="small" type="success" style="margin-right: 8px" :loading="saveLoading"
  46. :disabled="!form.id || showLock">
  47. 发送 SI EDI<i class="el-icon-arrow-down el-icon--right"></i>
  48. </el-button>
  49. <el-dropdown-menu slot="dropdown">
  50. <el-dropdown-item v-for="item in ediData_SI" :key="item.id" class="dropdown-max"
  51. @click.native="editypesSendingEdifun(item)">{{ item.cnName }}
  52. </el-dropdown-item>
  53. </el-dropdown-menu>
  54. </el-dropdown>
  55. <el-button size="small" style="margin-right: 8px" :loading="saveLoading" :disabled="!form.id"
  56. @click="previewDialogfun">预 览
  57. </el-button>
  58. <el-button size="small" type="warning" :disabled="!form.id || detailData.seeDisabled || showLock"
  59. v-if="form.status == 1" @click.stop="revokeDocumentApproval">撤销单据请核
  60. </el-button>
  61. <el-button size="small" type="success" :disabled="!form.id || detailData.seeDisabled || showLock"
  62. v-if="form.status == 0 || form.status == 4" @click.stop="DocumentApproval">单据请核
  63. </el-button>
  64. <el-button size="small" type="primary" style="margin-right: 8px"
  65. :disabled="detailData.seeDisabled || showLock" :loading="saveLoading" @click="editCustomer">保 存
  66. </el-button>
  67. <el-dropdown style="line-height: 0">
  68. <el-button type="warning" :loading="saveLoading" :disabled="!form.id" size="small">
  69. 审 批<i class="el-icon-arrow-down el-icon--right"></i>
  70. </el-button>
  71. <el-dropdown-menu slot="dropdown">
  72. <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">审核进度
  73. </el-dropdown-item>
  74. </el-dropdown-menu>
  75. </el-dropdown>
  76. </div>
  77. </div>
  78. <div style="margin-top: 50px">
  79. <el-tabs type="border-card" v-model="bigtabs" @tab-click="bigHandleClick">
  80. <el-tab-pane label="委托信息" name="wt" class="scrollable-container">
  81. <div>
  82. <el-form :model="form" ref="form" label-width="90px" class="demo-ruleForm" :disabled="showLock">
  83. <containerTitle title="基础资料"></containerTitle>
  84. <basic-container :showBtn="true">
  85. <el-row :gutter="60">
  86. <el-col v-for="(item, index) in basicData.column" :key="index" :span="8">
  87. <!--数组-->
  88. <div v-if="item instanceof Array"
  89. style="display: flex;align-items: center;justify-content: space-between">
  90. <el-row>
  91. <el-col :span="item[0].span ? item[0].span : 12">
  92. <el-form-item :label="item[0].label" :prop="item[0].prop"
  93. :rules="item[0].rules" :label-width="item[0].labelWidth">
  94. <span slot="label" v-if="item[0].label">
  95. <span v-if="item[0].label == 'HB/L NO'"
  96. style="color: #4c9e44;cursor: pointer;text-decoration: underline;"
  97. @click="applyforfun(item[0].label)">{{ form.hblno ? '删除'
  98. : '申请'
  99. }} {{ item[0].label }}
  100. </span>
  101. <span v-else style="color: #1e9fff">{{ item[0].label
  102. }}</span>
  103. </span>
  104. <span v-if="item[0].type == 'button'"></span>
  105. <!--<el-button v-if="item[0].type == 'button'" :disabled="detailData.seeDisabled || item[0].disabled"-->
  106. <!-- size="mini" type="success" icon="el-icon-circle-plus" circle-->
  107. <!-- @click="applyforfun(item[0].label)" >-->
  108. <!--</el-button>-->
  109. <search-query v-else-if="item[0].type == 'select'"
  110. :datalist="item[0].dicData"
  111. :selectValue="form[item[0].prop]" :filterable="true"
  112. :allowCreate="item[0].allowCreate || false" :remote="true"
  113. :disabled="detailData.seeDisabled || item[0].disabled"
  114. :buttonIf="false" :placeholder="`${item[0].text || ''}`"
  115. :forParameter="item[0].forParameter"
  116. @remoteMethod="remoteMethod($event, item[0].prop)"
  117. @corpChange="corpChange($event, item[0].prop)"
  118. @corpFocus="remoteMethod($event, item[0].prop)">
  119. </search-query>
  120. <el-input v-else type="age" style="width: 100%;"
  121. v-model="form[item[0].prop]" size="small" autocomplete="off"
  122. :disabled="detailData.seeDisabled || item[0].disabled"
  123. :placeholder="item[0].text || ''"></el-input>
  124. </el-form-item>
  125. </el-col>
  126. <el-col :span="item[1].span ? item[1].span : 12">
  127. <el-form-item :label="item[1].label" :prop="item[1].prop"
  128. :rules="item[1].rules" :label-width="item[1].labelWidth">
  129. <span slot="label" v-if="item[1].label">
  130. <span style="color: #1e9fff">{{ item[1].label }}</span>
  131. </span>
  132. <el-date-picker v-if="item[1].type == 'date'"
  133. v-model="form[item[1].prop]" clearable style="width: 100%;"
  134. type="date" size="small"
  135. :disabled="detailData.seeDisabled || item[1].disabled"
  136. value-format="yyyy-MM-dd HH:mm" placeholder="选择日期">
  137. </el-date-picker>
  138. <search-query v-else-if="item[1].type == 'select'"
  139. :datalist="item[1].dicData"
  140. :selectValue="form[item[1].prop]" :filterable="true"
  141. :remote="true"
  142. :disabled="detailData.seeDisabled || item[1].disabled"
  143. :buttonIf="false" :placeholder="`${item[1].text || ''}`"
  144. :forParameter="item[1].forParameter"
  145. @remoteMethod="remoteMethod($event, item[1].prop)"
  146. @corpChange="corpChange($event, item[1].prop)"
  147. @corpFocus="remoteMethod($event, item[1].prop)">
  148. </search-query>
  149. <tree-select v-else-if="item[1].type == 'tree'"
  150. v-model="form[item[1].prop]" :data="item[1].dicData"
  151. :props="item[1].forParameter" nodeKey="title" size="small"
  152. :clearable="false"
  153. :disabled="detailData.seeDisabled || item[1].disabled"
  154. :multiple="false" :placeholder="`${item[1].text || ''}`"
  155. @input="corpChange($event, item[1].prop)">
  156. </tree-select>
  157. <el-input v-else type="age" style="width: 100%;"
  158. v-model="form[item[1].prop]" size="small" autocomplete="off"
  159. :disabled="detailData.seeDisabled || item[1].disabled"
  160. :placeholder="item[1].text || ''"></el-input>
  161. </el-form-item>
  162. </el-col>
  163. <el-col v-if="item[2]" :span="item[2].span ? item[2].span : 12">
  164. <el-form-item :label="item[2].label" :prop="item[2].prop"
  165. :rules="item[2].rules" :label-width="item[2].labelWidth">
  166. <span slot="label" v-if="item[2].label">
  167. <span style="color: #1e9fff">{{ item[2].label }}</span>
  168. </span>
  169. <search-query v-if="item[2].type == 'select'"
  170. :datalist="item[2].dicData"
  171. :selectValue="form[item[2].prop]" :filterable="true"
  172. :clearable="false" :remote="true"
  173. :disabled="detailData.seeDisabled || item[2].disabled"
  174. :buttonIf="false" :forParameter="item[2].forParameter"
  175. :placeholder="`${item[2].text || ''}`"
  176. @remoteMethod="remoteMethod($event, item[2].prop)"
  177. @corpChange="corpChange($event, item[2].prop)"
  178. @corpFocus="remoteMethod($event, item[2].prop)">
  179. </search-query>
  180. <el-input v-else type="age" style="width: 100%;"
  181. v-model="form[item[2].prop]" size="small" autocomplete="off"
  182. :disabled="detailData.seeDisabled || item[1].disabled"
  183. :placeholder="item[2].text || ''"></el-input>
  184. </el-form-item>
  185. </el-col>
  186. </el-row>
  187. </div>
  188. <!--对象-->
  189. <div v-else>
  190. <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
  191. <span slot="label" v-if="item.label">
  192. <span style="color: #1e9fff">{{ item.label }}</span>
  193. </span>
  194. <search-query v-if="item.type == 'select'" ref="searchQueryRef"
  195. :datalist="item.dicData" :selectValue="form[item.prop]"
  196. :filterable="true" :clearable="false" :remote="true"
  197. :disabled="detailData.seeDisabled || item.disabled"
  198. :buttonIf="item.buttonIf" :forParameter="item.forParameter"
  199. :placeholder="`${item.text || ''}`" :joinData="item.joinData"
  200. @remoteMethod="remoteMethod($event, item.prop)"
  201. @corpChange="corpChange($event, item.prop)"
  202. @corpFocus="remoteMethod($event, item.prop)"
  203. @eldialogConfirm="eldialogConfirm(item.slot)">
  204. <bcorps v-show="item.slot == 'bcorps'" ref="bcorps" :eldialog="true"
  205. @selectionChange="eldialogMultipleChoice($event, item.slot)">
  206. </bcorps>
  207. <bcorpstypedefine v-show="item.slot == 'bcorpstypedefine'">
  208. </bcorpstypedefine>
  209. </search-query>
  210. <el-input v-else type="age" style="width: 100%;"
  211. v-model="form[item.prop]" size="small" autocomplete="off"
  212. :disabled="detailData.seeDisabled || item.disabled"
  213. :placeholder="item.text || ''"></el-input>
  214. </el-form-item>
  215. </div>
  216. </el-col>
  217. </el-row>
  218. </basic-container>
  219. </el-form>
  220. </div>
  221. <div class="customer-main margintop">
  222. <containerTitle title="详细"></containerTitle>
  223. <basic-container :showBtn="true">
  224. <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
  225. <el-tab-pane label="委托详情" name="first">
  226. <entrustment-lnformation :assemblyForm="form" :detailData="detailData"
  227. :disabled="showLock" :generateBillsfalse="generateBillsfalse"
  228. @billsDetailfun="billsDetailfun(form.id)">
  229. </entrustment-lnformation>
  230. </el-tab-pane>
  231. <el-tab-pane label="配箱信息" name="second">
  232. <DistributionBox :assemblyForm="form" :detailData="detailData" :showLock="showLock"
  233. :pleasereviewType="pleasereviewType" @billsAddfun="billsAddfun"
  234. @billsDetailfun="billsDetailfun(form.id)">
  235. </DistributionBox>
  236. </el-tab-pane>
  237. <el-tab-pane label="MB/L信息" name="third">
  238. <mbinformation :assemblyForm="form" :detailData="detailData" :disabled="showLock">
  239. </mbinformation>
  240. </el-tab-pane>
  241. <el-tab-pane label="报表管理" name="fourth"
  242. v-if="roleName.indexOf('admin') != -1 ? true : roleName.indexOf('报表管理') != -1 ? true : false">
  243. <reports :id="form.id" :assemblyForm="form"
  244. :disabled="detailData.seeDisabled || showLock" businessValue="HYCK"></reports>
  245. </el-tab-pane>
  246. <el-tab-pane label="EDI 及其他" name="sixth">
  247. <edicode :assemblyForm="form" :detailData="detailData" :disabled="showLock">
  248. </edicode>
  249. </el-tab-pane>
  250. <el-tab-pane label="文件中心" name="seventh">
  251. <filescenter ref="filescenter" :assemblyForm="form" :pid="form.id"
  252. :detailData="detailData" :showLock="showLock"></filescenter>
  253. </el-tab-pane>
  254. </el-tabs>
  255. </basic-container>
  256. <basic-container :showBtn="true" v-if="activeName == 'first' || activeName == 'third'">
  257. <formbottom :assemblyForm="form" :generateBillsfalse="generateBillsfalse"
  258. :disabled="showLock" :detailData="detailData"></formbottom>
  259. </basic-container>
  260. </div>
  261. </el-tab-pane>
  262. <el-tab-pane label="费用信息" name="fy" class="scrollable-container"
  263. v-if="roleName.indexOf('admin') != -1 ? true : roleName.indexOf('应收修改') != -1 || roleName.indexOf('应付修改') != -1 || roleName.indexOf('应收查看') != -1 || roleName.indexOf('应付查看') != -1">
  264. <feecenter :assemblyForm="form" :copyFormData="copyFormData" :detailData="detailData"
  265. :disabled="detailData.seeDisabled || showLock" :pleasereviewType="pleasereviewType"
  266. :pid="form.id" @billsDetailfun="billsDetailfun(form.id)">
  267. </feecenter>
  268. </el-tab-pane>
  269. <el-tab-pane label="单证中心" name="dz" class="scrollable-container">
  270. <document-center ref="documentCenter" :detailData="detailData" :assemblyForm="form"
  271. :disabled="detailData.seeDisabled || showLock"></document-center>
  272. </el-tab-pane>
  273. <el-tab-pane label="分单列表" name="fd" v-if="form.billType == 'MM'" class="scrollable-container">
  274. <Split-list :detailData="detailData" :assemblyForm="form" :data="billsListAllData"
  275. :disabled="detailData.seeDisabled || showLock"
  276. @billsListAllfun="billsListAllfun(form.id)"></Split-list>
  277. </el-tab-pane>
  278. </el-tabs>
  279. </div>
  280. <!--导入模板-->
  281. <el-dialog title="导入模板" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
  282. v-dialog-drag>
  283. <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading"
  284. :upload-before="uploadBefore" :upload-after="onSuccess">
  285. </avue-form>
  286. </el-dialog>
  287. <!--审核弹窗-->
  288. <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
  289. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  290. <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
  291. </el-dialog>
  292. <!--预览报表弹窗-->
  293. <el-dialog append-to-body title="预览报表" class="el-dialogDeep" :visible.sync="previewDialog" width="60%"
  294. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  295. <business-reports :id="form.id" :classifycode="getReportTypeByBigHandle()"
  296. :disabled="detailData.seeDisabled"></business-reports>
  297. </el-dialog>
  298. </div>
  299. </template>
  300. <script>
  301. import EntrustmentLnformation from "@/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation.vue";
  302. import mbinformation from "@/views/iosBasicData/SeafreightExportF/bills/assembly/mbinformation.vue";
  303. import reports from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reports.vue";
  304. import formbottom from "@/views/iosBasicData/SeafreightExportF/bills/assembly/formbottom.vue";
  305. import edicode from '@/views/iosBasicData/SeafreightExportF/bills/assembly/edicode.vue'
  306. import filescenter from "@/views/iosBasicData/SeafreightExportF/bills/assembly/filescenter.vue";
  307. import DistributionBox from "@/views/iosBasicData/SeafreightExportF/bills/assembly/DistributionBox.vue";
  308. import feecenter from '@/views/iosBasicData/SeafreightExportF/bills/assembly/feecenter.vue'
  309. import { getList as userGetList } from '@/api/system/user'
  310. import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
  311. import TreeSelect from "@/components/iosbasic-data/TreeSelect.vue";
  312. import bcorps from "@/views/iosBasicData/bcorps/index.vue";
  313. import bcorpstypedefine from "@/views/iosBasicData/bcorps/bcorpstypedefine.vue";
  314. import SplitList from "@/views/iosBasicData/SeafreightExportF/bills/assembly/SplitList.vue";
  315. import { getLazylist } from "@/api/basicData/agreement";
  316. import { getBcorpsList, getBcorpslistByType } from "@/api/iosBasicData/bcorps";
  317. import { getBlocationsList } from "@/api/iosBasicData/blocations";
  318. import { getBcorpsattnList } from "@/api/iosBasicData/bcorpsattn";
  319. import { getWorkDicts } from "@/api/system/dictbiz";
  320. import { getDeptLazyTree, getDeptTree, getLazyList } from "@/api/system/dept";
  321. import {
  322. billsCheckBills, billsCopyBills,
  323. billsDetail,
  324. billsGetBillNo, removeHblNo,
  325. billsListAll, billsRevokeCheckBills, editypesSendingEdi,
  326. billsSubmit,
  327. billsAdd,
  328. deptGetDetailPol, postSelectByUser, documentVerification, agreementpriceList
  329. } from '@/api/iosBasicData/bills'
  330. import { dateFormat } from "@/util/date";
  331. import checkSchedule from "@/components/checkH/checkSchedule.vue";
  332. import { getBvesselsList } from "@/api/iosBasicData/bvessels";
  333. import DocumentCenter from "@/views/iosBasicData/SeafreightExportF/bills/assembly/DocumentCenter.vue";
  334. import businessReports from "@/views/iosBasicData/SeafreightExportF/bills/assembly/businessReports.vue";
  335. import { popupReminder } from "@/util/messageReminder";
  336. import editypes from "@/views/iosBasicData/editypes/index.vue";
  337. import { editypesList } from "@/api/iosBasicData/editypes";
  338. import { verifyEnglish, checkFullWidthSymbols } from "@/util/date";
  339. import { contrastObj, contrastList } from "@/util/contrastData";
  340. import { selectListLos } from "@/api/approval/processConfig";
  341. import { isProcurement } from "@/api/basicData/configuration";
  342. import { similarValues } from "@/util/verifyData";
  343. import _ from "lodash";
  344. export default {
  345. components: {
  346. checkSchedule,
  347. SearchQuery,
  348. EntrustmentLnformation,
  349. formbottom,
  350. mbinformation,
  351. reports,
  352. edicode,
  353. filescenter,
  354. DistributionBox,
  355. feecenter,
  356. bcorps,
  357. bcorpstypedefine,
  358. SplitList,
  359. TreeSelect,
  360. DocumentCenter,
  361. businessReports,
  362. editypes,
  363. },
  364. props: {
  365. detailData: {
  366. type: Object
  367. }
  368. },
  369. data() {
  370. return {
  371. verifySymbolStatus: 0,
  372. showLock: false,
  373. ediData: [], // edi 列表数据
  374. ediData_SO: [], // edi SO 列表数据
  375. ediData_SI: [], // edi SI 列表数据
  376. previewDialog: false, // 预览报表弹窗开启
  377. generateBillsfalse: false, // 如果生成账单就禁用
  378. pleasereviewType: false, // 如果请核就禁用
  379. checkScheduleDialog: false, // 审核弹窗
  380. checkId: '', // 审核需要的id
  381. batchNo: '',
  382. billsListAllData: [], // 分单列表数据
  383. pageLoading: false, // 全屏的动画
  384. saveLoading: false,
  385. copyFormData: {}, // 详情的备份数据
  386. // 详情数据
  387. form: {
  388. billDate: dateFormat(new Date(), "yyyy-MM-dd") + ' 00:00', // 单据日期 默认 当天
  389. operatorName: JSON.parse(localStorage.getItem('saber-userInfo')).content.user_name, // OP 默认登录人
  390. operatorId: JSON.parse(localStorage.getItem('saber-userInfo')).content.user_id, // OP 默认登录人
  391. businessType: 'SE', // 业务类型 默认 海运出口
  392. businessTypes: '海运',
  393. billType: 'DD', // 单据类型 默认 直单
  394. accDeptName: '',// 核算部门 默认登录人的部门
  395. issueType: "ORI", // 签单方式 默认 正本提单
  396. mpaymode: 'PP', // 主单付费方式 默认PP
  397. hpaymode: 'PP', // 分单付费方式 默认 PP
  398. loadType: JSON.parse(localStorage.getItem('saber-tenantId')).content == '409341' ? 'FCL' : '整箱', // 装箱方式默认整箱
  399. srcType: 'OWN', // 业务来源默认公司 来源 内容 默认登录人所属公司
  400. numberOfObl: 'THREE', // 正本份数 默认 THREE
  401. numberOfCopy: 'THREE', // 副本份数 默认 THREE
  402. seaType: 'E', // 进出口 默认出口 E=出口 I=进口"
  403. cargoType: 'dry', // 货物类型默认普货
  404. marks: 'N/M',
  405. dgPackingLevel: '0', // 危险品包装等级
  406. serviceTerms: 'CY-CY', // 服务方式
  407. filesList: [], // 文件中心
  408. feeCenterListD: [], // 收
  409. feeCenterListC: [], // 付
  410. preContainersList: [], // 箱
  411. feeCenterAmendList: [],
  412. placeReceiptName: '',
  413. placeReceiptNamePrint: '',
  414. polEnName: '',
  415. polNamePrint: '',
  416. podEnName: '',
  417. podNamePrint: '',
  418. destinationName: '',
  419. destinationNamePrint: '',
  420. placeDeliveryName: '',
  421. placeDeliveryNamePrint: '',
  422. potEnName: '',
  423. potNamePrint: '',
  424. chargeableWeight: '方',
  425. detail: {},
  426. hmmEdi: {},
  427. },
  428. oldForm: {
  429. billDate: dateFormat(new Date(), "yyyy-MM-dd") + ' 00:00', // 单据日期 默认 当天
  430. operatorName: JSON.parse(localStorage.getItem('saber-userInfo')).content.user_name, // OP 默认登录人
  431. operatorId: JSON.parse(localStorage.getItem('saber-userInfo')).content.user_id, // OP 默认登录人
  432. businessType: 'SE', // 业务类型 默认 海运出口
  433. businessTypes: '海运',
  434. billType: 'DD', // 单据类型 默认 直单
  435. accDeptName: '',// 核算部门 默认登录人的部门
  436. issueType: "ORI", // 签单方式 默认 正本提单
  437. mpaymode: 'PP', // 主单付费方式 默认PP
  438. hpaymode: 'PP', // 分单付费方式 默认 PP
  439. loadType: JSON.parse(localStorage.getItem('saber-tenantId')).content == '409341' ? 'FCL' : '整箱', // 装箱方式默认整箱
  440. srcType: 'OWN', // 业务来源默认公司 来源 内容 默认登录人所属公司
  441. numberOfObl: 'THREE', // 正本份数 默认 THREE
  442. numberOfCopy: 'THREE', // 副本份数 默认 THREE
  443. seaType: 'E', // 进出口 默认出口 E=出口 I=进口"
  444. cargoType: 'dry', // 货物类型默认普货
  445. marks: 'N/M',
  446. dgPackingLevel: '0', // 危险品包装等级
  447. serviceTerms: 'CY-CY', // 服务方式
  448. filesList: [], // 文件中心
  449. feeCenterListD: [], // 收
  450. feeCenterListC: [], // 付
  451. preContainersList: [], // 箱
  452. feeCenterAmendList: [],
  453. placeReceiptName: '',
  454. placeReceiptNamePrint: '',
  455. polEnName: '',
  456. polNamePrint: '',
  457. podEnName: '',
  458. podNamePrint: '',
  459. destinationName: '',
  460. destinationNamePrint: '',
  461. placeDeliveryName: '',
  462. placeDeliveryNamePrint: '',
  463. potEnName: '',
  464. potNamePrint: '',
  465. chargeableWeight: '方',
  466. detail: {},
  467. hmmEdi: {},
  468. },
  469. // 循环的配置
  470. basicData: {
  471. column: [
  472. {
  473. label: "客户名称", // 调往来单位接口
  474. prop: "corpCnName",
  475. text: "请选择客户名称",
  476. type: 'select',
  477. dicData: [],
  478. disabled: false,
  479. buttonIf: true,
  480. joinData: true,
  481. slot: 'bcorps',
  482. forParameter: {
  483. key: 'id',
  484. label: 'cnName',
  485. value: 'cnName',
  486. short: 'shortName'
  487. },
  488. rules: [{
  489. required: true,
  490. message: " ",
  491. trigger: "blur"
  492. }]
  493. },
  494. [
  495. {
  496. label: "客户OP", // 客户联系人姓名 电话和邮箱带出来,可以修改 往来单位接口 需要传一个客户名称的值过去
  497. prop: "corpAttnName",
  498. text: "姓名",
  499. type: 'select',
  500. dicData: [],
  501. span: 10,
  502. disabled: false,
  503. clearable: false,
  504. allowCreate: true,
  505. forParameter: {
  506. key: 'id',
  507. label: 'cname',
  508. value: 'cname',
  509. },
  510. },
  511. {
  512. label: "", //客户联系人电话
  513. prop: "corpAttnTel",
  514. text: "电话",
  515. labelWidth: '10px',
  516. disabled: false,
  517. clearable: false,
  518. span: 7,
  519. // rules: [{
  520. // required: true,
  521. // message: "",
  522. // trigger: "blur"
  523. // }]
  524. },
  525. {
  526. label: "", // 客户联系人邮箱
  527. prop: "corpAttnEmail",
  528. text: "邮箱",
  529. labelWidth: '10px',
  530. disabled: false,
  531. clearable: false,
  532. span: 7,
  533. // rules: [{
  534. // required: true,
  535. // message: " ",
  536. // trigger: "blur"
  537. // }]
  538. },
  539. ],
  540. [
  541. {
  542. label: "业务来源", // OWN=公司 AGENT=代理 SALES=业务员
  543. prop: "srcType",
  544. text: "请选择业务来源",
  545. type: 'select',
  546. disabled: true,
  547. forParameter: {
  548. key: 'dictKey',
  549. label: 'dictValue',
  550. value: 'dictKey',
  551. },
  552. dicData: [],
  553. },
  554. {
  555. label: "",
  556. prop: "srcCnName", // 来源中文 公司不是下拉写死公司两字 业务员调用户管理列表 代理调往来单位四个代理数据
  557. text: "请选择来源",
  558. labelWidth: '30px',
  559. type: 'select',
  560. disabled: true,
  561. dicData: [],
  562. forParameter: {
  563. key: 'id',
  564. label: 'cnName',
  565. value: 'cnName',
  566. },
  567. },
  568. ],
  569. [
  570. {
  571. label: "MB/L NO",
  572. text: "请输入MB/L NO",
  573. prop: "mblno",
  574. span: 18,
  575. disabled: false,
  576. },
  577. {
  578. label: "", // MB/L 付款方式 PP=预付, CC=到付, FPA, Other
  579. text: "请选择付款方式",
  580. prop: "mpaymode",
  581. type: 'select',
  582. labelWidth: '30px',
  583. disabled: false,
  584. span: 6,
  585. dicData: [],
  586. forParameter: {
  587. key: 'dictKey',
  588. label: 'dictValue',
  589. value: 'dictKey',
  590. },
  591. },
  592. ],
  593. {
  594. label: "booking NO", // 订舱号
  595. text: "请输入booking NO",
  596. prop: "bookingNo",
  597. disabled: false,
  598. },
  599. [
  600. {
  601. label: "HB/L NO", //弹窗点击确认还是取消申请 调后台接口获取到一个编号
  602. prop: "HB/L NO",
  603. type: 'button',
  604. span: 4,
  605. disabled: false,
  606. },
  607. {
  608. label: "",
  609. text: "请输入HB/L NO",
  610. prop: "hblno",
  611. labelWidth: '26px',
  612. span: 14,
  613. disabled: true,
  614. },
  615. {
  616. label: "", // HB/L 付款方式 PP=预付, CC=到付, FPA, Other', 申请之后默认 PP
  617. text: "请选择付款方式",
  618. prop: "hpaymode",
  619. labelWidth: '30px',
  620. disabled: false,
  621. type: 'select',
  622. span: 6,
  623. dicData: [],
  624. forParameter: {
  625. key: 'dictKey',
  626. label: 'dictValue',
  627. value: 'dictKey',
  628. },
  629. },
  630. ],
  631. {
  632. label: "REF MBLNO", // Co-Loader 中文名称 往来单位 类别
  633. text: "请输入REF MBLNO",
  634. prop: "refno",
  635. disabled: false,
  636. },
  637. [
  638. {
  639. label: "业务编号",
  640. text: "业务编号",
  641. prop: "billNo",
  642. disabled: true,
  643. },
  644. {
  645. label: "所属团队",
  646. text: "请选择所属团队",
  647. prop: "teamName",
  648. disabled: false,
  649. type: 'select',
  650. dicData: [],
  651. forParameter: {
  652. key: 'id',
  653. label: 'postName',
  654. value: 'id',
  655. },
  656. rules: [{
  657. required: true,
  658. message: " ",
  659. trigger: "blur"
  660. }]
  661. },
  662. ],
  663. [
  664. {
  665. label: "OP", // 操作id 用户管理下拉 模糊搜索
  666. text: "请选择OP",
  667. prop: "operatorName",
  668. type: 'select',
  669. dicData: [],
  670. disabled: false,
  671. forParameter: {
  672. key: 'id',
  673. label: 'name',
  674. value: 'name',
  675. },
  676. rules: [{
  677. required: true,
  678. message: " ",
  679. trigger: "blur"
  680. }]
  681. },
  682. {
  683. label: "核算部门", // 核算部门Id accDept 核算部门 accDeptName 调机构管理接口
  684. text: "请选择核算部门",
  685. prop: "accDeptName",
  686. type: 'tree',
  687. dicData: [],
  688. disabled: false,
  689. clearable: false,
  690. forParameter: {
  691. label: "title",
  692. children: 'children'
  693. },
  694. rules: [{
  695. required: true,
  696. message: " ",
  697. trigger: "blur"
  698. }]
  699. },
  700. ],
  701. ]
  702. },
  703. activeName: 'first',
  704. bigtabs: 'wt',
  705. saberUserInfo: {}, // 当前登录人信息
  706. roleName: [], // 当前的角色权限
  707. // 需要加判断是否必填的数据
  708. messageData: [
  709. {
  710. name: '客户',
  711. value: 'corpCnName',
  712. },
  713. {
  714. name: '业务来源',
  715. value: 'srcType',
  716. },
  717. {
  718. name: 'MBLNO',
  719. value: 'mblno',
  720. },
  721. // {
  722. // name: 'booking NO',
  723. // value: 'bookingNo',
  724. // },
  725. // {
  726. // name: 'REF MBLNO',
  727. // value: 'refno',
  728. // },
  729. {
  730. name: '船名(VSL)',
  731. value: 'vesselCnName',
  732. },
  733. {
  734. name: '航次(VOY)',
  735. value: 'voyageNo',
  736. },
  737. {
  738. name: 'ETD',
  739. value: 'etd',
  740. },
  741. {
  742. name: '装货港',
  743. value: 'polCnName',
  744. },
  745. {
  746. name: '目的港',
  747. value: 'destinationNamePrint',
  748. },
  749. {
  750. name: '包装单位',
  751. value: 'packingUnit',
  752. },
  753. {
  754. name: '船公司',
  755. value: 'carrierCnName',
  756. },
  757. {
  758. name: '场站',
  759. value: 'cyCnName',
  760. },
  761. ],
  762. imporiData: [
  763. { id: 0, name: '导入 ONE 模板', key: 'ONE', showCoverDlg: true, document: 'importOne' },
  764. { id: 1, name: '导入 PIL 订舱模板', key: 'PIL-BOOKING', showCoverDlg: true, document: 'importPilBooking' },
  765. { id: 2, name: '导入截单格式', key: 'PIL-CUTDOC', showCoverDlg: true, document: 'importPilCutOffOrders' },
  766. { id: 3, name: '导入海信提单', key: 'HISENSE-BILL', showCoverDlg: false, document: 'importHisenseBill' }
  767. ],
  768. currentImportDataRow: null,
  769. excelForm: {},
  770. excelLoading: false,
  771. excelOption: {
  772. submitBtn: false,
  773. emptyBtn: false,
  774. column: [
  775. {
  776. label: "模板上传",
  777. prop: "excelFile",
  778. type: "upload",
  779. drag: true,
  780. loadText: "模板上传中,请稍等",
  781. span: 24,
  782. propsHttp: {
  783. res: "data"
  784. },
  785. tip: "请上传 .xls,.xlsx 标准格式文件",
  786. action: "api/blade-los/templateImport/importOne"
  787. }
  788. ]
  789. },
  790. excelBox: false,
  791. saberTenantId: 0,
  792. business: null,
  793. importTemplate: null,
  794. }
  795. },
  796. watch: {
  797. // 监听业务类型 如果不是分单 可以编辑分单号
  798. 'form.billType': {
  799. // 执行方法
  800. handler(oldValue, newValue) {
  801. // if (oldValue == 'MM') {
  802. // this.form.hblno = ''
  803. // }
  804. // 只有分单不能编辑
  805. // if (oldValue == 'MH') {
  806. // this.columnforfun('hblno').disabled = true
  807. // } else {
  808. // this.columnforfun('hblno').disabled = false
  809. // }
  810. // 王风刚 2025-02-21 所有分单号都不能手动输入,都可以申请
  811. },
  812. deep: true, // 深度监听
  813. immediate: true // 第一次改变就执行
  814. },
  815. // 监听箱信息数据 箱信息中有温度 自动切换 冻货
  816. 'form.preContainersList': {
  817. // 执行方法
  818. handler(oldValue, newValue) {
  819. // 判断是否是数组
  820. if (oldValue instanceof Array) {
  821. // 循环 有温度反 true 没有反 false
  822. const arr = oldValue.map(item => {
  823. if (Number(item.temperature)) {
  824. return true
  825. } else {
  826. return false
  827. }
  828. })
  829. console.log(arr, 12345)
  830. // 判断是否有温度
  831. if (arr[0]) {
  832. // 判断之前是否是冻货
  833. if (this.form.cargoType == 'reefer') return
  834. this.$message({
  835. message: '箱信息里有温度已将货描切换为冻柜',
  836. type: 'warning'
  837. });
  838. this.$set(this.form, 'cargoType', 'reefer')
  839. }
  840. }
  841. },
  842. deep: true, // 深度监听
  843. immediate: true // 第一次改变就执行,
  844. }
  845. },
  846. created() {
  847. let Obj = JSON.parse(localStorage.getItem('saber-tenantId'))
  848. this.saberTenantId = Obj ? Obj.content : 0;
  849. this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content
  850. this.roleName = localStorage.getItem('roleName').split(',')
  851. isProcurement({ "param": "verify.symbol" }).then(res => {
  852. this.verifySymbolStatus = res.data.data
  853. })
  854. isProcurement({ "param": "business" }).then(res => {
  855. this.business = res.data.data
  856. })
  857. isProcurement({ "param": "import.template" }).then(res => {
  858. this.importTemplate = res.data.data
  859. })
  860. if (this.detailData.billType) {
  861. this.form.billType = this.detailData.billType
  862. }
  863. // 判断是否员id, 有id 就不显示
  864. if (!this.form.id) {
  865. this.deptGetDetailPolfun() // 收货地 装货港 当前登录人的默认
  866. this.userGetListfun(undefined, true) // 获取用户管理数据
  867. }
  868. this.ownDeptLazyTreefun() // 获取公司数据
  869. this.getLazylistfun() // 获取审核数据
  870. this.mpaymodeWorkDictsfun() // 获取 付款方式字典
  871. this.srcTypeWorkDictsfun()
  872. // 获取EDI 数据
  873. this.editypesListfun()
  874. // 获取所属团队数据
  875. this.postSelectByUserfun()
  876. },
  877. methods: {
  878. inLock() {
  879. this.showLock = true;
  880. const data = {
  881. moduleName: "SE",
  882. tableName: "SE_order",
  883. billId: this.form.id,
  884. no: localStorage.getItem("browserID"),
  885. billNo: this.form.mblno
  886. };
  887. this.inDetailsKey(this.$route.name, {
  888. moduleName: "SE",
  889. tableName: "SE_order",
  890. billId: this.form.id,
  891. billNo: this.form.mblno
  892. });
  893. this.checkLock(data).then(res => {
  894. if (res.data.code == 200) {
  895. this.onLock(data).then(res => {
  896. if (res.data.code == 200) {
  897. this.showLock = false
  898. }
  899. });
  900. }
  901. });
  902. },
  903. addEdit() {
  904. if (this.form.billStatus >= 3) {
  905. this.$emit('toAddEdit')
  906. } else {
  907. if (contrastObj(this.form, this.oldForm)
  908. || contrastList(this.form.preContainersList, this.oldForm.preContainersList) || contrastList(this.form.containersList, this.oldForm.containersList)
  909. || contrastList(this.form.feeCenterListC, this.oldForm.feeCenterListC)
  910. || contrastList(this.form.feeCenterListD, this.oldForm.feeCenterListD)
  911. || contrastList(this.form.filesList, this.oldForm.filesList)
  912. || contrastList(this.form.waitingBoxList, this.oldForm.waitingBoxList)
  913. ) {
  914. this.$confirm('是否需要保存?', '提示', {
  915. confirmButtonText: '确定',
  916. cancelButtonText: '取消',
  917. type: 'warning'
  918. }).then(() => {
  919. this.editCustomer('toAddEdit')
  920. }).catch(() => {
  921. this.$emit('toAddEdit')
  922. });
  923. } else {
  924. this.$emit('toAddEdit')
  925. }
  926. }
  927. },
  928. CopyDocumentsfun() {
  929. if (!this.form.id) {
  930. return this.$message.error("请保存数据");
  931. }
  932. this.$DialogForm.show({
  933. title: '复制单据',
  934. width: '300px',
  935. menuPosition: 'right',
  936. data: { checkbox: '复制费用,复制箱型箱量' },
  937. option: {
  938. submitText: '确认',
  939. emptyText: '取消',
  940. span: 24,
  941. column: [{
  942. label: "复制类型",
  943. prop: "checkbox",
  944. type: 'checkbox',
  945. dicData: [{
  946. label: '复制费用',
  947. value: '复制费用',
  948. }, {
  949. label: '复制箱型箱量',
  950. value: '复制箱型箱量'
  951. }],
  952. dataType: 'string',
  953. span: 24,
  954. }]
  955. },
  956. beforeClose: (done) => {
  957. done()
  958. },
  959. callback: (res) => {
  960. res.done()
  961. this.billsCopyBillsfun(this.form.id, res.data.checkbox)
  962. res.close()
  963. }
  964. })
  965. },
  966. //文档导入
  967. importData(row) {
  968. if(!row) return
  969. this.excelOption.column[0].action = `/api/blade-los/templateImport/${row.document}?billId=${this.form.id}`
  970. // this.excelOption.column[0].action = `/api/blade-los/templateImport/${row.document}?billId=${this.form.id}`
  971. // this.excelOption.column[0].action = `/api/blade-los/templateImport/${row.document}?billId=${this.form.id}`
  972. // this.excelOption.column[0].action = `/api/blade-los/templateImport/${row.document}?billId=${this.form.id}`
  973. this.currentImportDataRow = row
  974. this.excelBox = true
  975. console.log('excelLoading', this.excelLoading)
  976. },
  977. uploadBefore(file, done, loading) {
  978. done();
  979. loading = true;
  980. },
  981. removeEmptyValues(obj) {
  982. Object.keys(obj).forEach(key => {
  983. if (obj[key] === null || obj[key] === undefined || obj[key] === '') {
  984. delete obj[key];
  985. }
  986. });
  987. return obj;
  988. },
  989. // 上传成功
  990. onSuccess(res, done, loading, column) {
  991. if (Object.keys(res).length) {
  992. if(this.currentImportDataRow.showCoverDlg===true) {
  993. this.$confirm('此操作将覆盖数据, 是否继续?', '提示', {
  994. confirmButtonText: '确定',
  995. cancelButtonText: '取消',
  996. type: 'warning'
  997. }).then(() => {
  998. // this.form = res;
  999. Object.keys(res).forEach(key => {
  1000. if (res[key]) {
  1001. if (key != 'detail') {
  1002. // this.form[key] = res[key]
  1003. this.$set(this.form, key, res[key])
  1004. }
  1005. if (key == 'detail') {
  1006. Object.keys(res.detail).forEach(key => {
  1007. if (res.detail[key]) {
  1008. // this.form.detail[key] = res.detail[key]
  1009. this.$set(this.form.detail, key, res.detail[key])
  1010. }
  1011. });
  1012. }
  1013. }
  1014. });
  1015. this.excelBox = false;
  1016. this.$message.success("导入成功!");
  1017. loading = false;
  1018. done();
  1019. }).catch(() => {
  1020. this.excelBox = false;
  1021. loading = false;
  1022. done();
  1023. });
  1024. }else{
  1025. console.log('onSuccess 1')
  1026. // this.form = res;
  1027. Object.keys(res).forEach(key => {
  1028. if (res[key]) {
  1029. if (key != 'detail') {
  1030. // this.form[key] = res[key]
  1031. this.$set(this.form, key, res[key])
  1032. }
  1033. if (key == 'detail') {
  1034. Object.keys(res.detail).forEach(key => {
  1035. if (res.detail[key]) {
  1036. // this.form.detail[key] = res.detail[key]
  1037. this.$set(this.form.detail, key, res.detail[key])
  1038. }
  1039. });
  1040. }
  1041. }
  1042. })
  1043. loading = false;
  1044. done();
  1045. this.excelBox = false;
  1046. this.$message.success("导入成功!");
  1047. console.log('onSuccess 2')
  1048. }
  1049. } else {
  1050. loading = false;
  1051. done();
  1052. }
  1053. },
  1054. // 获取EDI列表数据
  1055. editypesListfun() {
  1056. editypesList(1, 1000).then(res => {
  1057. this.ediData = res.data.data.records
  1058. this.ediData_SO = res.data.data.records.filter(r => r.groupName == 'SO')
  1059. this.ediData_SI = res.data.data.records.filter(r => r.groupName == 'SI')
  1060. })
  1061. },
  1062. // 发送edi
  1063. editypesSendingEdifun(row) {
  1064. row.billId = this.form.id
  1065. let msgsList = []
  1066. if (checkFullWidthSymbols(this.form.detail.hshipperDetails).hasFullWidth) {
  1067. let msg = []
  1068. for (let item of checkFullWidthSymbols(this.form.detail.hshipperDetails).positions) {
  1069. msg.push(`第${item.row}行的"${item.symbol}"`)
  1070. }
  1071. this.$message({
  1072. dangerouslyUseHTMLString: true,
  1073. message: `发货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
  1074. type: 'error'
  1075. });
  1076. return
  1077. }
  1078. if (checkFullWidthSymbols(this.form.detail.hconsigneeDetails).hasFullWidth) {
  1079. let msg = []
  1080. for (let item of checkFullWidthSymbols(this.form.detail.hconsigneeDetails).positions) {
  1081. msg.push(`第${item.row}行的"${item.symbol}"`)
  1082. }
  1083. this.$message({
  1084. dangerouslyUseHTMLString: true,
  1085. message: `收货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
  1086. type: 'error'
  1087. });
  1088. return
  1089. }
  1090. if (checkFullWidthSymbols(this.form.detail.hnotifyDetails).hasFullWidth) {
  1091. let msg = []
  1092. for (let item of checkFullWidthSymbols(this.form.detail.hnotifyDetails).positions) {
  1093. msg.push(`第${item.row}行的"${item.symbol}"`)
  1094. }
  1095. this.$message({
  1096. dangerouslyUseHTMLString: true,
  1097. message: `通知人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
  1098. type: 'error'
  1099. });
  1100. return
  1101. }
  1102. if (checkFullWidthSymbols(this.form.detail.mshipperDetails).hasFullWidth) {
  1103. let msg = []
  1104. for (let item of checkFullWidthSymbols(this.form.detail.mshipperDetails).positions) {
  1105. msg.push(`第${item.row}行的"${item.symbol}"`)
  1106. }
  1107. if (msg.length > 0) {
  1108. this.$message({
  1109. dangerouslyUseHTMLString: true,
  1110. message: `MBL 发货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
  1111. type: 'error'
  1112. });
  1113. return
  1114. }
  1115. }
  1116. if (checkFullWidthSymbols(this.form.detail.mconsigneeDetails).hasFullWidth) {
  1117. let msg = []
  1118. for (let item of checkFullWidthSymbols(this.form.detail.mconsigneeDetails).positions) {
  1119. msg.push(`第${item.row}行的"${item.symbol}"`)
  1120. }
  1121. if (msg.length > 0) {
  1122. this.$message({
  1123. dangerouslyUseHTMLString: true,
  1124. message: `MBL 收货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
  1125. type: 'error'
  1126. });
  1127. return
  1128. }
  1129. }
  1130. if (checkFullWidthSymbols(this.form.detail.mnotifyDetails).hasFullWidth) {
  1131. let msg = []
  1132. for (let item of checkFullWidthSymbols(this.form.detail.mnotifyDetails).positions) {
  1133. msg.push(`第${item.row}行的"${item.symbol}"`)
  1134. }
  1135. if (msg.length > 0) {
  1136. this.$message({
  1137. dangerouslyUseHTMLString: true,
  1138. message: `MBL 通知人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
  1139. type: 'error'
  1140. });
  1141. return
  1142. }
  1143. }
  1144. if (checkFullWidthSymbols(this.form.marks).hasFullWidth) {
  1145. let msg = []
  1146. for (let item of checkFullWidthSymbols(this.form.marks).positions) {
  1147. msg.push(`第${item.row}行的"${item.symbol}"`)
  1148. }
  1149. this.$message({
  1150. dangerouslyUseHTMLString: true,
  1151. message: `唛头:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
  1152. type: 'error'
  1153. });
  1154. return
  1155. }
  1156. if (checkFullWidthSymbols(this.form.commodityDescr).hasFullWidth) {
  1157. let msg = []
  1158. for (let item of checkFullWidthSymbols(this.form.commodityDescr).positions) {
  1159. msg.push(`第${item.row}行的"${item.symbol}"`)
  1160. }
  1161. this.$message({
  1162. dangerouslyUseHTMLString: true,
  1163. message: `货描:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
  1164. type: 'error'
  1165. });
  1166. return
  1167. }
  1168. if (checkFullWidthSymbols(this.form.forwarding).hasFullWidth) {
  1169. let msg = []
  1170. for (let item of checkFullWidthSymbols(this.form.forwarding).positions) {
  1171. msg.push(`第${item.row}行的"${item.symbol}"`)
  1172. }
  1173. this.$message({
  1174. dangerouslyUseHTMLString: true,
  1175. message: `FORWARDING:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
  1176. type: 'error'
  1177. });
  1178. return
  1179. }
  1180. if (!verifyEnglish(this.form.detail.hshipperDetails)) {
  1181. msgsList.push('发货人')
  1182. }
  1183. if (!verifyEnglish(this.form.detail.hconsigneeDetails)) {
  1184. msgsList.push('收货人')
  1185. }
  1186. if (!verifyEnglish(this.form.detail.hnotifyDetails)) {
  1187. msgsList.push('通知人')
  1188. }
  1189. if (!verifyEnglish(this.form.detail.mshipperDetails)) {
  1190. msgsList.push('MBL 发货人')
  1191. }
  1192. if (!verifyEnglish(this.form.detail.mconsigneeDetails)) {
  1193. msgsList.push('MBL 收货人')
  1194. }
  1195. if (!verifyEnglish(this.form.detail.mnotifyDetails)) {
  1196. msgsList.push('MBL 通知人')
  1197. }
  1198. if (!verifyEnglish(this.form.marks)) {
  1199. msgsList.push('唛头')
  1200. }
  1201. if (!verifyEnglish(this.form.commodityDescr)) {
  1202. msgsList.push('货描')
  1203. }
  1204. if (!verifyEnglish(this.form.forwarding)) {
  1205. msgsList.push('FORWARDING')
  1206. }
  1207. if (msgsList.length > 0) {
  1208. this.$message.error(`请正确输入${msgsList.join(",")}的英文`);
  1209. return;
  1210. }
  1211. this.saveLoading = true
  1212. editypesSendingEdi(row).then(res => {
  1213. this.saveLoading = false
  1214. // 判断data是否有值,没有值说明不成功给个弹窗返回
  1215. if (!res.data.data) {
  1216. let text = res.data.msg.replace("\r\n", "<br>");
  1217. console.log(text)
  1218. this.$message({
  1219. type: 'warning',
  1220. dangerouslyUseHTMLString: true,
  1221. message: text,
  1222. // message: `<p>${text.slice(text.indexOf('非空'), text.indexOf('特殊字符'))}</p><p>${text.slice(text.indexOf('特殊字符'), text.indexOf('长度超长'))}</p><p>${text.slice(text.indexOf('长度超长'), text.indexOf('其他'))}</p><p>${text.slice(text.indexOf('其他'))}</p>`,
  1223. duration: 5000
  1224. });
  1225. } else {
  1226. this.$message.success('操作成功,请去文件中心查看')
  1227. this.billsDetailfun(this.form.id) // 详情接口
  1228. }
  1229. }).catch((err) => {
  1230. this.saveLoading = false
  1231. })
  1232. },
  1233. // 报表弹窗
  1234. previewDialogfun() {
  1235. this.getReportTypeByBigHandle('业务')
  1236. this.previewDialog = true
  1237. },
  1238. //请核关闭
  1239. choceScheduleFun() {
  1240. this.checkScheduleDialog = false
  1241. },
  1242. // 收货地 装货港 当前登录人的默认
  1243. deptGetDetailPolfun() {
  1244. deptGetDetailPol(this.saberUserInfo.dept_pid.split(',')[0]).then(res => {
  1245. // 收货地
  1246. this.form.placeReceiptName = res.data.data.polEnName
  1247. this.form.placeReceiptId = res.data.data.polId
  1248. this.form.placeReceiptCode = res.data.data.polCode
  1249. this.form.placeReceiptNamePrint = res.data.data.polEnName
  1250. // 装货港
  1251. this.form.polCnName = res.data.data.polCnName
  1252. this.form.polEnName = res.data.data.polEnName
  1253. this.form.polId = res.data.data.polId
  1254. this.form.polCode = res.data.data.polCode
  1255. this.form.polNamePrint = res.data.data.polEnName
  1256. // 签单地点 默认 装货港
  1257. this.$set(this.form, 'issueAtId', this.form.polId)
  1258. this.$set(this.form, 'issueAt', this.form.polEnName)
  1259. // 主单单付费地点 默认 如果主单付费方式 为PP 取装货港 如果主单付费地点为CC 取卸货港
  1260. if (this.form.mpaymode == 'PP') {
  1261. this.$set(this.form, 'mpayplace', this.form.polEnName)
  1262. }
  1263. // 分单单付费地点 默认 如果分单付费方式 为PP 取装货港 如果分单付费地点为CC 取卸货港
  1264. if (this.form.hpaymode == 'PP') {
  1265. this.$set(this.form, 'hpayplace', this.form.polEnName)
  1266. }
  1267. })
  1268. },
  1269. // 获取用户管理数据
  1270. userGetListfun(account = undefined, type = false,) {
  1271. userGetList(1, 10, { account }, this.saberUserInfo.dept_pid.split(',')[0]).then(res => {
  1272. this.columnforfun('operatorName').dicData = res.data.data.records
  1273. if (type) {
  1274. // 核算部门 默认登录人的部门
  1275. for (let item of this.columnforfun('operatorName').dicData) {
  1276. if (item.name == this.form.operatorName) {
  1277. this.$set(this.form, 'accDeptName', item.deptName)
  1278. this.$set(this.form, 'accDept', item.deptId)
  1279. this.$set(this.form, 'operatorDept', item.deptId.split(',').pop())
  1280. this.$set(this.form, 'operatorDeptName', item.deptId)
  1281. }
  1282. }
  1283. }
  1284. })
  1285. },
  1286. // 获取所属岗位数据
  1287. postSelectByUserfun() {
  1288. postSelectByUser(JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id).then(res => {
  1289. this.columnforfun('teamName').dicData = res.data.data
  1290. // 判断是否有值,没有的话默认第一个
  1291. if (!this.form.teamName) {
  1292. this.$set(this.form, 'teamId', res.data.data[0].id)
  1293. this.$set(this.form, 'teamName', res.data.data[0].postName)
  1294. }
  1295. })
  1296. },
  1297. // 获取付款方式字典数据
  1298. mpaymodeWorkDictsfun() {
  1299. getWorkDicts('payment_method_los').then((res) => {
  1300. this.columnforfun('mpaymode').dicData = res.data.data
  1301. this.columnforfun('hpaymode').dicData = res.data.data
  1302. })
  1303. },
  1304. // 获取核算部分数据 // 机构管理接口
  1305. getLazylistfun() {
  1306. getDeptTree().then(res => {
  1307. this.columnforfun('accDeptName').dicData = res.data.data
  1308. })
  1309. },
  1310. // 获取客户名称数据 往来单位数据
  1311. getBcorpsListfun(cnName) {
  1312. getBcorpsList(1, 20, { shortName: cnName, status: 0 }).then(res => {
  1313. this.columnforfun('corpCnName').dicData = res.data.data.records
  1314. })
  1315. },
  1316. // 获取客户联系人 客户OP
  1317. getBcorpsattnListfun(cname) {
  1318. getBcorpsattnList(1, 10, { pid: this.form.corpId, cname }).then(res => {
  1319. this.columnforfun('corpAttnName').dicData = res.data.data.records
  1320. // if (res.data.data.records.length == 0) {
  1321. // this.form.corpAttnName = ''
  1322. // this.form.corpAttnId = ''
  1323. // this.$set(this.form, 'corpAttnTel', '')
  1324. // this.$set(this.form, 'corpAttnEmail', '')
  1325. // return
  1326. // }
  1327. // this.form.corpAttnName = res.data.data.records[0].cname
  1328. // this.form.corpAttnId = res.data.data.records[0].id
  1329. // this.$set(this.form, 'corpAttnTel', res.data.data.records[0].tel)
  1330. // this.$set(this.form, 'corpAttnEmail', res.data.data.records[0].email)
  1331. })
  1332. },
  1333. // 获取地点信息
  1334. getBlocationsListfun(cnName) {
  1335. getBlocationsList(1, 10, { cnName }).then(res => {
  1336. this.columnforfun('mPayplace').dicData = res.data.data.records
  1337. })
  1338. },
  1339. // 获取业务来源数据
  1340. srcTypeWorkDictsfun() {
  1341. getWorkDicts('src_type_los').then(res => {
  1342. this.columnforfun('srcType').dicData = res.data.data
  1343. })
  1344. },
  1345. // 获取业务来源代理数据
  1346. agentBcorpsListfun(cnName) {
  1347. let corpTypeName = '国内直接客户,国内同行及代理,国外直接客户,国外同行及代理'
  1348. getBcorpslistByType(1, 20, { cnName, status: 0, corpTypeName }).then(res => {
  1349. this.columnforfun('srcCnName').dicData = res.data.data.records
  1350. })
  1351. },
  1352. // 获取业务来源业务员数据
  1353. salesUserGetListfun(account) {
  1354. if (this.$store.getters.userInfo.tenant_id === "263057") {
  1355. userGetList(1, 10, { roleId: '业务员' }).then(res => {
  1356. this.columnforfun('srcCnName').dicData = res.data.data.records
  1357. })
  1358. } else {
  1359. selectListLos('业务员', account).then(res => {
  1360. this.columnforfun('srcCnName').dicData = res.data.data
  1361. })
  1362. }
  1363. },
  1364. // 获取公司名称 用户管理左侧
  1365. ownDeptLazyTreefun() {
  1366. getDeptLazyTree(0).then(res => {
  1367. this.columnforfun('srcCnName').dicData = res.data.data
  1368. // 来源 内容 默认登录人所属公司
  1369. for (let item of this.columnforfun('srcCnName').dicData) {
  1370. if (item.id == JSON.parse(localStorage.getItem('saber-userInfo')).content.dept_pid.split(',')[0]) {
  1371. this.$set(this.form, 'srcId', item.id)
  1372. this.$set(this.form, 'srcCnName', item.title)
  1373. this.$set(this.form, 'srcEnName', item.title)
  1374. }
  1375. }
  1376. })
  1377. },
  1378. // 申请B/L NO
  1379. billsGetBillNofun() {
  1380. let billNoFormat = ''
  1381. if (this.form.cargoType == 'dry') {
  1382. billNoFormat = 'HYCK-PH'
  1383. } else if (this.form.cargoType == 'danger') {
  1384. billNoFormat = 'HYCK-WXP'
  1385. } else if (this.form.cargoType == 'reefer') {
  1386. // 冻柜使用普货的编号
  1387. // billNoFormat = 'HYCK-DG'
  1388. billNoFormat = 'HYCK-PH'
  1389. }
  1390. billsGetBillNo({
  1391. businessTypeCode: 'HYCK',
  1392. billNoFormat: billNoFormat
  1393. }).then(res => {
  1394. this.columnforfun('hpaymode').disabled = false
  1395. this.$set(this.form, 'hblno', res.data.data)
  1396. this.billsSubmitfun()
  1397. })
  1398. },
  1399. // 下拉多选弹窗的确认
  1400. eldialogConfirm(name) {
  1401. if (name == 'bcorps') {
  1402. if (this.$refs.bcorps[0].isShow) {
  1403. console.log('列表确认')
  1404. this.form.corpCnName = this.$refs.bcorps[0].selectionList[0].cnName
  1405. this.form.corpEnName = this.$refs.bcorps[0].selectionList[0].enName
  1406. this.form.corpId = this.$refs.bcorps[0].selectionList[0].id
  1407. this.form.corpCode = this.$refs.bcorps[0].selectionList[0].code
  1408. this.form.corpSource = this.$refs.bcorps[0].selectionList[0].corpSource
  1409. if (this.business == 1) {
  1410. agreementpriceList({ corpId: this.$refs.bcorps[0].selectionList[0].id }).then(res => {
  1411. if (res.data.data.records.length) {
  1412. this.form.accountPeriodType = res.data.data.records[0].accountPeriodType == '月结' ? '月结' : '票结有协议'
  1413. } else {
  1414. this.form.accountPeriodType = '票结无协议'
  1415. }
  1416. })
  1417. }
  1418. // 获取 客户op数据
  1419. this.getBcorpsattnListfun()
  1420. // 业务来源参数带出
  1421. this.$set(this.form, 'srcType', this.$refs.bcorps[0].selectionList[0].sourceType)
  1422. this.$set(this.form, 'srcId', this.$refs.bcorps[0].selectionList[0].srcId)
  1423. this.$set(this.form, 'srcCnName', this.$refs.bcorps[0].selectionList[0].srcCnName)
  1424. this.$set(this.form, 'srcEnName', this.$refs.bcorps[0].selectionList[0].srcEnName)
  1425. this.columnforfun('srcType').disabled = false
  1426. this.columnforfun('srcCnName').disabled = false
  1427. // 航线带出往来单位的优势航线
  1428. this.$set(this.form, 'lineCnName', this.$refs.bcorps[0].selectionList[0].advantageRoute)
  1429. // 带出发货人数据
  1430. this.$set(this.form.detail, 'hshipperId', this.$refs.bcorps[0].selectionList[0].id)
  1431. this.$set(this.form.detail, 'hshipperCnName', this.$refs.bcorps[0].selectionList[0].cnName)
  1432. this.$set(this.form.detail, 'hshipperEnName', this.$refs.bcorps[0].selectionList[0].enName)
  1433. this.$set(this.form.detail, 'hshipperCode', this.$refs.bcorps[0].selectionList[0].code)
  1434. this.$set(this.form.detail, 'hshipperDetails', this.$refs.bcorps[0].selectionList[0].details)
  1435. this.$set(this.form.detail, 'hshipperCntyName', this.$refs.bcorps[0].selectionList[0].cntyName)
  1436. this.$set(this.form.detail, 'hshipperCntyCode', this.$refs.bcorps[0].selectionList[0].cntyCode)
  1437. this.columnforfun('corpAttnName').disabled = false
  1438. this.columnforfun('corpAttnTel').disabled = false
  1439. this.columnforfun('corpAttnEmail').disabled = false
  1440. } else {
  1441. console.log('详情确认')
  1442. console.log(this.$refs.bcorps, 962)
  1443. this.$refs.bcorps[0].$refs.detail.submitForm()
  1444. this.form.corpCnName = this.$refs.bcorps[0].$refs.detail.formData.cnName
  1445. this.form.corpEnName = this.$refs.bcorps[0].$refs.detail.formData.enName
  1446. this.form.corpId = this.$refs.bcorps[0].$refs.detail.formData.id
  1447. this.form.corpCode = this.$refs.bcorps[0].$refs.detail.formData.code
  1448. this.form.corpSource = this.$refs.bcorps[0].$refs.detail.formData.corpSource
  1449. if (this.business == 1) {
  1450. agreementpriceList({ corpId: this.$refs.bcorps[0].$refs.detail.formData.id }).then(res => {
  1451. if (res.data.data.records.length) {
  1452. this.form.accountPeriodType = res.data.data.records[0].accountPeriodType == '月结' ? '月结' : '票结有协议'
  1453. } else {
  1454. this.form.accountPeriodType = '票结无协议'
  1455. }
  1456. })
  1457. }
  1458. // 获取 客户op数据
  1459. this.getBcorpsattnListfun()
  1460. // 业务来源参数带出
  1461. this.$set(this.form, 'srcType', this.$refs.bcorps[0].$refs.detail.formData.sourceType)
  1462. this.$set(this.form, 'srcId', this.$refs.bcorps[0].$refs.detail.formData.srcId)
  1463. this.$set(this.form, 'srcCnName', this.$refs.bcorps[0].$refs.detail.formData.srcCnName)
  1464. this.$set(this.form, 'srcEnName', this.$refs.bcorps[0].$refs.detail.formData.srcEnName)
  1465. this.columnforfun('srcType').disabled = false
  1466. this.columnforfun('srcCnName').disabled = false
  1467. // 航线带出往来单位的优势航线
  1468. this.$set(this.form, 'lineCnName', this.$refs.bcorps[0].$refs.detail.formData.advantageRoute)
  1469. // 带出发货人数据
  1470. this.$set(this.form.detail, 'hshipperId', this.$refs.bcorps[0].$refs.detail.formData.id)
  1471. this.$set(this.form.detail, 'hshipperCnName', this.$refs.bcorps[0].$refs.detail.formData.cnName)
  1472. this.$set(this.form.detail, 'hshipperEnName', this.$refs.bcorps[0].$refs.detail.formData.enName)
  1473. this.$set(this.form.detail, 'hshipperCode', this.$refs.bcorps[0].$refs.detail.formData.code)
  1474. this.$set(this.form.detail, 'hshipperDetails', this.$refs.bcorps[0].$refs.detail.formData.details)
  1475. this.$set(this.form.detail, 'hshipperCntyName', this.$refs.bcorps[0].$refs.detail.formData.cntyName)
  1476. this.$set(this.form.detail, 'hshipperCntyCode', this.$refs.bcorps[0].$refs.detail.formData.cntyCode)
  1477. this.columnforfun('corpAttnName').disabled = false
  1478. this.columnforfun('corpAttnTel').disabled = false
  1479. this.columnforfun('corpAttnEmail').disabled = false
  1480. }
  1481. }
  1482. this.$refs.searchQueryRef[0].corpVisible = false
  1483. },
  1484. // 下拉多选弹窗数据多选回调
  1485. eldialogMultipleChoice(list, name) {
  1486. if (name == 'bcorps') {
  1487. let arr = []
  1488. if (list.length > 1) {
  1489. this.$refs.bcorps[0].$refs.crud.toggleSelection() // 先清空所以选择的数据
  1490. arr = [list[list.length - 1]] // 获取最新点击的数组
  1491. this.$refs.bcorps[0].$refs.crud.toggleSelection(arr, true) // 把刚点击的数组变成选择状态
  1492. } else {
  1493. arr = list
  1494. }
  1495. this.$refs.bcorps[0].selectionList = arr
  1496. }
  1497. },
  1498. /* 远程模糊查询操作用户 */
  1499. remoteMethod(value, name) {
  1500. if (name == 'operatorName') {
  1501. this.userGetListfun(value)
  1502. } else if (name == 'accDeptName') {
  1503. this.getLazylistfun(value)
  1504. } else if (name == 'corpCnName') {
  1505. this.getBcorpsListfun(value)
  1506. } else if (name == 'mPayplace') {
  1507. this.getBlocationsListfun(value)
  1508. } else if (name == 'corpAttnName') {
  1509. this.getBcorpsattnListfun(value)
  1510. } else if (name == 'srcType') {
  1511. this.srcTypeWorkDictsfun()
  1512. } else if (name == 'srcCnName') {
  1513. if (this.form.srcType == 'SALES') {
  1514. // 业务员
  1515. this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'name', value: 'name' }
  1516. this.salesUserGetListfun(value)
  1517. } else if (this.form.srcType == 'AGENT') {
  1518. // 代理
  1519. this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'cnName', value: 'cnName' }
  1520. this.agentBcorpsListfun(value)
  1521. } else if (this.form.srcType == 'OWN') {
  1522. // 公司
  1523. this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'title', value: 'title' }
  1524. this.ownDeptLazyTreefun()
  1525. } else { }
  1526. } else if (name == 'teamName') {
  1527. this.postSelectByUserfun()
  1528. } else {
  1529. }
  1530. },
  1531. // 下拉的监听事件
  1532. corpChange(value, name) {
  1533. if (name == 'operatorName') {
  1534. // OP 下拉赋值 用户管理列表
  1535. for (let item of this.columnforfun('operatorName').dicData) {
  1536. if (item.name == value) {
  1537. this.form.operatorName = item.name
  1538. this.form.operatorId = item.id
  1539. this.form.operatorDept = item.deptId.split(',').pop()
  1540. this.form.operatorDeptName = item.deptName
  1541. }
  1542. }
  1543. }
  1544. else if (name == 'accDeptName') {
  1545. // OP 下拉赋值 用户管理列表
  1546. for (let item of this.columnforfun('accDeptName').dicData) {
  1547. if (item.title == value) {
  1548. this.form.accDeptName = item.title
  1549. this.form.accDept = item.id
  1550. }
  1551. }
  1552. }
  1553. else if (name == 'corpCnName') {
  1554. if (value) {
  1555. // this.columnforfun('corpAttnName').disabled = false
  1556. // this.columnforfun('corpAttnTel').disabled = false
  1557. // this.columnforfun('corpAttnEmail').disabled = false
  1558. } else {
  1559. // this.columnforfun('corpAttnName').disabled = true
  1560. // this.columnforfun('corpAttnTel').disabled = true
  1561. // this.columnforfun('corpAttnEmail').disabled = true
  1562. // 如果点击清空按钮把值赋值为空
  1563. this.form.corpCnName = ''
  1564. this.form.corpEnName = ''
  1565. this.form.corpId = ''
  1566. this.form.corpCode = ''
  1567. this.form.shortName = ''
  1568. this.form.corpSource = ""
  1569. if (this.business == 1) {
  1570. this.form.accountPeriodType = ""
  1571. }
  1572. // 清空 客户OP
  1573. // this.form.corpAttnName = ''
  1574. this.form.corpAttnId = ''
  1575. this.$set(this.form, 'corpAttnTel', '')
  1576. this.$set(this.form, 'corpAttnEmail', '')
  1577. // 清空 业务来源和来源详情
  1578. this.$set(this.form, 'srcType', '')
  1579. this.$set(this.form, 'srcId', '')
  1580. this.$set(this.form, 'srcCnName', '')
  1581. this.$set(this.form, 'srcEnName', '')
  1582. }
  1583. // 往来单位
  1584. for (let item of this.columnforfun('corpCnName').dicData) {
  1585. if (item.cnName == value) {
  1586. this.form.corpCnName = item.cnName
  1587. this.form.corpEnName = item.enName
  1588. this.form.corpId = item.id
  1589. this.form.corpCode = item.code
  1590. this.form.shortName = item.shortName
  1591. this.form.corpSource = item.corpSource
  1592. if (this.business == 1) {
  1593. agreementpriceList({ corpId: item.id }).then(res => {
  1594. if (res.data.data.records.length) {
  1595. this.form.accountPeriodType = res.data.data.records[0].accountPeriodType == '月结' ? '月结' : '票结有协议'
  1596. } else {
  1597. this.form.accountPeriodType = '票结无协议'
  1598. }
  1599. })
  1600. }
  1601. // 获取 客户op数据
  1602. this.getBcorpsattnListfun()
  1603. // 业务来源参数带出
  1604. this.$set(this.form, 'srcType', item.sourceType)
  1605. this.$set(this.form, 'srcId', item.srcId)
  1606. this.$set(this.form, 'srcCnName', item.srcCnName)
  1607. this.$set(this.form, 'srcEnName', item.srcEnName)
  1608. this.$set(this.form, 'srcDeptId', item.deptId.split(',').pop())
  1609. this.$set(this.form, 'srcDeptName', item.deptName)
  1610. this.columnforfun('srcType').disabled = false
  1611. this.columnforfun('srcCnName').disabled = false
  1612. // 航线带出往来单位的优势航线
  1613. this.$set(this.form, 'lineCnName', item.advantageRoute)
  1614. // 带出发货人数据
  1615. // this.$set(this.form,'hshipperId',item.id)
  1616. // this.$set(this.form,'hshipperCnName',item.cnName)
  1617. // this.$set(this.form,'hshipperEnName',item.enName)
  1618. // this.$set(this.form,'hshipperCode',item.code)
  1619. // this.$set(this.form,'hshipperDetails',item.details)
  1620. // this.$set(this.form,'hshipperCntyName',item.cntyName)
  1621. // this.$set(this.form,'hshipperCntyCode',item.cntyCode)
  1622. }
  1623. }
  1624. }
  1625. else if (name == 'corpAttnName') {
  1626. if (this.columnforfun('corpAttnName').dicData.length) {
  1627. for (let item of this.columnforfun('corpAttnName').dicData) {
  1628. if (item.cname == value) {
  1629. this.form.corpAttnName = item.cname
  1630. this.form.corpAttnId = item.id
  1631. this.$set(this.form, 'corpAttnTel', item.tel)
  1632. this.$set(this.form, 'corpAttnEmail', item.email)
  1633. }
  1634. }
  1635. } else {
  1636. if (value) {
  1637. this.form.corpAttnName = value
  1638. this.form.corpAttnId = null
  1639. }
  1640. }
  1641. }
  1642. else if (name == 'srcType') {
  1643. if (!value) {
  1644. this.$set(this.form, 'srcType', '')
  1645. // this.columnforfun('srcCnName').disabled = true
  1646. return
  1647. }
  1648. this.$set(this.form, 'srcId', '')
  1649. this.$set(this.form, 'srcCnName', '')
  1650. this.$set(this.form, 'srcEnName', '')
  1651. this.form[name] = value
  1652. if (value == 'OWN') {
  1653. // 公司
  1654. this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'title', value: 'title' }
  1655. this.ownDeptLazyTreefun()
  1656. } else if (value == 'AGENT') {
  1657. // 代理
  1658. this.columnforfun('srcCnName').type = 'select'
  1659. this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'cnName', value: 'cnName' }
  1660. this.columnforfun('srcCnName').disabled = false
  1661. this.agentBcorpsListfun()
  1662. } else if (value == 'SALES') {
  1663. // 业务员
  1664. this.columnforfun('srcCnName').type = 'select'
  1665. this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'name', value: 'name' }
  1666. this.columnforfun('srcCnName').disabled = false
  1667. this.salesUserGetListfun()
  1668. }
  1669. }
  1670. else if (name == 'srcCnName') {
  1671. for (let item of this.columnforfun('srcCnName').dicData) {
  1672. if (item[this.columnforfun('srcCnName').forParameter.value] == value) {
  1673. if (this.form.srcType == 'SALES') {
  1674. // 业务员
  1675. this.$set(this.form, 'srcId', item.id)
  1676. this.$set(this.form, 'srcCnName', item.name)
  1677. this.$set(this.form, 'srcEnName', item.name)
  1678. this.$set(this.form, 'srcDeptId', item.deptId.split(',').pop())
  1679. this.$set(this.form, 'srcDeptName', item.deptName)
  1680. } else if (this.form.srcType == 'AGENT') {
  1681. // 代理
  1682. this.$set(this.form, 'srcId', item.id)
  1683. this.$set(this.form, 'srcCnName', item.cnName)
  1684. this.$set(this.form, 'srcEnName', item.enName)
  1685. }
  1686. }
  1687. }
  1688. }
  1689. else if (name == 'coloaderCnName') {
  1690. for (let item of this.columnforfun('coloaderCnName').dicData) {
  1691. if (item.cnName == value) {
  1692. this.$set(this.form, 'coloaderId', item.id)
  1693. this.$set(this.form, 'coloaderCnName', item.cnName)
  1694. this.$set(this.form, 'coloaderEnName', item.enName)
  1695. }
  1696. }
  1697. }
  1698. else if (name == 'mpaymode') {
  1699. console.log('mpaymode')
  1700. // 主单付费方式
  1701. this.form[name] = value
  1702. if (value == 'PP') {
  1703. if (this.business == 1) {
  1704. // 无需更改,提示即可
  1705. // this.$set(this.form, 'hpaymode', 'PP')
  1706. // this.$set(this.form, 'hpayplace', this.form.polEnName ? this.form.polEnName : '')
  1707. }
  1708. this.$set(this.form, 'mpayplace', this.form.polEnName ? this.form.polEnName : '')
  1709. } else {
  1710. if (this.business == 1) {
  1711. // 无需更改,提示即可
  1712. // this.$set(this.form, 'hpaymode', 'CC')
  1713. this.$set(this.form, 'mpayplace', 'DESTINATION')
  1714. // this.$set(this.form, 'hpayplace', 'DESTINATION')
  1715. } else {
  1716. this.$set(this.form, 'mpayplace', this.form.podEnName ? this.form.podEnName : '')
  1717. }
  1718. }
  1719. if (value != this.form.hpaymode) {
  1720. this.$alert('主单付费方式和分单的付费方式不一致 !', '提示', {
  1721. confirmButtonText: '确定',
  1722. });
  1723. }
  1724. }
  1725. else if (name == 'hpaymode') {
  1726. // 分单付费方式
  1727. this.form[name] = value
  1728. if (value == 'PP') {
  1729. if (this.business == 1) {
  1730. // this.$set(this.form, 'mpaymode', 'PP')
  1731. // this.$set(this.form, 'mpayplace', this.form.polEnName ? this.form.polEnName : '')
  1732. }
  1733. this.$set(this.form, 'hpayplace', this.form.polEnName ? this.form.polEnName : '')
  1734. } else {
  1735. if (this.business == 1) {
  1736. // this.$set(this.form, 'mpaymode', 'CC')
  1737. // this.$set(this.form, 'mpayplace', 'DESTINATION')
  1738. this.$set(this.form, 'hpayplace', 'DESTINATION')
  1739. } else {
  1740. this.$set(this.form, 'hpayplace', this.form.podEnName ? this.form.podEnName : '')
  1741. }
  1742. }
  1743. if (value != this.form.paymode) {
  1744. this.$alert('主单付费方式和分单的付费方式不一致 !', '提示', {
  1745. confirmButtonText: '确定',
  1746. });
  1747. }
  1748. }
  1749. else if (name == 'teamName') {
  1750. if (!value) {
  1751. this.$set(this.form, 'teamId', '')
  1752. this.$set(this.form, 'teamName', '')
  1753. }
  1754. for (let item of this.columnforfun('teamName').dicData) {
  1755. if (item.id == value) {
  1756. this.$set(this.form, 'teamId', item.id)
  1757. this.$set(this.form, 'teamName', item.postName)
  1758. }
  1759. }
  1760. }
  1761. else {
  1762. this.form[name] = value
  1763. }
  1764. },
  1765. // 申请B/L NO
  1766. applyforfun(text) {
  1767. if (!this.form.id) {
  1768. this.$message({
  1769. message: '请先保存数据',
  1770. type: 'warning'
  1771. });
  1772. return
  1773. }
  1774. // 如果不是分单
  1775. // 王风刚 2025-02-21 所有分单号都不能手动输入,都可以申请
  1776. // if (this.form.billType != 'MH') {
  1777. // this.$message({
  1778. // message: '只有分单需要申请',
  1779. // type: 'warning'
  1780. // });
  1781. // return
  1782. // }
  1783. if (!this.form.businessType) {
  1784. this.$message({
  1785. message: '请先选择业务类型',
  1786. type: 'warning'
  1787. });
  1788. return
  1789. }
  1790. if (!this.form.corpCnName) {
  1791. this.$message({
  1792. message: '请先选择客户名称',
  1793. type: 'warning'
  1794. });
  1795. return
  1796. }
  1797. if (this.form.hblno) {
  1798. this.$confirm(`确定删除${text}?`, {
  1799. confirmButtonText: "确定",
  1800. cancelButtonText: "取消",
  1801. type: "warning"
  1802. }).then(res => {
  1803. removeHblNo({ id: this.form.id }).then(res => {
  1804. this.form.hblno = null
  1805. this.billsSubmitfun()
  1806. })
  1807. })
  1808. } else {
  1809. if (!this.form.hblno) {
  1810. // 王风刚 2025-02-21 无需弹窗,直接申请分单号
  1811. // this.$confirm(`确定${text}?`, {
  1812. // confirmButtonText: "确定",
  1813. // cancelButtonText: "取消",
  1814. // type: "warning"
  1815. // }).then(res => {
  1816. // this.billsGetBillNofun()
  1817. // })
  1818. this.billsGetBillNofun()
  1819. }
  1820. }
  1821. },
  1822. // 配置项
  1823. columnforfun(value) {
  1824. for (let item of this.basicData.column) {
  1825. if (item instanceof Array) {
  1826. for (let ite of item) {
  1827. if (value == ite.prop) {
  1828. return ite
  1829. }
  1830. }
  1831. } else {
  1832. if (value == item.prop) {
  1833. return item
  1834. }
  1835. }
  1836. }
  1837. },
  1838. //返回列表
  1839. backToList() {
  1840. if (contrastObj(this.form, this.oldForm)
  1841. || contrastList(this.form.preContainersList, this.oldForm.preContainersList) || contrastList(this.form.containersList, this.oldForm.containersList)
  1842. || contrastList(this.form.feeCenterListC, this.oldForm.feeCenterListC)
  1843. || contrastList(this.form.feeCenterListD, this.oldForm.feeCenterListD)
  1844. || contrastList(this.form.filesList, this.oldForm.filesList)
  1845. || contrastList(this.form.waitingBoxList, this.oldForm.waitingBoxList)
  1846. ) {
  1847. this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
  1848. confirmButtonText: "确定",
  1849. cancelButtonText: "取消",
  1850. type: "warning"
  1851. })
  1852. .then(() => {
  1853. this.editCustomer('goBack')
  1854. })
  1855. .catch(() => {
  1856. if (this.form.id) {
  1857. this.unLock({
  1858. moduleName: "SE",
  1859. tableName: "SE_order",
  1860. billId: this.form.id,
  1861. billNo: this.form.mblno
  1862. });
  1863. }
  1864. this.$emit('goBack')
  1865. });
  1866. } else {
  1867. if (this.form.id) {
  1868. this.unLock({
  1869. moduleName: "SE",
  1870. tableName: "SE_order",
  1871. billId: this.form.id,
  1872. billNo: this.form.mblno
  1873. });
  1874. }
  1875. this.$emit('goBack')
  1876. }
  1877. },
  1878. // 单据请核
  1879. DocumentApproval() {
  1880. if (this.form.billType == 'MH') {
  1881. this.$message.warning('分单不能提交请核')
  1882. return
  1883. }
  1884. if (popupReminder(this.form, this.messageData)) {
  1885. this.$confirm(popupReminder(this.form, this.messageData), {
  1886. confirmButtonText: "确定",
  1887. cancelButtonText: "取消",
  1888. type: "warning"
  1889. })
  1890. }
  1891. if (popupReminder(this.form, this.messageData)) {
  1892. return;
  1893. }
  1894. if (this.form.feeCenterListC.length == 0 && this.form.feeCenterListD == 0) {
  1895. return this.$message.warning('请添加费用信息')
  1896. }
  1897. this.$confirm("确定要请核数据?", {
  1898. confirmButtonText: "确定",
  1899. cancelButtonText: "取消",
  1900. type: "warning"
  1901. }).then(() => {
  1902. this.pageLoading = true
  1903. billsCheckBills({
  1904. id: this.form.id,
  1905. url: '/iosBasicData/SeafreightExportF/bills/approvalDetails',
  1906. pageStatus: "this.$store.getters.approvalDetails",
  1907. pageLabel: "审批详情(F)",
  1908. }).then(res => {
  1909. this.pageLoading = false
  1910. this.$message({
  1911. type: "success",
  1912. message: "操作成功!"
  1913. });
  1914. // 详情
  1915. this.billsDetailfun(this.form.id)
  1916. }).catch(() => {
  1917. this.pageLoading = false
  1918. })
  1919. })
  1920. },
  1921. // 撤销单据请核
  1922. revokeDocumentApproval() {
  1923. this.$confirm("确定要撤销请核数据?", {
  1924. confirmButtonText: "确定",
  1925. cancelButtonText: "取消",
  1926. type: "warning"
  1927. }).then(() => {
  1928. this.pageLoading = true
  1929. billsRevokeCheckBills({
  1930. id: this.form.id
  1931. }).then(res => {
  1932. this.pageLoading = false
  1933. this.$message({
  1934. type: "success",
  1935. message: "操作成功!"
  1936. });
  1937. // 详情
  1938. this.billsDetailfun(this.form.id)
  1939. })
  1940. })
  1941. },
  1942. // 编辑按钮
  1943. editHandle() {
  1944. this.detailData.seeDisabled = false
  1945. },
  1946. //去除文本框的空格
  1947. getTextTirim(data) {
  1948. if (data) {
  1949. let obj = data.split('\n')
  1950. let res = []
  1951. obj.forEach(item => {
  1952. res.push(_.trimEnd(item))
  1953. })
  1954. return res.join('\n')
  1955. } else {
  1956. return null
  1957. }
  1958. },
  1959. // 大保存按钮
  1960. editCustomer(status) {
  1961. this.$refs.form.validate((valid) => {
  1962. if (valid) {
  1963. // 判断必填项
  1964. let msgs = []
  1965. if (!this.form.quantity) {
  1966. msgs.push('件数')
  1967. }
  1968. if (!this.form.packingUnit) {
  1969. msgs.push('包装')
  1970. }
  1971. if (!this.form.grossWeight) {
  1972. msgs.push('毛重')
  1973. }
  1974. if (!this.form.measurement) {
  1975. msgs.push('尺码')
  1976. }
  1977. if (!this.form.etd) {
  1978. msgs.push('ETD')
  1979. }
  1980. if (!this.form.teamName) {
  1981. msgs.push('所属团队')
  1982. }
  1983. for (let item of this.form.preContainersList) {
  1984. if (!item.cntrTypeCode) {
  1985. this.$message.warning('请选择尺码箱型')
  1986. return;
  1987. }
  1988. if (!item.quantity) {
  1989. this.$message.warning('请输入箱量')
  1990. return;
  1991. }
  1992. }
  1993. for (let item of this.form.feeCenterListD) {
  1994. if (!item.corpId || !item.feeId || !item.elementsId || !item.curCode) {
  1995. msgs.push(`应收第${item.$index + 1}行${!item.corpId ? ' 往来单位' : ''}${!item.feeId ? ' 费用简称' : ''}${!item.elementsId ? ' 核算要素' : ''}${!item.curCode ? ' 币种' : ''}`)
  1996. }
  1997. }
  1998. for (let item of this.form.feeCenterListC) {
  1999. if (!item.corpId || !item.feeId || !item.elementsId || !item.curCode) {
  2000. msgs.push(`应付第${item.$index + 1}行${!item.corpId ? ' 往来单位' : ''}${!item.feeId ? ' 费用简称' : ''}${!item.elementsId ? ' 核算要素' : ''}${!item.curCode ? ' 币种' : ''}`)
  2001. }
  2002. }
  2003. if (msgs.length > 0) {
  2004. this.$confirm(`请填写下列信息:${msgs.join(" ,")}!`, {
  2005. confirmButtonText: "确定",
  2006. cancelButtonText: "取消",
  2007. type: "warning"
  2008. })
  2009. return;
  2010. }
  2011. if (this.verifySymbolStatus == 1) {
  2012. let msgsList = []
  2013. if (checkFullWidthSymbols(this.form.detail.hshipperDetails).hasFullWidth) {
  2014. let msg = []
  2015. for (let item of checkFullWidthSymbols(this.form.detail.hshipperDetails).positions) {
  2016. msg.push(`第${item.row}行的"${item.symbol}"`)
  2017. }
  2018. if (msg.length > 0) {
  2019. this.$message({
  2020. dangerouslyUseHTMLString: true,
  2021. message: `发货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
  2022. type: 'error'
  2023. });
  2024. return
  2025. }
  2026. }
  2027. if (checkFullWidthSymbols(this.form.detail.hconsigneeDetails).hasFullWidth) {
  2028. let msg = []
  2029. for (let item of checkFullWidthSymbols(this.form.detail.hconsigneeDetails).positions) {
  2030. msg.push(`第${item.row}行的"${item.symbol}"`)
  2031. }
  2032. if (msg.length > 0) {
  2033. this.$message({
  2034. dangerouslyUseHTMLString: true,
  2035. message: `收货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
  2036. type: 'error'
  2037. });
  2038. return
  2039. }
  2040. }
  2041. if (checkFullWidthSymbols(this.form.detail.hnotifyDetails).hasFullWidth) {
  2042. let msg = []
  2043. for (let item of checkFullWidthSymbols(this.form.detail.hnotifyDetails).positions) {
  2044. msg.push(`第${item.row}行的"${item.symbol}"`)
  2045. }
  2046. if (msg.length > 0) {
  2047. this.$message({
  2048. dangerouslyUseHTMLString: true,
  2049. message: `通知人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
  2050. type: 'error'
  2051. });
  2052. return
  2053. }
  2054. }
  2055. if (checkFullWidthSymbols(this.form.detail.mshipperDetails).hasFullWidth) {
  2056. let msg = []
  2057. for (let item of checkFullWidthSymbols(this.form.detail.mshipperDetails).positions) {
  2058. msg.push(`第${item.row}行的"${item.symbol}"`)
  2059. }
  2060. if (msg.length > 0) {
  2061. this.$message({
  2062. dangerouslyUseHTMLString: true,
  2063. message: `MBL 发货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
  2064. type: 'error'
  2065. });
  2066. return
  2067. }
  2068. }
  2069. if (checkFullWidthSymbols(this.form.detail.mconsigneeDetails).hasFullWidth) {
  2070. let msg = []
  2071. for (let item of checkFullWidthSymbols(this.form.detail.mconsigneeDetails).positions) {
  2072. msg.push(`第${item.row}行的"${item.symbol}"`)
  2073. }
  2074. if (msg.length > 0) {
  2075. this.$message({
  2076. dangerouslyUseHTMLString: true,
  2077. message: `MBL 收货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
  2078. type: 'error'
  2079. });
  2080. return
  2081. }
  2082. }
  2083. if (checkFullWidthSymbols(this.form.detail.mnotifyDetails).hasFullWidth) {
  2084. let msg = []
  2085. for (let item of checkFullWidthSymbols(this.form.detail.mnotifyDetails).positions) {
  2086. msg.push(`第${item.row}行的"${item.symbol}"`)
  2087. }
  2088. if (msg.length > 0) {
  2089. this.$message({
  2090. dangerouslyUseHTMLString: true,
  2091. message: `MBL 通知人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
  2092. type: 'error'
  2093. });
  2094. return
  2095. }
  2096. }
  2097. if (checkFullWidthSymbols(this.form.marks).hasFullWidth) {
  2098. let msg = []
  2099. for (let item of checkFullWidthSymbols(this.form.marks).positions) {
  2100. msg.push(`第${item.row}行的"${item.symbol}"`)
  2101. }
  2102. if (msg.length > 0) {
  2103. this.$message({
  2104. dangerouslyUseHTMLString: true,
  2105. message: `唛头:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
  2106. type: 'error'
  2107. });
  2108. return
  2109. }
  2110. }
  2111. if (checkFullWidthSymbols(this.form.commodityDescr).hasFullWidth) {
  2112. let msg = []
  2113. for (let item of checkFullWidthSymbols(this.form.commodityDescr).positions) {
  2114. msg.push(`第${item.row}行的"${item.symbol}"`)
  2115. }
  2116. if (msg.length > 0) {
  2117. this.$message({
  2118. dangerouslyUseHTMLString: true,
  2119. message: `货描:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
  2120. type: 'error'
  2121. });
  2122. return
  2123. }
  2124. }
  2125. if (checkFullWidthSymbols(this.form.forwarding).hasFullWidth) {
  2126. let msg = []
  2127. for (let item of checkFullWidthSymbols(this.form.forwarding).positions) {
  2128. msg.push(`第${item.row}行的"${item.symbol}"`)
  2129. }
  2130. if (msg.length > 0) {
  2131. this.$message({
  2132. dangerouslyUseHTMLString: true,
  2133. message: `FORWARDING:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,,请修正后再保存!`,
  2134. type: 'error'
  2135. });
  2136. return
  2137. }
  2138. }
  2139. // wfg
  2140. var fldNames = 'placeReceiptNamePrint,polNamePrint,podNamePrint,destinationNamePrint,placeDeliveryNamePrint,potNamePrint,siRemarks,bookingRemarks';
  2141. var fldDescs = '收货地,装货港,卸货港,目的地,交货地,中转港,SI 备注,订舱备注';
  2142. fldNames.split(',').forEach((fld, fi) => {
  2143. if (checkFullWidthSymbols(this.form.forwarding).hasFullWidth) {
  2144. this.$message({
  2145. dangerouslyUseHTMLString: true,
  2146. message: `${fldDescs.split(',')[fi]}: 存在全角或汉字符号,,请修正后再保存!`,
  2147. type: 'error'
  2148. });
  2149. return
  2150. }
  2151. });
  2152. console.log(this.form.detail)
  2153. if (!verifyEnglish(this.form.detail.hshipperDetails)) {
  2154. msgsList.push('发货人')
  2155. }
  2156. if (!verifyEnglish(this.form.detail.hconsigneeDetails)) {
  2157. msgsList.push('收货人')
  2158. }
  2159. if (!verifyEnglish(this.form.detail.hnotifyDetails)) {
  2160. msgsList.push('通知人')
  2161. }
  2162. if (!verifyEnglish(this.form.detail.mshipperDetails)) {
  2163. msgsList.push('MBL 发货人')
  2164. }
  2165. if (!verifyEnglish(this.form.detail.mconsigneeDetails)) {
  2166. msgsList.push('MBL 收货人')
  2167. }
  2168. if (!verifyEnglish(this.form.detail.mnotifyDetails)) {
  2169. msgsList.push('MBL 通知人')
  2170. }
  2171. if (!verifyEnglish(this.form.marks)) {
  2172. msgsList.push('唛头')
  2173. }
  2174. if (!verifyEnglish(this.form.commodityDescr)) {
  2175. msgsList.push('货描')
  2176. }
  2177. if (!verifyEnglish(this.form.forwarding)) {
  2178. msgsList.push('FORWARDING')
  2179. }
  2180. if (msgsList.length > 0) {
  2181. // this.$message.error(`请正确输入${msgsList.join(",")}的英文`);
  2182. this.$message.error(`${msgsList.join(",")}存在非英文字符,如汉字等,请修正后再保存!`);
  2183. return;
  2184. }
  2185. }
  2186. this.form.detail.hshipperDetails = this.getTextTirim(this.form.detail.hshipperDetails)
  2187. this.form.detail.hconsigneeDetails = this.getTextTirim(this.form.detail.hconsigneeDetails)
  2188. this.form.detail.hnotifyDetails = this.getTextTirim(this.form.detail.hnotifyDetails)
  2189. this.form.detail.marks = this.getTextTirim(this.form.detail.marks)
  2190. this.form.detail.commodityDescr = this.getTextTirim(this.form.detail.commodityDescr)
  2191. this.form.forwarding = this.getTextTirim(this.form.forwarding)
  2192. // 赋值 ETD 日期
  2193. this.form.billDate = this.form.etd ? this.form.etd.slice(0, 10) + ' 00:00:00' : null // 单据日期
  2194. // 调用保存接口
  2195. if (this.business == 1) {
  2196. documentVerification(this.form).then(res => {
  2197. if (res.data.data == 0) {
  2198. this.billsSubmitfun(status)
  2199. }
  2200. if (res.data.data == 1) {
  2201. this.$confirm(res.data.msg, '提示', {
  2202. confirmButtonText: '确认',
  2203. showCancelButton: false,
  2204. type: 'warning'
  2205. })
  2206. }
  2207. if (res.data.data == 2) {
  2208. this.$confirm(res.data.msg, '提示', {
  2209. confirmButtonText: '确定',
  2210. cancelButtonText: '取消',
  2211. type: 'warning'
  2212. }).then(() => {
  2213. this.billsSubmitfun(status)
  2214. })
  2215. }
  2216. })
  2217. } else {
  2218. this.billsSubmitfun(status)
  2219. }
  2220. }
  2221. })
  2222. },
  2223. // 主表保存接口大保存
  2224. billsSubmitfun(status) {
  2225. /*
  2226. if (this.form.cargoType == 'dry') {
  2227. // 普货
  2228. this.form.billNoFormat = 'HYCK-PH'
  2229. } else if (this.form.cargoType == 'danger') {
  2230. // 危险品
  2231. this.form.billNoFormat = 'HYCK-WXP'
  2232. } else if (this.form.cargoType == 'reefer') {
  2233. // 冻柜
  2234. this.form.billNoFormat = 'HYCK-DG'
  2235. } else {
  2236. this.form.billNoFormat = 'HYCK'
  2237. }
  2238. */
  2239. this.form.billNoFormat = 'HYCK'
  2240. this.form.businessTypeCode = 'HYCK'
  2241. delete this.form.extendedData
  2242. // 把拼接的数据拆开 开始 🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒
  2243. // this.searchSplit()
  2244. // 把拼接的数据拆开 结束 💩💩💩💩💩💩💩💩💩💩💩💩💩💩
  2245. // 费用 收 赋值数据
  2246. // this.form.shortName=this.form.corpCnName.split('-')[1]
  2247. if (this.business == 1) {
  2248. let similarDataD = similarValues(this.form.feeCenterListD, 'feeCnName', 'curCode')
  2249. if (similarDataD) {
  2250. return this.$message.error(`应收费用简称:${similarDataD.feeCnName}的币别不一致,请重新选择`);
  2251. }
  2252. let similarDataC = similarValues(this.form.feeCenterListC, 'feeCnName', 'curCode')
  2253. if (similarDataC) {
  2254. return this.$message.error(`应付费用简称:${similarDataC.feeCnName}的币别不一致,请重新选择`);
  2255. }
  2256. }
  2257. this.form.feeCenterListD.map((row, index) => {
  2258. row.dc = 'D'
  2259. row.sort = Number(index) + 1
  2260. row.businessType = this.form.businessType // 业务类型
  2261. row.billType = this.form.billType // 单据类型
  2262. row.billNo = this.form.billNo // 单据编号
  2263. row.billDate = this.form.billDate
  2264. row.billCorpId = this.form.corpId // 主表客户 id
  2265. row.billCorpCnName = this.form.corpCnName // 主表客户中文名称
  2266. row.billCorpEnName = this.form.corpEnName // 主表客户英文名称
  2267. row.lineId = this.form.lineId // 航线 id
  2268. row.lineCnName = this.form.lineCnName // 航线中文名称
  2269. row.lineEnName = this.form.lineEnName // 航线英文名称
  2270. row.vesselId = this.form.vesselId // 船名 id
  2271. row.vesselCnName = this.form.vesselCnName // 中文船名
  2272. row.vesselEnName = this.form.vesselEnName // 英文船名
  2273. row.voyageNo = this.form.voyageNo // 航次
  2274. row.mblno = this.form.mblno // MB/L NO
  2275. row.hblno = this.form.hblno // HB/L NO
  2276. row.etd = this.form.etd // 开船日期
  2277. row.eta = this.form.eta // 到港日期
  2278. row.polId = this.form.polId // 装货港 id
  2279. row.polCode = this.form.polCode // 装货港代码
  2280. row.polCnName = this.form.polCnName // 装货港中文名称
  2281. row.polEnName = this.form.polEnName // 装货港英文名称
  2282. row.podId = this.form.podId // 卸货港 id
  2283. row.podCode = this.form.podCode // 卸货港代码
  2284. row.podCnName = this.form.podCnName // 卸货港中文名称
  2285. row.podEnName = this.form.podEnName // 卸货港英文名称
  2286. row.corpArgreementNo = this.form.corpArgreementNo // 客户约号
  2287. // 数量 * 单价 = 净额
  2288. // 总税率 = 税率 + 附件税率
  2289. // 税额 = 净额 * 总税率
  2290. // 含税
  2291. if (row.curCode == 'CNY') {
  2292. row.amount = row.rmbAmount ? row.rmbAmount : (Number(row.quantity) * Number(row.price)).toFixed(2)
  2293. } else {
  2294. row.amount = row.usdAmount ? row.usdAmount : (Number(row.quantity) * Number(row.price)).toFixed(2)
  2295. }
  2296. // 净额
  2297. if (row.curCode == 'CNY') {
  2298. row.amountNet = row.rmbAmountNet ? row.rmbAmountNet : (Number(row.quantity) * Number(row.price)).toFixed(2)
  2299. } else {
  2300. row.amountNet = row.usdAmountNet ? row.usdAmountNet : (Number(row.quantity) * Number(row.price)).toFixed(2)
  2301. }
  2302. })
  2303. // 费用 付 赋值数据
  2304. this.form.feeCenterListC.map((row, index) => {
  2305. row.dc = 'C'
  2306. row.sort = Number(index) + 1
  2307. row.businessType = this.form.businessType // 业务类型
  2308. row.billType = this.form.billType // 单据类型
  2309. row.billNo = this.form.billNo // 单据编号
  2310. row.billDate = this.form.billDate // 单据日期
  2311. row.billCorpId = this.form.corpId // 主表客户 id
  2312. row.billCorpCnName = this.form.corpCnName // 主表客户中文名称
  2313. row.billCorpEnName = this.form.corpEnName // 主表客户英文名称
  2314. row.lineId = this.form.lineId // 航线 id
  2315. row.lineCnName = this.form.lineCnName // 航线中文名称
  2316. row.lineEnName = this.form.lineEnName // 航线英文名称
  2317. row.vesselId = this.form.vesselId // 船名 id
  2318. row.vesselCnName = this.form.vesselCnName // 中文船名
  2319. row.vesselEnName = this.form.vesselEnName // 英文船名
  2320. row.voyageNo = this.form.voyageNo // 航次
  2321. row.mblno = this.form.mblno // MB/L NO
  2322. row.hblno = this.form.hblno // HB/L NO
  2323. row.etd = this.form.etd // 开船日期
  2324. row.eta = this.form.eta // 到港日期
  2325. row.polId = this.form.polId // 装货港 id
  2326. row.polCode = this.form.polCode // 装货港代码
  2327. row.polCnName = this.form.polCnName // 装货港中文名称
  2328. row.polEnName = this.form.polEnName // 装货港英文名称
  2329. row.podId = this.form.podId // 卸货港 id
  2330. row.podCode = this.form.podCode // 卸货港代码
  2331. row.podCnName = this.form.podCnName // 卸货港中文名称
  2332. row.podEnName = this.form.podEnName // 卸货港英文名称
  2333. row.corpArgreementNo = this.form.corpArgreementNo // 客户约号
  2334. // 数量 * 单价 = 净额
  2335. // 总税率 = 税率 + 附件税率
  2336. // 税额 = 净额 * 总税率
  2337. // 含税
  2338. if (row.curCode == 'CNY') {
  2339. row.amount = row.rmbAmount ? row.rmbAmount : (Number(row.quantity) * Number(row.price)).toFixed(2)
  2340. } else {
  2341. row.amount = row.usdAmount ? row.usdAmount : (Number(row.quantity) * Number(row.price)).toFixed(2)
  2342. }
  2343. // 净额
  2344. if (row.curCode == 'CNY') {
  2345. row.amountNet = row.rmbAmountNet ? row.rmbAmountNet : (Number(row.quantity) * Number(row.price)).toFixed(2)
  2346. } else {
  2347. row.amountNet = row.usdAmountNet ? row.usdAmountNet : (Number(row.quantity) * Number(row.price)).toFixed(2)
  2348. }
  2349. })
  2350. this.pageLoading = true
  2351. billsSubmit(this.form).then(res => {
  2352. this.pageLoading = false
  2353. if (res.data.code === 601) {
  2354. console.info('11111111111----', res)
  2355. this.billsDetailfun(this.form.id)
  2356. this.$message({
  2357. type: "error",
  2358. message: res.data.msg
  2359. });
  2360. return true
  2361. }
  2362. this.$message({
  2363. type: "success",
  2364. message: "操作成功!"
  2365. });
  2366. if (status == 'goBack') {
  2367. if (this.form.id) {
  2368. this.unLock({
  2369. moduleName: "SE",
  2370. tableName: "SE_order",
  2371. billId: this.form.id,
  2372. billNo: this.form.mblno
  2373. });
  2374. }
  2375. this.$emit('goBack')
  2376. }
  2377. // this.detailData.seeDisabled = true
  2378. this.billsDetailfun(res.data.data.id, status)
  2379. }).catch(err => {
  2380. this.pageLoading = false
  2381. }).finally(() => {
  2382. })
  2383. },
  2384. // 提取箱专用的保存
  2385. billsAddfun() {
  2386. billsAdd(this.form).then(res => {
  2387. this.pageLoading = false
  2388. this.$message({
  2389. type: "success",
  2390. message: "操作成功!"
  2391. });
  2392. // this.detailData.seeDisabled = true
  2393. this.billsDetailfun(res.data.data.id)
  2394. }).catch(err => {
  2395. this.pageLoading = false
  2396. })
  2397. },
  2398. // 复制单据接口
  2399. billsCopyBillsfun(id, type) {
  2400. const loading = this.$loading({
  2401. lock: true,
  2402. text: '加载中',
  2403. spinner: 'el-icon-loading',
  2404. background: 'rgba(255,255,255,0.7)'
  2405. });
  2406. billsCopyBills({ id }).then(res => {
  2407. let types = typeof type == "string" ? type.split(",") : []
  2408. // if (type == '复制费用' || type == '') {
  2409. // res.data.data.preContainersList = []
  2410. // }
  2411. // if (type == '复制箱型箱量' || type == '') {
  2412. // res.data.data.feeCenterListD = []
  2413. // res.data.data.feeCenterListC = []
  2414. // }
  2415. if (types.indexOf("复制箱型箱量") < 0) {
  2416. res.data.data.preContainersList = []
  2417. }
  2418. if (types.indexOf("复制费用") < 0) {
  2419. res.data.data.feeCenterListD = []
  2420. res.data.data.feeCenterListC = []
  2421. }
  2422. this.form = res.data.data;
  2423. this.pageLoading = false
  2424. // this.searchMontage() // 下拉 中文名称和编号拼接
  2425. // 配箱最上面可以编辑
  2426. for (let item of this.form.containersList) {
  2427. item.edit = false
  2428. }
  2429. // 先把状态改成可以编辑,然后判断是否可以编辑
  2430. this.generateBillsfalse = false
  2431. // 应收
  2432. for (let item of this.form.feeCenterListD) {
  2433. // 判断是否生成了账单
  2434. if (item.accStatus == 1) {
  2435. this.columnforfun('corpCnName').disabled = true
  2436. this.columnforfun('srcType').disabled = true
  2437. this.columnforfun('mblno').disabled = true
  2438. this.columnforfun('bookingNo').disabled = true
  2439. this.columnforfun('refno').disabled = true
  2440. this.generateBillsfalse = true
  2441. }
  2442. if (item.curCode == 'CNY') {
  2443. this.$set(item, 'rmbAmount', item.amount)
  2444. this.$set(item, 'usdAmount', '')
  2445. this.$set(item, 'rmbAmountNet', item.amountNet)
  2446. this.$set(item, 'usdAmountNet', '')
  2447. } else {
  2448. this.$set(item, 'usdAmount', item.amount)
  2449. this.$set(item, 'rmbAmount', '')
  2450. this.$set(item, 'usdAmountNet', item.amountNet)
  2451. this.$set(item, 'rmbAmountNet', '')
  2452. }
  2453. item.edit = false
  2454. }
  2455. // 应付
  2456. for (let item of this.form.feeCenterListC) {
  2457. // 判断是否生成了账单
  2458. if (item.accStatus == 1) {
  2459. this.generateBillsfalse = true
  2460. this.columnforfun('corpCnName').disabled = true
  2461. this.columnforfun('srcType').disabled = true
  2462. this.columnforfun('mblno').disabled = true
  2463. this.columnforfun('bookingNo').disabled = true
  2464. this.columnforfun('refno').disabled = true
  2465. }
  2466. if (item.curCode == 'CNY') {
  2467. this.$set(item, 'rmbAmount', item.amount)
  2468. this.$set(item, 'usdAmount', '')
  2469. this.$set(item, 'rmbAmountNet', item.amountNet)
  2470. this.$set(item, 'usdAmountNet', '')
  2471. } else {
  2472. this.$set(item, 'usdAmount', item.amount)
  2473. this.$set(item, 'rmbAmount', '')
  2474. this.$set(item, 'usdAmountNet', item.amountNet)
  2475. this.$set(item, 'rmbAmountNet', '')
  2476. }
  2477. item.edit = false
  2478. }
  2479. // 文件中心
  2480. for (let item of this.form.filesList) {
  2481. this.$set(item, 'edit', false)
  2482. }
  2483. }).finally(() => {
  2484. loading.close();
  2485. })
  2486. },
  2487. // 详情接口
  2488. async billsDetailfun(id, status) {
  2489. const res = await billsDetail(id)
  2490. // this.form = res.data.data;
  2491. this.$set(this, 'form', res.data.data)
  2492. this.inLock()
  2493. // console.log('form', this.form)
  2494. // console.log(this.$refs)
  2495. this.copyFormData = JSON.parse(JSON.stringify(res.data.data))
  2496. // 如果已经请核就禁用按钮
  2497. // if (this.form.status == 1 || this.form.status == 2 || this.form.status == 3) {
  2498. // this.detailData.seeDisabled = true
  2499. // }else {
  2500. // this.detailData.seeDisabled = false
  2501. // }
  2502. this.columnforfun('teamName').disabled = true
  2503. this.columnforfun('operatorName').disabled = true
  2504. this.columnforfun('accDeptName').disabled = true
  2505. if (this.form.status == 1 || this.form.status == 2 || this.form.status == 3) {
  2506. this.columnforfun('corpCnName').disabled = true
  2507. this.columnforfun('srcType').disabled = true
  2508. this.columnforfun('mblno').disabled = true
  2509. this.columnforfun('bookingNo').disabled = true
  2510. this.columnforfun('refno').disabled = true
  2511. // this.columnforfun('teamId').disabled = true
  2512. this.generateBillsfalse = true
  2513. this.pleasereviewType = true // 请核禁用
  2514. } else {
  2515. // 判断是否可以编辑
  2516. this.columnforfun('corpCnName').disabled = false
  2517. this.columnforfun('srcType').disabled = false
  2518. this.columnforfun('mblno').disabled = false
  2519. this.columnforfun('bookingNo').disabled = false
  2520. this.columnforfun('refno').disabled = false
  2521. if (this.saberTenantId == '607913') {
  2522. this.columnforfun('operatorName').disabled = false
  2523. this.columnforfun('accDeptName').disabled = false
  2524. }
  2525. // this.columnforfun('teamId').disabled = false
  2526. this.generateBillsfalse = false
  2527. this.pleasereviewType = false
  2528. }
  2529. this.pageLoading = false
  2530. // this.searchMontage() // 下拉 中文名称和编号拼接
  2531. // 配箱最上面可以编辑
  2532. for (let item of this.form.containersList) {
  2533. item.edit = false
  2534. }
  2535. // 配箱最下面的
  2536. for (let item of this.form.waitingBoxList) {
  2537. this.$set(item, 'editQuantity', item.quantity)
  2538. this.$set(item, 'editGrossWeight', item.grossWeight)
  2539. this.$set(item, 'editMeasurement', item.measurement)
  2540. this.$set(item, 'edit', false)
  2541. }
  2542. // 应收
  2543. for (let item of this.form.feeCenterListD) {
  2544. // 判断是否生成了账单
  2545. if (item.accStatus == 1) {
  2546. this.columnforfun('corpCnName').disabled = true
  2547. this.columnforfun('srcType').disabled = true
  2548. this.columnforfun('mblno').disabled = true
  2549. this.columnforfun('bookingNo').disabled = true
  2550. this.columnforfun('refno').disabled = true
  2551. this.columnforfun('teamName').disabled = true
  2552. this.generateBillsfalse = true
  2553. }
  2554. if (item.curCode == 'CNY') {
  2555. this.$set(item, 'rmbAmount', item.amount)
  2556. this.$set(item, 'usdAmount', '')
  2557. this.$set(item, 'rmbAmountNet', item.amountNet)
  2558. this.$set(item, 'usdAmountNet', '')
  2559. } else {
  2560. this.$set(item, 'usdAmount', item.amount)
  2561. this.$set(item, 'rmbAmount', '')
  2562. this.$set(item, 'usdAmountNet', item.amountNet)
  2563. this.$set(item, 'rmbAmountNet', '')
  2564. }
  2565. item.edit = false
  2566. }
  2567. // 应付
  2568. for (let item of this.form.feeCenterListC) {
  2569. // 判断是否生成了账单
  2570. if (item.accStatus == 1) {
  2571. this.generateBillsfalse = true
  2572. this.columnforfun('corpCnName').disabled = true
  2573. this.columnforfun('srcType').disabled = true
  2574. this.columnforfun('mblno').disabled = true
  2575. this.columnforfun('bookingNo').disabled = true
  2576. this.columnforfun('refno').disabled = true
  2577. this.columnforfun('teamName').disabled = true
  2578. }
  2579. if (item.curCode == 'CNY') {
  2580. this.$set(item, 'rmbAmount', item.amount)
  2581. this.$set(item, 'usdAmount', '')
  2582. this.$set(item, 'rmbAmountNet', item.amountNet)
  2583. this.$set(item, 'usdAmountNet', '')
  2584. } else {
  2585. this.$set(item, 'usdAmount', item.amount)
  2586. this.$set(item, 'rmbAmount', '')
  2587. this.$set(item, 'usdAmountNet', item.amountNet)
  2588. this.$set(item, 'rmbAmountNet', '')
  2589. }
  2590. item.edit = false
  2591. }
  2592. // 文件中心
  2593. this.$refs.filescenter.getData(res.data.data)
  2594. for (let item of this.form.filesList) {
  2595. this.$set(item, 'edit', false)
  2596. }
  2597. if (status == 'toAddEdit') {
  2598. this.$emit(status)
  2599. }
  2600. this.oldForm = this.deepClone(this.form);
  2601. },
  2602. // tbas切换
  2603. handleClick(tba, event) {
  2604. },
  2605. // 大tbas切换
  2606. bigHandleClick() {
  2607. if (this.bigtabs == 'fd') {
  2608. if (this.form.id) {
  2609. this.billsListAllfun(this.form.id)
  2610. }
  2611. }
  2612. if (this.bigtabs == 'dz') {
  2613. if (this.form.id) {
  2614. this.$refs.documentCenter.reportslogListfun({ currentPage: 1, pageSize: 10 })
  2615. }
  2616. this.getReportTypeByBigHandle('单证')
  2617. }
  2618. if (this.bigtabs == 'fy') this.getReportTypeByBigHandle('费用')
  2619. },
  2620. getReportTypeByBigHandle(name) {
  2621. return name;
  2622. },
  2623. // 获取不分页的分单列表
  2624. billsListAllfun(masterId) {
  2625. billsListAll({ masterId }).then(res => {
  2626. this.billsListAllData = res.data.data
  2627. })
  2628. }
  2629. },
  2630. }
  2631. </script>
  2632. <style scoped lang="scss">
  2633. ::v-deep .el-tabs--border-card>.el-tabs__content {
  2634. padding: 4px !important;
  2635. }
  2636. .scrollable-container {
  2637. height: 84vh;
  2638. /* 设置容器高度 */
  2639. overflow-y: auto;
  2640. /* 添加垂直滚动条 */
  2641. }
  2642. .borderless {
  2643. height: 100%;
  2644. box-sizing: border-box
  2645. }
  2646. .customer-main {
  2647. margin-bottom: 15px;
  2648. }
  2649. .demo-ruleForm {
  2650. font-size: 14px;
  2651. }
  2652. .margintop {
  2653. margin-top: 0px !important;
  2654. }
  2655. ::v-deep.el-form-item {
  2656. margin-bottom: 0;
  2657. }
  2658. ::v-deep .basic-container .el-card__body {
  2659. padding: 6px 20px;
  2660. }
  2661. ::v-deep .el-tabs__header {
  2662. margin: 0 05px;
  2663. }
  2664. .isShow {
  2665. display: none;
  2666. }
  2667. .dropdown-max {
  2668. top: 150px !important;
  2669. max-width: 600px;
  2670. display: flex;
  2671. flex-flow: row wrap;
  2672. li {
  2673. margin-right: 5px;
  2674. white-space: nowrap;
  2675. }
  2676. }
  2677. </style>