billsDetails.vue 134 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429
  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" @click="backToList"
  7. >{{ $t("btn118n.toList") }}
  8. </el-button>
  9. <el-button v-if="form.id && pageIds.length" type="text" @click="lastPage">{{ $t("btn118n.previous") }}</el-button>
  10. <el-button v-if="form.id && pageIds.length" type="text" @click="nextPage">{{ $t("btn118n.next") }}</el-button>
  11. </div>
  12. <div class="add-customer-btn">
  13. <!--<el-popover-->
  14. <!-- placement="bottom-end"-->
  15. <!-- width="100"-->
  16. <!-- trigger="hover">-->
  17. <!-- <div>-->
  18. <!-- </div>-->
  19. <el-button size="small" type="primary" @click="addEdit">{{ $t("btn118n.new") }} </el-button>
  20. <el-button type="success" size="small" style="margin-right: 8px" @click="CopyDocumentsfun">{{ $t("btn118n.copy") }} </el-button>
  21. <el-dropdown style="line-height: 0" v-if="importTemplate == 1">
  22. <el-button size="small" type="warning" style="margin-right: 8px" :disabled="form.status > 0 || showLock || !form.id">
  23. {{ $t("btn118n.importTemplate") }}<i class="el-icon-arrow-down el-icon--right"></i>
  24. </el-button>
  25. <el-dropdown-menu slot="dropdown">
  26. <el-dropdown-item v-for="item in imporiData" :key="item.id" @click.native="importData(item.id)">{{ item.name }} </el-dropdown-item>
  27. </el-dropdown-menu>
  28. </el-dropdown>
  29. <!-- <el-dropdown style="line-height: 0">
  30. <el-button size="small" type="success" style="margin-right: 8px" :loading="saveLoading"
  31. :disabled="!form.id || showLock">
  32. 发送 SO EDI<i class="el-icon-arrow-down el-icon--right"></i>
  33. </el-button>
  34. <el-dropdown-menu slot="dropdown">
  35. <el-dropdown-item v-for="item in ediData_SO" :key="item.id" class="dropdown-max"
  36. @click.native="editypesSendingEdifun(item)">{{ item.cnName }}
  37. </el-dropdown-item>
  38. </el-dropdown-menu>
  39. </el-dropdown> -->
  40. <!-- <el-dropdown style="line-height: 0">
  41. <el-button size="small" type="success" style="margin-right: 8px" :loading="saveLoading"
  42. :disabled="!form.id || showLock">
  43. 发送 SI EDI<i class="el-icon-arrow-down el-icon--right"></i>
  44. </el-button>
  45. <el-dropdown-menu slot="dropdown">
  46. <el-dropdown-item v-for="item in ediData_SI" :key="item.id" class="dropdown-max"
  47. @click.native="editypesSendingEdifun(item)">{{ item.cnName }}
  48. </el-dropdown-item>
  49. </el-dropdown-menu>
  50. </el-dropdown> -->
  51. <el-button
  52. v-if="
  53. bigtabs != 'dz' &&
  54. !(form.billType == 'MM' && isHq != 1) &&
  55. (roleName.includes('admin') ||
  56. (roleName.includes('应付查看') && roleName.includes('应收查看')) ||
  57. (roleName.includes('应付修改') && roleName.includes('应收修改')))
  58. "
  59. size="small"
  60. style="margin-right: 8px"
  61. :loading="saveLoading"
  62. :disabled="!form.id"
  63. @click="previewDialogfun"
  64. >{{ $t("btn118n.preview") }}
  65. </el-button>
  66. <el-button v-if="form.id && form.logisticsStatus == '录入'" size="small" type="success" @click.stop="allClick('物流提交')"
  67. >{{ $t("btn118n.localApply") }}
  68. </el-button>
  69. <el-button v-if="form.id && form.logisticsStatus == '已提交'" size="small" type="danger" @click.stop="allClick('物流撤销提交')"
  70. >{{ $t("btn118n.unlocalApply") }}
  71. </el-button>
  72. <el-button
  73. v-if="
  74. form.id &&
  75. form.transferOrderStatus == '录入' &&
  76. form.billType != 'MH' &&
  77. (roleName.includes('admin') || roleName.includes('总部') || roleName.includes('国外费用'))
  78. "
  79. size="small"
  80. type="info"
  81. @click.stop="allClick('转单')"
  82. :loading="pageLoading"
  83. >{{ $t("btn118n.transferApply") }}
  84. </el-button>
  85. <el-button
  86. v-if="form.id && form.transferOrderStatus == '已转单'&&(roleName.includes('admin')||roleName.includes('总部'))"
  87. size="small"
  88. type="danger"
  89. @click.stop="allClick('撤销转单')"
  90. :loading="pageLoading"
  91. >{{ $t("btn118n.untransferApply") }}
  92. </el-button>
  93. <el-button size="small" type="warning" :disabled="!form.id || showLock" v-if="form.billType == 'MM'" @click.stop="allClick('同步主单到分单')"
  94. >{{ $t("btn118n.setInfoMMToMH") }}
  95. </el-button>
  96. <el-button size="small" type="warning" :disabled="!form.id || showLock" v-if="form.billType == 'MM'" @click.stop="allClick('同步分单信息')"
  97. >{{ $t("btn118n.getInfoMMToMH") }}
  98. </el-button>
  99. <el-button v-if="form.id && (form.billType == 'DD' || form.billType == 'MH')" size="small" type="success" @click.stop="allClick('提单确认')"
  100. >{{ $t("btn118n.SIInfoImport") }}
  101. </el-button>
  102. <el-button
  103. size="small"
  104. type="warning"
  105. :disabled="!form.id || showLock"
  106. v-if="form.status == 1 && form.billType != 'MH'"
  107. @click.stop="revokeDocumentApproval"
  108. >{{ $t("btn118n.unapply") }}
  109. </el-button>
  110. <el-button
  111. size="small"
  112. type="success"
  113. :disabled="!form.id || detailData.seeDisabled || showLock"
  114. v-if="(form.status == 0 || form.status == 4) && form.billType != 'MH'"
  115. @click.stop="DocumentApproval"
  116. >{{ $t("btn118n.apply") }}
  117. </el-button>
  118. <el-button
  119. size="small"
  120. type="danger"
  121. :disabled="showLock"
  122. v-if="form.status == 3 && form.billType != 'MH' && (roleName.includes('admin') || roleName.includes('撤销锁单'))"
  123. @click.stop="revokeLockOrder"
  124. >{{ $t("btn118n.unapply") }}
  125. </el-button>
  126. <el-button v-if="overTime && form.id && form.billType != 'MM'" type="success" size="small" @click="billModify"
  127. >{{ $t("btn118n.billModify") }}
  128. </el-button>
  129. <el-button
  130. size="small"
  131. type="primary"
  132. style="margin-right: 8px"
  133. :disabled="detailData.seeDisabled || showLock"
  134. :loading="saveLoading"
  135. @click="editCustomer"
  136. >{{ $t("btn118n.save") }}
  137. </el-button>
  138. <el-dropdown style="line-height: 0" v-if="form.billType != 'MH'">
  139. <el-button type="warning" :loading="saveLoading" :disabled="!form.id" size="small">
  140. {{ $t("btn118n.checked") }} <i class="el-icon-arrow-down el-icon--right"></i>
  141. </el-button>
  142. <el-dropdown-menu slot="dropdown">
  143. <el-dropdown-item @click.native="(checkScheduleDialog = true), (checkId = form.id)">审核进度 </el-dropdown-item>
  144. </el-dropdown-menu>
  145. </el-dropdown>
  146. </div>
  147. </div>
  148. <div style="margin-top: 50px">
  149. <el-tabs type="border-card" v-model="bigtabs" @tab-click="bigHandleClick">
  150. <el-tab-pane :label="$t('sea118n.orderInfo')" name="wt" class="scrollable-container">
  151. <div>
  152. <el-form :model="form" ref="form" label-width="90px" class="demo-ruleForm" :disabled="showLock">
  153. <!-- <containerTitle title="基础资料"></containerTitle>-->
  154. <basic-container>
  155. <el-row :gutter="60">
  156. <el-col v-for="(item, index) in basicData.column" :key="index" :span="8">
  157. <!--数组-->
  158. <div v-if="item instanceof Array" style="display: flex;align-items: center;justify-content: space-between">
  159. <el-row>
  160. <el-col :span="item[0].span ? item[0].span : 12">
  161. <el-form-item :label="item[0].label" :prop="item[0].prop" :rules="item[0].rules" :label-width="item[0].labelWidth">
  162. <span slot="label" v-if="item[0].label">
  163. <span
  164. v-if="item[0].label == 'HB/L NO'"
  165. style="color: #4c9e44;cursor: pointer;text-decoration: underline;"
  166. @click="applyforfun(item[0].label)"
  167. >{{ form.hblno ? "删除" : "申请" }} {{ item[0].label }}
  168. </span>
  169. <span v-else style="color: #1e9fff">{{ item[0].label }}</span>
  170. </span>
  171. <span v-if="item[0].type == 'button'"></span>
  172. <!--<el-button v-if="item[0].type == 'button'" :disabled="detailData.seeDisabled || item[0].disabled"-->
  173. <!-- size="mini" type="success" icon="el-icon-circle-plus" circle-->
  174. <!-- @click="applyforfun(item[0].label)" >-->
  175. <!--</el-button>-->
  176. <search-query
  177. v-else-if="item[0].type == 'select'"
  178. :datalist="item[0].dicData"
  179. :selectValue="form[item[0].prop]"
  180. :filterable="true"
  181. :allowCreate="item[0].allowCreate || false"
  182. :remote="true"
  183. :disabled="
  184. detailData.seeDisabled ||
  185. item[0].disabled ||
  186. form.feeCenterListD.filter(item => item.auditStatus > 0).length ||
  187. form.feeCenterListC.filter(item => item.auditStatus > 0).length
  188. "
  189. :buttonIf="false"
  190. :placeholder="`${item[0].text || ''}`"
  191. :forParameter="item[0].forParameter"
  192. @remoteMethod="remoteMethod($event, item[0].prop)"
  193. @corpChange="corpChange($event, item[0].prop)"
  194. @corpFocus="remoteMethod($event, item[0].prop)"
  195. >
  196. </search-query>
  197. <el-input
  198. v-else
  199. type="age"
  200. style="width: 100%;"
  201. v-model="form[item[0].prop]"
  202. size="small"
  203. autocomplete="off"
  204. :disabled="
  205. detailData.seeDisabled ||
  206. item[0].disabled ||
  207. form.feeCenterListD.filter(item => item.auditStatus > 0).length ||
  208. form.feeCenterListC.filter(item => item.auditStatus > 0).length
  209. "
  210. :placeholder="item[0].text || ''"
  211. ></el-input>
  212. </el-form-item>
  213. </el-col>
  214. <el-col :span="item[1].span ? item[1].span : 12">
  215. <el-form-item :label="item[1].label" :prop="item[1].prop" :rules="item[1].rules" :label-width="item[1].labelWidth">
  216. <span slot="label" v-if="item[1].label">
  217. <span style="color: #1e9fff">{{ item[1].label }}</span>
  218. </span>
  219. <el-date-picker
  220. v-if="item[1].type == 'date'"
  221. v-model="form[item[1].prop]"
  222. clearable
  223. style="width: 100%;"
  224. type="date"
  225. size="small"
  226. :disabled="detailData.seeDisabled || item[1].disabled"
  227. value-format="yyyy-MM-dd HH:mm"
  228. placeholder="选择日期"
  229. >
  230. </el-date-picker>
  231. <search-query
  232. v-else-if="item[1].type == 'select'"
  233. :datalist="item[1].dicData"
  234. :selectValue="form[item[1].prop]"
  235. :filterable="true"
  236. :remote="true"
  237. :disabled="
  238. detailData.seeDisabled ||
  239. item[1].disabled ||
  240. form.feeCenterListD.filter(item => item.auditStatus > 0).length ||
  241. form.feeCenterListC.filter(item => item.auditStatus > 0).length
  242. "
  243. :buttonIf="false"
  244. :placeholder="`${item[1].text || ''}`"
  245. :forParameter="item[1].forParameter"
  246. @remoteMethod="remoteMethod($event, item[1].prop)"
  247. @corpChange="corpChange($event, item[1].prop)"
  248. @corpFocus="remoteMethod($event, item[1].prop)"
  249. >
  250. </search-query>
  251. <tree-select
  252. v-else-if="item[1].type == 'tree'"
  253. v-model="form[item[1].prop]"
  254. :data="item[1].dicData"
  255. :props="item[1].forParameter"
  256. nodeKey="title"
  257. size="small"
  258. :clearable="false"
  259. :disabled="detailData.seeDisabled || item[1].disabled"
  260. :multiple="false"
  261. :placeholder="`${item[1].text || ''}`"
  262. @input="corpChange($event, item[1].prop)"
  263. >
  264. </tree-select>
  265. <el-input
  266. v-else
  267. type="age"
  268. style="width: 100%;"
  269. v-model="form[item[1].prop]"
  270. size="small"
  271. autocomplete="off"
  272. :disabled="detailData.seeDisabled || item[1].disabled"
  273. :placeholder="item[1].text || ''"
  274. ></el-input>
  275. </el-form-item>
  276. </el-col>
  277. <el-col v-if="item[2]" :span="item[2].span ? item[2].span : 12">
  278. <el-form-item :label="item[2].label" :prop="item[2].prop" :rules="item[2].rules" :label-width="item[2].labelWidth">
  279. <span slot="label" v-if="item[2].label">
  280. <span style="color: #1e9fff">{{ item[2].label }}</span>
  281. </span>
  282. <search-query
  283. v-if="item[2].type == 'select'"
  284. :datalist="item[2].dicData"
  285. :selectValue="form[item[2].prop]"
  286. :filterable="true"
  287. :clearable="false"
  288. :remote="true"
  289. :disabled="detailData.seeDisabled || item[2].disabled"
  290. :buttonIf="false"
  291. :forParameter="item[2].forParameter"
  292. :placeholder="`${item[2].text || ''}`"
  293. @remoteMethod="remoteMethod($event, item[2].prop)"
  294. @corpChange="corpChange($event, item[2].prop)"
  295. @corpFocus="remoteMethod($event, item[2].prop)"
  296. >
  297. </search-query>
  298. <el-input
  299. v-else
  300. type="age"
  301. style="width: 100%;"
  302. v-model="form[item[2].prop]"
  303. size="small"
  304. autocomplete="off"
  305. :disabled="detailData.seeDisabled || item[1].disabled"
  306. :placeholder="item[2].text || ''"
  307. ></el-input>
  308. </el-form-item>
  309. </el-col>
  310. </el-row>
  311. </div>
  312. <!--对象-->
  313. <div v-else>
  314. <el-form-item v-if="item.display == true" :label="item.label" :prop="item.prop" :rules="item.rules">
  315. <span slot="label" v-if="item.label">
  316. <span style="color: #1e9fff">{{ item.label }}</span>
  317. </span>
  318. <search-query
  319. v-if="item.type == 'select'"
  320. ref="searchQueryRef"
  321. :datalist="item.dicData"
  322. :selectValue="form[item.prop]"
  323. :filterable="true"
  324. :clearable="false"
  325. :remote="true"
  326. :disabled="
  327. detailData.seeDisabled ||
  328. form.feeCenterListD.filter(item => item.auditStatus > 0).length ||
  329. form.feeCenterListC.filter(item => item.auditStatus > 0).length
  330. "
  331. :buttonIf="item.buttonIf"
  332. :forParameter="item.forParameter"
  333. :placeholder="`${item.text || ''}`"
  334. :joinData="item.joinData"
  335. @remoteMethod="remoteMethod($event, item.prop)"
  336. @corpChange="corpChange($event, item.prop)"
  337. @corpFocus="remoteMethod($event, item.prop)"
  338. @eldialogConfirm="eldialogConfirm(item.slot)"
  339. >
  340. <bcorps
  341. v-show="item.slot == 'bcorps'"
  342. ref="bcorps"
  343. :eldialog="true"
  344. @selectionChange="eldialogMultipleChoice($event, item.slot)"
  345. >
  346. </bcorps>
  347. <bcorpstypedefine v-show="item.slot == 'bcorpstypedefine'"> </bcorpstypedefine>
  348. </search-query>
  349. <el-input
  350. v-else
  351. type="age"
  352. style="width: 100%;"
  353. v-model="form[item.prop]"
  354. size="small"
  355. autocomplete="off"
  356. :disabled="detailData.seeDisabled || item.disabled"
  357. :placeholder="item.text || ''"
  358. ></el-input>
  359. </el-form-item>
  360. </div>
  361. </el-col>
  362. </el-row>
  363. </basic-container>
  364. </el-form>
  365. </div>
  366. <div class="customer-main margintop">
  367. <!-- <containerTitle :title='$t("sea118n.info")'></containerTitle>-->
  368. <basic-container :showBtn="true">
  369. <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
  370. <el-tab-pane :label="$t('sea118n.billInfo')" name="first">
  371. <entrustment-lnformation
  372. :assemblyForm="form"
  373. :saberUserInfo="saberUserInfo"
  374. :detailData="detailData"
  375. :disabled="showLock"
  376. :overTime="overTime"
  377. :generateBillsfalse="generateBillsfalse"
  378. @billsDetailfun="billsDetailfun(form.id)"
  379. @editCustomer="editCustomer"
  380. >
  381. </entrustment-lnformation>
  382. </el-tab-pane>
  383. <el-tab-pane :label="$t('sea118n.ctnrList')" name="second">
  384. <DistributionBox
  385. :key="form.id"
  386. :assemblyForm="form"
  387. :detailData="detailData"
  388. :showLock="showLock"
  389. :pleasereviewType="pleasereviewType"
  390. @billsAddfun="billsAddfun"
  391. @billsDetailfun="billsDetailfun(form.id)"
  392. >
  393. </DistributionBox>
  394. </el-tab-pane>
  395. <el-tab-pane label="MB/L Info" name="third">
  396. <mbinformation :assemblyForm="form" :detailData="detailData" :disabled="showLock"> </mbinformation>
  397. </el-tab-pane>
  398. <el-tab-pane
  399. :label="$t('sea118n.reportManage')"
  400. name="fourth"
  401. v-if="roleName.includes('admin') ? true : roleName.includes('报表管理') ? true : false"
  402. >
  403. <reports :id="form.id" :assemblyForm="form" :disabled="detailData.seeDisabled || showLock" businessValue="HYCK"></reports>
  404. </el-tab-pane>
  405. <!-- <el-tab-pane label="EDI 及其他" name="sixth">
  406. <edicode :assemblyForm="form" :detailData="detailData" :disabled="showLock">
  407. </edicode>
  408. </el-tab-pane> -->
  409. <el-tab-pane :label="$t('sea118n.fileCerter')" name="seventh">
  410. <filescenter ref="filescenter" :assemblyForm="form" :pid="form.id" :detailData="detailData" :showLock="showLock"></filescenter>
  411. </el-tab-pane>
  412. </el-tabs>
  413. </basic-container>
  414. <basic-container :showBtn="true" v-show="activeName == 'first' || activeName == 'third'">
  415. <formbottom :assemblyForm="form" :generateBillsfalse="generateBillsfalse" :disabled="showLock" :detailData="detailData"
  416. @billsDetailfun="billsDetailfun(form.id)"></formbottom>
  417. </basic-container>
  418. </div>
  419. </el-tab-pane>
  420. <el-tab-pane
  421. :label="$t('sea118n.feeInfo')"
  422. name="fy"
  423. class="scrollable-container"
  424. v-if="
  425. (!(form.billType == 'MM' && isHq != 1) &&
  426. (roleName.includes('admin') ||
  427. roleName.includes('应收修改') ||
  428. roleName.includes('应付修改') ||
  429. roleName.includes('应收查看') ||
  430. roleName.includes('应付查看'))) ||
  431. roleName.includes('国外费用') ||
  432. roleName.includes('允许修改他人费用')
  433. "
  434. >
  435. <feecenter
  436. :assemblyForm="form"
  437. :copyFormData="copyFormData"
  438. :detailData="detailData"
  439. :disabled="detailData.seeDisabled || showLock"
  440. :showLock="showLock"
  441. :pleasereviewType="pleasereviewType"
  442. :pid="form.id"
  443. @billsDetailfun="billsDetailfun(form.id)"
  444. >
  445. </feecenter>
  446. </el-tab-pane>
  447. <el-tab-pane :label="$t('sea118n.docCenter')" name="dz" class="scrollable-container">
  448. <document-center
  449. ref="documentCenter"
  450. :detailData="detailData"
  451. :assemblyForm="form"
  452. :disabled="showLock"
  453. @billsDetailfun="billsDetailfun(form.id)"
  454. ></document-center>
  455. </el-tab-pane>
  456. <el-tab-pane :label="$t('sea118n.hblnolist')" name="fd" v-if="form.billType == 'MM'" class="scrollable-container">
  457. <Split-list
  458. :detailData="detailData"
  459. :assemblyForm="form"
  460. :data="billsListAllData"
  461. :disabled="detailData.seeDisabled || showLock"
  462. @billsListAllfun="billsListAllfun(form.id)"
  463. @billsDetailfun="billsDetailfun(form.id)"
  464. ></Split-list>
  465. </el-tab-pane>
  466. <el-tab-pane label="海关信息">
  467. <customs-information :form="form" @synchronization="billsDetailfun(form.id)"></customs-information>
  468. </el-tab-pane>
  469. </el-tabs>
  470. </div>
  471. <!--导入模板-->
  472. <el-dialog
  473. :title="$t('btn118n.importTemplate')"
  474. append-to-body
  475. :visible.sync="excelBox"
  476. width="555px"
  477. :close-on-click-modal="false"
  478. v-dialog-drag
  479. >
  480. <avue-form v-if="excelBox" :option="excelOption" v-model="excelForm" :upload-before="uploadBefore" :upload-after="onSuccess"> </avue-form>
  481. </el-dialog>
  482. <!--审核弹窗-->
  483. <el-dialog
  484. append-to-body
  485. title="审批进度"
  486. class="el-dialogDeep"
  487. :visible.sync="checkScheduleDialog"
  488. width="40%"
  489. :close-on-click-modal="false"
  490. :destroy-on-close="true"
  491. :close-on-press-escape="false"
  492. v-dialog-drag
  493. >
  494. <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
  495. </el-dialog>
  496. <!--预览报表弹窗-->
  497. <el-dialog
  498. append-to-body
  499. title="预览报表"
  500. class="el-dialogDeep"
  501. :visible.sync="previewDialog"
  502. width="60%"
  503. :close-on-click-modal="false"
  504. :destroy-on-close="true"
  505. :close-on-press-escape="false"
  506. v-dialog-drag
  507. >
  508. <business-reports
  509. v-if="previewDialog"
  510. :id="form.id"
  511. :classifycode="getReportTypeByBigHandle()"
  512. :disabled="detailData.seeDisabled"
  513. ></business-reports>
  514. </el-dialog>
  515. <el-dialog
  516. append-to-body
  517. title="物流信息"
  518. class="el-dialogDeep"
  519. :visible.sync="logisticsDialog"
  520. width="30%"
  521. :close-on-click-modal="false"
  522. :destroy-on-close="true"
  523. :close-on-press-escape="false"
  524. v-dialog-drag
  525. >
  526. <span>
  527. <avue-form v-if="logisticsDialog" ref="logisticsForm" :option="logisticsOption" v-model="logisticsForm">
  528. <tempalte slot="shippingCompany">
  529. <dic-select
  530. v-model="logisticsForm.shippingCompany"
  531. placeholder="船务公司"
  532. key="id"
  533. label="deptName"
  534. url="/blade-system/dept/getDeptList?isHq=1"
  535. :filterable="true"
  536. :remote="true"
  537. dataName="deptName"
  538. @selectChange="dicChange('shippingCompany', $event)"
  539. ></dic-select>
  540. </tempalte>
  541. <tempalte slot="shippingStaffName">
  542. <dic-select
  543. v-model="logisticsForm.shippingStaffName"
  544. placeholder="船务员工"
  545. :key="logisticsForm.shippingCompanyId"
  546. label="realName"
  547. :url="'/blade-user/userListAll?deptId=' + logisticsForm.shippingCompanyId"
  548. :filterable="true"
  549. :remote="true"
  550. dataName="realName"
  551. @selectChange="dicChange('shippingStaffName', $event)"
  552. ></dic-select>
  553. </tempalte>
  554. </avue-form>
  555. </span>
  556. <span slot="footer" class="dialog-footer">
  557. <el-button @click="logisticsDialog = false" size="mini">取 消</el-button>
  558. <el-button type="primary" @click="logisticsSubmit" size="mini">确 定</el-button>
  559. </span>
  560. </el-dialog>
  561. <el-dialog
  562. append-to-body
  563. title="转单信息"
  564. class="el-dialogDeep"
  565. :visible.sync="transferDialog"
  566. width="30%"
  567. :close-on-click-modal="false"
  568. :destroy-on-close="true"
  569. :close-on-press-escape="false"
  570. v-dialog-drag
  571. >
  572. <span>
  573. <avue-form v-if="transferDialog" ref="transferForm" :option="transferOption" v-model="transferForm">
  574. <tempalte slot="podCompanyName">
  575. <dic-select
  576. v-model="transferForm.podCompanyName"
  577. placeholder="目的港公司"
  578. key="id"
  579. label="deptName"
  580. url="/blade-system/dept/lazy-list"
  581. :filterable="true"
  582. @selectChange="dicChange('podCompanyName', $event)"
  583. ></dic-select>
  584. </tempalte>
  585. <tempalte slot="podStaffName">
  586. <dic-select
  587. v-model="transferForm.podStaffName"
  588. placeholder="目的港员工"
  589. label="realName"
  590. :key="transferForm.podCompanyId"
  591. :url="'/blade-user/userListAll?deptId=' + transferForm.podCompanyId"
  592. :filterable="true"
  593. :remote="true"
  594. dataName="realName"
  595. @selectChange="dicChange('podStaffName', $event)"
  596. ></dic-select>
  597. </tempalte>
  598. </avue-form>
  599. </span>
  600. <span slot="footer" class="dialog-footer">
  601. <el-button @click="transferDialog = false" size="mini">取 消</el-button>
  602. <el-button type="primary" @click="transferSubmit" size="mini">确 定</el-button>
  603. </span>
  604. </el-dialog>
  605. <bill-lading ref="billLading" :oldForm="form" @upDate="billsDetailfun(form.id)"></bill-lading>
  606. </div>
  607. </template>
  608. <script>
  609. import EntrustmentLnformation from "@/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation.vue";
  610. import mbinformation from "@/views/iosBasicData/SeafreightExportF/bills/assembly/mbinformation.vue";
  611. import reports from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reports.vue";
  612. import formbottom from "@/views/iosBasicData/SeafreightExportF/bills/assembly/formbottom.vue";
  613. import edicode from "@/views/iosBasicData/SeafreightExportF/bills/assembly/edicode.vue";
  614. import filescenter from "@/views/iosBasicData/SeafreightExportF/bills/assembly/filescenter.vue";
  615. import DistributionBox from "@/views/iosBasicData/SeafreightExportF/bills/assembly/DistributionBox.vue";
  616. import feecenter from "@/views/iosBasicData/SeafreightExportF/bills/assembly/feecenter.vue";
  617. import { getList as userGetList } from "@/api/system/user";
  618. import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
  619. import TreeSelect from "@/components/iosbasic-data/TreeSelect.vue";
  620. import bcorps from "@/views/iosBasicData/bcorps/index.vue";
  621. import dicSelect from "@/components/dicSelect/main";
  622. import bcorpstypedefine from "@/views/iosBasicData/bcorps/bcorpstypedefine.vue";
  623. import SplitList from "@/views/iosBasicData/SeafreightExportF/bills/assembly/SplitList.vue";
  624. import { getLazylist } from "@/api/basicData/agreement";
  625. import { getBcorpsList, getBcorpslistByType } from "@/api/iosBasicData/bcorps";
  626. import { getBlocationsList } from "@/api/iosBasicData/blocations";
  627. import { getBcorpsattnList } from "@/api/iosBasicData/bcorpsattn";
  628. import { getWorkDicts } from "@/api/system/dictbiz";
  629. import { getDeptLazyTree, getDeptTree, getLazyList } from "@/api/system/dept";
  630. import {
  631. billsCheckBills,
  632. billsCopyBills,
  633. billsDetail,
  634. billsGetBillNo,
  635. removeHblNo,
  636. billsListAll,
  637. billsRevokeCheckBills,
  638. editypesSendingEdi,
  639. billsSubmit,
  640. billsAdd,
  641. deptGetDetailPol,
  642. postSelectByUser,
  643. logisticsSubmission,
  644. logisticsRevokeSubmission,
  645. transferOrder,
  646. revokeTransferOrder,
  647. synchronizeData,
  648. revokeLockOrder,
  649. synchronizeDataMM,
  650. verifyData,
  651. updateVerifyData
  652. } from "@/api/iosBasicData/bills";
  653. import { dateFormat } from "@/util/date";
  654. import { validatenull } from "@/util/validate";
  655. import checkSchedule from "@/components/checkH/checkSchedule.vue";
  656. import { getBvesselsList } from "@/api/iosBasicData/bvessels";
  657. import DocumentCenter from "@/views/iosBasicData/SeafreightExportF/bills/assembly/DocumentCenter.vue";
  658. import businessReports from "@/views/iosBasicData/SeafreightExportF/bills/assembly/businessReports.vue";
  659. import { popupReminder } from "@/util/messageReminder";
  660. import editypes from "@/views/iosBasicData/editypes/index.vue";
  661. import { editypesList } from "@/api/iosBasicData/editypes";
  662. import { verifyEnglish, checkFullWidthSymbols, lineQuantityVerification, tabVerify } from "@/util/date";
  663. import { contrastObj, contrastList } from "@/util/contrastData";
  664. import { selectListLos } from "@/api/approval/processConfig";
  665. import { isProcurement } from "@/api/basicData/configuration";
  666. import billLading from "./assembly/billLading.vue";
  667. import customsInformation from "./assembly/customsInformation.vue";
  668. import { submit } from "@/api/iosBasicData/sailingSchedule.js";
  669. import _ from "lodash";
  670. export default {
  671. name: "海运出口(F)",
  672. components: {
  673. checkSchedule,
  674. SearchQuery,
  675. EntrustmentLnformation,
  676. formbottom,
  677. mbinformation,
  678. reports,
  679. edicode,
  680. filescenter,
  681. DistributionBox,
  682. feecenter,
  683. bcorps,
  684. bcorpstypedefine,
  685. SplitList,
  686. TreeSelect,
  687. DocumentCenter,
  688. businessReports,
  689. editypes,
  690. dicSelect,
  691. billLading,
  692. customsInformation
  693. },
  694. props: {
  695. detailData: {
  696. type: Object
  697. },
  698. pageIds: {
  699. type: Array, // 指定 prop 的类型为 Array
  700. default: () => [] // 提供一个默认值,这里使用函数形式返回一个空数组
  701. }
  702. },
  703. data() {
  704. return {
  705. isCutOffDate: false,
  706. overTime: false,
  707. roleName: localStorage.getItem("roleName"),
  708. transferForm: {
  709. podCompanyId: null
  710. },
  711. transferOption: {
  712. menuBtn: false,
  713. disabled: false,
  714. column: [
  715. {
  716. label: "目的港公司",
  717. prop: "podCompanyName",
  718. disabled: false,
  719. span: 24,
  720. rules: [
  721. {
  722. required: true,
  723. message: " ",
  724. trigger: "blur"
  725. }
  726. ]
  727. },
  728. {
  729. label: "目的港员工",
  730. prop: "podStaffName",
  731. disabled: false,
  732. span: 24,
  733. rules: [
  734. {
  735. required: true,
  736. message: " ",
  737. trigger: "blur"
  738. }
  739. ]
  740. }
  741. ]
  742. },
  743. transferDialog: false,
  744. logisticsForm: {
  745. shippingCompanyId: null
  746. },
  747. logisticsOption: {
  748. menuBtn: false,
  749. disabled: false,
  750. column: [
  751. {
  752. label: "船务公司",
  753. prop: "shippingCompany",
  754. disabled: false,
  755. span: 24
  756. },
  757. {
  758. label: "船务员工",
  759. prop: "shippingStaffName",
  760. disabled: false,
  761. span: 24,
  762. rules: [
  763. {
  764. required: true,
  765. message: " ",
  766. trigger: "blur"
  767. }
  768. ]
  769. }
  770. ]
  771. },
  772. logisticsDialog: false,
  773. showLock: false,
  774. ediData: [], // edi 列表数据
  775. ediData_SO: [], // edi SO 列表数据
  776. ediData_SI: [], // edi SI 列表数据
  777. previewDialog: false, // 预览报表弹窗开启
  778. generateBillsfalse: false, // 如果生成账单就禁用
  779. pleasereviewType: false, // 如果请核就禁用
  780. checkScheduleDialog: false, // 审核弹窗
  781. checkId: "", // 审核需要的id
  782. batchNo: "",
  783. billsListAllData: [], // 分单列表数据
  784. pageLoading: false, // 全屏的动画
  785. saveLoading: false,
  786. copyFormData: {}, // 详情的备份数据
  787. // 详情数据
  788. form: {
  789. branchId: JSON.parse(localStorage.getItem("sysitemData")).deptId,
  790. branchName: JSON.parse(localStorage.getItem("sysitemData")).deptName,
  791. billDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00", // 单据日期 默认 当天
  792. operatorName: JSON.parse(localStorage.getItem("saber-userInfo")).content.user_name, // OP 默认登录人
  793. operatorId: JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id, // OP 默认登录人
  794. businessType: "SE", // 业务类型 默认 海运出口
  795. businessTypes: "海运",
  796. billType: "DD", // 单据类型 默认 直单
  797. accDeptName: "", // 核算部门 默认登录人的部门
  798. issueType: "TER", // 签单方式 默认 正本提单
  799. mpaymode: "PP", // 主单付费方式 默认PP
  800. hpaymode: "PP", // 分单付费方式 默认 PP
  801. loadType: JSON.parse(localStorage.getItem("saber-tenantId")).content == "409341" ? "FCL" : "整箱", // 装箱方式默认整箱
  802. srcType: "OWN", // 业务来源默认公司 来源 内容 默认登录人所属公司
  803. numberOfObl: "NONE", // 正本份数 默认 THREE
  804. numberOfCopy: "NONE", // 副本份数 默认 THREE
  805. seaType: "E", // 进出口 默认出口 E=出口 I=进口"
  806. cargoType: "dry", // 货物类型默认普货
  807. marks: "N/M",
  808. dgPackingLevel: "0", // 危险品包装等级
  809. serviceTerms: "CY-CY", // 服务方式
  810. polFreeBoxUseDays: "7",
  811. podFreeBoxUseDays: "14",
  812. boxBelongsTo: "SOC",
  813. cabinType: "DF自营",
  814. bookingDate: dateFormat(new Date(), "yyyy-MM-dd"),
  815. filesList: [], // 文件中心
  816. feeCenterListD: [], // 收
  817. feeCenterListC: [], // 付
  818. preContainersList: [], // 箱
  819. feeCenterAmendList: [],
  820. containerNumberItemList: [],
  821. containersList: [],
  822. waitingBoxList: [],
  823. placeReceiptName: "",
  824. placeReceiptNamePrint: "",
  825. polEnName: "",
  826. polNamePrint: "",
  827. podEnName: "",
  828. podNamePrint: "",
  829. destinationName: "",
  830. destinationNamePrint: "",
  831. placeDeliveryName: "",
  832. placeDeliveryNamePrint: "",
  833. potEnName: "",
  834. potNamePrint: "",
  835. detail: {},
  836. hmmEdi: {}
  837. },
  838. oldForm: {
  839. branchId: JSON.parse(localStorage.getItem("sysitemData")).deptId,
  840. branchName: JSON.parse(localStorage.getItem("sysitemData")).deptName,
  841. billDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00", // 单据日期 默认 当天
  842. operatorName: JSON.parse(localStorage.getItem("saber-userInfo")).content.user_name, // OP 默认登录人
  843. operatorId: JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id, // OP 默认登录人
  844. businessType: "SE", // 业务类型 默认 海运出口
  845. businessTypes: "海运",
  846. billType: "DD", // 单据类型 默认 直单
  847. accDeptName: "", // 核算部门 默认登录人的部门
  848. issueType: "TER", // 签单方式 默认 正本提单
  849. mpaymode: "PP", // 主单付费方式 默认PP
  850. hpaymode: "PP", // 分单付费方式 默认 PP
  851. loadType: JSON.parse(localStorage.getItem("saber-tenantId")).content == "409341" ? "FCL" : "整箱", // 装箱方式默认整箱
  852. srcType: "OWN", // 业务来源默认公司 来源 内容 默认登录人所属公司
  853. numberOfObl: "NONE", // 正本份数 默认 THREE
  854. numberOfCopy: "NONE", // 副本份数 默认 THREE
  855. seaType: "E", // 进出口 默认出口 E=出口 I=进口"
  856. cargoType: "dry", // 货物类型默认普货
  857. marks: "N/M",
  858. dgPackingLevel: "0", // 危险品包装等级
  859. serviceTerms: "CY-CY", // 服务方式
  860. polFreeBoxUseDays: "7",
  861. podFreeBoxUseDays: "14",
  862. boxBelongsTo: "SOC",
  863. bookingDate: dateFormat(new Date(), "yyyy-MM-dd"),
  864. filesList: [], // 文件中心
  865. feeCenterListD: [], // 收
  866. feeCenterListC: [], // 付
  867. preContainersList: [], // 箱
  868. feeCenterAmendList: [],
  869. containerNumberItemList: [],
  870. containersList: [],
  871. waitingBoxList: [],
  872. placeReceiptName: "",
  873. placeReceiptNamePrint: "",
  874. polEnName: "",
  875. polNamePrint: "",
  876. podEnName: "",
  877. podNamePrint: "",
  878. destinationName: "",
  879. destinationNamePrint: "",
  880. placeDeliveryName: "",
  881. placeDeliveryNamePrint: "",
  882. potEnName: "",
  883. potNamePrint: "",
  884. detail: {},
  885. hmmEdi: {}
  886. },
  887. // 循环的配置
  888. basicData: {
  889. column: [
  890. {
  891. label: this.$t("sea118n.corpName"), // 调往来单位接口
  892. prop: "corpCnName",
  893. text: "请选择客户名称",
  894. type: "select",
  895. dicData: [],
  896. disabled: false,
  897. buttonIf: true,
  898. joinData: true,
  899. slot: "bcorps",
  900. display: true,
  901. forParameter: {
  902. key: "id",
  903. label: "cnName",
  904. value: "cnName",
  905. short: "shortName"
  906. },
  907. rules: [
  908. {
  909. required: true,
  910. message: " ",
  911. trigger: "blur"
  912. }
  913. ]
  914. },
  915. {
  916. label: "booking NO", // 订舱号
  917. text: "请输入booking NO",
  918. prop: "bookingNo",
  919. disabled: false,
  920. display: true
  921. },
  922. {
  923. label: "HB/L NO",
  924. text: "请输入HB/L NO",
  925. prop: "hblno",
  926. disabled: false,
  927. display: false
  928. },
  929. [
  930. {
  931. label: "MB/L NO",
  932. text: "请输入MB/L NO",
  933. prop: "mblno",
  934. span: 18,
  935. disabled: false
  936. },
  937. {
  938. label: "", // MB/L 付款方式 PP=预付, CC=到付, FPA, Other
  939. text: "请选择付款方式",
  940. prop: "mpaymode",
  941. type: "select",
  942. labelWidth: "30px",
  943. disabled: false,
  944. span: 6,
  945. dicData: [],
  946. forParameter: {
  947. key: "dictKey",
  948. label: "dictValue",
  949. value: "dictKey"
  950. }
  951. }
  952. ]
  953. ]
  954. },
  955. activeName: "first",
  956. bigtabs: "wt",
  957. saberUserInfo: {}, // 当前登录人信息
  958. // 需要加判断是否必填的数据
  959. messageData: [
  960. {
  961. name: "客户",
  962. value: "corpCnName"
  963. },
  964. {
  965. name: "业务来源",
  966. value: "srcType"
  967. },
  968. {
  969. name: "MBLNO",
  970. value: "mblno"
  971. },
  972. // {
  973. // name: 'booking NO',
  974. // value: 'bookingNo',
  975. // },
  976. // {
  977. // name: 'REF MBLNO',
  978. // value: 'refno',
  979. // },
  980. {
  981. name: "船名(VSL)",
  982. value: "vesselCnName"
  983. },
  984. {
  985. name: "航次(VOY)",
  986. value: "voyageNo"
  987. },
  988. {
  989. name: "ETD",
  990. value: "etd"
  991. },
  992. {
  993. name: "ATD",
  994. value: "actualEtd"
  995. },
  996. {
  997. name: "装货港",
  998. value: "polCnName"
  999. },
  1000. {
  1001. name: "卸货港",
  1002. value: "podCnName"
  1003. },
  1004. // {
  1005. // name: '包装单位',
  1006. // value: 'packingUnit',
  1007. // },
  1008. {
  1009. name: "承运人",
  1010. value: "carrierCnName"
  1011. },
  1012. {
  1013. name: "舱位类型",
  1014. value: "cabinType"
  1015. }
  1016. ],
  1017. imporiData: [
  1018. // { id: 0, name: '导入 ONE 模板' },
  1019. // { id: 1, name: '导入 PIL 订舱模板' },
  1020. // { id: 2, name: '导入截单格式' },
  1021. // { id: 3, name: '导入海信提单' },
  1022. { id: 4, name: "提单样本" }
  1023. ],
  1024. excelForm: {},
  1025. excelLoading: false,
  1026. excelOption: {
  1027. submitBtn: false,
  1028. emptyBtn: false,
  1029. column: [
  1030. {
  1031. label: "模板上传",
  1032. prop: "excelFile",
  1033. type: "upload",
  1034. drag: true,
  1035. loadText: "模板上传中,请稍等",
  1036. span: 24,
  1037. propsHttp: {
  1038. res: "data"
  1039. },
  1040. tip: "请上传 .xls,.xlsx 标准格式文件",
  1041. action: "api/blade-los/templateImport/importOne"
  1042. }
  1043. ]
  1044. },
  1045. excelBox: false,
  1046. saberTenantId: 0,
  1047. importTemplate: null,
  1048. isHq: null,
  1049. textareaNumber: 5,
  1050. lineLength: 35
  1051. };
  1052. },
  1053. watch: {
  1054. // 监听业务类型 如果不是分单 可以编辑分单号
  1055. "form.billType": {
  1056. // 执行方法
  1057. handler(oldValue, newValue) {
  1058. if (oldValue == "MH" || oldValue == "MM") {
  1059. this.basicData.column.forEach(item => {
  1060. if (item.prop == "bookingNo") {
  1061. item.display = false;
  1062. }
  1063. if (item.prop == "hblno") {
  1064. item.display = true;
  1065. }
  1066. });
  1067. } else {
  1068. this.basicData.column.forEach(item => {
  1069. if (item.prop == "bookingNo") {
  1070. item.display = false;
  1071. }
  1072. if (item.prop == "hblno") {
  1073. item.display = true;
  1074. }
  1075. });
  1076. }
  1077. // 只有分单不能编辑
  1078. if (oldValue == "MH") {
  1079. this.basicData.column.forEach((item, index) => {
  1080. if (index == 3) {
  1081. item.forEach(row => {
  1082. if (row.prop == "mblno") {
  1083. row.disabled = true;
  1084. }
  1085. });
  1086. }
  1087. });
  1088. } else {
  1089. this.basicData.column.forEach((item, index) => {
  1090. if (index == 3) {
  1091. item.forEach(row => {
  1092. if (row.prop == "mblno") {
  1093. row.disabled = false;
  1094. }
  1095. });
  1096. }
  1097. });
  1098. }
  1099. // 王风刚 2025-02-21 所有分单号都不能手动输入,都可以申请
  1100. },
  1101. deep: true, // 深度监听
  1102. immediate: true // 第一次改变就执行
  1103. },
  1104. // 监听箱信息数据 箱信息中有温度 自动切换 冻货
  1105. "form.preContainersList": {
  1106. // 执行方法
  1107. handler(oldValue, newValue) {
  1108. // 判断是否是数组
  1109. if (oldValue instanceof Array) {
  1110. // 循环 有温度反 true 没有反 false
  1111. const arr = oldValue.map(item => {
  1112. if (Number(item.temperature)) {
  1113. return true;
  1114. } else {
  1115. return false;
  1116. }
  1117. });
  1118. console.log(arr, 12345);
  1119. // 判断是否有温度
  1120. if (arr[0]) {
  1121. // 判断之前是否是冻货
  1122. if (this.form.cargoType == "reefer") return;
  1123. this.$message({
  1124. message: "箱信息里有温度已将货描切换为冻柜",
  1125. type: "warning"
  1126. });
  1127. this.$set(this.form, "cargoType", "reefer");
  1128. }
  1129. }
  1130. },
  1131. deep: true, // 深度监听
  1132. immediate: true // 第一次改变就执行,
  1133. },
  1134. billsListAllData: {
  1135. // 执行方法
  1136. handler(oldValue, newValue) {
  1137. if (oldValue.length && this.form.billType == "MM") {
  1138. this.basicData.column.forEach((item, index) => {
  1139. if (index == 3) {
  1140. item.forEach(row => {
  1141. if (row.prop == "mblno") {
  1142. row.disabled = true;
  1143. }
  1144. });
  1145. }
  1146. });
  1147. console.log(this.basicData.column);
  1148. }
  1149. },
  1150. deep: true, // 深度监听
  1151. immediate: true // 第一次改变就执行,
  1152. }
  1153. },
  1154. created() {
  1155. let Obj = JSON.parse(localStorage.getItem("saber-tenantId"));
  1156. this.saberTenantId = Obj ? Obj.content : 0;
  1157. this.saberUserInfo = JSON.parse(localStorage.getItem("saber-userInfo")).content;
  1158. this.isHq = JSON.parse(localStorage.getItem("user-Information")).isHq;
  1159. isProcurement({ param: "import.template" }).then(res => {
  1160. this.importTemplate = res.data.data;
  1161. });
  1162. isProcurement({ param: "textarea.number" }).then(res => {
  1163. if (res.data.data) {
  1164. this.textareaNumber = res.data.data;
  1165. }
  1166. });
  1167. // isProcurement({ param: "line.length" }).then(res => {
  1168. // if (res.data.data) {
  1169. // this.lineLength = res.data.data;
  1170. // }
  1171. // });
  1172. if (this.detailData.billType) {
  1173. this.form.billType = this.detailData.billType;
  1174. }
  1175. // 判断是否员id, 有id 就不显示
  1176. if (!this.form.id) {
  1177. this.deptGetDetailPolfun(); // 收货地 装货港 当前登录人的默认
  1178. // this.userGetListfun(undefined, true); // 获取用户管理数据
  1179. }
  1180. this.ownDeptLazyTreefun(); // 获取公司数据
  1181. this.getLazylistfun(); // 获取审核数据
  1182. this.mpaymodeWorkDictsfun(); // 获取 付款方式字典
  1183. this.srcTypeWorkDictsfun();
  1184. // 获取EDI 数据
  1185. this.editypesListfun();
  1186. // 获取所属团队数据
  1187. this.postSelectByUserfun();
  1188. },
  1189. methods: {
  1190. inLock() {
  1191. this.showLock = true;
  1192. const data = {
  1193. moduleName: "SE",
  1194. tableName: "SE_order",
  1195. billId: this.form.id,
  1196. no: localStorage.getItem("browserID"),
  1197. billNo: this.form.billNo
  1198. };
  1199. this.inDetailsKey(this.$route.name, {
  1200. moduleName: "SE",
  1201. tableName: "SE_order",
  1202. billId: this.form.id,
  1203. billNo: this.form.billNo
  1204. });
  1205. this.checkLock(data).then(res => {
  1206. if (res.data.code == 200) {
  1207. this.onLock(data).then(res => {
  1208. if (res.data.code == 200) {
  1209. this.showLock = false;
  1210. }
  1211. });
  1212. }
  1213. });
  1214. },
  1215. lastPage() {
  1216. if (this.pageIds.length) {
  1217. const index = this.pageIds.indexOf(this.form.id);
  1218. if (index == 0) {
  1219. return this.$message.error("没有上一票了");
  1220. }
  1221. const lastIndex = index - 1;
  1222. if (this.form.id) {
  1223. this.unLock({
  1224. moduleName: "SE",
  1225. tableName: "SE_order",
  1226. billId: this.form.id,
  1227. billNo: this.form.billNo
  1228. });
  1229. }
  1230. this.pageLoading = true;
  1231. this.billsDetailfun(this.pageIds[lastIndex]);
  1232. }
  1233. },
  1234. nextPage() {
  1235. if (this.pageIds.length) {
  1236. const index = this.pageIds.indexOf(this.form.id);
  1237. if (this.pageIds[this.pageIds.length - 1] == this.form.id) {
  1238. return this.$message.error("没有下一票了");
  1239. }
  1240. const nextIndex = index + 1;
  1241. if (this.form.id) {
  1242. this.unLock({
  1243. moduleName: "SE",
  1244. tableName: "SE_order",
  1245. billId: this.form.id,
  1246. billNo: this.form.billNo
  1247. });
  1248. }
  1249. this.pageLoading = true;
  1250. this.billsDetailfun(this.pageIds[nextIndex]);
  1251. }
  1252. },
  1253. billModify() {
  1254. if (this.verifyTags("提单修改")) {
  1255. this.$router.push({
  1256. name: "提单修改",
  1257. query: {
  1258. generateId: this.form.id
  1259. }
  1260. });
  1261. }
  1262. },
  1263. addEdit() {
  1264. if (this.form.billStatus >= 3) {
  1265. this.$emit("toAddEdit");
  1266. } else {
  1267. if (
  1268. contrastObj(this.form, this.oldForm) ||
  1269. contrastList(this.form.preContainersList, this.oldForm.preContainersList) ||
  1270. contrastList(this.form.containersList, this.oldForm.containersList) ||
  1271. contrastList(this.form.feeCenterListC, this.oldForm.feeCenterListC) ||
  1272. contrastList(this.form.feeCenterListD, this.oldForm.feeCenterListD) ||
  1273. contrastList(this.form.filesList, this.oldForm.filesList) ||
  1274. contrastList(this.form.waitingBoxList, this.oldForm.waitingBoxList)
  1275. ) {
  1276. this.$confirm("是否需要保存?", "提示", {
  1277. confirmButtonText: "确定",
  1278. cancelButtonText: "取消",
  1279. type: "warning"
  1280. })
  1281. .then(() => {
  1282. this.editCustomer("toAddEdit");
  1283. })
  1284. .catch(() => {
  1285. this.$emit("toAddEdit");
  1286. });
  1287. } else {
  1288. this.$emit("toAddEdit");
  1289. }
  1290. }
  1291. },
  1292. CopyDocumentsfun() {
  1293. if (!this.form.id) {
  1294. return this.$message.error("请保存数据");
  1295. }
  1296. this.$DialogForm.show({
  1297. title: "复制单据",
  1298. width: "300px",
  1299. menuPosition: "right",
  1300. data: { checkbox: "复制费用,复制箱型箱量" },
  1301. option: {
  1302. submitText: "确认",
  1303. emptyText: "取消",
  1304. span: 24,
  1305. column: [
  1306. {
  1307. label: "单据类型",
  1308. prop: "billType",
  1309. type: "select",
  1310. value: this.form.billType,
  1311. dicData: [
  1312. {
  1313. label: "直单",
  1314. value: "DD"
  1315. },
  1316. {
  1317. label: "主单",
  1318. value: "MM"
  1319. },
  1320. {
  1321. label: "分单",
  1322. value: "MH"
  1323. }
  1324. ],
  1325. dataType: "string",
  1326. span: 24
  1327. },
  1328. {
  1329. label: "复制类型",
  1330. prop: "checkbox",
  1331. type: "checkbox",
  1332. dicData: [
  1333. {
  1334. label: "复制费用",
  1335. value: "复制费用"
  1336. },
  1337. {
  1338. label: "复制箱型箱量",
  1339. value: "复制箱型箱量"
  1340. }
  1341. ],
  1342. dataType: "string",
  1343. span: 24
  1344. }
  1345. ]
  1346. },
  1347. beforeClose: done => {
  1348. done();
  1349. },
  1350. callback: res => {
  1351. res.done();
  1352. this.billsCopyBillsfun(this.form.id, res.data.checkbox, res.data.billType);
  1353. res.close();
  1354. }
  1355. });
  1356. },
  1357. //文档导入
  1358. importData(row) {
  1359. if (row == 0) {
  1360. this.excelOption.column[0].action = `/api/blade-los/templateImport/importOne?billId=${this.form.id}`;
  1361. } else if (row == 1) {
  1362. this.excelOption.column[0].action = `/api/blade-los/templateImport/importPilBooking?billId=${this.form.id}`;
  1363. } else if (row == 2) {
  1364. this.excelOption.column[0].action = `/api/blade-los/templateImport/importPilCutOffOrders?billId=${this.form.id}`;
  1365. } else if (row == 3) {
  1366. this.excelOption.column[0].action = `/api/blade-los/templateImport/importHisenseBill?billId=${this.form.id}`;
  1367. } else if (row == 4) {
  1368. this.excelOption.column[0].action = `/api/blade-los/templateImport/importBills?billId=${this.form.id}`;
  1369. }
  1370. this.excelBox = true;
  1371. },
  1372. // uploadBefore(file, done, loading) {
  1373. // done();
  1374. // loading = true;
  1375. // },
  1376. removeEmptyValues(obj) {
  1377. Object.keys(obj).forEach(key => {
  1378. if (obj[key] === null || obj[key] === undefined || obj[key] === "") {
  1379. delete obj[key];
  1380. }
  1381. });
  1382. return obj;
  1383. },
  1384. // 上传成功
  1385. onSuccess(res, done, loading, column) {
  1386. loading = true;
  1387. if (Object.keys(res).length) {
  1388. // loading = false;
  1389. this.$confirm("此操作将覆盖数据, 是否继续?", "提示", {
  1390. confirmButtonText: "确定",
  1391. cancelButtonText: "取消",
  1392. type: "warning"
  1393. })
  1394. .then(() => {
  1395. // this.form = res;
  1396. Object.keys(res).forEach(key => {
  1397. if (res[key]) {
  1398. if (key != "detail") {
  1399. if (key != "preContainersList") {
  1400. this.$set(this.form, key, res[key]);
  1401. }
  1402. }
  1403. if (key == "detail") {
  1404. Object.keys(res.detail).forEach(key => {
  1405. if (res.detail[key]) {
  1406. // this.form.detail[key] = res.detail[key]
  1407. this.$set(this.form.detail, key, res.detail[key]);
  1408. }
  1409. });
  1410. }
  1411. }
  1412. });
  1413. this.excelBox = false;
  1414. this.$message.success("导入成功!");
  1415. loading = false;
  1416. done();
  1417. })
  1418. .catch(() => {
  1419. this.excelBox = false;
  1420. loading = false;
  1421. done();
  1422. });
  1423. } else {
  1424. loading = false;
  1425. done();
  1426. }
  1427. },
  1428. allClick(name) {
  1429. if (name == "物流提交") {
  1430. this.logisticsForm = {
  1431. shippingCompanyId: null
  1432. };
  1433. this.logisticsDialog = true;
  1434. }
  1435. if (name == "转单") {
  1436. if (!this.form.podId) {
  1437. return this.$message.error("请选择卸货港");
  1438. }
  1439. if (!this.form.actualEtd) {
  1440. return this.$message.error("请填写ATD");
  1441. }
  1442. this.transferForm = {
  1443. podCompanyId: null
  1444. };
  1445. getLazylist().then(res => {
  1446. for (let item of res.data.data) {
  1447. if (this.form.podId == item.polId) {
  1448. this.transferForm.podCompanyId = item.id;
  1449. this.transferForm.podCompanyName = item.deptName;
  1450. return;
  1451. }
  1452. }
  1453. });
  1454. this.transferDialog = true;
  1455. }
  1456. if (name == "物流撤销提交") {
  1457. this.$confirm("是否撤销物流?", "提示", {
  1458. confirmButtonText: "确定",
  1459. cancelButtonText: "取消",
  1460. type: "warning"
  1461. }).then(() => {
  1462. logisticsRevokeSubmission(this.form).then(res => {
  1463. this.$message({
  1464. type: "success",
  1465. message: "操作成功!"
  1466. });
  1467. this.logisticsDialog = false;
  1468. this.billsDetailfun(this.form.id);
  1469. });
  1470. });
  1471. }
  1472. if (name == "撤销转单") {
  1473. this.$confirm("是否撤销转单?", "提示", {
  1474. confirmButtonText: "确定",
  1475. cancelButtonText: "取消",
  1476. type: "warning"
  1477. }).then(() => {
  1478. this.pageLoading = true;
  1479. revokeTransferOrder(this.form)
  1480. .then(res => {
  1481. this.$message({
  1482. type: "success",
  1483. message: "操作成功!"
  1484. });
  1485. this.logisticsDialog = false;
  1486. this.billsDetailfun(this.form.id);
  1487. })
  1488. .catch(() => {
  1489. this.pageLoading = false;
  1490. });
  1491. });
  1492. }
  1493. if (name == "同步主单到分单") {
  1494. this.$confirm("是否同步主单到分单?", "提示", {
  1495. confirmButtonText: "确定",
  1496. cancelButtonText: "取消",
  1497. type: "warning"
  1498. }).then(() => {
  1499. synchronizeDataMM({ billId: this.form.id }).then(res => {
  1500. this.$message({
  1501. type: "success",
  1502. message: "操作成功!"
  1503. });
  1504. this.billsDetailfun(this.form.id);
  1505. });
  1506. });
  1507. }
  1508. if (name == "同步分单信息") {
  1509. this.$confirm("是否同步分单到主单?", "提示", {
  1510. confirmButtonText: "确定",
  1511. cancelButtonText: "取消",
  1512. type: "warning"
  1513. }).then(() => {
  1514. synchronizeData({ billId: this.form.id }).then(res => {
  1515. this.$message({
  1516. type: "success",
  1517. message: "操作成功!"
  1518. });
  1519. this.billsDetailfun(this.form.id);
  1520. });
  1521. });
  1522. }
  1523. if (name == "提单确认") {
  1524. if (!this.form.temporaryId) {
  1525. return this.$message.error("此单据不能点提单确认");
  1526. }
  1527. if (this.form.cyTrailerTime) {
  1528. const nowDate = new Date(dateFormat(new Date(), "yyyy-MM-dd hh:mm:ss"));
  1529. const cyTrailerTime = new Date(this.form.cyTrailerTime).getTime();
  1530. if (nowDate > cyTrailerTime) {
  1531. return this.$message.error("现在时间超过截单时间不允许提单确认");
  1532. }
  1533. }
  1534. this.$refs.billLading.openDialog(this.form.temporaryId);
  1535. }
  1536. },
  1537. dicChange(name, row) {
  1538. if (name == "shippingCompany") {
  1539. if (row) {
  1540. this.logisticsForm.shippingCompanyId = row.id;
  1541. } else {
  1542. this.logisticsForm.shippingCompanyId = null;
  1543. this.logisticsForm.shippingCompany = null;
  1544. }
  1545. }
  1546. if (name == "shippingStaffName") {
  1547. if (row) {
  1548. this.logisticsForm.shippingStaffId = row.id;
  1549. } else {
  1550. this.logisticsForm.shippingStaffId = null;
  1551. this.logisticsForm.shippingStaffName = null;
  1552. }
  1553. }
  1554. if (name == "podStaffName") {
  1555. if (row) {
  1556. this.transferForm.podStaffId = row.id;
  1557. } else {
  1558. this.transferForm.podStaffId = null;
  1559. this.transferForm.podStaffName = null;
  1560. }
  1561. }
  1562. if (name == "podCompanyName") {
  1563. if (row) {
  1564. this.transferForm.podCompanyId = row.id;
  1565. } else {
  1566. this.transferForm.podCompanyId = null;
  1567. this.transferForm.podCompanyName = null;
  1568. }
  1569. }
  1570. },
  1571. logisticsSubmit() {
  1572. this.$refs["logisticsForm"].validate((valid, done) => {
  1573. done();
  1574. if (valid) {
  1575. let obj = {
  1576. ...this.form,
  1577. ...this.logisticsForm
  1578. };
  1579. logisticsSubmission(obj).then(res => {
  1580. this.$message({
  1581. type: "success",
  1582. message: "操作成功!"
  1583. });
  1584. this.logisticsDialog = false;
  1585. this.billsDetailfun(this.form.id);
  1586. });
  1587. } else {
  1588. return false;
  1589. }
  1590. });
  1591. },
  1592. transferSubmit() {
  1593. this.$refs["transferForm"].validate((valid, done) => {
  1594. done();
  1595. if (valid) {
  1596. let obj = {
  1597. ...this.form,
  1598. ...this.transferForm
  1599. };
  1600. this.pageLoading = true;
  1601. transferOrder(obj)
  1602. .then(res => {
  1603. this.$message({
  1604. type: "success",
  1605. message: "操作成功!"
  1606. });
  1607. this.transferDialog = false;
  1608. this.billsDetailfun(this.form.id);
  1609. })
  1610. .catch(err => {
  1611. this.pageLoading = false;
  1612. });
  1613. } else {
  1614. return false;
  1615. }
  1616. });
  1617. },
  1618. // 获取EDI列表数据
  1619. editypesListfun() {
  1620. editypesList(1, 1000).then(res => {
  1621. this.ediData = res.data.data.records;
  1622. this.ediData_SO = res.data.data.records.filter(r => r.groupName == "SO");
  1623. this.ediData_SI = res.data.data.records.filter(r => r.groupName == "SI");
  1624. });
  1625. },
  1626. // 发送edi
  1627. editypesSendingEdifun(row) {
  1628. row.billId = this.form.id;
  1629. // let msgsList = [];
  1630. // if (checkFullWidthSymbols(this.form.detail.hshipperDetails).hasFullWidth) {
  1631. // let msg = [];
  1632. // for (let item of checkFullWidthSymbols(this.form.detail.hshipperDetails).positions) {
  1633. // msg.push(`第${item.row}行的"${item.symbol}"`);
  1634. // }
  1635. // this.$message({
  1636. // dangerouslyUseHTMLString: true,
  1637. // message: `发货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  1638. // type: "error"
  1639. // });
  1640. // return;
  1641. // }
  1642. // if (checkFullWidthSymbols(this.form.detail.hconsigneeDetails).hasFullWidth) {
  1643. // let msg = [];
  1644. // for (let item of checkFullWidthSymbols(this.form.detail.hconsigneeDetails).positions) {
  1645. // msg.push(`第${item.row}行的"${item.symbol}"`);
  1646. // }
  1647. // this.$message({
  1648. // dangerouslyUseHTMLString: true,
  1649. // message: `收货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  1650. // type: "error"
  1651. // });
  1652. // return;
  1653. // }
  1654. // if (checkFullWidthSymbols(this.form.detail.hnotifyDetails).hasFullWidth) {
  1655. // let msg = [];
  1656. // for (let item of checkFullWidthSymbols(this.form.detail.hnotifyDetails).positions) {
  1657. // msg.push(`第${item.row}行的"${item.symbol}"`);
  1658. // }
  1659. // this.$message({
  1660. // dangerouslyUseHTMLString: true,
  1661. // message: `通知人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  1662. // type: "error"
  1663. // });
  1664. // return;
  1665. // }
  1666. // if (checkFullWidthSymbols(this.form.detail.mshipperDetails).hasFullWidth) {
  1667. // let msg = [];
  1668. // for (let item of checkFullWidthSymbols(this.form.detail.mshipperDetails).positions) {
  1669. // msg.push(`第${item.row}行的"${item.symbol}"`);
  1670. // }
  1671. // if (msg.length > 0) {
  1672. // this.$message({
  1673. // dangerouslyUseHTMLString: true,
  1674. // message: `MBL 发货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  1675. // type: "error"
  1676. // });
  1677. // return;
  1678. // }
  1679. // }
  1680. // if (checkFullWidthSymbols(this.form.detail.mconsigneeDetails).hasFullWidth) {
  1681. // let msg = [];
  1682. // for (let item of checkFullWidthSymbols(this.form.detail.mconsigneeDetails).positions) {
  1683. // msg.push(`第${item.row}行的"${item.symbol}"`);
  1684. // }
  1685. // if (msg.length > 0) {
  1686. // this.$message({
  1687. // dangerouslyUseHTMLString: true,
  1688. // message: `MBL 收货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  1689. // type: "error"
  1690. // });
  1691. // return;
  1692. // }
  1693. // }
  1694. // if (checkFullWidthSymbols(this.form.detail.mnotifyDetails).hasFullWidth) {
  1695. // let msg = [];
  1696. // for (let item of checkFullWidthSymbols(this.form.detail.mnotifyDetails).positions) {
  1697. // msg.push(`第${item.row}行的"${item.symbol}"`);
  1698. // }
  1699. // if (msg.length > 0) {
  1700. // this.$message({
  1701. // dangerouslyUseHTMLString: true,
  1702. // message: `MBL 通知人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  1703. // type: "error"
  1704. // });
  1705. // return;
  1706. // }
  1707. // }
  1708. // if (checkFullWidthSymbols(this.form.marks).hasFullWidth) {
  1709. // let msg = [];
  1710. // for (let item of checkFullWidthSymbols(this.form.marks).positions) {
  1711. // msg.push(`第${item.row}行的"${item.symbol}"`);
  1712. // }
  1713. // this.$message({
  1714. // dangerouslyUseHTMLString: true,
  1715. // message: `唛头:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  1716. // type: "error"
  1717. // });
  1718. // return;
  1719. // }
  1720. // if (checkFullWidthSymbols(this.form.commodityDescr).hasFullWidth) {
  1721. // let msg = [];
  1722. // for (let item of checkFullWidthSymbols(this.form.commodityDescr).positions) {
  1723. // msg.push(`第${item.row}行的"${item.symbol}"`);
  1724. // }
  1725. // this.$message({
  1726. // dangerouslyUseHTMLString: true,
  1727. // message: `货描:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  1728. // type: "error"
  1729. // });
  1730. // return;
  1731. // }
  1732. // if (checkFullWidthSymbols(this.form.forwarding).hasFullWidth) {
  1733. // let msg = [];
  1734. // for (let item of checkFullWidthSymbols(this.form.forwarding).positions) {
  1735. // msg.push(`第${item.row}行的"${item.symbol}"`);
  1736. // }
  1737. // this.$message({
  1738. // dangerouslyUseHTMLString: true,
  1739. // message: `FORWARDING:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  1740. // type: "error"
  1741. // });
  1742. // return;
  1743. // }
  1744. // if (lineQuantityVerification(this.form.detail.hshipperDetails, this.lineLength)) {
  1745. // return this.$message.error(`发货人详情超长,请手动断行,否则影响打印`);
  1746. // }
  1747. // if (lineQuantityVerification(this.form.detail.hconsigneeDetails, this.lineLength)) {
  1748. // return this.$message.error(`收货人详情超长,请手动断行,否则影响打印`);
  1749. // }
  1750. // if (lineQuantityVerification(this.form.detail.hnotifyDetails, this.lineLength)) {
  1751. // return this.$message.error(`通知人详情超长,请手动断行,否则影响打印`);
  1752. // }
  1753. // if (!verifyEnglish(this.form.detail.hshipperDetails)) {
  1754. // msgsList.push("发货人");
  1755. // }
  1756. // if (!verifyEnglish(this.form.detail.hconsigneeDetails)) {
  1757. // msgsList.push("收货人");
  1758. // }
  1759. // if (!verifyEnglish(this.form.detail.hnotifyDetails)) {
  1760. // msgsList.push("通知人");
  1761. // }
  1762. // if (!verifyEnglish(this.form.detail.mshipperDetails)) {
  1763. // msgsList.push("MBL 发货人");
  1764. // }
  1765. // if (!verifyEnglish(this.form.detail.mconsigneeDetails)) {
  1766. // msgsList.push("MBL 收货人");
  1767. // }
  1768. // if (!verifyEnglish(this.form.detail.mnotifyDetails)) {
  1769. // msgsList.push("MBL 通知人");
  1770. // }
  1771. // if (!verifyEnglish(this.form.marks)) {
  1772. // msgsList.push("唛头");
  1773. // }
  1774. // if (!verifyEnglish(this.form.commodityDescr)) {
  1775. // msgsList.push("货描");
  1776. // }
  1777. // if (!verifyEnglish(this.form.forwarding)) {
  1778. // msgsList.push("FORWARDING");
  1779. // }
  1780. // if (msgsList.length > 0) {
  1781. // this.$message.error(`请正确输入${msgsList.join(",")}的英文`);
  1782. // return;
  1783. // }
  1784. this.saveLoading = true;
  1785. editypesSendingEdi(row)
  1786. .then(res => {
  1787. this.saveLoading = false;
  1788. // 判断data是否有值,没有值说明不成功给个弹窗返回
  1789. if (!res.data.data) {
  1790. let text = res.data.msg.replace("\r\n", "<br>");
  1791. console.log(text);
  1792. this.$message({
  1793. type: "warning",
  1794. dangerouslyUseHTMLString: true,
  1795. message: text,
  1796. // 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>`,
  1797. duration: 5000
  1798. });
  1799. } else {
  1800. this.$message.success("操作成功,请去文件中心查看");
  1801. this.billsDetailfun(this.form.id); // 详情接口
  1802. }
  1803. })
  1804. .catch(err => {
  1805. this.saveLoading = false;
  1806. });
  1807. },
  1808. // 报表弹窗
  1809. previewDialogfun() {
  1810. this.getReportTypeByBigHandle("业务");
  1811. this.previewDialog = true;
  1812. },
  1813. //请核关闭
  1814. choceScheduleFun() {
  1815. this.checkScheduleDialog = false;
  1816. },
  1817. // 收货地 装货港 当前登录人的默认
  1818. deptGetDetailPolfun() {
  1819. deptGetDetailPol(this.saberUserInfo.dept_pid.split(",")[0]).then(res => {
  1820. // 收货地
  1821. this.form.placeReceiptName = res.data.data.polEnName;
  1822. this.form.placeReceiptId = res.data.data.polId;
  1823. this.form.placeReceiptCode = res.data.data.polCode;
  1824. this.form.placeReceiptNamePrint = res.data.data.polEnName;
  1825. this.form.polCnName = res.data.data.polCnName;
  1826. this.form.polEnName = res.data.data.polEnName;
  1827. this.form.polId = res.data.data.polId;
  1828. this.form.polCode = res.data.data.polCode;
  1829. this.form.polNamePrint = res.data.data.polEnName;
  1830. // 签单地点 默认 装货港
  1831. this.$set(this.form, "issueAtId", this.form.polId);
  1832. this.$set(this.form, "issueAt", this.form.polEnName);
  1833. // 主单单付费地点 默认 如果主单付费方式 为PP 取装货港 如果主单付费地点为CC 取卸货港
  1834. if (this.form.mpaymode == "PP") {
  1835. this.$set(this.form, "mpayplace", this.form.polEnName);
  1836. }
  1837. // 分单单付费地点 默认 如果分单付费方式 为PP 取装货港 如果分单付费地点为CC 取卸货港
  1838. if (this.form.hpaymode == "PP") {
  1839. this.$set(this.form, "hpayplace", this.form.polEnName);
  1840. }
  1841. });
  1842. },
  1843. // 获取用户管理数据
  1844. userGetListfun(account = undefined, type = false) {
  1845. // userGetList(1, 10, { account }, this.saberUserInfo.dept_pid.split(',')[0]).then(res => {
  1846. // this.columnforfun('operatorName').dicData = res.data.data.records
  1847. // if (type) {
  1848. // // 核算部门 默认登录人的部门
  1849. // for (let item of this.columnforfun('operatorName').dicData) {
  1850. // if (item.name == this.form.operatorName) {
  1851. // this.$set(this.form, 'accDeptName', item.deptName)
  1852. // this.$set(this.form, 'accDept', item.deptId)
  1853. // this.$set(this.form, 'operatorDept', item.deptId.split(',').pop())
  1854. // this.$set(this.form, 'operatorDeptName', item.deptId)
  1855. // }
  1856. // }
  1857. // }
  1858. // })
  1859. },
  1860. // 获取所属岗位数据
  1861. postSelectByUserfun() {
  1862. postSelectByUser(JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id).then(res => {
  1863. // this.columnforfun('teamName').dicData = res.data.data
  1864. // 判断是否有值,没有的话默认第一个
  1865. if (!this.form.teamName) {
  1866. this.$set(this.form, "teamId", res.data.data[0].id);
  1867. this.$set(this.form, "teamName", res.data.data[0].postName);
  1868. }
  1869. });
  1870. },
  1871. // 获取付款方式字典数据
  1872. mpaymodeWorkDictsfun() {
  1873. getWorkDicts("payment_method_los").then(res => {
  1874. this.columnforfun("mpaymode").dicData = res.data.data;
  1875. // this.columnforfun('hpaymode').dicData = res.data.data
  1876. });
  1877. },
  1878. // 获取核算部分数据 // 机构管理接口
  1879. getLazylistfun() {
  1880. // getDeptTree().then(res => {
  1881. // this.columnforfun('accDeptName').dicData = res.data.data
  1882. // })
  1883. },
  1884. // 获取客户名称数据 往来单位数据
  1885. getBcorpsListfun(cnName) {
  1886. getBcorpsList(1, 20, { shortName: cnName, status: 0 }).then(res => {
  1887. this.columnforfun("corpCnName").dicData = res.data.data.records;
  1888. });
  1889. },
  1890. // 获取客户联系人 客户OP
  1891. getBcorpsattnListfun(cname) {
  1892. // getBcorpsattnList(1, 10, { pid: this.form.corpId, cname }).then(res => {
  1893. // this.columnforfun('corpAttnName').dicData = res.data.data.records
  1894. // // if (res.data.data.records.length == 0) {
  1895. // // this.form.corpAttnName = ''
  1896. // // this.form.corpAttnId = ''
  1897. // // this.$set(this.form, 'corpAttnTel', '')
  1898. // // this.$set(this.form, 'corpAttnEmail', '')
  1899. // // return
  1900. // // }
  1901. // // this.form.corpAttnName = res.data.data.records[0].cname
  1902. // // this.form.corpAttnId = res.data.data.records[0].id
  1903. // // this.$set(this.form, 'corpAttnTel', res.data.data.records[0].tel)
  1904. // // this.$set(this.form, 'corpAttnEmail', res.data.data.records[0].email)
  1905. // })
  1906. },
  1907. // 获取地点信息
  1908. getBlocationsListfun(cnName) {
  1909. // getBlocationsList(1, 10, { cnName }).then(res => {
  1910. // this.columnforfun('mPayplace').dicData = res.data.data.records
  1911. // })
  1912. },
  1913. // 获取业务来源数据
  1914. srcTypeWorkDictsfun() {
  1915. // getWorkDicts('src_type_los').then(res => {
  1916. // this.columnforfun('srcType').dicData = res.data.data
  1917. // })
  1918. },
  1919. // 获取业务来源代理数据
  1920. agentBcorpsListfun(cnName) {
  1921. // let corpTypeName = '国内直接客户,国内同行及代理,国外直接客户,国外同行及代理'
  1922. // getBcorpslistByType(1, 20, { cnName, status: 0, corpTypeName }).then(res => {
  1923. // this.columnforfun('srcCnName').dicData = res.data.data.records
  1924. // })
  1925. },
  1926. // 获取业务来源业务员数据
  1927. salesUserGetListfun(account) {
  1928. // if (this.$store.getters.userInfo.tenant_id === "263057") {
  1929. // userGetList(1, 10, { roleId: '业务员' }).then(res => {
  1930. // this.columnforfun('srcCnName').dicData = res.data.data.records
  1931. // })
  1932. // } else {
  1933. // selectListLos('业务员', account).then(res => {
  1934. // this.columnforfun('srcCnName').dicData = res.data.data
  1935. // })
  1936. // }
  1937. },
  1938. // 获取公司名称 用户管理左侧
  1939. ownDeptLazyTreefun() {
  1940. // getDeptLazyTree(0).then(res => {
  1941. // this.columnforfun('srcCnName').dicData = res.data.data
  1942. // // 来源 内容 默认登录人所属公司
  1943. // for (let item of this.columnforfun('srcCnName').dicData) {
  1944. // if (item.id == JSON.parse(localStorage.getItem('saber-userInfo')).content.dept_pid.split(',')[0]) {
  1945. // this.$set(this.form, 'srcId', item.id)
  1946. // this.$set(this.form, 'srcCnName', item.title)
  1947. // this.$set(this.form, 'srcEnName', item.title)
  1948. // }
  1949. // }
  1950. // })
  1951. },
  1952. // 申请B/L NO
  1953. billsGetBillNofun() {
  1954. let billNoFormat = "";
  1955. if (this.form.cargoType == "dry") {
  1956. billNoFormat = "HYCK-PH";
  1957. } else if (this.form.cargoType == "danger") {
  1958. billNoFormat = "HYCK-WXP";
  1959. } else if (this.form.cargoType == "reefer") {
  1960. billNoFormat = "HYCK-DG";
  1961. }
  1962. billsGetBillNo({
  1963. businessTypeCode: "HYCK",
  1964. billNoFormat: billNoFormat
  1965. }).then(res => {
  1966. // this.columnforfun('hpaymode').disabled = false
  1967. this.$set(this.form, "hblno", res.data.data);
  1968. this.billsSubmitfun();
  1969. });
  1970. },
  1971. // 下拉多选弹窗的确认
  1972. eldialogConfirm(name) {
  1973. if (name == "bcorps") {
  1974. if (this.$refs.bcorps[0].isShow) {
  1975. console.log("列表确认");
  1976. this.form.corpCnName = this.$refs.bcorps[0].selectionList[0].cnName;
  1977. this.form.corpEnName = this.$refs.bcorps[0].selectionList[0].enName;
  1978. this.form.corpId = this.$refs.bcorps[0].selectionList[0].id;
  1979. this.form.corpCode = this.$refs.bcorps[0].selectionList[0].code;
  1980. this.form.corpSource = this.$refs.bcorps[0].selectionList[0].corpSource;
  1981. // 获取 客户op数据
  1982. this.getBcorpsattnListfun();
  1983. // 业务来源参数带出
  1984. this.$set(this.form, "srcType", this.$refs.bcorps[0].selectionList[0].sourceType);
  1985. this.$set(this.form, "srcId", this.$refs.bcorps[0].selectionList[0].srcId);
  1986. this.$set(this.form, "srcCnName", this.$refs.bcorps[0].selectionList[0].srcCnName);
  1987. this.$set(this.form, "srcEnName", this.$refs.bcorps[0].selectionList[0].srcEnName);
  1988. // this.columnforfun('srcType').disabled = false
  1989. // this.columnforfun('srcCnName').disabled = false
  1990. // 航线带出往来单位的优势航线
  1991. this.$set(this.form, "lineCnName", this.$refs.bcorps[0].selectionList[0].advantageRoute);
  1992. // 带出发货人数据
  1993. this.$set(this.form.detail, "hshipperId", this.$refs.bcorps[0].selectionList[0].id);
  1994. this.$set(this.form.detail, "hshipperCnName", this.$refs.bcorps[0].selectionList[0].cnName);
  1995. this.$set(this.form.detail, "hshipperEnName", this.$refs.bcorps[0].selectionList[0].enName);
  1996. this.$set(this.form.detail, "hshipperCode", this.$refs.bcorps[0].selectionList[0].code);
  1997. this.$set(this.form.detail, "hshipperDetails", this.$refs.bcorps[0].selectionList[0].details);
  1998. this.$set(this.form.detail, "hshipperCntyName", this.$refs.bcorps[0].selectionList[0].cntyName);
  1999. this.$set(this.form.detail, "hshipperCntyCode", this.$refs.bcorps[0].selectionList[0].cntyCode);
  2000. // this.columnforfun('corpAttnName').disabled = false
  2001. // this.columnforfun('corpAttnTel').disabled = false
  2002. // this.columnforfun('corpAttnEmail').disabled = false
  2003. } else {
  2004. console.log("详情确认");
  2005. console.log(this.$refs.bcorps, 962);
  2006. this.$refs.bcorps[0].$refs.detail.submitForm();
  2007. this.form.corpCnName = this.$refs.bcorps[0].$refs.detail.formData.cnName;
  2008. this.form.corpEnName = this.$refs.bcorps[0].$refs.detail.formData.enName;
  2009. this.form.corpId = this.$refs.bcorps[0].$refs.detail.formData.id;
  2010. this.form.corpCode = this.$refs.bcorps[0].$refs.detail.formData.code;
  2011. this.form.corpSource = this.$refs.bcorps[0].$refs.detail.formData.corpSource;
  2012. // 获取 客户op数据
  2013. this.getBcorpsattnListfun();
  2014. // 业务来源参数带出
  2015. this.$set(this.form, "srcType", this.$refs.bcorps[0].$refs.detail.formData.sourceType);
  2016. this.$set(this.form, "srcId", this.$refs.bcorps[0].$refs.detail.formData.srcId);
  2017. this.$set(this.form, "srcCnName", this.$refs.bcorps[0].$refs.detail.formData.srcCnName);
  2018. this.$set(this.form, "srcEnName", this.$refs.bcorps[0].$refs.detail.formData.srcEnName);
  2019. // this.columnforfun('srcType').disabled = false
  2020. // this.columnforfun('srcCnName').disabled = false
  2021. // 航线带出往来单位的优势航线
  2022. this.$set(this.form, "lineCnName", this.$refs.bcorps[0].$refs.detail.formData.advantageRoute);
  2023. // 带出发货人数据
  2024. this.$set(this.form.detail, "hshipperId", this.$refs.bcorps[0].$refs.detail.formData.id);
  2025. this.$set(this.form.detail, "hshipperCnName", this.$refs.bcorps[0].$refs.detail.formData.cnName);
  2026. this.$set(this.form.detail, "hshipperEnName", this.$refs.bcorps[0].$refs.detail.formData.enName);
  2027. this.$set(this.form.detail, "hshipperCode", this.$refs.bcorps[0].$refs.detail.formData.code);
  2028. this.$set(this.form.detail, "hshipperDetails", this.$refs.bcorps[0].$refs.detail.formData.details);
  2029. this.$set(this.form.detail, "hshipperCntyName", this.$refs.bcorps[0].$refs.detail.formData.cntyName);
  2030. this.$set(this.form.detail, "hshipperCntyCode", this.$refs.bcorps[0].$refs.detail.formData.cntyCode);
  2031. // this.columnforfun('corpAttnName').disabled = false
  2032. // this.columnforfun('corpAttnTel').disabled = false
  2033. // this.columnforfun('corpAttnEmail').disabled = false
  2034. }
  2035. }
  2036. this.$refs.searchQueryRef[0].corpVisible = false;
  2037. },
  2038. // 下拉多选弹窗数据多选回调
  2039. eldialogMultipleChoice(list, name) {
  2040. if (name == "bcorps") {
  2041. let arr = [];
  2042. if (list.length > 1) {
  2043. this.$refs.bcorps[0].$refs.crud.toggleSelection(); // 先清空所以选择的数据
  2044. arr = [list[list.length - 1]]; // 获取最新点击的数组
  2045. this.$refs.bcorps[0].$refs.crud.toggleSelection(arr, true); // 把刚点击的数组变成选择状态
  2046. } else {
  2047. arr = list;
  2048. }
  2049. this.$refs.bcorps[0].selectionList = arr;
  2050. }
  2051. },
  2052. /* 远程模糊查询操作用户 */
  2053. remoteMethod(value, name) {
  2054. // if (name == 'operatorName') {
  2055. // this.userGetListfun(value)
  2056. // }
  2057. // else if (name == 'accDeptName') {
  2058. // this.getLazylistfun(value)
  2059. // }
  2060. if (name == "corpCnName") {
  2061. this.getBcorpsListfun(value);
  2062. }
  2063. // else if (name == 'mPayplace') {
  2064. // this.getBlocationsListfun(value)
  2065. // }
  2066. // else if (name == 'corpAttnName') {
  2067. // this.getBcorpsattnListfun(value)
  2068. // }
  2069. // else if (name == 'srcType') {
  2070. // this.srcTypeWorkDictsfun()
  2071. // }
  2072. // else if (name == 'srcCnName') {
  2073. // if (this.form.srcType == 'SALES') {
  2074. // // 业务员
  2075. // this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'name', value: 'name' }
  2076. // this.salesUserGetListfun(value)
  2077. // } else if (this.form.srcType == 'AGENT') {
  2078. // // 代理
  2079. // this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'cnName', value: 'cnName' }
  2080. // this.agentBcorpsListfun(value)
  2081. // } else if (this.form.srcType == 'OWN') {
  2082. // // 公司
  2083. // this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'title', value: 'title' }
  2084. // this.ownDeptLazyTreefun()
  2085. // }
  2086. // } else if (name == 'teamName') {
  2087. // this.postSelectByUserfun()
  2088. // }
  2089. },
  2090. // 下拉的监听事件
  2091. corpChange(value, name) {
  2092. // if (name == 'operatorName') {
  2093. // // OP 下拉赋值 用户管理列表
  2094. // for (let item of this.columnforfun('operatorName').dicData) {
  2095. // if (item.name == value) {
  2096. // this.form.operatorName = item.name
  2097. // this.form.operatorId = item.id
  2098. // this.form.operatorDept = item.deptId.split(',').pop()
  2099. // this.form.operatorDeptName = item.deptName
  2100. // }
  2101. // }
  2102. // }
  2103. // else if (name == 'accDeptName') {
  2104. // // OP 下拉赋值 用户管理列表
  2105. // for (let item of this.columnforfun('accDeptName').dicData) {
  2106. // if (item.title == value) {
  2107. // this.form.accDeptName = item.title
  2108. // this.form.accDept = item.id
  2109. // }
  2110. // }
  2111. // }
  2112. if (name == "corpCnName") {
  2113. if (value) {
  2114. // this.columnforfun('corpAttnName').disabled = false
  2115. // this.columnforfun('corpAttnTel').disabled = false
  2116. // this.columnforfun('corpAttnEmail').disabled = false
  2117. } else {
  2118. // this.columnforfun('corpAttnName').disabled = true
  2119. // this.columnforfun('corpAttnTel').disabled = true
  2120. // this.columnforfun('corpAttnEmail').disabled = true
  2121. // 如果点击清空按钮把值赋值为空
  2122. this.form.corpCnName = "";
  2123. this.form.corpEnName = "";
  2124. this.form.corpId = "";
  2125. this.form.corpCode = "";
  2126. this.form.shortName = "";
  2127. this.form.corpSource = "";
  2128. // 清空 客户OP
  2129. // this.form.corpAttnName = ''
  2130. this.form.corpAttnId = "";
  2131. this.$set(this.form, "corpAttnTel", "");
  2132. this.$set(this.form, "corpAttnEmail", "");
  2133. // 清空 业务来源和来源详情
  2134. this.$set(this.form, "srcType", "");
  2135. this.$set(this.form, "srcId", "");
  2136. this.$set(this.form, "srcCnName", "");
  2137. this.$set(this.form, "srcEnName", "");
  2138. }
  2139. // 往来单位
  2140. for (let item of this.columnforfun("corpCnName").dicData) {
  2141. if (item.cnName == value) {
  2142. this.form.corpCnName = item.cnName;
  2143. this.form.corpEnName = item.enName;
  2144. this.form.corpId = item.id;
  2145. this.form.corpCode = item.code;
  2146. this.form.shortName = item.shortName;
  2147. this.form.corpSource = item.corpSource;
  2148. // 获取 客户op数据
  2149. this.getBcorpsattnListfun();
  2150. // 业务来源参数带出
  2151. this.$set(this.form, "srcType", item.sourceType);
  2152. this.$set(this.form, "srcId", item.srcId);
  2153. this.$set(this.form, "srcCnName", item.srcCnName);
  2154. this.$set(this.form, "srcEnName", item.srcEnName);
  2155. this.$set(this.form, "srcDeptId", item.deptId.split(",").pop());
  2156. this.$set(this.form, "srcDeptName", item.deptName);
  2157. this.columnforfun("srcType").disabled = false;
  2158. this.columnforfun("srcCnName").disabled = false;
  2159. // 航线带出往来单位的优势航线
  2160. this.$set(this.form, "lineCnName", item.advantageRoute);
  2161. // 带出发货人数据
  2162. // this.$set(this.form,'hshipperId',item.id)
  2163. // this.$set(this.form,'hshipperCnName',item.cnName)
  2164. // this.$set(this.form,'hshipperEnName',item.enName)
  2165. // this.$set(this.form,'hshipperCode',item.code)
  2166. // this.$set(this.form,'hshipperDetails',item.details)
  2167. // this.$set(this.form,'hshipperCntyName',item.cntyName)
  2168. // this.$set(this.form,'hshipperCntyCode',item.cntyCode)
  2169. }
  2170. }
  2171. }
  2172. // else if (name == 'corpAttnName') {
  2173. // if (this.columnforfun('corpAttnName').dicData.length) {
  2174. // for (let item of this.columnforfun('corpAttnName').dicData) {
  2175. // if (item.cname == value) {
  2176. // this.form.corpAttnName = item.cname
  2177. // this.form.corpAttnId = item.id
  2178. // this.$set(this.form, 'corpAttnTel', item.tel)
  2179. // this.$set(this.form, 'corpAttnEmail', item.email)
  2180. // }
  2181. // }
  2182. // } else {
  2183. // if (value) {
  2184. // this.form.corpAttnName = value
  2185. // this.form.corpAttnId = null
  2186. // }
  2187. // }
  2188. // }
  2189. // else if (name == 'srcType') {
  2190. // if (!value) {
  2191. // this.$set(this.form, 'srcType', '')
  2192. // // this.columnforfun('srcCnName').disabled = true
  2193. // return
  2194. // }
  2195. // this.$set(this.form, 'srcId', '')
  2196. // this.$set(this.form, 'srcCnName', '')
  2197. // this.$set(this.form, 'srcEnName', '')
  2198. // this.form[name] = value
  2199. // if (value == 'OWN') {
  2200. // // 公司
  2201. // this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'title', value: 'title' }
  2202. // this.ownDeptLazyTreefun()
  2203. // } else if (value == 'AGENT') {
  2204. // // 代理
  2205. // this.columnforfun('srcCnName').type = 'select'
  2206. // this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'cnName', value: 'cnName' }
  2207. // this.columnforfun('srcCnName').disabled = false
  2208. // this.agentBcorpsListfun()
  2209. // } else if (value == 'SALES') {
  2210. // // 业务员
  2211. // this.columnforfun('srcCnName').type = 'select'
  2212. // this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'name', value: 'name' }
  2213. // this.columnforfun('srcCnName').disabled = false
  2214. // this.salesUserGetListfun()
  2215. // }
  2216. // }
  2217. // else if (name == 'srcCnName') {
  2218. // for (let item of this.columnforfun('srcCnName').dicData) {
  2219. // if (item[this.columnforfun('srcCnName').forParameter.value] == value) {
  2220. // if (this.form.srcType == 'SALES') {
  2221. // // 业务员
  2222. // this.$set(this.form, 'srcId', item.id)
  2223. // this.$set(this.form, 'srcCnName', item.name)
  2224. // this.$set(this.form, 'srcEnName', item.name)
  2225. // this.$set(this.form, 'srcDeptId', item.deptId.split(',').pop())
  2226. // this.$set(this.form, 'srcDeptName', item.deptName)
  2227. // } else if (this.form.srcType == 'AGENT') {
  2228. // // 代理
  2229. // this.$set(this.form, 'srcId', item.id)
  2230. // this.$set(this.form, 'srcCnName', item.cnName)
  2231. // this.$set(this.form, 'srcEnName', item.enName)
  2232. // }
  2233. // }
  2234. // }
  2235. // }
  2236. // else if (name == 'coloaderCnName') {
  2237. // for (let item of this.columnforfun('coloaderCnName').dicData) {
  2238. // if (item.cnName == value) {
  2239. // this.$set(this.form, 'coloaderId', item.id)
  2240. // this.$set(this.form, 'coloaderCnName', item.cnName)
  2241. // this.$set(this.form, 'coloaderEnName', item.enName)
  2242. // }
  2243. // }
  2244. // }
  2245. else if (name == "mpaymode") {
  2246. // 主单付费方式
  2247. this.form[name] = value;
  2248. if (value == "PP") {
  2249. this.$set(this.form, "mpayplace", this.form.polEnName ? this.form.polEnName.split(" - ")[0] : "");
  2250. } else {
  2251. this.$set(this.form, "mpayplace", this.form.podEnName ? this.form.podEnName.split(" - ")[0] : "");
  2252. }
  2253. }
  2254. // else if (name == 'hpaymode') {
  2255. // // 分单付费方式
  2256. // this.form[name] = value
  2257. // if (value == 'PP') {
  2258. // this.$set(this.form, 'hpayplace', this.form.polEnName.split(' - ')[0])
  2259. // } else {
  2260. // this.$set(this.form, 'hpayplace', this.form.podEnName.split(' - ')[0])
  2261. // }
  2262. // }
  2263. // else if (name == 'teamName') {
  2264. // if (!value) {
  2265. // this.$set(this.form, 'teamId', '')
  2266. // this.$set(this.form, 'teamName', '')
  2267. // }
  2268. // for (let item of this.columnforfun('teamName').dicData) {
  2269. // if (item.id == value) {
  2270. // this.$set(this.form, 'teamId', item.id)
  2271. // this.$set(this.form, 'teamName', item.postName)
  2272. // }
  2273. // }
  2274. // }
  2275. else {
  2276. this.form[name] = value;
  2277. }
  2278. },
  2279. // 申请B/L NO
  2280. applyforfun(text) {
  2281. if (!this.form.id) {
  2282. this.$message({
  2283. message: "请先保存数据",
  2284. type: "warning"
  2285. });
  2286. return;
  2287. }
  2288. // 如果不是分单
  2289. // 王风刚 2025-02-21 所有分单号都不能手动输入,都可以申请
  2290. // if (this.form.billType != 'MH') {
  2291. // this.$message({
  2292. // message: '只有分单需要申请',
  2293. // type: 'warning'
  2294. // });
  2295. // return
  2296. // }
  2297. if (!this.form.businessType) {
  2298. this.$message({
  2299. message: "请先选择业务类型",
  2300. type: "warning"
  2301. });
  2302. return;
  2303. }
  2304. if (!this.form.corpCnName) {
  2305. this.$message({
  2306. message: "请先选择客户名称",
  2307. type: "warning"
  2308. });
  2309. return;
  2310. }
  2311. if (this.form.hblno) {
  2312. this.$confirm(`确定删除${text}?`, {
  2313. confirmButtonText: "确定",
  2314. cancelButtonText: "取消",
  2315. type: "warning"
  2316. }).then(res => {
  2317. removeHblNo({ id: this.form.id }).then(res => {
  2318. this.form.hblno = null;
  2319. this.billsSubmitfun();
  2320. });
  2321. });
  2322. } else {
  2323. if (!this.form.hblno) {
  2324. // 王风刚 2025-02-21 无需弹窗,直接申请分单号
  2325. // this.$confirm(`确定${text}?`, {
  2326. // confirmButtonText: "确定",
  2327. // cancelButtonText: "取消",
  2328. // type: "warning"
  2329. // }).then(res => {
  2330. // this.billsGetBillNofun()
  2331. // })
  2332. this.billsGetBillNofun();
  2333. }
  2334. }
  2335. },
  2336. // 配置项
  2337. columnforfun(value) {
  2338. for (let item of this.basicData.column) {
  2339. if (item instanceof Array) {
  2340. for (let ite of item) {
  2341. if (value == ite.prop) {
  2342. return ite;
  2343. }
  2344. }
  2345. } else {
  2346. if (value == item.prop) {
  2347. return item;
  2348. }
  2349. }
  2350. }
  2351. },
  2352. //返回列表
  2353. backToList() {
  2354. console.log(
  2355. this.form.feeCenterListC,
  2356. this.oldForm.feeCenterListC,
  2357. this.form.feeCenterListD,
  2358. this.oldForm.feeCenterListD,
  2359. this.form.filesList,
  2360. this.oldForm.filesList,
  2361. this.form.waitingBoxList,
  2362. this.oldForm.waitingBoxList,
  2363. 3
  2364. );
  2365. if (
  2366. contrastObj(this.form, this.oldForm) ||
  2367. contrastList(this.form.preContainersList, this.oldForm.preContainersList) ||
  2368. contrastList(this.form.containersList, this.oldForm.containersList) ||
  2369. contrastList(this.form.feeCenterListC, this.oldForm.feeCenterListC) ||
  2370. contrastList(this.form.feeCenterListD, this.oldForm.feeCenterListD) ||
  2371. contrastList(this.form.filesList, this.oldForm.filesList) ||
  2372. contrastList(this.form.waitingBoxList, this.oldForm.waitingBoxList)
  2373. ) {
  2374. this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
  2375. confirmButtonText: "确定",
  2376. cancelButtonText: "取消",
  2377. type: "warning"
  2378. })
  2379. .then(() => {
  2380. this.editCustomer("goBack");
  2381. })
  2382. .catch(() => {
  2383. if (this.form.id) {
  2384. this.unLock({
  2385. moduleName: "SE",
  2386. tableName: "SE_order",
  2387. billId: this.form.id,
  2388. billNo: this.form.billNo
  2389. });
  2390. }
  2391. this.$emit("goBack");
  2392. });
  2393. } else {
  2394. if (this.form.id) {
  2395. this.unLock({
  2396. moduleName: "SE",
  2397. tableName: "SE_order",
  2398. billId: this.form.id,
  2399. billNo: this.form.billNo
  2400. });
  2401. }
  2402. this.$emit("goBack");
  2403. }
  2404. },
  2405. // 单据请核
  2406. DocumentApproval() {
  2407. if (this.form.billType == "MH") {
  2408. this.$message.warning("分单不能提交请核");
  2409. return;
  2410. }
  2411. if (popupReminder(this.form, this.messageData)) {
  2412. console.log(popupReminder(this.form, this.messageData));
  2413. this.$confirm(popupReminder(this.form, this.messageData), {
  2414. confirmButtonText: "确定",
  2415. cancelButtonText: "取消",
  2416. type: "warning"
  2417. });
  2418. return;
  2419. }
  2420. // if (popupReminder(this.form, this.messageData)) {
  2421. // }
  2422. if (this.form.billType == "DD") {
  2423. if (this.form.feeCenterListC.length == 0 && this.form.feeCenterListD.length == 0) {
  2424. return this.$message.warning("请添加费用信息");
  2425. }
  2426. }
  2427. this.$confirm("确定要请核数据?", {
  2428. confirmButtonText: "确定",
  2429. cancelButtonText: "取消",
  2430. type: "warning"
  2431. }).then(() => {
  2432. this.pageLoading = true;
  2433. billsCheckBills({
  2434. id: this.form.id,
  2435. url: "/iosBasicData/SeafreightExportF/bills/approvalDetails",
  2436. pageStatus: "this.$store.getters.approvalDetails",
  2437. pageLabel: "审批详情(F)"
  2438. })
  2439. .then(res => {
  2440. this.pageLoading = false;
  2441. this.$message({
  2442. type: "success",
  2443. message: "操作成功!"
  2444. });
  2445. // 详情
  2446. this.billsDetailfun(this.form.id);
  2447. })
  2448. .catch(() => {
  2449. this.pageLoading = false;
  2450. });
  2451. });
  2452. },
  2453. // 撤销单据请核
  2454. revokeDocumentApproval() {
  2455. this.$confirm("确定要撤销请核数据?", {
  2456. confirmButtonText: "确定",
  2457. cancelButtonText: "取消",
  2458. type: "warning"
  2459. }).then(() => {
  2460. this.pageLoading = true;
  2461. billsRevokeCheckBills({
  2462. id: this.form.id
  2463. }).then(res => {
  2464. this.pageLoading = false;
  2465. this.$message({
  2466. type: "success",
  2467. message: "操作成功!"
  2468. });
  2469. // 详情
  2470. this.billsDetailfun(this.form.id);
  2471. });
  2472. });
  2473. },
  2474. //撤销锁单
  2475. revokeLockOrder() {
  2476. this.$confirm("是否撤销锁单?", {
  2477. confirmButtonText: "确定",
  2478. cancelButtonText: "取消",
  2479. type: "warning"
  2480. }).then(() => {
  2481. this.pageLoading = true;
  2482. revokeLockOrder({
  2483. id: this.form.id
  2484. }).then(res => {
  2485. this.pageLoading = false;
  2486. this.$message({
  2487. type: "success",
  2488. message: "操作成功!"
  2489. });
  2490. // 详情
  2491. this.billsDetailfun(this.form.id);
  2492. });
  2493. });
  2494. },
  2495. // 编辑按钮
  2496. editHandle() {
  2497. this.detailData.seeDisabled = false;
  2498. },
  2499. //去除文本框的空格
  2500. getTextTirim(data) {
  2501. if (data) {
  2502. let obj = data.split("\n");
  2503. let res = [];
  2504. obj.forEach(item => {
  2505. res.push(_.toUpper(_.trimEnd(item)));
  2506. });
  2507. return res.join("\n");
  2508. } else {
  2509. return null;
  2510. }
  2511. },
  2512. // 大保存按钮
  2513. editCustomer(status) {
  2514. this.$refs.form.validate(valid => {
  2515. if (valid) {
  2516. // 判断必填项
  2517. let msgs = [];
  2518. if (!this.form.cargoType) {
  2519. msgs.push("货描");
  2520. }
  2521. if (!this.form.quantity) {
  2522. msgs.push("件数");
  2523. }
  2524. if (!this.form.packingUnit) {
  2525. msgs.push("包装");
  2526. }
  2527. if (!this.form.grossWeight) {
  2528. msgs.push("毛重");
  2529. }
  2530. if (!this.form.measurement) {
  2531. msgs.push("尺码");
  2532. }
  2533. if (!this.form.etd) {
  2534. msgs.push("ETD");
  2535. }
  2536. if (!this.form.actualEtd) {
  2537. msgs.push("ATD");
  2538. }
  2539. if (!this.form.srcType || !this.form.srcCnName) {
  2540. msgs.push("业务来源");
  2541. }
  2542. if (!this.form.cabinType) {
  2543. msgs.push("舱位类型");
  2544. }
  2545. if (this.form.billType != "MM") {
  2546. if (!this.form.operatorName) {
  2547. msgs.push("OP");
  2548. }
  2549. if (!this.form.customerServiceName) {
  2550. msgs.push("客服");
  2551. }
  2552. }
  2553. // if (!this.form.issueType) {
  2554. // msgs.push("签单方式");
  2555. // }
  2556. // if (!this.form.teamName) {
  2557. // msgs.push('所属团队')
  2558. // }
  2559. for (let item of this.form.preContainersList) {
  2560. if (!item.cntrTypeCode) {
  2561. this.$message.error("请选择尺码箱型");
  2562. return;
  2563. }
  2564. if (validatenull(item.quantity)) {
  2565. this.$message.error("箱量不能为空");
  2566. return;
  2567. }
  2568. }
  2569. for (let item of this.form.feeCenterListD) {
  2570. if (!item.corpId || !item.feeId || !item.curCode) {
  2571. msgs.push(
  2572. `应收第${item.$index + 1}行${!item.corpId ? " 往来单位" : ""}${!item.feeId ? " 费用简称" : ""}${!item.curCode ? " 币种" : ""}`
  2573. );
  2574. }
  2575. }
  2576. for (let item of this.form.feeCenterListC) {
  2577. if (!item.corpId || !item.feeId || !item.curCode) {
  2578. msgs.push(
  2579. `应付第${item.$index + 1}行${!item.corpId ? " 往来单位" : ""}${!item.feeId ? " 费用简称" : ""}${!item.curCode ? " 币种" : ""}${
  2580. item.feeCnName == "快递费" && !item.trackingNumber ? " 快递费" : ""
  2581. }`
  2582. );
  2583. }
  2584. }
  2585. if (msgs.length > 0) {
  2586. this.$confirm(`请填写下列信息:${msgs.join(" ,")}!`, {
  2587. confirmButtonText: "确定",
  2588. cancelButtonText: "取消",
  2589. type: "warning"
  2590. });
  2591. return;
  2592. }
  2593. let msgsList = [];
  2594. // if (checkFullWidthSymbols(this.form.detail.hshipperDetails).hasFullWidth) {
  2595. // let msg = [];
  2596. // for (let item of checkFullWidthSymbols(this.form.detail.hshipperDetails).positions) {
  2597. // msg.push(`第${item.row}行的"${item.symbol}"`);
  2598. // }
  2599. // if (msg.length > 0) {
  2600. // this.$message({
  2601. // dangerouslyUseHTMLString: true,
  2602. // message: `发货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  2603. // type: "error"
  2604. // });
  2605. // return;
  2606. // }
  2607. // }
  2608. // if (checkFullWidthSymbols(this.form.detail.hconsigneeDetails).hasFullWidth) {
  2609. // let msg = [];
  2610. // for (let item of checkFullWidthSymbols(this.form.detail.hconsigneeDetails).positions) {
  2611. // msg.push(`第${item.row}行的"${item.symbol}"`);
  2612. // }
  2613. // if (msg.length > 0) {
  2614. // this.$message({
  2615. // dangerouslyUseHTMLString: true,
  2616. // message: `收货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  2617. // type: "error"
  2618. // });
  2619. // return;
  2620. // }
  2621. // }
  2622. // if (checkFullWidthSymbols(this.form.detail.hnotifyDetails).hasFullWidth) {
  2623. // let msg = [];
  2624. // for (let item of checkFullWidthSymbols(this.form.detail.hnotifyDetails).positions) {
  2625. // msg.push(`第${item.row}行的"${item.symbol}"`);
  2626. // }
  2627. // if (msg.length > 0) {
  2628. // this.$message({
  2629. // dangerouslyUseHTMLString: true,
  2630. // message: `通知人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  2631. // type: "error"
  2632. // });
  2633. // return;
  2634. // }
  2635. // }
  2636. // if (checkFullWidthSymbols(this.form.detail.mshipperDetails).hasFullWidth) {
  2637. // let msg = [];
  2638. // for (let item of checkFullWidthSymbols(this.form.detail.mshipperDetails).positions) {
  2639. // msg.push(`第${item.row}行的"${item.symbol}"`);
  2640. // }
  2641. // if (msg.length > 0) {
  2642. // this.$message({
  2643. // dangerouslyUseHTMLString: true,
  2644. // message: `MBL 发货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  2645. // type: "error"
  2646. // });
  2647. // return;
  2648. // }
  2649. // }
  2650. // if (checkFullWidthSymbols(this.form.detail.mconsigneeDetails).hasFullWidth) {
  2651. // let msg = [];
  2652. // for (let item of checkFullWidthSymbols(this.form.detail.mconsigneeDetails).positions) {
  2653. // msg.push(`第${item.row}行的"${item.symbol}"`);
  2654. // }
  2655. // if (msg.length > 0) {
  2656. // this.$message({
  2657. // dangerouslyUseHTMLString: true,
  2658. // message: `MBL 收货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  2659. // type: "error"
  2660. // });
  2661. // return;
  2662. // }
  2663. // }
  2664. // if (checkFullWidthSymbols(this.form.detail.mnotifyDetails).hasFullWidth) {
  2665. // let msg = [];
  2666. // for (let item of checkFullWidthSymbols(this.form.detail.mnotifyDetails).positions) {
  2667. // msg.push(`第${item.row}行的"${item.symbol}"`);
  2668. // }
  2669. // if (msg.length > 0) {
  2670. // this.$message({
  2671. // dangerouslyUseHTMLString: true,
  2672. // message: `MBL 通知人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  2673. // type: "error"
  2674. // });
  2675. // return;
  2676. // }
  2677. // }
  2678. // if (checkFullWidthSymbols(this.form.marks).hasFullWidth) {
  2679. // let msg = [];
  2680. // for (let item of checkFullWidthSymbols(this.form.marks).positions) {
  2681. // msg.push(`第${item.row}行的"${item.symbol}"`);
  2682. // }
  2683. // if (msg.length > 0) {
  2684. // this.$message({
  2685. // dangerouslyUseHTMLString: true,
  2686. // message: `唛头:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  2687. // type: "error"
  2688. // });
  2689. // return;
  2690. // }
  2691. // }
  2692. // if (checkFullWidthSymbols(this.form.commodityDescr).hasFullWidth) {
  2693. // let msg = [];
  2694. // for (let item of checkFullWidthSymbols(this.form.commodityDescr).positions) {
  2695. // msg.push(`第${item.row}行的"${item.symbol}"`);
  2696. // }
  2697. // if (msg.length > 0) {
  2698. // this.$message({
  2699. // dangerouslyUseHTMLString: true,
  2700. // message: `货描:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  2701. // type: "error"
  2702. // });
  2703. // return;
  2704. // }
  2705. // }
  2706. // if (checkFullWidthSymbols(this.form.forwarding).hasFullWidth) {
  2707. // let msg = [];
  2708. // for (let item of checkFullWidthSymbols(this.form.forwarding).positions) {
  2709. // msg.push(`第${item.row}行的"${item.symbol}"`);
  2710. // }
  2711. // if (msg.length > 0) {
  2712. // this.$message({
  2713. // dangerouslyUseHTMLString: true,
  2714. // message: `FORWARDING:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,,请修正后再保存!`,
  2715. // type: "error"
  2716. // });
  2717. // return;
  2718. // }
  2719. // }
  2720. // if (lineQuantityVerification(this.form.detail.hshipperDetails, this.lineLength)) {
  2721. // return this.$message.error(`发货人详情超长,请手动断行,否则影响打印`);
  2722. // }
  2723. // if (this.form.detail.hshipperDetails) {
  2724. // let msg = tabVerify(this.form.detail.hshipperDetails);
  2725. // if (msg.length > 0) {
  2726. // this.$confirm(`${msg.join(",")}含有TAB字符,是否替换成空格!`, "发货人详情", {
  2727. // confirmButtonText: "确定",
  2728. // cancelButtonText: "取消"
  2729. // }).then(() => {
  2730. // this.form.detail.hshipperDetails = this.form.detail.hshipperDetails.replace(/\t/g, " ");
  2731. // });
  2732. // return;
  2733. // }
  2734. // }
  2735. // if (lineQuantityVerification(this.form.detail.hconsigneeDetails, this.lineLength)) {
  2736. // return this.$message.error(`收货人详情超长,请手动断行,否则影响打印`);
  2737. // }
  2738. // if (this.form.detail.hconsigneeDetails) {
  2739. // let msg = tabVerify(this.form.detail.hconsigneeDetails);
  2740. // if (msg.length > 0) {
  2741. // this.$confirm(`${msg.join(",")}含有TAB字符,是否替换成空格!`, "收货人详情", {
  2742. // confirmButtonText: "确定",
  2743. // cancelButtonText: "取消"
  2744. // }).then(() => {
  2745. // this.form.detail.hconsigneeDetails = this.form.detail.hconsigneeDetails.replace(/\t/g, " ");
  2746. // });
  2747. // return;
  2748. // }
  2749. // }
  2750. // if (lineQuantityVerification(this.form.detail.hnotifyDetails, this.lineLength)) {
  2751. // return this.$message.error(`通知人详情超长,请手动断行,否则影响打印`);
  2752. // }
  2753. // if (this.form.detail.hnotifyDetails) {
  2754. // let msg = tabVerify(this.form.detail.hnotifyDetails);
  2755. // if (msg.length > 0) {
  2756. // this.$confirm(`${msg.join(",")}含有TAB字符,是否替换成空格!`, "通知人详情", {
  2757. // confirmButtonText: "确定",
  2758. // cancelButtonText: "取消"
  2759. // }).then(() => {
  2760. // this.form.detail.hnotifyDetails = this.form.detail.hnotifyDetails.replace(/\t/g, " ");
  2761. // });
  2762. // return;
  2763. // }
  2764. // }
  2765. // if (this.form.marks) {
  2766. // let msg = tabVerify(this.form.marks);
  2767. // if (msg.length > 0) {
  2768. // this.$confirm(`${msg.join(",")}含有TAB字符,是否替换成空格!`, "唛头", {
  2769. // confirmButtonText: "确定",
  2770. // cancelButtonText: "取消"
  2771. // }).then(() => {
  2772. // this.form.marks = this.form.marks.replace(/\t/g, " ");
  2773. // });
  2774. // return;
  2775. // }
  2776. // }
  2777. // if (this.form.commodityDescr) {
  2778. // let msg = tabVerify(this.form.commodityDescr);
  2779. // if (msg.length > 0) {
  2780. // this.$confirm(`${msg.join(",")}含有TAB字符,是否替换成空格!`, "货描", {
  2781. // confirmButtonText: "确定",
  2782. // cancelButtonText: "取消"
  2783. // }).then(() => {
  2784. // this.form.commodityDescr = this.form.commodityDescr.replace(/\t/g, " ");
  2785. // });
  2786. // return;
  2787. // }
  2788. // }
  2789. // console.log(this.form.detail);
  2790. // if (!verifyEnglish(this.form.detail.hshipperDetails)) {
  2791. // msgsList.push("发货人");
  2792. // }
  2793. // if (!verifyEnglish(this.form.detail.hconsigneeDetails)) {
  2794. // msgsList.push("收货人");
  2795. // }
  2796. // if (!verifyEnglish(this.form.detail.hnotifyDetails)) {
  2797. // msgsList.push("通知人");
  2798. // }
  2799. // if (!verifyEnglish(this.form.detail.mshipperDetails)) {
  2800. // msgsList.push("MBL 发货人");
  2801. // }
  2802. // if (!verifyEnglish(this.form.detail.mconsigneeDetails)) {
  2803. // msgsList.push("MBL 收货人");
  2804. // }
  2805. // if (!verifyEnglish(this.form.detail.mnotifyDetails)) {
  2806. // msgsList.push("MBL 通知人");
  2807. // }
  2808. // if (!verifyEnglish(this.form.marks)) {
  2809. // msgsList.push("唛头");
  2810. // }
  2811. // if (!verifyEnglish(this.form.commodityDescr)) {
  2812. // msgsList.push("货描");
  2813. // }
  2814. // if (!verifyEnglish(this.form.forwarding)) {
  2815. // msgsList.push("FORWARDING");
  2816. // }
  2817. // if (msgsList.length > 0) {
  2818. // // this.$message.error(`请正确输入${msgsList.join(",")}的英文`);
  2819. // this.$message.error(`${msgsList.join(",")}存在非英文字符,如汉字等,请修正后再保存!`);
  2820. // return;
  2821. // }
  2822. this.form.detail.hshipperDetails = this.getTextTirim(this.form.detail.hshipperDetails);
  2823. this.form.detail.hconsigneeDetails = this.getTextTirim(this.form.detail.hconsigneeDetails);
  2824. this.form.detail.hnotifyDetails = this.getTextTirim(this.form.detail.hnotifyDetails);
  2825. this.form.detail.marks = this.getTextTirim(this.form.detail.marks);
  2826. this.form.detail.commodityDescr = this.getTextTirim(this.form.detail.commodityDescr);
  2827. this.form.forwarding = this.getTextTirim(this.form.forwarding);
  2828. // 赋值 ETD 日期
  2829. // this.form.billDate = this.form.etd ? this.form.etd.slice(0, 10) + ' 00:00:00' : null // 单据日期
  2830. // 调用保存接口
  2831. // this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
  2832. // confirmButtonText: "覆盖",
  2833. // cancelButtonText: "更新",
  2834. // type: "warning"
  2835. // })
  2836. // .then(() => {
  2837. // })
  2838. // .catch(() => {
  2839. // });
  2840. for (let item of this.form.preContainersList) {
  2841. if (this.form.containersList.filter(e => e.cntrTypeCode == item.cntrTypeCode).length > item.quantity) {
  2842. return this.$message.error(`${item.cntrTypeCode}箱量不能超过${item.quantity}条`);
  2843. }
  2844. // let qtySUM = 0;
  2845. // for (let row of this.form.containersList) {
  2846. // if (item.cntrTypeCode == row.cntrTypeCode) {
  2847. // qtySUM += Number(row.quantity);
  2848. // }
  2849. // if (qtySUM > item.number) {
  2850. // return this.$message.error(`箱型:${item.cntrTypeCode}的总数量不能超过${item.number}`);
  2851. // }
  2852. // }
  2853. }
  2854. this.billsSubmitfun(status);
  2855. }
  2856. });
  2857. },
  2858. // 主表保存接口大保存
  2859. billsSubmitfun(status) {
  2860. if (this.form.cargoType == "dry") {
  2861. // 普货
  2862. this.form.billNoFormat = "HYCK-PH";
  2863. } else if (this.form.cargoType == "danger") {
  2864. // 危险品
  2865. this.form.billNoFormat = "HYCK-WXP";
  2866. } else if (this.form.cargoType == "reefer") {
  2867. // 冻柜
  2868. this.form.billNoFormat = "HYCK-DG";
  2869. } else {
  2870. this.form.billNoFormat = "HYCK";
  2871. }
  2872. this.form.businessTypeCode = "HYCK";
  2873. delete this.form.extendedData;
  2874. // 把拼接的数据拆开 开始 🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒
  2875. // this.searchSplit()
  2876. // 把拼接的数据拆开 结束 💩💩💩💩💩💩💩💩💩💩💩💩💩💩
  2877. // 费用 收 赋值数据
  2878. // this.form.shortName=this.form.corpCnName.split('-')[1]
  2879. // 处理超长数据
  2880. if (this.form.detail.hshipperDetails) {
  2881. let arrDeteil = [];
  2882. arrDeteil = this.form.detail.hshipperDetails.split("\n");
  2883. if (arrDeteil.length > this.textareaNumber) {
  2884. this.form.detail.hshipperDetails = arrDeteil.slice(0, this.textareaNumber).join("\n") + "*";
  2885. this.form.commodityDescr += "\n*" + arrDeteil.slice(this.textareaNumber, arrDeteil.length).join("\n");
  2886. } else {
  2887. this.form.detail.hshipperDetails = this.form.detail.hshipperDetails;
  2888. }
  2889. }
  2890. if (this.form.detail.hconsigneeDetails) {
  2891. let arrDeteil = [];
  2892. arrDeteil = this.form.detail.hconsigneeDetails.split("\n");
  2893. if (arrDeteil.length > this.textareaNumber) {
  2894. this.form.detail.hconsigneeDetails = arrDeteil.slice(0, this.textareaNumber).join("\n") + "**";
  2895. this.form.commodityDescr += "\n**" + arrDeteil.slice(this.textareaNumber, arrDeteil.length).join("\n");
  2896. } else {
  2897. this.form.detail.hconsigneeDetails = this.form.detail.hconsigneeDetails;
  2898. }
  2899. }
  2900. if (this.form.detail.hnotifyDetails) {
  2901. let arrDeteil = [];
  2902. arrDeteil = this.form.detail.hnotifyDetails.split("\n");
  2903. if (arrDeteil.length > this.textareaNumber) {
  2904. this.form.detail.hnotifyDetails = arrDeteil.slice(0, this.textareaNumber).join("\n") + "***";
  2905. this.form.commodityDescr += "\n***" + arrDeteil.slice(this.textareaNumber, arrDeteil.length).join("\n");
  2906. } else {
  2907. this.form.detail.hnotifyDetails = this.form.detail.hnotifyDetails;
  2908. }
  2909. }
  2910. this.form.feeCenterListD.map((row, index) => {
  2911. row.dc = "D";
  2912. row.sort = Number(index) + 1;
  2913. row.businessType = this.form.businessType; // 业务类型
  2914. row.billType = this.form.billType; // 单据类型
  2915. row.billNo = this.form.billNo; // 单据编号
  2916. row.billDate = this.form.billDate;
  2917. row.billCorpId = this.form.corpId; // 主表客户 id
  2918. row.billCorpCnName = this.form.corpCnName; // 主表客户中文名称
  2919. row.billCorpEnName = this.form.corpEnName; // 主表客户英文名称
  2920. row.lineId = this.form.lineId; // 航线 id
  2921. row.lineCnName = this.form.lineCnName; // 航线中文名称
  2922. row.lineEnName = this.form.lineEnName; // 航线英文名称
  2923. row.vesselId = this.form.vesselId; // 船名 id
  2924. row.vesselCnName = this.form.vesselCnName; // 中文船名
  2925. row.vesselEnName = this.form.vesselEnName; // 英文船名
  2926. row.voyageNo = this.form.voyageNo; // 航次
  2927. row.mblno = this.form.mblno; // MB/L NO
  2928. row.hblno = this.form.hblno; // HB/L NO
  2929. row.etd = this.form.etd; // 开船日期
  2930. row.eta = this.form.eta; // 到港日期
  2931. row.polId = this.form.polId; // 装货港 id
  2932. row.polCode = this.form.polCode; // 装货港代码
  2933. row.polCnName = this.form.polCnName; // 装货港中文名称
  2934. row.polEnName = this.form.polEnName; // 装货港英文名称
  2935. row.podId = this.form.podId; // 卸货港 id
  2936. row.podCode = this.form.podCode; // 卸货港代码
  2937. row.podCnName = this.form.podCnName; // 卸货港中文名称
  2938. row.podEnName = this.form.podEnName; // 卸货港英文名称
  2939. row.corpArgreementNo = this.form.corpArgreementNo; // 客户约号
  2940. // 数量 * 单价 = 净额
  2941. // 总税率 = 税率 + 附件税率
  2942. // 税额 = 净额 * 总税率
  2943. // 含税
  2944. if (row.curCode == this.getLocalCurrency()) {
  2945. row.amount = row.rmbAmount ? row.rmbAmount : (Number(row.quantity) * Number(row.price)).toFixed(2);
  2946. } else {
  2947. row.amount = row.usdAmount ? row.usdAmount : (Number(row.quantity) * Number(row.price)).toFixed(2);
  2948. }
  2949. // 净额
  2950. if (row.curCode == this.getLocalCurrency()) {
  2951. row.amountNet = row.rmbAmountNet ? row.rmbAmountNet : (Number(row.quantity) * Number(row.price)).toFixed(2);
  2952. } else {
  2953. row.amountNet = row.usdAmountNet ? row.usdAmountNet : (Number(row.quantity) * Number(row.price)).toFixed(2);
  2954. }
  2955. });
  2956. // 费用 付 赋值数据
  2957. this.form.feeCenterListC.map((row, index) => {
  2958. row.dc = "C";
  2959. row.sort = Number(index) + 1;
  2960. row.businessType = this.form.businessType; // 业务类型
  2961. row.billType = this.form.billType; // 单据类型
  2962. row.billNo = this.form.billNo; // 单据编号
  2963. row.billDate = this.form.billDate; // 单据日期
  2964. row.billCorpId = this.form.corpId; // 主表客户 id
  2965. row.billCorpCnName = this.form.corpCnName; // 主表客户中文名称
  2966. row.billCorpEnName = this.form.corpEnName; // 主表客户英文名称
  2967. row.lineId = this.form.lineId; // 航线 id
  2968. row.lineCnName = this.form.lineCnName; // 航线中文名称
  2969. row.lineEnName = this.form.lineEnName; // 航线英文名称
  2970. row.vesselId = this.form.vesselId; // 船名 id
  2971. row.vesselCnName = this.form.vesselCnName; // 中文船名
  2972. row.vesselEnName = this.form.vesselEnName; // 英文船名
  2973. row.voyageNo = this.form.voyageNo; // 航次
  2974. row.mblno = this.form.mblno; // MB/L NO
  2975. row.hblno = this.form.hblno; // HB/L NO
  2976. row.etd = this.form.etd; // 开船日期
  2977. row.eta = this.form.eta; // 到港日期
  2978. row.polId = this.form.polId; // 装货港 id
  2979. row.polCode = this.form.polCode; // 装货港代码
  2980. row.polCnName = this.form.polCnName; // 装货港中文名称
  2981. row.polEnName = this.form.polEnName; // 装货港英文名称
  2982. row.podId = this.form.podId; // 卸货港 id
  2983. row.podCode = this.form.podCode; // 卸货港代码
  2984. row.podCnName = this.form.podCnName; // 卸货港中文名称
  2985. row.podEnName = this.form.podEnName; // 卸货港英文名称
  2986. row.corpArgreementNo = this.form.corpArgreementNo; // 客户约号
  2987. // 数量 * 单价 = 净额
  2988. // 总税率 = 税率 + 附件税率
  2989. // 税额 = 净额 * 总税率
  2990. // 含税
  2991. if (row.curCode == this.getLocalCurrency()) {
  2992. row.amount = row.rmbAmount ? row.rmbAmount : (Number(row.quantity) * Number(row.price)).toFixed(2);
  2993. } else {
  2994. row.amount = row.usdAmount ? row.usdAmount : (Number(row.quantity) * Number(row.price)).toFixed(2);
  2995. }
  2996. // 净额
  2997. if (row.curCode == this.getLocalCurrency()) {
  2998. row.amountNet = row.rmbAmountNet ? row.rmbAmountNet : (Number(row.quantity) * Number(row.price)).toFixed(2);
  2999. } else {
  3000. row.amountNet = row.usdAmountNet ? row.usdAmountNet : (Number(row.quantity) * Number(row.price)).toFixed(2);
  3001. }
  3002. });
  3003. this.pageLoading = true;
  3004. billsSubmit(this.form)
  3005. .then(res => {
  3006. this.pageLoading = false;
  3007. if (res.data.code === 601) {
  3008. console.info("11111111111----", res);
  3009. this.billsDetailfun(this.form.id);
  3010. this.$message({
  3011. type: "error",
  3012. message: res.data.msg
  3013. });
  3014. return true;
  3015. }
  3016. this.$message({
  3017. type: "success",
  3018. message: "操作成功!"
  3019. });
  3020. if (status == "goBack") {
  3021. if (this.form.id) {
  3022. this.unLock({
  3023. moduleName: "SE",
  3024. tableName: "SE_order",
  3025. billId: this.form.id,
  3026. billNo: this.form.billNo
  3027. });
  3028. }
  3029. this.$emit("goBack");
  3030. }
  3031. // this.detailData.seeDisabled = true
  3032. this.billsDetailfun(res.data.data.id, status);
  3033. })
  3034. .catch(err => {
  3035. this.pageLoading = false;
  3036. })
  3037. .finally(() => {});
  3038. },
  3039. // 提取箱专用的保存
  3040. billsAddfun() {
  3041. billsAdd(this.form)
  3042. .then(res => {
  3043. this.pageLoading = false;
  3044. this.$message({
  3045. type: "success",
  3046. message: "操作成功!"
  3047. });
  3048. // this.detailData.seeDisabled = true
  3049. this.billsDetailfun(res.data.data.id);
  3050. })
  3051. .catch(err => {
  3052. this.pageLoading = false;
  3053. });
  3054. },
  3055. // 复制单据接口
  3056. async billsCopyBillsfun(id, type, billType) {
  3057. const loading = this.$loading({
  3058. lock: true,
  3059. text: "加载中",
  3060. spinner: "el-icon-loading",
  3061. background: "rgba(255,255,255,0.7)"
  3062. });
  3063. let types = typeof type == "string" ? type.split(",") : [];
  3064. console.log(types.indexOf("复制配箱信息", 1));
  3065. let res = await billsCopyBills({ id, containers: types.indexOf("复制配箱信息") != -1 ? 1 : null });
  3066. this.detailData.seeDisabled = false;
  3067. loading.close();
  3068. // if (type == '复制费用' || type == '') {
  3069. // res.data.data.preContainersList = []
  3070. // }
  3071. // if (type == '复制箱型箱量' || type == '') {
  3072. // res.data.data.feeCenterListD = []
  3073. // res.data.data.feeCenterListC = []
  3074. // }
  3075. if (types.indexOf("复制箱型箱量") < 0) {
  3076. res.data.data.preContainersList = [];
  3077. }
  3078. if (types.indexOf("复制费用") < 0) {
  3079. res.data.data.feeCenterListD = [];
  3080. res.data.data.feeCenterListC = [];
  3081. }
  3082. if (types.indexOf("复制配箱信息") < 0) {
  3083. res.data.data.containersList = [];
  3084. }
  3085. res.data.data.billType = billType;
  3086. if (
  3087. !this.roleName.includes("admin") &&
  3088. (this.roleName.includes("应收修改") || this.roleName.includes("应收查看")) &&
  3089. !(this.roleName.includes("应付修改") || this.roleName.includes("应付查看") || !this.roleName.includes("允许修改他人费用"))
  3090. ) {
  3091. res.data.data.feeCenterListC = [];
  3092. }
  3093. if (
  3094. !this.roleName.includes("admin") &&
  3095. (this.roleName.includes("应付修改") || this.roleName.includes("应付查看")) &&
  3096. !(this.roleName.includes("应收修改") || this.roleName.includes("应收查看") || !this.roleName.includes("允许修改他人费用"))
  3097. ) {
  3098. res.data.data.feeCenterListD = [];
  3099. }
  3100. if (res.data.data.billType == "DD" || res.data.data.billType == "MM") {
  3101. res.data.data.hblno = null;
  3102. }
  3103. await this.saveLocalCurrency(res.data.data.branchId);
  3104. this.form = res.data.data;
  3105. this.pageLoading = false;
  3106. // this.searchMontage() // 下拉 中文名称和编号拼接
  3107. // 配箱最上面可以编辑
  3108. for (let item of this.form.containersList) {
  3109. item.edit = false;
  3110. }
  3111. // 先把状态改成可以编辑,然后判断是否可以编辑
  3112. this.generateBillsfalse = false;
  3113. // 应收
  3114. for (let item of this.form.feeCenterListD) {
  3115. // 判断是否生成了账单
  3116. if (item.accStatus == 1) {
  3117. this.columnforfun("corpCnName").disabled = true;
  3118. // this.columnforfun('srcType').disabled = true
  3119. this.columnforfun("mblno").disabled = true;
  3120. this.columnforfun("bookingNo").disabled = true;
  3121. // this.columnforfun('refno').disabled = true
  3122. this.generateBillsfalse = true;
  3123. }
  3124. if (item.curCode == this.getLocalCurrency()) {
  3125. this.$set(item, "rmbAmount", item.amount);
  3126. this.$set(item, "usdAmount", "");
  3127. this.$set(item, "rmbAmountNet", item.amountNet);
  3128. this.$set(item, "usdAmountNet", "");
  3129. } else {
  3130. this.$set(item, "usdAmount", item.amount);
  3131. this.$set(item, "rmbAmount", "");
  3132. this.$set(item, "usdAmountNet", item.amountNet);
  3133. this.$set(item, "rmbAmountNet", "");
  3134. }
  3135. item.edit = false;
  3136. }
  3137. console.log(this.form.feeCenterListD);
  3138. // 应付
  3139. for (let item of this.form.feeCenterListC) {
  3140. // 判断是否生成了账单
  3141. if (item.accStatus == 1) {
  3142. this.generateBillsfalse = true;
  3143. this.columnforfun("corpCnName").disabled = true;
  3144. // this.columnforfun('srcType').disabled = true
  3145. this.columnforfun("mblno").disabled = true;
  3146. this.columnforfun("bookingNo").disabled = true;
  3147. // this.columnforfun('refno').disabled = true
  3148. }
  3149. if (item.curCode == this.getLocalCurrency()) {
  3150. this.$set(item, "rmbAmount", item.amount);
  3151. this.$set(item, "usdAmount", "");
  3152. this.$set(item, "rmbAmountNet", item.amountNet);
  3153. this.$set(item, "usdAmountNet", "");
  3154. } else {
  3155. this.$set(item, "usdAmount", item.amount);
  3156. this.$set(item, "rmbAmount", "");
  3157. this.$set(item, "usdAmountNet", item.amountNet);
  3158. this.$set(item, "rmbAmountNet", "");
  3159. }
  3160. item.edit = false;
  3161. }
  3162. console.log(this.form.feeCenterListD);
  3163. // 文件中心
  3164. for (let item of this.form.filesList) {
  3165. this.$set(item, "edit", false);
  3166. }
  3167. },
  3168. // 详情接口
  3169. async billsDetailfun(id, status) {
  3170. const loading = this.$loading({
  3171. lock: true,
  3172. text: "加载中",
  3173. spinner: "el-icon-loading",
  3174. background: "rgba(255,255,255,0.7)"
  3175. });
  3176. const isCODate = await isProcurement({ param: "is.cutOffDate" });
  3177. this.isCutOffDate = isCODate.data.data == 1 ? true : false;
  3178. const res = await billsDetail(id);
  3179. loading.close();
  3180. // this.form = res.data.data;
  3181. await this.saveLocalCurrency(res.data.data.branchId);
  3182. if (
  3183. !this.roleName.includes("admin") &&
  3184. (this.roleName.includes("应收修改") || this.roleName.includes("应收查看")) &&
  3185. !(this.roleName.includes("应付修改") || this.roleName.includes("应付查看") || !this.roleName.includes("允许修改他人费用"))
  3186. ) {
  3187. res.data.data.feeCenterListC = [];
  3188. }
  3189. if (
  3190. !this.roleName.includes("admin") &&
  3191. (this.roleName.includes("应付修改") || this.roleName.includes("应付查看")) &&
  3192. !(this.roleName.includes("应收修改") || this.roleName.includes("应收查看") || !this.roleName.includes("允许修改他人费用"))
  3193. ) {
  3194. res.data.data.feeCenterListD = [];
  3195. }
  3196. res.data.data.marks = res.data.data.marks ? res.data.data.marks.split("&|&").join("\n") : "";
  3197. res.data.data.commodityDescr = res.data.data.commodityDescr ? res.data.data.commodityDescr.split("&|&").join("\n") : "";
  3198. this.$set(this, "form", res.data.data);
  3199. // this.inLock();
  3200. // console.log('form', this.form)
  3201. // console.log(this.$refs)
  3202. if (this.form.id) {
  3203. this.$refs.documentCenter.reportslogListfun({ currentPage: 1, pageSize: 10 });
  3204. }
  3205. this.billsListAllfun(this.form.id);
  3206. this.copyFormData = JSON.parse(JSON.stringify(res.data.data));
  3207. // 如果已经请核就禁用按钮
  3208. if (this.form.status == 1 || this.form.status == 2 || this.form.status == 3) {
  3209. this.detailData.seeDisabled = true;
  3210. } else {
  3211. if (this.isCutOffDate && this.form.cyTrailerTime&&this.form.boxBelongsTo=='SOC') {
  3212. const cutOffDate = new Date(this.form.cyTrailerTime);
  3213. const newDate = new Date(dateFormat(new Date(), "yyyy-MM-dd"));
  3214. if (newDate > cutOffDate) {
  3215. this.overTime = true;
  3216. } else {
  3217. this.overTime = false;
  3218. }
  3219. } else {
  3220. this.overTime = false;
  3221. }
  3222. this.detailData.seeDisabled = false;
  3223. }
  3224. // this.columnforfun('teamName').disabled = true
  3225. // this.columnforfun('operatorName').disabled = true
  3226. // this.columnforfun('accDeptName').disabled = true
  3227. if (this.form.status == 1 || this.form.status == 2 || this.form.status == 3) {
  3228. this.columnforfun("corpCnName").disabled = true;
  3229. // this.columnforfun('srcType').disabled = true
  3230. this.columnforfun("mblno").disabled = true;
  3231. this.columnforfun("bookingNo").disabled = true;
  3232. // this.columnforfun('refno').disabled = true
  3233. // this.columnforfun('teamId').disabled = true
  3234. this.generateBillsfalse = true;
  3235. this.pleasereviewType = true; // 请核禁用
  3236. } else {
  3237. // 判断是否可以编辑
  3238. this.columnforfun("corpCnName").disabled = false;
  3239. // this.columnforfun('srcType').disabled = false
  3240. this.columnforfun("mblno").disabled = false;
  3241. this.columnforfun("bookingNo").disabled = false;
  3242. // this.columnforfun('refno').disabled = false
  3243. // if (this.saberTenantId == '607913') {
  3244. // this.columnforfun('operatorName').disabled = false
  3245. // this.columnforfun('accDeptName').disabled = false
  3246. // }
  3247. // this.columnforfun('teamId').disabled = false
  3248. this.generateBillsfalse = false;
  3249. this.pleasereviewType = false;
  3250. }
  3251. this.pageLoading = false;
  3252. // this.searchMontage() // 下拉 中文名称和编号拼接
  3253. // 配箱最上面可以编辑
  3254. for (let item of this.form.containersList) {
  3255. item.edit = false;
  3256. }
  3257. // 配箱最下面的
  3258. for (let item of this.form.waitingBoxList) {
  3259. this.$set(item, "editQuantity", item.quantity);
  3260. this.$set(item, "editGrossWeight", item.grossWeight);
  3261. this.$set(item, "editMeasurement", item.measurement);
  3262. this.$set(item, "edit", false);
  3263. }
  3264. // 应收
  3265. for (let item of this.form.feeCenterListD) {
  3266. // 判断是否生成了账单
  3267. if (item.accStatus == 1) {
  3268. this.generateBillsfalse = true;
  3269. this.columnforfun("corpCnName").disabled = true;
  3270. // this.columnforfun('srcType').disabled = true
  3271. this.columnforfun("mblno").disabled = true;
  3272. this.columnforfun("bookingNo").disabled = true;
  3273. // this.columnforfun('refno').disabled = true
  3274. }
  3275. if (item.curCode == this.getLocalCurrency()) {
  3276. this.$set(item, "rmbAmount", item.amount);
  3277. this.$set(item, "usdAmount", "");
  3278. this.$set(item, "rmbAmountNet", item.amountNet);
  3279. this.$set(item, "usdAmountNet", "");
  3280. } else {
  3281. this.$set(item, "usdAmount", item.amount);
  3282. this.$set(item, "rmbAmount", "");
  3283. this.$set(item, "usdAmountNet", item.amountNet);
  3284. this.$set(item, "rmbAmountNet", "");
  3285. }
  3286. item.edit = false;
  3287. }
  3288. // 应付
  3289. for (let item of this.form.feeCenterListC) {
  3290. // 判断是否生成了账单
  3291. if (item.accStatus == 1) {
  3292. this.generateBillsfalse = true;
  3293. this.columnforfun("corpCnName").disabled = true;
  3294. // this.columnforfun('srcType').disabled = true
  3295. this.columnforfun("mblno").disabled = true;
  3296. this.columnforfun("bookingNo").disabled = true;
  3297. // this.columnforfun('refno').disabled = true
  3298. }
  3299. if (item.curCode == this.getLocalCurrency()) {
  3300. this.$set(item, "rmbAmount", item.amount);
  3301. this.$set(item, "usdAmount", "");
  3302. this.$set(item, "rmbAmountNet", item.amountNet);
  3303. this.$set(item, "usdAmountNet", "");
  3304. } else {
  3305. this.$set(item, "usdAmount", item.amount);
  3306. this.$set(item, "rmbAmount", "");
  3307. this.$set(item, "usdAmountNet", item.amountNet);
  3308. this.$set(item, "rmbAmountNet", "");
  3309. }
  3310. item.edit = false;
  3311. }
  3312. // 文件中心
  3313. this.$refs.filescenter.getData(res.data.data);
  3314. for (let item of this.form.filesList) {
  3315. this.$set(item, "edit", false);
  3316. }
  3317. if (status == "toAddEdit") {
  3318. this.$emit(status);
  3319. }
  3320. this.oldForm = this.deepClone(this.form);
  3321. },
  3322. // tbas切换
  3323. handleClick(tba, event) {},
  3324. // 大tbas切换
  3325. bigHandleClick() {
  3326. if (this.bigtabs == "fd") {
  3327. if (this.form.id) {
  3328. this.billsListAllfun(this.form.id);
  3329. }
  3330. }
  3331. if (this.bigtabs == "dz") {
  3332. if (this.form.id) {
  3333. this.$refs.documentCenter.reportslogListfun({ currentPage: 1, pageSize: 10 });
  3334. }
  3335. this.getReportTypeByBigHandle("单证");
  3336. }
  3337. if (this.bigtabs == "fy") this.getReportTypeByBigHandle("费用");
  3338. },
  3339. getReportTypeByBigHandle(name) {
  3340. return name;
  3341. },
  3342. // 获取不分页的分单列表
  3343. billsListAllfun(masterId) {
  3344. billsListAll({ masterId }).then(res => {
  3345. this.billsListAllData = res.data.data;
  3346. });
  3347. }
  3348. }
  3349. };
  3350. </script>
  3351. <style scoped lang="scss">
  3352. ::v-deep .el-tabs--border-card > .el-tabs__content {
  3353. padding: 4px !important;
  3354. }
  3355. .scrollable-container {
  3356. height: 84vh;
  3357. /* 设置容器高度 */
  3358. overflow-y: auto;
  3359. /* 添加垂直滚动条 */
  3360. }
  3361. .borderless {
  3362. height: 100%;
  3363. box-sizing: border-box;
  3364. }
  3365. .customer-main {
  3366. margin-bottom: 15px;
  3367. }
  3368. .demo-ruleForm {
  3369. font-size: 14px;
  3370. }
  3371. .margintop {
  3372. margin-top: 0px !important;
  3373. }
  3374. ::v-deep.el-form-item {
  3375. margin-bottom: 0;
  3376. }
  3377. ::v-deep .basic-container .el-card__body {
  3378. padding: 6px 20px;
  3379. }
  3380. ::v-deep .el-tabs__header {
  3381. margin: 0 05px;
  3382. }
  3383. .isShow {
  3384. display: none;
  3385. }
  3386. .dropdown-max {
  3387. top: 150px !important;
  3388. max-width: 600px;
  3389. display: flex;
  3390. flex-flow: row wrap;
  3391. li {
  3392. margin-right: 5px;
  3393. white-space: nowrap;
  3394. }
  3395. }
  3396. </style>