detailsPage.vue 105 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009
  1. <template>
  2. <div>
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left" @click="goBack()">返回列表 </el-button>
  6. <el-button v-if="form.id && pageIds.length" type="text" @click="lastPage">上一票</el-button>
  7. <el-button v-if="form.id && pageIds.length" type="text" @click="nextPage">下一票</el-button>
  8. </div>
  9. <div class="add-customer-btn">
  10. <el-button size="small" :disabled="!form.id" @click="$refs.print.openDialog()">预 览 </el-button>
  11. <el-button v-if="roleName.indexOf('admin') != -1" size="small" :disabled="!form.id" @click="$refs.report.openDialog()">报表设计 </el-button>
  12. <!-- <el-button class="el-button&#45;&#45;small-yh" style="margin-left: 6px;" type="danger" size="small"
  13. @click="allClick('预定订舱')">预定订舱
  14. </el-button>-->
  15. <!-- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small" v-if="editButton"
  16. :disabled="showLock || !(roleName.indexOf('admin') != -1 || roleName.indexOf('允许修改他人业务') != -1 || saberUserInfo.user_id == form.createUser)"
  17. @click="inEdit">编 辑
  18. </el-button> -->
  19. <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small" @click="allClick('模板保存')"
  20. >模板保存
  21. </el-button>
  22. <el-button
  23. class="el-button--small-yh"
  24. style="margin-left: 6px;"
  25. type="success"
  26. size="small"
  27. :disabled="isSaveBtn || editDisabled"
  28. @click="allClick('导入模板')"
  29. >导入模板
  30. </el-button>
  31. <el-button
  32. class="el-button--small-yh"
  33. style="margin-left: 6px;"
  34. type="primary"
  35. size="small"
  36. :disabled="isSaveBtn || editDisabled"
  37. @click="submit"
  38. >保 存
  39. </el-button>
  40. <el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="danger" size="small" @click="allClick('退舱')"
  41. >退 舱
  42. </el-button>
  43. <el-button
  44. v-if="form.id && form.issueStatus == 0"
  45. class="el-button--small-yh"
  46. style="margin-left: 6px;"
  47. type="success"
  48. size="small"
  49. :disabled="form.issueStatus == 1 || form.issueStatus == 2"
  50. @click="allClick('提交订舱')"
  51. >提交订舱
  52. </el-button>
  53. <el-button
  54. v-if="form.issueStatus == 2"
  55. class="el-button--small-yh"
  56. style="margin-left: 6px;"
  57. type="danger"
  58. size="small"
  59. @click="allClick('撤销订舱')"
  60. >撤销订舱
  61. </el-button>
  62. <el-button
  63. v-if="form.issueStatus == 1 || form.issueStatus == 2"
  64. class="el-button--small-yh"
  65. style="margin-left: 6px;"
  66. type="danger"
  67. size="small"
  68. @click="allClick('提单修改')"
  69. >截单SI修改
  70. </el-button>
  71. <el-button
  72. v-if="form.issueStatus == 1 || form.issueStatus == 2"
  73. class="el-button--small-yh"
  74. style="margin-left: 6px;"
  75. type="success"
  76. size="small"
  77. :disabled="flxDisabled"
  78. @click="allClick('提单确认')"
  79. >确认提交
  80. </el-button>
  81. <!-- <el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
  82. :disabled="form.status != 0 || form.issueStatus == 1" @click="application">提单确认
  83. </el-button> -->
  84. <!-- <el-button v-if="form.status == 1" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
  85. size="small" @click="revokeApplication">撤销单据请核
  86. </el-button> -->
  87. <el-dropdown style="line-height: 0" v-if="importTemplate == 1">
  88. <el-button size="small" type="warning" style="margin-left: 8px" :disabled="isSaveBtn || editDisabled || showLock">
  89. 导入模板<i class="el-icon-arrow-down el-icon--right"></i>
  90. </el-button>
  91. <el-dropdown-menu slot="dropdown">
  92. <el-dropdown-item v-for="item in imporiData" :key="item.id" @click.native="importData2(item.id)">{{ item.name }} </el-dropdown-item>
  93. </el-dropdown-menu>
  94. </el-dropdown>
  95. <!-- <el-dropdown style="line-height: 0">
  96. <el-button class="el-button--small-yh" style="margin-left: 6px;" type="warning" :disabled="!form.id"
  97. size="small">
  98. 审 批<i class="el-icon-arrow-down el-icon--right"></i>
  99. </el-button>
  100. <el-dropdown-menu slot="dropdown">
  101. <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">审核进度
  102. </el-dropdown-item>
  103. </el-dropdown-menu>
  104. </el-dropdown> -->
  105. </div>
  106. </div>
  107. <div style="margin-top: 50px">
  108. <el-tabs type="border-card">
  109. <el-tab-pane label="基础信息">
  110. <trade-card title="基础信息">
  111. <el-form :model="form" ref="form" label-width="90px" class="demo-ruleForm" :disabled="editDisabled">
  112. <el-row>
  113. <el-col span="12">
  114. <el-row>
  115. <el-col span="12">
  116. <el-form-item label="船公司客服" prop="customerServiceName">
  117. <dic-select
  118. v-model="form.customerServiceName"
  119. placeholder="船公司客服"
  120. :key="form.branchId"
  121. label="realName"
  122. :url="'/blade-user/userListAll?roleAlias=客服&deptId=' + form.branchId"
  123. :filterable="true"
  124. @selectChange="dicChange('customerServiceName', $event)"
  125. :disabled="editDisabled"
  126. ></dic-select>
  127. </el-form-item>
  128. </el-col>
  129. <el-col span="12">
  130. <el-form-item label="B/L NO" prop="hblno">
  131. <el-input style="width: 100%;" v-model="form.hblno" size="small" :disabled="true" clearable placeholder="HB/L NO"></el-input>
  132. </el-form-item>
  133. </el-col>
  134. </el-row>
  135. <el-row>
  136. <el-col span="12">
  137. <el-row>
  138. <el-form-item label="发货人" prop="hshipperDetails">
  139. <el-input
  140. type="textarea"
  141. style="width: 100%;"
  142. v-model="form.detail.hshipperDetails"
  143. size="small"
  144. autocomplete="off"
  145. :disabled="editDisabled"
  146. :rows="7"
  147. clearable
  148. placeholder="请输入发货人提单描述"
  149. @change="textareaBlur('hshipperDetails', $event)"
  150. ></el-input>
  151. </el-form-item>
  152. </el-row>
  153. <el-row>
  154. <el-form-item label="收货人" prop="hconsigneeDetails">
  155. <el-input
  156. type="textarea"
  157. style="width: 100%;"
  158. v-model="form.detail.hconsigneeDetails"
  159. size="small"
  160. autocomplete="off"
  161. :disabled="editDisabled"
  162. :rows="7"
  163. clearable
  164. placeholder="请输入收货人提单描述"
  165. @change="textareaBlur('hconsigneeDetails', $event)"
  166. ></el-input>
  167. </el-form-item>
  168. </el-row>
  169. <el-row>
  170. <el-form-item label="通知人" prop="hnotifyDetails">
  171. <el-input
  172. type="textarea"
  173. style="width: 100%;"
  174. v-model="form.detail.hnotifyDetails"
  175. size="small"
  176. autocomplete="off"
  177. :disabled="editDisabled"
  178. :rows="7"
  179. clearable
  180. placeholder="请输入通知人提单描述"
  181. @change="textareaBlur('hnotifyDetails', $event)"
  182. ></el-input>
  183. </el-form-item>
  184. </el-row>
  185. </el-col>
  186. <el-col span="12">
  187. <el-row>
  188. <el-form-item
  189. label="唛头"
  190. prop="marks"
  191. :rules="[
  192. {
  193. required: true,
  194. message: ' ',
  195. trigger: 'blur'
  196. }
  197. ]"
  198. >
  199. <el-input
  200. type="textarea"
  201. style="width: 100%;"
  202. v-model="form.marks"
  203. size="small"
  204. autocomplete="off"
  205. :disabled="editDisabled"
  206. :rows="7"
  207. clearable
  208. placeholder="请输入唛头"
  209. @change="textareaBlur2('marks', $event)"
  210. ></el-input>
  211. </el-form-item>
  212. </el-row>
  213. <el-row>
  214. <el-form-item
  215. label="货物"
  216. prop="commodityDescr"
  217. :rules="[
  218. {
  219. required: true,
  220. message: ' ',
  221. trigger: 'blur'
  222. }
  223. ]"
  224. >
  225. <el-input
  226. type="textarea"
  227. style="width: 100%;"
  228. v-model="form.commodityDescr"
  229. size="small"
  230. autocomplete="off"
  231. :disabled="editDisabled"
  232. :rows="15"
  233. clearable
  234. placeholder="请输入提单上货物描述"
  235. @change="textareaBlur2('commodityDescr', $event)"
  236. ></el-input>
  237. </el-form-item>
  238. </el-row>
  239. </el-col>
  240. </el-row>
  241. </el-col>
  242. <el-col span="12">
  243. <el-row>
  244. <el-col span="12">
  245. <el-form-item label="船名" prop="vesselCnName">
  246. <el-input
  247. style="width: 100%;"
  248. v-model="form.vesselCnName"
  249. size="small"
  250. :disabled="true"
  251. clearable
  252. placeholder="船名"
  253. ></el-input>
  254. </el-form-item>
  255. </el-col>
  256. <el-col span="12">
  257. <el-form-item label="航次" prop="voyageNo">
  258. <el-input style="width: 100%;" v-model="form.voyageNo" size="small" :disabled="true" clearable placeholder="航次"></el-input>
  259. </el-form-item>
  260. </el-col>
  261. </el-row>
  262. <el-row>
  263. <el-col span="12">
  264. <el-form-item
  265. label="起运港"
  266. prop="polCnName"
  267. :rules="[
  268. {
  269. required: true,
  270. message: ' ',
  271. trigger: 'blur'
  272. }
  273. ]"
  274. >
  275. <dic-select
  276. ref="pol"
  277. v-model="form.polCnName"
  278. placeholder="起运港"
  279. key="id"
  280. label="cnName"
  281. res="records"
  282. url="/blade-los/bports/list?current=1&size=5"
  283. :filterable="true"
  284. :remote="true"
  285. dataName="cnName"
  286. @selectChange="dicChange('polCnName', $event)"
  287. :disabled="editDisabled || !flxDisabled"
  288. :slotRight="true"
  289. rightLabel="code"
  290. ></dic-select>
  291. <el-input
  292. style="width: 100%;"
  293. v-model="form.polNamePrint"
  294. size="small"
  295. :disabled="editDisabled || !flxDisabled"
  296. clearable
  297. placeholder="装货港"
  298. @change="textareaBlur2('polNamePrint', $event)"
  299. ></el-input>
  300. </el-form-item>
  301. </el-col>
  302. <el-col span="12">
  303. <el-form-item
  304. label="卸货港"
  305. prop="podCnName"
  306. :rules="[
  307. {
  308. required: true,
  309. message: ' ',
  310. trigger: 'blur'
  311. }
  312. ]"
  313. >
  314. <dic-select
  315. ref="pod"
  316. v-model="form.podCnName"
  317. placeholder="卸货港"
  318. key="id"
  319. label="cnName"
  320. res="records"
  321. url="/blade-los/bports/list?current=1&size=5"
  322. :filterable="true"
  323. :remote="true"
  324. dataName="cnName"
  325. @selectChange="dicChange('podCnName', $event)"
  326. :disabled="editDisabled || !flxDisabled"
  327. :slotRight="true"
  328. rightLabel="code"
  329. ></dic-select>
  330. <el-input
  331. style="width: 100%;"
  332. v-model="form.podNamePrint"
  333. size="small"
  334. :disabled="editDisabled || !flxDisabled"
  335. clearable
  336. placeholder="卸货港"
  337. @change="textareaBlur2('podNamePrint', $event)"
  338. ></el-input>
  339. </el-form-item>
  340. </el-col>
  341. </el-row>
  342. <el-row>
  343. <el-col span="12">
  344. <el-form-item label="交货地" prop="placeDeliveryName">
  345. <dic-select
  346. ref="placeDelivery"
  347. v-model="form.placeDeliveryName"
  348. placeholder="交货地"
  349. key="id"
  350. label="cnName"
  351. res="records"
  352. url="/blade-los/bports/list?current=1&size=5"
  353. :filterable="true"
  354. :remote="true"
  355. dataName="cnName"
  356. @selectChange="dicChange('placeDeliveryName', $event)"
  357. :disabled="editDisabled || !flxDisabled"
  358. :slotRight="true"
  359. rightLabel="code"
  360. ></dic-select>
  361. <el-input
  362. style="width: 100%;"
  363. v-model="form.placeDeliveryNamePrint"
  364. size="small"
  365. :disabled="editDisabled || !flxDisabled"
  366. clearable
  367. placeholder="交货地"
  368. @change="textareaBlur2('placeDeliveryNamePrint', $event)"
  369. ></el-input>
  370. </el-form-item>
  371. </el-col>
  372. <el-col span="12">
  373. <el-form-item
  374. label="HS CODE"
  375. prop="hscode"
  376. :rules="[
  377. {
  378. required: true,
  379. message: ' ',
  380. trigger: 'blur'
  381. }
  382. ]"
  383. >
  384. <el-input
  385. style="width: 100%;"
  386. v-model="form.hscode"
  387. size="small"
  388. :disabled="editDisabled"
  389. clearable
  390. placeholder="HS CODE"
  391. ></el-input>
  392. <el-input
  393. style="width: 100%;"
  394. v-model="form.commodityCnName"
  395. size="small"
  396. :disabled="editDisabled"
  397. clearable
  398. placeholder="英文名称"
  399. ></el-input>
  400. </el-form-item>
  401. </el-col>
  402. </el-row>
  403. <el-row>
  404. <el-col span="12">
  405. <el-form-item
  406. label="ETD"
  407. prop="etd"
  408. :rules="[
  409. {
  410. required: true,
  411. message: ' ',
  412. trigger: 'blur'
  413. }
  414. ]"
  415. >
  416. <el-date-picker
  417. v-model="form.etd"
  418. type="date"
  419. placeholder="请选择 ETD"
  420. :disabled="editDisabled"
  421. size="small"
  422. format="yyyy-MM-dd"
  423. value-format="yyyy-MM-dd"
  424. style="width: 100%;"
  425. @selectChange="dicChange('ETD', $event)"
  426. >
  427. </el-date-picker>
  428. </el-form-item>
  429. </el-col>
  430. <el-col span="12">
  431. <el-form-item label="订舱日期" prop="bookingDate">
  432. <el-date-picker
  433. v-model="form.bookingDate"
  434. type="date"
  435. placeholder="请选择 订舱日期"
  436. :disabled="editDisabled"
  437. size="small"
  438. format="yyyy-MM-dd"
  439. value-format="yyyy-MM-dd"
  440. style="width: 100%;"
  441. >
  442. </el-date-picker>
  443. </el-form-item>
  444. </el-col>
  445. </el-row>
  446. <el-row>
  447. <el-col span="12">
  448. <el-form-item
  449. label="付款方式"
  450. prop="mpaymode"
  451. :rules="[
  452. {
  453. required: true,
  454. message: ' ',
  455. trigger: 'blur'
  456. }
  457. ]"
  458. >
  459. <dic-select
  460. v-model="form.mpaymode"
  461. placeholder="付款方式"
  462. key="dictKey"
  463. label="dictValue"
  464. keyValue="dictKey"
  465. url="/blade-system/dict-biz/dictionary?code=payment_method_los"
  466. :filterable="true"
  467. :disabled="editDisabled"
  468. ></dic-select>
  469. </el-form-item>
  470. </el-col>
  471. <el-col span="12">
  472. <el-form-item
  473. label="运输条款"
  474. prop="serviceTerms"
  475. :rules="[
  476. {
  477. required: true,
  478. message: ' ',
  479. trigger: 'blur'
  480. }
  481. ]"
  482. >
  483. <dic-select
  484. v-model="form.serviceTerms"
  485. placeholder="运输条款"
  486. key="id"
  487. label="cnName"
  488. res="records"
  489. url="/blade-los/bserviceterms/list?status=0&current=1&size=20"
  490. :filterable="true"
  491. :remote="true"
  492. dataName="cnName"
  493. :disabled="editDisabled"
  494. ></dic-select>
  495. </el-form-item>
  496. </el-col>
  497. </el-row>
  498. <el-row>
  499. <el-col span="12">
  500. <el-form-item
  501. label="总件数"
  502. prop="quantity"
  503. :rules="[
  504. {
  505. required: true,
  506. message: ' ',
  507. trigger: 'blur'
  508. }
  509. ]"
  510. >
  511. <el-input
  512. style="width: 100%;"
  513. v-model="form.quantity"
  514. size="small"
  515. autocomplete="off"
  516. min="1"
  517. :disabled="editDisabled"
  518. clearable
  519. placeholder="请输入 件数"
  520. >
  521. </el-input>
  522. </el-form-item>
  523. </el-col>
  524. <el-col span="12">
  525. <el-form-item
  526. label="包装"
  527. prop="packingUnit"
  528. :rules="[
  529. {
  530. required: true,
  531. message: ' ',
  532. trigger: 'blur'
  533. }
  534. ]"
  535. >
  536. <dic-select
  537. v-model="form.packingUnit"
  538. placeholder="包装"
  539. key="id"
  540. label="cnName"
  541. res="records"
  542. url="/blade-los/bpackages/list?current=1&size=5&status=0&whetherDg=0"
  543. :filterable="true"
  544. :remote="true"
  545. dataName="cnName"
  546. @selectChange="dicChange('packingUnit', $event)"
  547. :disabled="editDisabled"
  548. :slotRight="true"
  549. rightLabel="code"
  550. ></dic-select>
  551. </el-form-item>
  552. </el-col>
  553. </el-row>
  554. <el-row>
  555. <el-col span="12">
  556. <el-form-item
  557. label="总重量(KGS)"
  558. prop="grossWeight"
  559. :rules="[
  560. {
  561. required: true,
  562. message: ' ',
  563. trigger: 'blur'
  564. }
  565. ]"
  566. >
  567. <el-input
  568. style="width: 100%;"
  569. v-model="form.grossWeight"
  570. size="small"
  571. autocomplete="off"
  572. :disabled="editDisabled"
  573. clearable
  574. placeholder="请输入 总重量"
  575. >
  576. </el-input>
  577. </el-form-item>
  578. </el-col>
  579. <el-col span="12">
  580. <el-form-item
  581. label="总体积(CBM)"
  582. prop="measurement"
  583. :rules="[
  584. {
  585. required: true,
  586. message: ' ',
  587. trigger: 'blur'
  588. }
  589. ]"
  590. >
  591. <el-input
  592. style="width: 100%;"
  593. v-model="form.measurement"
  594. size="small"
  595. autocomplete="off"
  596. :disabled="editDisabled"
  597. clearable
  598. placeholder="请输入 总体积(CBM)"
  599. >
  600. </el-input>
  601. </el-form-item>
  602. </el-col>
  603. </el-row>
  604. <el-row>
  605. <!--
  606. <el-form-item label="所属公司" prop="branchName">
  607. <dic-select v-model="form.branchName" placeholder="所属公司" key="id" label="deptName"
  608. url="/blade-system/dept/top-list" :filterable="true" :remote="true" dataName="deptName"
  609. @selectChange="dicChange('branchName', $event)" :default="true"
  610. :disabled="editDisabled || roleName.includes('secondaryAdmin')"></dic-select>
  611. </el-form-item>
  612. </el-col>-->
  613. <el-col span="24">
  614. <el-row>
  615. <el-col span="12">
  616. <el-form-item
  617. label="货类"
  618. prop="cargoType"
  619. :rules="[
  620. {
  621. required: true,
  622. message: ' ',
  623. trigger: 'blur'
  624. }
  625. ]"
  626. >
  627. <el-select v-model="form.cargoType" placeholder="请选择 货类" :disabled="editDisabled" size="small" style="width: 100%;">
  628. <el-option v-for="item in cargoTypeData" :key="item.value" :label="item.label" :value="item.value"> </el-option>
  629. </el-select>
  630. </el-form-item>
  631. </el-col>
  632. <el-col span="12">
  633. <el-form-item label="签单方式" prop="issueType">
  634. <dic-select
  635. v-model="form.issueType"
  636. placeholder="签单方式"
  637. key="dictKey"
  638. label="dictValue"
  639. keyValue="dictKey"
  640. url="/blade-system/dict-biz/dictionary?code=issue_type_F"
  641. :filterable="true"
  642. :disabled="detailData.seeDisabled"
  643. :initData="true"
  644. ></dic-select>
  645. </el-form-item>
  646. </el-col>
  647. </el-row>
  648. </el-col>
  649. </el-row>
  650. <el-row>
  651. <el-col span="8">
  652. <el-form-item
  653. label="联系人"
  654. prop="contact"
  655. :rules="[
  656. {
  657. required: true,
  658. message: ' ',
  659. trigger: 'blur'
  660. }
  661. ]"
  662. >
  663. <el-input
  664. style="width: 100%;"
  665. size="small"
  666. v-model="form.contact"
  667. :disabled="editDisabled"
  668. placeholder="文件联络人"
  669. ></el-input>
  670. </el-form-item>
  671. </el-col>
  672. <el-col span="8">
  673. <el-form-item
  674. label="邮箱"
  675. prop="fileEmail"
  676. :rules="[
  677. {
  678. required: true,
  679. message: ' ',
  680. trigger: 'blur'
  681. }
  682. ]"
  683. >
  684. <el-input
  685. style="width: 100%;"
  686. size="small"
  687. v-model="form.fileEmail"
  688. :disabled="editDisabled"
  689. placeholder="文件联络人邮箱"
  690. ></el-input>
  691. </el-form-item>
  692. </el-col>
  693. <el-col span="8">
  694. <el-form-item
  695. label="电话"
  696. prop="fileTel"
  697. :rules="[
  698. {
  699. required: true,
  700. message: ' ',
  701. trigger: 'blur'
  702. }
  703. ]"
  704. >
  705. <el-input
  706. style="width: 100%;"
  707. size="small"
  708. v-model="form.fileTel"
  709. :disabled="editDisabled"
  710. placeholder="文件联络人电话"
  711. ></el-input>
  712. </el-form-item>
  713. </el-col>
  714. </el-row>
  715. <el-row>
  716. <el-col span="12">
  717. <el-form-item label="订舱备注" prop="cyRemarks">
  718. <el-input
  719. type="textarea"
  720. style="width: 100%;"
  721. v-model="form.cyRemarks"
  722. size="small"
  723. autocomplete="off"
  724. :disabled="editDisabled"
  725. :rows="2"
  726. clearable
  727. placeholder="请输入备注"
  728. @change="textareaBlur('cyRemarks', $event)"
  729. ></el-input>
  730. </el-form-item>
  731. </el-col>
  732. <el-col span="12">
  733. <el-form-item label="SI备注" prop="siRemarks">
  734. <el-input
  735. type="textarea"
  736. style="width: 100%;"
  737. v-model="form.siRemarks"
  738. size="small"
  739. autocomplete="off"
  740. :disabled="editDisabled"
  741. :rows="2"
  742. clearable
  743. placeholder="请输入备注"
  744. @change="textareaBlur('siRemarks', $event)"
  745. ></el-input>
  746. </el-form-item>
  747. </el-col>
  748. </el-row>
  749. </el-col>
  750. </el-row>
  751. </el-form>
  752. </trade-card>
  753. <trade-card title="集装箱">
  754. <avue-crud
  755. :option="option"
  756. :data="form.preContainersList"
  757. id="out-table"
  758. ref="crud"
  759. :header-cell-class-name="headerClassName"
  760. :row-style="{ height: '20px', padding: '0px' }"
  761. :cell-style="{ height: '20px', padding: '0px' }"
  762. @selection-change="selectionChange"
  763. @select="selectHandle"
  764. @row-update="rowUpdate"
  765. @resetColumn="resetColumn('crud', 'option', 'optionBack', 512)"
  766. @saveColumn="saveColumn('crud', 'option', 'optionBack', 512)"
  767. >
  768. <template slot="menuLeft">
  769. <el-button type="info" plain size="small" :disabled="editDisabled || !form.id" @click="allClick('一键保存')">一键保存</el-button>
  770. <el-button type="info" plain size="small" :disabled="editDisabled" @click="allClick('一键编辑')">一键编辑</el-button>
  771. <el-button type="danger" plain size="small" :disabled="editDisabled || selectionList.length == 0" @click="allClick('批量删除')"
  772. >批量删除</el-button
  773. >
  774. <el-button v-if="form.issueStatus > 0" type="success" plain size="small" @click="allClick('提交箱型')">修改预配箱</el-button>
  775. </template>
  776. <template slot="indexHeader" slot-scope="{ row, index }">
  777. <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled || !form.id" circle @click="addRow()"> </el-button>
  778. </template>
  779. <template slot="index" slot-scope="{ row, index }">
  780. <span>{{ index + 1 }}</span>
  781. </template>
  782. <tempalte slot="cntrTypeCodeForm" slot-scope="{ row, index }">
  783. <dic-select
  784. v-if="row.$cellEdit"
  785. v-model="row.cntrTypeCode"
  786. placeholder="箱型"
  787. key="id"
  788. label="cnName"
  789. res="records"
  790. url="/blade-los/bcntrtypes/list?current=1&size=5"
  791. :filterable="true"
  792. :remote="true"
  793. dataName="cnName"
  794. @selectChange="rowDicChange('cntrTypeCode', $event, row)"
  795. :slotRight="true"
  796. rightLabel="code"
  797. ></dic-select>
  798. <span v-else>{{ row.corpCnName }}</span>
  799. </tempalte>
  800. </avue-crud>
  801. </trade-card>
  802. <trade-card title="配箱信息">
  803. <DistributionBox
  804. :assemblyForm="form"
  805. :detailData="detailData"
  806. :showLock="showLock"
  807. :pleasereviewType="editDisabled"
  808. @billsAddfun="billsAddfun"
  809. @billsDetailfun="getDetails(form.id, true)"
  810. >
  811. </DistributionBox>
  812. </trade-card>
  813. <trade-card title="操作记录">
  814. <avue-form :option="optionForm2" v-model="form" ref="form2"> </avue-form>
  815. </trade-card>
  816. </el-tab-pane>
  817. <el-tab-pane label="费用信息" v-if="false">
  818. <el-card
  819. v-show="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1 ? true : roleName.indexOf('应付查看') != -1"
  820. class="box-card"
  821. style="margin: 2px 0"
  822. >
  823. <avue-crud
  824. :option="feecOption"
  825. :data="form.feeCenterListC"
  826. id="out-table"
  827. ref="crud2"
  828. :header-cell-class-name="headerClassName"
  829. :row-style="{ height: '20px' }"
  830. :cell-style="{ padding: '0px' }"
  831. @selection-change="feecChange"
  832. @row-update="rowUpdate"
  833. @resetColumn="resetColumn('crud2', 'feecOption', 'feecOptionBack', 235.2)"
  834. @saveColumn="saveColumn('crud2', 'feecOption', 'feecOptionBack', 235.2)"
  835. >
  836. <template slot="menuLeft">
  837. <div style="display: inline-block;margin-right: 20px" class="disabledBox meetSize">
  838. <i class="el-icon-coin"></i>
  839. <span>应付费用</span>
  840. </div>
  841. <el-button type="info" plain size="small" :disabled="editDisabled || !form.id" @click="allClick('费用一键保存')">一键保存</el-button>
  842. <el-button type="info" plain size="small" :disabled="editDisabled || !form.id" @click="allClick('费用一键编辑')">一键编辑</el-button>
  843. <el-button type="danger" plain size="small" :disabled="selectionfeecList.length == 0" @click="allClick('费用批量删除')"
  844. >批量删除</el-button
  845. >
  846. <!-- <el-button type="primary" plain size="small" :disabled="selectionfeecList.length == 0"
  847. @click="allClick('费用申请')">请核费用</el-button> -->
  848. <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
  849. </template>
  850. <template slot="indexHeader" slot-scope="{ row, index }">
  851. <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled || !form.id" circle @click="feecAddRow()">
  852. </el-button>
  853. </template>
  854. <template slot="index" slot-scope="{ row, index }">
  855. <span>{{ index + 1 }}</span>
  856. </template>
  857. <template slot="corpTypeForm" slot-scope="{ row, index }">
  858. <dic-select
  859. v-if="row.$cellEdit"
  860. v-model="row.corpType"
  861. key="id"
  862. label="cnName"
  863. res="records"
  864. url="/blade-los/bcorpstypedefine/list?status=0&current=1&size=20"
  865. :filterable="true"
  866. :remote="true"
  867. dataName="cnName"
  868. @selectChange="rowDicChange('corpType', $event, row, index)"
  869. ></dic-select>
  870. <span v-else>{{ row.corpType }}</span>
  871. </template>
  872. <template slot="cntrNoForm" slot-scope="{ row, index }">
  873. <dic-select
  874. v-if="row.$cellEdit"
  875. v-model="row.cntrNo"
  876. key="id"
  877. label="code"
  878. :mockData="form.tradingBoxItemsList"
  879. :filterable="true"
  880. ></dic-select>
  881. <span v-else>{{ row.cntrNo }}</span>
  882. </template>
  883. <template slot="corpCnNameForm" slot-scope="{ row, index }">
  884. <dic-select
  885. v-if="row.$cellEdit"
  886. :key="row.corpType"
  887. v-model="row.corpCnName"
  888. placeholder="付费对象"
  889. label="shortName"
  890. res="records"
  891. :url="'/blade-los/bcorps/selectList?status=0&current=1&size=5&corpTypeName=' + row.corpType"
  892. :filterable="true"
  893. :remote="true"
  894. dataName="shortName"
  895. @selectChange="rowDicChange('corpCnName', $event, row)"
  896. :slotRight="true"
  897. rightLabel="code"
  898. ></dic-select>
  899. <span v-else>{{ row.corpCnName }}</span>
  900. <!-- <dic-select v-if="row.$cellEdit" v-model="row.corpCnName" key="id" placeholder="付费对象" label="cnName"
  901. res="records" url="/blade-los/bcorps/selectList?corpTypeName=船公司&status=0&current=1&size=20"
  902. :filterable="true" :remote="true" dataName="cnName"
  903. @selectChange="rowDicChange('corpCnName', $event, row)"></dic-select>
  904. <span v-else>{{ row.corpCnName }}</span> -->
  905. </template>
  906. <template slot="feeCnNameForm" slot-scope="{ row }">
  907. <dic-select
  908. v-if="row.$cellEdit"
  909. v-model="row.feeCnName"
  910. key="id"
  911. placeholder="费用名称"
  912. label="cnName"
  913. res="records"
  914. url="/blade-los/bfees/list?status=0&current=1&size=20"
  915. :filterable="true"
  916. :remote="true"
  917. dataName="cnName"
  918. @selectChange="rowDicChange('feeCnName', $event, row)"
  919. ></dic-select>
  920. <span v-else>{{ row.feeCnName }}</span>
  921. </template>
  922. <template slot="curCodeForm" slot-scope="{ row }">
  923. <dic-select
  924. v-if="row.$cellEdit"
  925. v-model="row.curCode"
  926. placeholder="币别"
  927. label="code"
  928. :url="'/blade-los/bcurrency/obtainRate?deptId=' + deptId + '&date=' + form.purchaseDate + '&type=1'"
  929. :filterable="true"
  930. @selectChange="rowDicChange('curCodeC', $event, row)"
  931. ></dic-select>
  932. <span v-else>{{ row.curCode }}</span>
  933. </template>
  934. <template slot="exrateForm" slot-scope="{ row }">
  935. <el-input-number
  936. v-if="row.$cellEdit"
  937. v-model="row.exrate"
  938. :controls="false"
  939. placeholder="请输入 汇率"
  940. size="small"
  941. style="width: 100%;"
  942. ></el-input-number>
  943. <span v-else>{{ row.exrate }}</span>
  944. </template>
  945. <template slot="unitNoForm" slot-scope="{ row, index }">
  946. <dic-select
  947. v-if="row.$cellEdit"
  948. v-model="row.unitNo"
  949. label="cnName"
  950. url="/blade-los/bunits/listAll?status=0"
  951. :filterable="true"
  952. ></dic-select>
  953. <span v-else>{{ row.unitNo }}</span>
  954. </template>
  955. <template slot="priceForm" slot-scope="{ row }">
  956. <el-input-number
  957. v-if="row.$cellEdit"
  958. v-model="row.price"
  959. :controls="false"
  960. placeholder="请输入 成本价"
  961. size="small"
  962. style="width: 100%;"
  963. :precision="2"
  964. @change="countChange(row)"
  965. ></el-input-number>
  966. <span v-else>{{ row.price }}</span>
  967. </template>
  968. <template slot="quantityForm" slot-scope="{ row }">
  969. <el-input-number
  970. v-if="row.$cellEdit"
  971. v-model="row.quantity"
  972. :controls="false"
  973. placeholder="请输入 成本价"
  974. size="small"
  975. style="width: 100%;"
  976. :precision="0"
  977. @change="countChange(row)"
  978. ></el-input-number>
  979. <span v-else>{{ row.quantity }}</span>
  980. </template>
  981. <template slot="remarks" slot-scope="{ row }">
  982. <el-input v-if="row.$cellEdit" v-model="row.remarks" placeholder="请输入 备注" size="small" style="width: 100%;"></el-input>
  983. <span v-else>{{ row.remarks }}</span>
  984. </template>
  985. <template slot="menu" slot-scope="{ row, index }">
  986. <el-button size="small" icon="el-icon-delete" type="text" @click="polRowDel(row, index)">删 除</el-button>
  987. </template>
  988. </avue-crud>
  989. </el-card>
  990. </el-tab-pane>
  991. <el-tab-pane label="文件中心">
  992. <containerTitle title="上传附件"></containerTitle>
  993. <c-upload
  994. :data="form.filesList"
  995. :enumerationValue="76"
  996. deleteUrl="/api/blade-los/filescenter/remove"
  997. display
  998. :disabled="editButton"
  999. ></c-upload>
  1000. </el-tab-pane>
  1001. </el-tabs>
  1002. </div>
  1003. <business-reports :id="form.id" ref="print" businessValue="KHTS" :type="true"></business-reports>
  1004. <reports :id="form.id" :assemblyForm="form" businessValue="KHTS" ref="report"></reports>
  1005. <!--审核弹窗-->
  1006. <el-dialog
  1007. append-to-body
  1008. title="审批进度"
  1009. class="el-dialogDeep"
  1010. :visible.sync="checkScheduleDialog"
  1011. width="40%"
  1012. :close-on-click-modal="false"
  1013. :destroy-on-close="true"
  1014. :close-on-press-escape="false"
  1015. v-dialog-drag
  1016. >
  1017. <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
  1018. </el-dialog>
  1019. <freight-rate ref="freightRate" @importData="importData" />
  1020. <import-temp ref="importTemp" @importData="importTemp"></import-temp>
  1021. <!--导入模板-->
  1022. <el-dialog title="导入模板" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false" v-dialog-drag>
  1023. <avue-form v-if="excelBox" :option="excelOption" v-model="excelForm" :upload-before="uploadBefore" :upload-after="onSuccess"> </avue-form>
  1024. </el-dialog>
  1025. </div>
  1026. </template>
  1027. <script>
  1028. import {
  1029. submit,
  1030. getDetail,
  1031. submitConfirm,
  1032. submitCustomerBooking,
  1033. revokeCustomerBooking,
  1034. submitBookingCabin,
  1035. sendMessageBooking,
  1036. copyAgent,
  1037. pleaseCheck,
  1038. repealCancel,
  1039. submitItemList,
  1040. itemRemove,
  1041. submitFeeList,
  1042. itemFeeRemove,
  1043. getBCorps,
  1044. submitCommonTemplates,
  1045. submitBoxType,
  1046. refundCabin
  1047. } from "@/api/iosBasicData/businessCenter/bookingCabin.js";
  1048. import dicSelect from "@/components/dicSelect/main";
  1049. import checkSchedule from "@/components/checkH/checkSchedule.vue";
  1050. import businessReports from "@/components/boxManagement/businessReportsTS.vue";
  1051. import reports from "@/components/boxManagement/reportsTS.vue";
  1052. import freightRate from "./components/freightRate.vue";
  1053. import importTemp from "./components/importTemp.vue";
  1054. import DistributionBox from "./components/DistributionBox.vue";
  1055. import { billsAdd, deptGetDetailPol } from "@/api/iosBasicData/bills";
  1056. import { getDicinit } from "@/api/dicSelect/index";
  1057. import _ from "lodash";
  1058. import { Header } from "element-ui";
  1059. import { dateFormat } from "@/util/date";
  1060. import { isProcurement } from "@/api/basicData/configuration";
  1061. import { verifyEnglish, checkFullWidthSymbols } from "@/util/date";
  1062. export default {
  1063. name: "detailsPage",
  1064. data() {
  1065. return {
  1066. cargoTypeData: [
  1067. {
  1068. label: "普货",
  1069. value: "dry"
  1070. },
  1071. {
  1072. label: "危险品",
  1073. value: "danger"
  1074. },
  1075. {
  1076. label: "冻柜",
  1077. value: "reefer"
  1078. }
  1079. ],
  1080. excelForm: {},
  1081. excelLoading: false,
  1082. excelOption: {
  1083. submitBtn: false,
  1084. emptyBtn: false,
  1085. column: [
  1086. {
  1087. label: "模板上传",
  1088. prop: "excelFile",
  1089. type: "upload",
  1090. drag: true,
  1091. loadText: "模板上传中,请稍等",
  1092. span: 24,
  1093. propsHttp: {
  1094. res: "data"
  1095. },
  1096. tip: "请上传 .xls,.xlsx 标准格式文件",
  1097. action: "api/blade-los/templateImport/importOne"
  1098. }
  1099. ]
  1100. },
  1101. excelBox: false,
  1102. imporiData: [
  1103. // { id: 0, name: '导入 ONE 模板' },
  1104. // { id: 1, name: '导入 PIL 订舱模板' },
  1105. // { id: 2, name: '导入截单格式' },
  1106. // { id: 3, name: '导入海信提单' },
  1107. { id: 4, name: "提单样本" }
  1108. ],
  1109. importTemplate: null,
  1110. selectionTemplateList: [],
  1111. selectionfeecList: [],
  1112. feeType: null,
  1113. treeOption: {
  1114. nodeKey: "id",
  1115. // lazy: true,
  1116. addBtn: false,
  1117. menu: false,
  1118. size: "small",
  1119. props: {
  1120. labelText: "标题",
  1121. label: "cnName",
  1122. value: "value",
  1123. children: "children"
  1124. }
  1125. },
  1126. templateData: [],
  1127. templateList: [],
  1128. templateOption: {
  1129. height: 500,
  1130. menu: false,
  1131. addBtn: false,
  1132. editBtn: false,
  1133. delBtn: false,
  1134. viewBtn: false,
  1135. header: false,
  1136. index: true,
  1137. selection: true,
  1138. column: [
  1139. {
  1140. label: "费用",
  1141. prop: "feeCnName",
  1142. overHidden: true
  1143. },
  1144. {
  1145. label: "成本价",
  1146. prop: "price",
  1147. overHidden: true
  1148. },
  1149. {
  1150. label: "币别",
  1151. prop: "curCode",
  1152. overHidden: true
  1153. },
  1154. {
  1155. label: "汇率",
  1156. prop: "curCode",
  1157. overHidden: true
  1158. }
  1159. ]
  1160. },
  1161. templateDialog: false,
  1162. selectionList: [],
  1163. selectionPolList: [],
  1164. selectionPodList: [],
  1165. checkId: "", // 审核需要的id
  1166. batchNo: "",
  1167. checkScheduleDialog: false, // 审核弹窗
  1168. isSaveBtn: false,
  1169. editButton: false,
  1170. editDisabled: false,
  1171. form: {
  1172. branchId: JSON.parse(localStorage.getItem("sysitemData")).deptId,
  1173. branchName: JSON.parse(localStorage.getItem("sysitemData")).deptName,
  1174. // customerServiceName: JSON.parse(localStorage.getItem('sysitemData')).name, // OP 默认登录人
  1175. // customerServiceId: JSON.parse(localStorage.getItem('sysitemData')).id,
  1176. businessType: "KHTS",
  1177. billNoFormat: "KHTS",
  1178. businessTypeCode: "KHTS",
  1179. boxBelongsTo: "SOC",
  1180. cargoType: "dry",
  1181. issueType: "TER", // 签单方式 默认 正本提单
  1182. bookingDate: dateFormat(new Date()),
  1183. polId: null,
  1184. polCode: null,
  1185. polEnName: null,
  1186. polCnName: null,
  1187. polNamePrint: null,
  1188. podId: null,
  1189. podCode: null,
  1190. podEnName: null,
  1191. podCnName: null,
  1192. podNamePrint: null,
  1193. placeDeliveryId: null,
  1194. placeDeliveryCode: null,
  1195. placeDeliveryName: null,
  1196. placeDeliveryNamePrint: null,
  1197. serviceTerms: "CY-CY",
  1198. mpaymode: "PP",
  1199. srcType: "SALES",
  1200. srcId: JSON.parse(localStorage.getItem("sysitemData")).id,
  1201. srcEnName: JSON.parse(localStorage.getItem("sysitemData")).name,
  1202. srcCnName: JSON.parse(localStorage.getItem("sysitemData")).name,
  1203. polFreeBoxUseDays: 7,
  1204. podFreeBoxUseDays: 14,
  1205. loadType: "整箱", // 装箱方式默认整箱
  1206. detail: {},
  1207. preContainersList: [],
  1208. feeCenterListC: [],
  1209. filesList: []
  1210. },
  1211. polFeeList: [],
  1212. podFeeList: [],
  1213. oldForm: {},
  1214. optionForm2: {
  1215. menuBtn: false,
  1216. span: 6,
  1217. disabled: false,
  1218. labelWidth: 100,
  1219. column: [
  1220. {
  1221. label: "系统号",
  1222. prop: "billNo",
  1223. disabled: true
  1224. },
  1225. // {
  1226. // label: 'B/L NO',
  1227. // prop: "hblno",
  1228. // disabled: true,
  1229. // },
  1230. // {
  1231. // label: '船名',
  1232. // prop: "vesselCnName",
  1233. // disabled: true,
  1234. // },
  1235. // {
  1236. // label: '航次',
  1237. // prop: "voyageNo",
  1238. // disabled: true,
  1239. // },
  1240. {
  1241. label: "截单日期",
  1242. prop: "cyTrailerTime",
  1243. disabled: true,
  1244. type: "date",
  1245. format: "yyyy-MM-dd HH:mm:ss",
  1246. valueFormat: "yyyy-MM-dd HH:mm:ss"
  1247. },
  1248. {
  1249. label: "截港日期",
  1250. prop: "cyReturnTime",
  1251. disabled: true,
  1252. type: "date",
  1253. format: "yyyy-MM-dd HH:mm:ss",
  1254. valueFormat: "yyyy-MM-dd HH:mm:ss"
  1255. },
  1256. // {
  1257. // label: '系统号',
  1258. // prop: "businessNo",
  1259. // disabled: true,
  1260. // },
  1261. {
  1262. label: "制单人",
  1263. prop: "createUserName",
  1264. disabled: true
  1265. },
  1266. {
  1267. label: "制单日期",
  1268. prop: "createTime",
  1269. disabled: true
  1270. },
  1271. {
  1272. label: "修改人",
  1273. prop: "updateUserName",
  1274. disabled: true
  1275. },
  1276. {
  1277. label: "修改日期",
  1278. prop: "updateTime",
  1279. disabled: true
  1280. }
  1281. ]
  1282. },
  1283. option: {},
  1284. optionBack: {
  1285. // height: 'auto',
  1286. calcHeight: 30,
  1287. menuWidth: 60,
  1288. tip: false,
  1289. border: true,
  1290. addBtn: false,
  1291. viewBtn: false,
  1292. editBtn: false,
  1293. delBtn: false,
  1294. refreshBtn: false,
  1295. selection: true,
  1296. align: "center",
  1297. menu: false,
  1298. column: [
  1299. {
  1300. label: "index",
  1301. prop: "index",
  1302. width: "55",
  1303. fixed: true,
  1304. headerslot: true
  1305. },
  1306. {
  1307. label: "箱型",
  1308. prop: "cntrTypeCode",
  1309. overHidden: true,
  1310. cell: true,
  1311. slot: true,
  1312. formslot: true,
  1313. rules: [
  1314. {
  1315. required: true,
  1316. message: "请选择箱型",
  1317. trigger: "blur"
  1318. }
  1319. ]
  1320. },
  1321. {
  1322. label: "箱量",
  1323. prop: "quantity",
  1324. overHidden: true,
  1325. cell: true,
  1326. rules: [
  1327. {
  1328. required: true,
  1329. message: "请选择箱型",
  1330. trigger: "blur"
  1331. }
  1332. ]
  1333. }
  1334. ]
  1335. },
  1336. feecOption: {},
  1337. feecOptionBack: {
  1338. // height: 'auto',
  1339. maxHeight: "250",
  1340. calcHeight: 30,
  1341. menuWidth: 60,
  1342. tip: false,
  1343. border: true,
  1344. addBtn: false,
  1345. viewBtn: false,
  1346. editBtn: false,
  1347. delBtn: false,
  1348. refreshBtn: false,
  1349. selection: true,
  1350. align: "center",
  1351. menu: false,
  1352. summaryText: "合计",
  1353. showSummary: true,
  1354. sumColumnList: [
  1355. {
  1356. name: "amountCNY",
  1357. type: "sum",
  1358. decimals: 2
  1359. },
  1360. {
  1361. name: "amountUSD",
  1362. type: "sum",
  1363. decimals: 2
  1364. },
  1365. {
  1366. name: "appliedInvoiceAmount",
  1367. type: "sum",
  1368. decimals: 2
  1369. },
  1370. {
  1371. name: "uninvoicedAmount",
  1372. type: "sum",
  1373. decimals: 2
  1374. },
  1375. {
  1376. name: "stlTtlAmount",
  1377. type: "sum",
  1378. decimals: 2
  1379. }
  1380. ],
  1381. column: [
  1382. {
  1383. label: "index",
  1384. prop: "index",
  1385. width: "55",
  1386. fixed: true,
  1387. headerslot: true
  1388. },
  1389. // {
  1390. // label: '账单状态',
  1391. // prop: 'accStatus',
  1392. // overHidden: true,
  1393. // width: 80,
  1394. // type: 'select',
  1395. // dicData: [{
  1396. // label: '未生成',
  1397. // value: 0,
  1398. // }, {
  1399. // label: '已生成',
  1400. // value: 1,
  1401. // }],
  1402. // },
  1403. // {
  1404. // label: '审核状态',
  1405. // prop: 'auditStatus',
  1406. // overHidden: true,
  1407. // width: 80,
  1408. // type: 'select',
  1409. // dicData: [{
  1410. // label: '录入',
  1411. // value: '0',
  1412. // }, {
  1413. // label: '提交审核',
  1414. // value: '1',
  1415. // }, {
  1416. // label: '审核中',
  1417. // value: '2',
  1418. // }, {
  1419. // label: '审核通过',
  1420. // value: '4',
  1421. // }],
  1422. // },
  1423. {
  1424. label: "类别",
  1425. prop: "corpType",
  1426. width: 100,
  1427. overHidden: true,
  1428. cell: true,
  1429. slot: true,
  1430. formslot: true,
  1431. rules: [
  1432. {
  1433. required: true,
  1434. message: "请选择类别",
  1435. trigger: "blur"
  1436. }
  1437. ]
  1438. },
  1439. {
  1440. label: "付费对象",
  1441. prop: "corpCnName",
  1442. width: "100",
  1443. overHidden: true,
  1444. cell: true,
  1445. slot: true,
  1446. formslot: true,
  1447. rules: [
  1448. {
  1449. required: true,
  1450. message: "请选择付费对象",
  1451. trigger: "blur"
  1452. }
  1453. ]
  1454. },
  1455. // {
  1456. // label: "箱号",
  1457. // prop: "cntrNo",
  1458. // width: "100",
  1459. // cell: true,
  1460. // slot: true,
  1461. // formslot: true,
  1462. // overHidden: true,
  1463. // },
  1464. {
  1465. label: "费用名称",
  1466. prop: "feeCnName",
  1467. width: "100",
  1468. overHidden: true,
  1469. cell: true,
  1470. slot: true,
  1471. formslot: true,
  1472. rules: [
  1473. {
  1474. required: true,
  1475. message: "请选择费用名称",
  1476. trigger: "blur"
  1477. }
  1478. ]
  1479. },
  1480. {
  1481. label: "计量单位",
  1482. prop: "unitNo",
  1483. width: "100",
  1484. overHidden: true,
  1485. cell: true,
  1486. slot: true,
  1487. formslot: true
  1488. },
  1489. {
  1490. label: "币别",
  1491. prop: "curCode",
  1492. width: "100",
  1493. overHidden: true,
  1494. cell: true,
  1495. slot: true,
  1496. formslot: true,
  1497. rules: [
  1498. {
  1499. required: true,
  1500. message: "请选择币别",
  1501. trigger: "blur"
  1502. }
  1503. ]
  1504. },
  1505. {
  1506. label: "汇率",
  1507. prop: "exrate",
  1508. width: "100",
  1509. overHidden: true,
  1510. cell: true,
  1511. slot: true,
  1512. formslot: true
  1513. },
  1514. {
  1515. label: "单价",
  1516. prop: "price",
  1517. width: "100",
  1518. overHidden: true,
  1519. cell: true,
  1520. slot: true,
  1521. formslot: true,
  1522. rules: [
  1523. {
  1524. required: true,
  1525. message: "请输入单价",
  1526. trigger: "blur"
  1527. }
  1528. ]
  1529. },
  1530. {
  1531. label: "数量",
  1532. prop: "quantity",
  1533. width: "100",
  1534. overHidden: true,
  1535. cell: true,
  1536. slot: true,
  1537. formslot: true,
  1538. rules: [
  1539. {
  1540. required: true,
  1541. message: "请输入数量",
  1542. trigger: "blur"
  1543. }
  1544. ]
  1545. },
  1546. {
  1547. label: "本币",
  1548. prop: "amountCNY",
  1549. width: "100",
  1550. overHidden: true
  1551. },
  1552. {
  1553. label: "外币",
  1554. prop: "amountUSD",
  1555. width: "100",
  1556. overHidden: true
  1557. },
  1558. {
  1559. label: "申请发票金额",
  1560. prop: "appliedInvoiceAmount",
  1561. width: "120",
  1562. overHidden: true
  1563. },
  1564. {
  1565. label: "已开票金额",
  1566. prop: "uninvoicedAmount",
  1567. width: "120",
  1568. overHidden: true
  1569. },
  1570. {
  1571. label: "已结算金额",
  1572. prop: "stlTtlAmount",
  1573. width: "120",
  1574. overHidden: true
  1575. },
  1576. {
  1577. label: "制单人",
  1578. prop: "createUserName",
  1579. width: "100",
  1580. overHidden: true
  1581. },
  1582. {
  1583. label: "制单日期",
  1584. prop: "createTime",
  1585. width: "120",
  1586. overHidden: true
  1587. },
  1588. {
  1589. label: "修改人",
  1590. prop: "updateUserName",
  1591. width: "100",
  1592. overHidden: true
  1593. },
  1594. {
  1595. label: "修改日期",
  1596. prop: "updateTime",
  1597. width: "120",
  1598. overHidden: true
  1599. },
  1600. {
  1601. label: "备注",
  1602. prop: "remarks",
  1603. // cell: true,
  1604. width: 150,
  1605. overHidden: true
  1606. }
  1607. ]
  1608. },
  1609. roleName: [],
  1610. saberUserInfo: null,
  1611. deptId: JSON.parse(localStorage.getItem("sysitemData")).deptId,
  1612. flxDisabled: true,
  1613. verifySymbolStatus: 0
  1614. };
  1615. },
  1616. components: {
  1617. dicSelect,
  1618. checkSchedule,
  1619. businessReports,
  1620. reports,
  1621. freightRate,
  1622. DistributionBox,
  1623. importTemp
  1624. },
  1625. props: {
  1626. detailData: Object,
  1627. pageIds: {
  1628. type: Array, // 指定 prop 的类型为 Array
  1629. default: () => [] // 提供一个默认值,这里使用函数形式返回一个空数组
  1630. }
  1631. },
  1632. async created() {
  1633. this.saberUserInfo = JSON.parse(localStorage.getItem("saber-userInfo")).content;
  1634. this.roleName = localStorage.getItem("roleName").split(",");
  1635. this.option = await this.getColumnData(this.getColumnName(512), this.optionBack);
  1636. this.feecOption = await this.getColumnData(this.getColumnName(235.2), this.feecOptionBack);
  1637. this.saveLocalCurrency(JSON.parse(localStorage.getItem("sysitemData")).deptId);
  1638. isProcurement({ param: "import.template" }).then(res => {
  1639. this.importTemplate = res.data.data;
  1640. });
  1641. isProcurement({ param: "verify.symbol" }).then(res => {
  1642. this.verifySymbolStatus = res.data.data;
  1643. });
  1644. if (this.detailData && this.detailData.id) {
  1645. this.getDetails(this.detailData.id);
  1646. }
  1647. if (this.$route.query.billId) {
  1648. this.getDetails(this.$route.query.billId);
  1649. }
  1650. if (this.detailData && this.detailData.copyId) {
  1651. this.getCopydate(this.detailData.copyId);
  1652. }
  1653. if (this.detailData.type == "new") {
  1654. if (this.roleName.includes("客户")) {
  1655. let obj = {
  1656. userId: JSON.parse(localStorage.getItem("sysitemData")).id
  1657. };
  1658. getBCorps(obj).then(res => {
  1659. this.form.corpId = res.data.data.id;
  1660. this.form.corpCode = res.data.data.code;
  1661. this.form.corpEnName = res.data.data.enName;
  1662. this.form.corpCnName = res.data.data.cnName;
  1663. this.form.shortName = res.data.data.shortName;
  1664. });
  1665. }
  1666. deptGetDetailPol(this.saberUserInfo.dept_pid.split(",")[0]).then(res => {
  1667. // 装货港
  1668. this.form.polCnName = res.data.data.polCnName;
  1669. this.form.polEnName = res.data.data.polEnName;
  1670. this.form.polId = res.data.data.polId;
  1671. this.form.polCode = res.data.data.polCode;
  1672. this.form.polNamePrint = res.data.data.polEnName;
  1673. });
  1674. }
  1675. this.saveLocalCurrency(this.deptId);
  1676. },
  1677. methods: {
  1678. importTemp(val) {
  1679. delete val.hblno;
  1680. delete val.version;
  1681. delete val.billNo;
  1682. delete val.issueStatus;
  1683. delete val.confirmStatus;
  1684. delete val.detail.id;
  1685. delete val.detail.pid;
  1686. if (this.form.issueStatus == 1 || this.form.issueStatus == 2) {
  1687. delete val.preContainersList;
  1688. }
  1689. const obj = this.deepClone(this.form);
  1690. this.form = {
  1691. ...obj,
  1692. ...val,
  1693. detail: {
  1694. ...obj.detail,
  1695. ...val.detail
  1696. }
  1697. };
  1698. },
  1699. lastPage() {
  1700. if (this.pageIds.length) {
  1701. const index = this.pageIds.indexOf(this.form.id);
  1702. if (index == 0) {
  1703. return this.$message.error("没有上一票了");
  1704. }
  1705. const lastIndex = index - 1;
  1706. // if (this.form.id) {
  1707. // this.unLock({
  1708. // moduleName: "SE",
  1709. // tableName: "SE_order",
  1710. // billId: this.form.id,
  1711. // billNo: this.form.mblno
  1712. // });
  1713. // }
  1714. this.getDetails(this.pageIds[lastIndex]);
  1715. }
  1716. },
  1717. nextPage() {
  1718. if (this.pageIds.length) {
  1719. const index = this.pageIds.indexOf(this.form.id);
  1720. if (this.pageIds[this.pageIds.length - 1] == this.form.id) {
  1721. return this.$message.error("没有下一票了");
  1722. }
  1723. const nextIndex = index + 1;
  1724. // if (this.form.id) {
  1725. // this.unLock({
  1726. // moduleName: "SE",
  1727. // tableName: "SE_order",
  1728. // billId: this.form.id,
  1729. // billNo: this.form.mblno
  1730. // });
  1731. // }
  1732. this.getDetails(this.pageIds[nextIndex]);
  1733. }
  1734. },
  1735. // 提取箱专用的保存
  1736. billsAddfun() {
  1737. billsAdd(this.form).then(res => {
  1738. this.$message({
  1739. type: "success",
  1740. message: "操作成功!"
  1741. });
  1742. this.getDetails(this.form.id);
  1743. });
  1744. },
  1745. //文档导入
  1746. importData2(row) {
  1747. if (row == 0) {
  1748. this.excelOption.column[0].action = `/api/blade-los/templateImport/importOne?billId=${this.form.id}`;
  1749. } else if (row == 1) {
  1750. this.excelOption.column[0].action = `/api/blade-los/templateImport/importPilBooking?billId=${this.form.id}`;
  1751. } else if (row == 2) {
  1752. this.excelOption.column[0].action = `/api/blade-los/templateImport/importPilCutOffOrders?billId=${this.form.id}`;
  1753. } else if (row == 3) {
  1754. this.excelOption.column[0].action = `/api/blade-los/templateImport/importHisenseBill?billId=${this.form.id}`;
  1755. } else if (row == 4) {
  1756. this.excelOption.column[0].action = `/api/blade-los/templateImport/importBookingCabin`;
  1757. }
  1758. this.excelBox = true;
  1759. },
  1760. // 上传成功
  1761. onSuccess(res, done, loading, column) {
  1762. loading = true;
  1763. if (Object.keys(res).length) {
  1764. // loading = false;
  1765. this.$confirm("此操作将覆盖数据, 是否继续?", "提示", {
  1766. confirmButtonText: "确定",
  1767. cancelButtonText: "取消",
  1768. type: "warning"
  1769. })
  1770. .then(() => {
  1771. // this.form = res;
  1772. Object.keys(res).forEach(key => {
  1773. if (res[key]) {
  1774. if (key != "detail") {
  1775. // this.form[key] = res[key]
  1776. this.$set(this.form, key, res[key]);
  1777. }
  1778. if (key == "detail") {
  1779. Object.keys(res.detail).forEach(key => {
  1780. if (res.detail[key]) {
  1781. // this.form.detail[key] = res.detail[key]
  1782. this.$set(this.form.detail, key, res.detail[key]);
  1783. }
  1784. });
  1785. }
  1786. }
  1787. });
  1788. this.excelBox = false;
  1789. this.$message.success("导入成功!");
  1790. loading = false;
  1791. done();
  1792. })
  1793. .catch(() => {
  1794. this.excelBox = false;
  1795. loading = false;
  1796. done();
  1797. });
  1798. } else {
  1799. loading = false;
  1800. done();
  1801. }
  1802. },
  1803. countChange(row) {
  1804. if (row.curCode == this.getLocalCurrency()) {
  1805. row.amountCNY = _.round(_.multiply(row.price, row.quantity), 2);
  1806. row.amountUSD = 0;
  1807. } else {
  1808. row.amountCNY = 0;
  1809. row.amountUSD = _.round(_.multiply(row.price, row.quantity), 2);
  1810. }
  1811. },
  1812. importData(row) {
  1813. this.form.preContainersList.forEach(item => {
  1814. if (item.cntrTypeCode == "20GP") {
  1815. item.salesPrice = row.gp20;
  1816. item.costPrice = row.gp20Cost;
  1817. }
  1818. if (item.cntrTypeCode == "40GP") {
  1819. item.salesPrice = row.gp40;
  1820. item.costPrice = row.gp40Cost;
  1821. }
  1822. if (item.cntrTypeCode == "40HC") {
  1823. item.salesPrice = row.hc40;
  1824. item.costPrice = row.hc40Cost;
  1825. }
  1826. });
  1827. this.submit();
  1828. },
  1829. textareaBlur(name, row) {
  1830. this.form.detail[name] = row.toUpperCase();
  1831. },
  1832. textareaBlur2(name, row) {
  1833. this.form[name] = row.toUpperCase();
  1834. },
  1835. rowDicChange(name, row, el, index) {
  1836. if (name == "cntrTypeCode") {
  1837. if (row) {
  1838. if (this.form.preContainersList.filter(item => item.cntrTypeCode == row.cnName).length > 1) {
  1839. el.cntrTypeCodeId = null;
  1840. el.cntrTypeCode = null;
  1841. el.teu = null;
  1842. return this.$message.error("箱型不能重复");
  1843. }
  1844. el.cntrTypeCodeId = row.id;
  1845. el.teu = row.teu;
  1846. } else {
  1847. el.cntrTypeCodeId = null;
  1848. el.cntrTypeCode = null;
  1849. el.teu = null;
  1850. }
  1851. }
  1852. if (name == "curCodeC") {
  1853. if (row) {
  1854. el.exrate = row.exratePayable;
  1855. this.countChange(el);
  1856. } else {
  1857. el.exrate = null;
  1858. el.amountCNY = 0;
  1859. el.amountUSD = 0;
  1860. }
  1861. }
  1862. if (name == "feeCnName") {
  1863. if (row) {
  1864. el.feeId = row.id;
  1865. el.feeCode = row.code;
  1866. } else {
  1867. el.feeId = null;
  1868. el.feeCode = null;
  1869. el.feeCnName = null;
  1870. }
  1871. }
  1872. if (name == "corpType") {
  1873. el.corpId = null;
  1874. el.corpCode = null;
  1875. el.shortName = null;
  1876. el.corpCnName = null;
  1877. el.corpEnName = null;
  1878. }
  1879. if (name == "corpCnName") {
  1880. if (row) {
  1881. el.corpId = row.id;
  1882. el.corpCode = row.code;
  1883. el.shortName = row.shortName;
  1884. el.corpEnName = row.enName;
  1885. } else {
  1886. el.corpId = null;
  1887. el.corpCode = null;
  1888. el.shortName = null;
  1889. el.corpCnName = null;
  1890. el.corpEnName = null;
  1891. }
  1892. }
  1893. },
  1894. async dicChange(name, row) {
  1895. if (name == "packingUnit") {
  1896. if (row) {
  1897. this.form.packingUnitId = row.id;
  1898. } else {
  1899. this.form.branchId = null;
  1900. this.form.packingUnit = null;
  1901. }
  1902. }
  1903. if (name == "branchName") {
  1904. if (row) {
  1905. this.form.branchId = row.id;
  1906. } else {
  1907. this.form.branchId = null;
  1908. this.form.branchName = null;
  1909. }
  1910. }
  1911. if (name == "corpCnName") {
  1912. if (row) {
  1913. this.form.corpId = row.id;
  1914. this.form.corpCode = row.code;
  1915. this.form.corpEnName = row.enName;
  1916. this.form.shortName = row.shortName;
  1917. } else {
  1918. this.form.corpId = null;
  1919. this.form.corpCode = null;
  1920. this.form.corpCnName = null;
  1921. this.form.corpEnName = null;
  1922. this.form.shortName = null;
  1923. }
  1924. }
  1925. if (name == "operatorName") {
  1926. if (row) {
  1927. this.form.operatorName = row.realName;
  1928. this.form.operatorId = row.id;
  1929. } else {
  1930. this.form.operatorName = null;
  1931. this.form.operatorId = null;
  1932. }
  1933. }
  1934. if (name == "customerServiceName") {
  1935. if (row) {
  1936. this.form.customerServiceId = row.id;
  1937. this.form.srcId = row.id;
  1938. this.form.srcEnName = row.name;
  1939. this.form.srcCnName = row.name;
  1940. } else {
  1941. this.form.customerServiceName = null;
  1942. this.form.customerServiceId = null;
  1943. this.form.srcId = null;
  1944. this.form.srcEnName = null;
  1945. this.form.srcCnName = null;
  1946. }
  1947. }
  1948. if (name == "polCnName") {
  1949. if (row) {
  1950. this.form.polId = row.id;
  1951. this.form.polCode = row.code;
  1952. this.form.polEnName = row.enName;
  1953. // this.form.polNamePrint = row.enName;
  1954. if (this.form.polNamePrint) {
  1955. this.$confirm("是否覆盖内容?", "提示", {
  1956. confirmButtonText: "确定",
  1957. cancelButtonText: "取消",
  1958. type: "warning"
  1959. })
  1960. .then(() => {
  1961. this.form.polNamePrint = row.enName;
  1962. this.$refs.pol.$refs.mySelect.blur();
  1963. })
  1964. .catch(() => {
  1965. this.$refs.pol.$refs.mySelect.blur();
  1966. });
  1967. } else {
  1968. this.form.polNamePrint = row.enName;
  1969. }
  1970. } else {
  1971. this.form.polId = null;
  1972. this.form.polCode = null;
  1973. this.form.polEnName = null;
  1974. this.form.polCnName = null;
  1975. this.form.polNamePrint = null;
  1976. }
  1977. }
  1978. if (name == "podCnName") {
  1979. if (row) {
  1980. this.form.podId = row.id;
  1981. this.form.podCode = row.code;
  1982. this.form.podEnName = row.enName;
  1983. // this.form.podNamePrint = row.enName;
  1984. if (this.form.podNamePrint) {
  1985. this.$confirm("是否覆盖内容?", "提示", {
  1986. confirmButtonText: "确定",
  1987. cancelButtonText: "取消",
  1988. type: "warning"
  1989. })
  1990. .then(() => {
  1991. this.form.podNamePrint = row.enName;
  1992. this.$refs.pod.$refs.mySelect.blur();
  1993. })
  1994. .catch(() => {
  1995. this.$refs.pod.$refs.mySelect.blur();
  1996. });
  1997. } else {
  1998. this.form.podNamePrint = row.enName;
  1999. }
  2000. } else {
  2001. this.form.podId = null;
  2002. this.form.podCode = null;
  2003. this.form.podEnName = null;
  2004. this.form.podCnName = null;
  2005. this.form.podNamePrint = null;
  2006. }
  2007. }
  2008. if (name == "placeDeliveryName") {
  2009. if (row) {
  2010. this.form.placeDeliveryId = row.id;
  2011. this.form.placeDeliveryCode = row.code;
  2012. this.form.podEnName = row.enName;
  2013. // this.form.placeDeliveryNamePrint = row.enName;
  2014. if (this.form.placeDeliveryNamePrint) {
  2015. this.$confirm("是否覆盖内容?", "提示", {
  2016. confirmButtonText: "确定",
  2017. cancelButtonText: "取消",
  2018. type: "warning"
  2019. })
  2020. .then(() => {
  2021. this.form.placeDeliveryNamePrint = row.enName;
  2022. this.$refs.placeDelivery.$refs.mySelect.blur();
  2023. })
  2024. .catch(() => {
  2025. this.$refs.placeDelivery.$refs.mySelect.blur();
  2026. });
  2027. } else {
  2028. this.form.placeDeliveryNamePrint = row.enName;
  2029. }
  2030. } else {
  2031. this.form.placeDeliveryId = null;
  2032. this.form.placeDeliveryCode = null;
  2033. // this.form.podEnName = null
  2034. this.form.placeDeliveryName = null;
  2035. this.form.placeDeliveryNamePrint = null;
  2036. }
  2037. }
  2038. if (name == "srcType") {
  2039. this.form.srcId = null;
  2040. this.form.srcEnName = null;
  2041. this.form.srcCnName = null;
  2042. }
  2043. if (name == "OWN") {
  2044. if (row) {
  2045. this.form.srcId = row.id;
  2046. this.form.srcEnName = row.title;
  2047. this.form.srcCnName = row.title;
  2048. } else {
  2049. this.form.srcId = null;
  2050. this.form.srcEnName = null;
  2051. this.form.srcCnName = null;
  2052. }
  2053. }
  2054. if (name == "AGENT") {
  2055. if (row) {
  2056. this.form.srcId = row.id;
  2057. this.form.srcEnName = row.cnName;
  2058. this.form.srcCnName = row.cnName;
  2059. } else {
  2060. this.form.srcId = null;
  2061. this.form.srcEnName = null;
  2062. this.form.srcCnName = null;
  2063. }
  2064. }
  2065. if (name == "SALES") {
  2066. if (row) {
  2067. this.form.srcId = row.id;
  2068. this.form.srcEnName = row.name;
  2069. this.form.srcCnName = row.name;
  2070. } else {
  2071. this.form.srcId = null;
  2072. this.form.srcEnName = null;
  2073. this.form.srcCnName = null;
  2074. }
  2075. }
  2076. if (name == "ETD") {
  2077. if (row) {
  2078. await this.checkRate(null, row, null, 1, this.deptId);
  2079. this.form.feeCenterListC.forEach(item => {
  2080. item.exrate = this.getExchangeRate(item.curCode, "C", 1);
  2081. });
  2082. }
  2083. }
  2084. },
  2085. rowEdit(row) {},
  2086. addRow() {
  2087. if (!this.form.id) {
  2088. return this.$message.error("请保存数据");
  2089. }
  2090. this.form.preContainersList.push({
  2091. pid: this.form.id,
  2092. $cellEdit: true,
  2093. oceanFreight: 0,
  2094. salesPrice: 0
  2095. });
  2096. },
  2097. async feecAddRow() {
  2098. if (!this.form.id) {
  2099. return this.$message.error("请保存数据");
  2100. }
  2101. await this.checkRate(null, this.form.purchaseDate, null, 1, this.deptId);
  2102. this.form.feeCenterListC.push({
  2103. pid: this.form.id,
  2104. dc: "C",
  2105. paymode: "C",
  2106. sort: Number(this.form.feeCenterListC.length) + 1,
  2107. businessType: this.form.businessType, // 业务类型
  2108. billType: this.form.billType, // 单据类型
  2109. billNo: this.form.billNo, // 单据编号
  2110. billDate: this.form.etd,
  2111. branchId: this.form.branchId,
  2112. branchName: this.form.branchName,
  2113. corpId: this.form.corpId,
  2114. shortName: this.form.shortName,
  2115. corpCnName: this.form.corpCnName,
  2116. corpEnName: this.form.corpCnName,
  2117. etd: this.form.etd, // 开船日期
  2118. polId: this.form.polId, // 装货港 id
  2119. polCode: this.form.polCode, // 装货港代码
  2120. polCnName: this.form.polCnName, // 装货港中文名称
  2121. polEnName: this.form.polEnName, // 装货港英文名称
  2122. podId: this.form.podId, // 卸货港 id
  2123. podCode: this.form.podCode, // 卸货港代码
  2124. podCnName: this.form.podCnName, // 卸货港中文名称
  2125. podEnName: this.form.podEnName, // 卸货港英文名称
  2126. curCode: this.getLocalCurrency(),
  2127. exrate: this.getExchangeRate(this.getLocalCurrency(), "C", 1),
  2128. $cellEdit: true
  2129. });
  2130. },
  2131. templateChange(list) {
  2132. this.selectionTemplateList = list;
  2133. },
  2134. selectionChange(list) {
  2135. this.selectionList = list;
  2136. },
  2137. feecChange(list) {
  2138. let ids = [];
  2139. list.forEach(e => {
  2140. ids.push(e.id);
  2141. });
  2142. if (ids.length) {
  2143. this.itemCIds = ids.join(",");
  2144. } else {
  2145. this.itemCIds = null;
  2146. }
  2147. this.selectionfeecList = list;
  2148. },
  2149. getDetails(id, type) {
  2150. const loading = this.$loading({
  2151. lock: true,
  2152. text: "加载中",
  2153. spinner: "el-icon-loading",
  2154. background: "rgba(255,255,255,0.7)"
  2155. });
  2156. getDetail({ id: id })
  2157. .then(res => {
  2158. res.data.data.feeCenterListC.forEach(row => {
  2159. if (row.curCode == this.getLocalCurrency()) {
  2160. row.amountCNY = row.amount;
  2161. row.amountUSD = 0;
  2162. }
  2163. if (row.curCode != this.getLocalCurrency()) {
  2164. row.amountUSD = row.amount;
  2165. row.amountCNY = 0;
  2166. }
  2167. });
  2168. this.form = res.data.data;
  2169. if (!type) {
  2170. if (res.data.data.issueStatus == 1 || res.data.data.issueStatus == 2 || res.data.data.confirmStatus == 1) {
  2171. this.isSaveBtn = true;
  2172. this.editDisabled = true;
  2173. this.optionForm.disabled = true;
  2174. } else {
  2175. this.editDisabled = false;
  2176. this.optionForm.disabled = false;
  2177. }
  2178. }
  2179. })
  2180. .finally(() => {
  2181. loading.close();
  2182. });
  2183. },
  2184. getCopydate(id) {
  2185. const loading = this.$loading({
  2186. lock: true,
  2187. text: "加载中",
  2188. spinner: "el-icon-loading",
  2189. background: "rgba(255,255,255,0.7)"
  2190. });
  2191. copyAgent({ id: id })
  2192. .then(res => {
  2193. this.form = res.data.data;
  2194. })
  2195. .finally(() => {
  2196. loading.close();
  2197. });
  2198. },
  2199. inEdit() {
  2200. this.editButton = false;
  2201. if (this.form.status == "录入") {
  2202. this.editDisabled = false;
  2203. this.optionForm.disabled = false;
  2204. }
  2205. },
  2206. allClick(name) {
  2207. if (name == "提取价格") {
  2208. let obj = {
  2209. polId: this.form.polId,
  2210. podId: this.form.podId,
  2211. // actualShippingCompanyId: this.selectionList[0].carrierId,
  2212. etd: this.form.etd
  2213. };
  2214. this.$refs.freightRate.openDialog(obj);
  2215. }
  2216. if (name == "预定订舱") {
  2217. this.$confirm("是否发送消息?", {
  2218. confirmButtonText: "确定",
  2219. cancelButtonText: "取消",
  2220. type: "warning"
  2221. }).then(() => {
  2222. const loading = this.$loading({
  2223. lock: true,
  2224. text: "加载中",
  2225. spinner: "el-icon-loading",
  2226. background: "rgba(255,255,255,0.7)"
  2227. });
  2228. sendMessageBooking(this.form)
  2229. .then(res => {
  2230. this.$message.success("操作成功");
  2231. this.getDetails(this.form.id);
  2232. })
  2233. .finally(() => {
  2234. loading.close();
  2235. });
  2236. });
  2237. }
  2238. if (name == "生成订单") {
  2239. if (!this.form.preContainersList.length) {
  2240. return this.$message.error("集装箱明细不能为空");
  2241. }
  2242. if (this.form.status != 3) {
  2243. for (let item of this.form.preContainersList) {
  2244. if (!item.id) {
  2245. return this.$message.error("请保存数据");
  2246. }
  2247. if (Number(item.oceanFreight) < Number(item.salesPrice)) {
  2248. return this.$message.error("集装箱的海运费低于销售价,请点击运费申请");
  2249. }
  2250. }
  2251. }
  2252. this.$confirm("是否生成订单?", {
  2253. confirmButtonText: "确定",
  2254. cancelButtonText: "取消",
  2255. type: "warning"
  2256. }).then(() => {
  2257. for (let row of this.form.preContainersList) {
  2258. if (!row.cntrTypeCode || !row.quantity) {
  2259. this.$refs.crud.rowCell(row, row.$index);
  2260. return this.$message.error("请完善明细信息");
  2261. }
  2262. }
  2263. this.form.businessType = "KHTS";
  2264. this.form.billNoFormat = "KHTS";
  2265. this.form.businessTypeCode = "KHTS";
  2266. const loading = this.$loading({
  2267. lock: true,
  2268. text: "加载中",
  2269. spinner: "el-icon-loading",
  2270. background: "rgba(255,255,255,0.7)"
  2271. });
  2272. submitBookingCabin(this.form)
  2273. .then(res => {
  2274. this.$message.success("操作成功");
  2275. this.getDetails(this.form.id);
  2276. })
  2277. .finally(() => {
  2278. loading.close();
  2279. });
  2280. });
  2281. }
  2282. if (name == "一键保存") {
  2283. if (!this.form.preContainersList.length) {
  2284. return this.$message.error("请添加数据");
  2285. }
  2286. for (let row of this.form.preContainersList) {
  2287. if (!row.cntrTypeCode || !row.quantity) {
  2288. this.$refs.crud.rowCell(row, row.$index);
  2289. return this.$message.error("请完善明细信息");
  2290. }
  2291. }
  2292. const loading = this.$loading({
  2293. lock: true,
  2294. text: "加载中",
  2295. spinner: "el-icon-loading",
  2296. background: "rgba(255,255,255,0.7)"
  2297. });
  2298. submitItemList(this.form.preContainersList)
  2299. .then(res => {
  2300. this.$message.success("保存成功");
  2301. this.form.preContainersList = res.data.data;
  2302. })
  2303. .finally(() => {
  2304. loading.close();
  2305. });
  2306. }
  2307. if (name == "一键编辑") {
  2308. for (let row of this.form.preContainersList) {
  2309. this.$set(row, "$cellEdit", true);
  2310. }
  2311. }
  2312. if (name == "批量删除") {
  2313. let multiList = [];
  2314. let arr = [];
  2315. this.$confirm("确定将选择数据删除?", {
  2316. confirmButtonText: "确定",
  2317. cancelButtonText: "取消",
  2318. type: "warning"
  2319. }).then(() => {
  2320. multiList = this.selectionList;
  2321. arr = this.form.preContainersList;
  2322. // 获取有id 的数据
  2323. const itemsWithId = multiList.filter(item => item.id != null);
  2324. let arrIds = itemsWithId.map(item => item.id); // 获取id 数据
  2325. // 把选中的删除掉
  2326. multiList.forEach(item => {
  2327. for (let index in arr) {
  2328. if (JSON.stringify(item) == JSON.stringify(arr[index])) {
  2329. arr.splice(Number(index), 1);
  2330. }
  2331. }
  2332. });
  2333. if (itemsWithId.length != 0) {
  2334. const loading = this.$loading({
  2335. lock: true,
  2336. text: "加载中",
  2337. spinner: "el-icon-loading",
  2338. background: "rgba(255,255,255,0.7)"
  2339. });
  2340. itemRemove({ ids: arrIds.join(",") })
  2341. .then(res => {
  2342. this.$message.success("删除成功");
  2343. })
  2344. .finally(() => {
  2345. loading.close();
  2346. });
  2347. }
  2348. });
  2349. }
  2350. if (name == "提交箱型") {
  2351. this.$confirm("是否提交箱型?", "提示", {
  2352. confirmButtonText: "确定",
  2353. cancelButtonText: "取消",
  2354. type: "warning"
  2355. }).then(() => {
  2356. let obj = {
  2357. id: this.form.id
  2358. };
  2359. submitBoxType(obj).then(res => {
  2360. this.$message.success("操作成功");
  2361. this.getDetails(this.form.id);
  2362. });
  2363. });
  2364. }
  2365. if (name == "费用一键保存") {
  2366. if (!this.form.feeCenterListC.length) {
  2367. return this.$message.error("请添加数据");
  2368. }
  2369. for (let row of this.form.feeCenterListC) {
  2370. row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD;
  2371. row.amountNet = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD;
  2372. if (!row.corpType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
  2373. this.$refs.crud2.rowCell(row, row.$index);
  2374. return this.$message.error("请完善费用明细");
  2375. }
  2376. }
  2377. const loading = this.$loading({
  2378. lock: true,
  2379. text: "加载中",
  2380. spinner: "el-icon-loading",
  2381. background: "rgba(255,255,255,0.7)"
  2382. });
  2383. submitFeeList(this.form.feeCenterListC)
  2384. .then(res => {
  2385. this.$message.success("保存成功");
  2386. this.getDetails(this.form.id);
  2387. })
  2388. .finally(() => {
  2389. loading.close();
  2390. });
  2391. }
  2392. if (name == "费用一键编辑") {
  2393. for (let row of this.form.feeCenterListC) {
  2394. this.$set(row, "$cellEdit", true);
  2395. }
  2396. }
  2397. if (name == "费用批量删除") {
  2398. // for (let row of this.selectionfeecList) {
  2399. // if (row.automaticGenerated == 1) {
  2400. // return this.$message.error("系统自动生成的费用不允许删除");
  2401. // }
  2402. // if (row.stlPid && row.accStatus != 0) {
  2403. // return this.$message.error("已生成账单,不允许删除");
  2404. // }
  2405. // if (row.stlPid && row.auditStatus != 0) {
  2406. // return this.$message.error("已申请费用,不允许删除");
  2407. // }
  2408. // }
  2409. let multiList = [];
  2410. let arr = [];
  2411. this.$confirm("确定将选择数据删除?", {
  2412. confirmButtonText: "确定",
  2413. cancelButtonText: "取消",
  2414. type: "warning"
  2415. }).then(() => {
  2416. multiList = this.selectionfeecList;
  2417. arr = this.form.feeCenterListC;
  2418. // 获取有id 的数据
  2419. const itemsWithId = multiList.filter(item => item.id != null);
  2420. let arrIds = itemsWithId.map(item => item.id); // 获取id 数据
  2421. // 把选中的删除掉
  2422. multiList.forEach(item => {
  2423. for (let index in arr) {
  2424. if (JSON.stringify(item) == JSON.stringify(arr[index])) {
  2425. arr.splice(Number(index), 1);
  2426. }
  2427. }
  2428. });
  2429. if (itemsWithId.length != 0) {
  2430. const loading = this.$loading({
  2431. lock: true,
  2432. text: "加载中",
  2433. spinner: "el-icon-loading",
  2434. background: "rgba(255,255,255,0.7)"
  2435. });
  2436. itemFeeRemove({ ids: arrIds.join(",") })
  2437. .then(res => {
  2438. this.$message.success("删除成功");
  2439. })
  2440. .finally(() => {
  2441. loading.close();
  2442. });
  2443. }
  2444. });
  2445. }
  2446. if (name == "提交订舱") {
  2447. if (this.verifySymbolStatus == 1) {
  2448. if (checkFullWidthSymbols(this.form.detail.hshipperDetails).hasFullWidth) {
  2449. let msg = [];
  2450. for (let item of checkFullWidthSymbols(this.form.detail.hshipperDetails).positions) {
  2451. msg.push(`第${item.row}行的"${item.symbol}"`);
  2452. }
  2453. this.$message({
  2454. dangerouslyUseHTMLString: true,
  2455. message: `发货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  2456. type: "error"
  2457. });
  2458. return;
  2459. }
  2460. if (checkFullWidthSymbols(this.form.detail.hconsigneeDetails).hasFullWidth) {
  2461. let msg = [];
  2462. for (let item of checkFullWidthSymbols(this.form.detail.hconsigneeDetails).positions) {
  2463. msg.push(`第${item.row}行的"${item.symbol}"`);
  2464. }
  2465. this.$message({
  2466. dangerouslyUseHTMLString: true,
  2467. message: `收货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  2468. type: "error"
  2469. });
  2470. return;
  2471. }
  2472. if (checkFullWidthSymbols(this.form.detail.hnotifyDetails).hasFullWidth) {
  2473. let msg = [];
  2474. for (let item of checkFullWidthSymbols(this.form.detail.hnotifyDetails).positions) {
  2475. msg.push(`第${item.row}行的"${item.symbol}"`);
  2476. }
  2477. this.$message({
  2478. dangerouslyUseHTMLString: true,
  2479. message: `通知人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  2480. type: "error"
  2481. });
  2482. return;
  2483. }
  2484. if (checkFullWidthSymbols(this.form.marks).hasFullWidth) {
  2485. let msg = [];
  2486. for (let item of checkFullWidthSymbols(this.form.marks).positions) {
  2487. msg.push(`第${item.row}行的"${item.symbol}"`);
  2488. }
  2489. this.$message({
  2490. dangerouslyUseHTMLString: true,
  2491. message: `唛头:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  2492. type: "error"
  2493. });
  2494. return;
  2495. }
  2496. if (checkFullWidthSymbols(this.form.commodityDescr).hasFullWidth) {
  2497. let msg = [];
  2498. for (let item of checkFullWidthSymbols(this.form.commodityDescr).positions) {
  2499. msg.push(`第${item.row}行的"${item.symbol}"`);
  2500. }
  2501. this.$message({
  2502. dangerouslyUseHTMLString: true,
  2503. message: `货描:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  2504. type: "error"
  2505. });
  2506. return;
  2507. }
  2508. }
  2509. if (!this.form.preContainersList.length) {
  2510. return this.$message.error("集装箱明细不能为空");
  2511. }
  2512. let htmlText = [];
  2513. for (let item of this.form.preContainersList) {
  2514. if (!item.id) {
  2515. return this.$message.error("请保存数据");
  2516. }
  2517. if (!item.cntrTypeCode || !item.quantity) {
  2518. this.$refs.crud.rowCell(item, item.$index);
  2519. return this.$message.error("请完善明细信息");
  2520. }
  2521. htmlText.push(item.cntrTypeCode + "*" + item.quantity);
  2522. }
  2523. for (let item of this.form.containersList) {
  2524. if (!item.id) {
  2525. return this.$message.error("请保存数据");
  2526. }
  2527. }
  2528. submit(this.form).then(res => {
  2529. this.$confirm(`预定集装箱:${htmlText.join(",")}<br/>是否提交订舱?`, {
  2530. confirmButtonText: "确定",
  2531. cancelButtonText: "取消",
  2532. dangerouslyUseHTMLString: true,
  2533. type: "warning"
  2534. }).then(() => {
  2535. this.form.businessType = "KHTS";
  2536. this.form.billNoFormat = "KHTS";
  2537. this.form.businessTypeCode = "KHTS";
  2538. const loading = this.$loading({
  2539. lock: true,
  2540. text: "加载中",
  2541. spinner: "el-icon-loading",
  2542. background: "rgba(255,255,255,0.7)"
  2543. });
  2544. submitCustomerBooking(this.form)
  2545. .then(res => {
  2546. this.$message.success("操作成功");
  2547. this.getDetails(this.form.id);
  2548. })
  2549. .finally(() => {
  2550. loading.close();
  2551. });
  2552. });
  2553. });
  2554. }
  2555. if (name == "撤销订舱") {
  2556. this.$confirm("是否撤销订舱?", {
  2557. confirmButtonText: "确定",
  2558. cancelButtonText: "取消",
  2559. type: "warning"
  2560. }).then(() => {
  2561. const loading = this.$loading({
  2562. lock: true,
  2563. text: "加载中",
  2564. spinner: "el-icon-loading",
  2565. background: "rgba(255,255,255,0.7)"
  2566. });
  2567. revokeCustomerBooking(this.form)
  2568. .then(res => {
  2569. this.$message.success("操作成功");
  2570. this.getDetails(this.form.id);
  2571. })
  2572. .finally(() => {
  2573. loading.close();
  2574. });
  2575. });
  2576. }
  2577. if (name == "提单修改") {
  2578. this.flxDisabled = false;
  2579. this.isSaveBtn = false;
  2580. this.editDisabled = false;
  2581. this.optionForm.disabled = false;
  2582. }
  2583. if (name == "提单确认") {
  2584. if (this.form.containersList.length == 0) {
  2585. return this.$message.error("配箱信息不能为空");
  2586. }
  2587. for (let item of this.form.containersList) {
  2588. let textList = [];
  2589. if (!item.cntrTypeCode) {
  2590. textList.push("箱型");
  2591. }
  2592. if (!item.cntrNo) {
  2593. textList.push("箱号");
  2594. }
  2595. if (!item.sealNo) {
  2596. textList.push("封号");
  2597. }
  2598. if (!item.quantity || Number(item.quantity) == 0) {
  2599. textList.push("件数");
  2600. }
  2601. if (!item.grossWeight || Number(item.grossWeight) == 0) {
  2602. textList.push("毛重");
  2603. }
  2604. if (!item.measurement || Number(item.measurement) == 0) {
  2605. textList.push("尺码/体积");
  2606. }
  2607. if (textList.length) {
  2608. return this.$message.error(`请完善配箱信息的${textList.join(",")}!`);
  2609. }
  2610. }
  2611. submit(this.form).then(res => {
  2612. this.form = res.data.data;
  2613. this.$confirm("是否提单确认?", {
  2614. confirmButtonText: "确定",
  2615. cancelButtonText: "取消",
  2616. type: "warning"
  2617. }).then(() => {
  2618. const loading = this.$loading({
  2619. lock: true,
  2620. text: "加载中",
  2621. spinner: "el-icon-loading",
  2622. background: "rgba(255,255,255,0.7)"
  2623. });
  2624. submitConfirm(this.form)
  2625. .then(res => {
  2626. this.$message.success("操作成功");
  2627. this.getDetails(this.form.id);
  2628. })
  2629. .finally(() => {
  2630. loading.close();
  2631. });
  2632. });
  2633. });
  2634. }
  2635. if (name == "模板保存") {
  2636. this.$DialogForm.show({
  2637. title: "订舱模板",
  2638. width: "30%",
  2639. // data: this.assemblyForm.hmmEdi,
  2640. menuPosition: "right",
  2641. option: {
  2642. submitText: "确定",
  2643. emptyText: "取消",
  2644. column: [
  2645. {
  2646. label: "模板名称",
  2647. span: 24,
  2648. prop: "templatesName",
  2649. rules: [
  2650. {
  2651. required: true,
  2652. message: "请输入模板名称",
  2653. trigger: "blur"
  2654. }
  2655. ]
  2656. }
  2657. ]
  2658. },
  2659. beforeClose: done => {
  2660. done();
  2661. },
  2662. callback: res => {
  2663. res.done();
  2664. console.log(res);
  2665. this.form.businessType = "KHDC";
  2666. this.form.billNoFormat = "DCMB";
  2667. this.form.businessTypeCode = "KHDC";
  2668. let obj = {
  2669. ...this.form,
  2670. templatesName: res.data.templatesName
  2671. };
  2672. const loading = this.$loading({
  2673. lock: true,
  2674. text: "加载中",
  2675. spinner: "el-icon-loading",
  2676. background: "rgba(255,255,255,0.7)"
  2677. });
  2678. submitCommonTemplates(obj)
  2679. .then(res => {
  2680. this.$message.success("操作成功");
  2681. })
  2682. .finally(() => {
  2683. loading.close();
  2684. });
  2685. res.close();
  2686. }
  2687. });
  2688. }
  2689. if (name == "导入模板") {
  2690. this.$refs.importTemp.openDialog();
  2691. }
  2692. if (name == "退舱") {
  2693. this.$confirm("是否退舱?", {
  2694. confirmButtonText: "确定",
  2695. cancelButtonText: "取消",
  2696. type: "warning"
  2697. }).then(() => {
  2698. const loading = this.$loading({
  2699. lock: true,
  2700. text: "加载中",
  2701. spinner: "el-icon-loading",
  2702. background: "rgba(255,255,255,0.7)"
  2703. });
  2704. refundCabin(this.form)
  2705. .then(res => {
  2706. this.$message.success("操作成功");
  2707. this.getDetails(this.form.id);
  2708. })
  2709. .finally(() => {
  2710. loading.close();
  2711. });
  2712. });
  2713. }
  2714. },
  2715. submit(type) {
  2716. this.$refs["form"].validate(valid => {
  2717. if (valid) {
  2718. if (!this.form.detail.hshipperDetails) {
  2719. return this.$message.error("请输入发货人提单描述");
  2720. }
  2721. if (!this.form.detail.hconsigneeDetails) {
  2722. return this.$message.error("请输入收货人提单描述");
  2723. }
  2724. if (!this.form.detail.hnotifyDetails) {
  2725. return this.$message.error("请输入通知人提单描述");
  2726. }
  2727. if (this.verifySymbolStatus == 1) {
  2728. if (checkFullWidthSymbols(this.form.detail.hshipperDetails).hasFullWidth) {
  2729. let msg = [];
  2730. for (let item of checkFullWidthSymbols(this.form.detail.hshipperDetails).positions) {
  2731. msg.push(`第${item.row}行的"${item.symbol}"`);
  2732. }
  2733. this.$message({
  2734. dangerouslyUseHTMLString: true,
  2735. message: `发货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  2736. type: "error"
  2737. });
  2738. return;
  2739. }
  2740. if (checkFullWidthSymbols(this.form.detail.hconsigneeDetails).hasFullWidth) {
  2741. let msg = [];
  2742. for (let item of checkFullWidthSymbols(this.form.detail.hconsigneeDetails).positions) {
  2743. msg.push(`第${item.row}行的"${item.symbol}"`);
  2744. }
  2745. this.$message({
  2746. dangerouslyUseHTMLString: true,
  2747. message: `收货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  2748. type: "error"
  2749. });
  2750. return;
  2751. }
  2752. if (checkFullWidthSymbols(this.form.detail.hnotifyDetails).hasFullWidth) {
  2753. let msg = [];
  2754. for (let item of checkFullWidthSymbols(this.form.detail.hnotifyDetails).positions) {
  2755. msg.push(`第${item.row}行的"${item.symbol}"`);
  2756. }
  2757. this.$message({
  2758. dangerouslyUseHTMLString: true,
  2759. message: `通知人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  2760. type: "error"
  2761. });
  2762. return;
  2763. }
  2764. if (checkFullWidthSymbols(this.form.marks).hasFullWidth) {
  2765. let msg = [];
  2766. for (let item of checkFullWidthSymbols(this.form.marks).positions) {
  2767. msg.push(`第${item.row}行的"${item.symbol}"`);
  2768. }
  2769. this.$message({
  2770. dangerouslyUseHTMLString: true,
  2771. message: `唛头:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  2772. type: "error"
  2773. });
  2774. return;
  2775. }
  2776. if (checkFullWidthSymbols(this.form.commodityDescr).hasFullWidth) {
  2777. let msg = [];
  2778. for (let item of checkFullWidthSymbols(this.form.commodityDescr).positions) {
  2779. msg.push(`第${item.row}行的"${item.symbol}"`);
  2780. }
  2781. this.$message({
  2782. dangerouslyUseHTMLString: true,
  2783. message: `货描:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
  2784. type: "error"
  2785. });
  2786. return;
  2787. }
  2788. }
  2789. for (let row of this.form.preContainersList) {
  2790. if (!row.cntrTypeCode || !row.quantity) {
  2791. this.$refs.crud.rowCell(row, row.$index);
  2792. return this.$message.error("请完善明细信息");
  2793. }
  2794. }
  2795. // for (let row of this.form.feeCenterListC) {
  2796. // row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD
  2797. // row.amountNet = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD
  2798. // if (!row.corpType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
  2799. // this.$refs.crud2.rowCell(row, row.$index)
  2800. // return this.$message.error("请完善费用明细");
  2801. // }
  2802. // }
  2803. this.form.billDate = this.form.etd;
  2804. this.form.businessType = "KHTS";
  2805. this.form.billNoFormat = "KHTS";
  2806. this.form.businessTypeCode = "KHTS";
  2807. // this.form.billNoFormat = 'COC'
  2808. // this.form.businessTypeCode = 'COC'
  2809. const loading = this.$loading({
  2810. lock: true,
  2811. text: "加载中",
  2812. spinner: "el-icon-loading",
  2813. background: "rgba(255,255,255,0.7)"
  2814. });
  2815. submit(this.form)
  2816. .then(res => {
  2817. this.$message.success("保存成功");
  2818. this.getDetails(res.data.data.id);
  2819. })
  2820. .finally(() => {
  2821. loading.close();
  2822. });
  2823. } else {
  2824. return false;
  2825. }
  2826. });
  2827. },
  2828. application() {
  2829. if (!this.form.preContainersList.length) {
  2830. return this.$message.error("集装箱明细不能为空");
  2831. }
  2832. this.$confirm("是否提单确认?", {
  2833. confirmButtonText: "确定",
  2834. cancelButtonText: "取消",
  2835. type: "warning"
  2836. }).then(() => {
  2837. let obj = {};
  2838. obj = {
  2839. id: this.form.id,
  2840. url: "/iosBasicData/businessCenter/customerBooking/index",
  2841. pageStatus: "",
  2842. pageLabel: "客户订舱 "
  2843. };
  2844. const loading = this.$loading({
  2845. lock: true,
  2846. text: "加载中",
  2847. spinner: "el-icon-loading",
  2848. background: "rgba(255,255,255,0.7)"
  2849. });
  2850. pleaseCheck(obj)
  2851. .then(res => {
  2852. this.$message.success("请核成功");
  2853. this.getDetails(res.data.data.id);
  2854. })
  2855. .finally(() => {
  2856. loading.close();
  2857. });
  2858. });
  2859. },
  2860. revokeApplication() {
  2861. this.$confirm("确定撤销请核?", {
  2862. confirmButtonText: "确定",
  2863. cancelButtonText: "取消",
  2864. type: "warning"
  2865. }).then(() => {
  2866. let obj = {};
  2867. obj = {
  2868. id: this.form.id
  2869. };
  2870. const loading = this.$loading({
  2871. lock: true,
  2872. text: "加载中",
  2873. spinner: "el-icon-loading",
  2874. background: "rgba(255,255,255,0.7)"
  2875. });
  2876. repealCancel(obj)
  2877. .then(res => {
  2878. this.$message.success("撤销请核成功");
  2879. this.getDetails(res.data.data.id);
  2880. this.editDisabled = false;
  2881. this.optionForm.disabled = false;
  2882. })
  2883. .finally(() => {
  2884. loading.close();
  2885. });
  2886. });
  2887. },
  2888. //请核关闭
  2889. choceScheduleFun() {
  2890. this.checkScheduleDialog = false;
  2891. },
  2892. //自定义列保存
  2893. async saveColumn(ref, option, optionBack, code) {
  2894. const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
  2895. if (inSave) {
  2896. this.$message.success("保存成功");
  2897. //关闭窗口
  2898. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  2899. }
  2900. },
  2901. //自定义列重置
  2902. async resetColumn(ref, option, optionBack, code) {
  2903. this[option] = this[optionBack];
  2904. const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
  2905. if (inSave) {
  2906. this.$message.success("重置成功");
  2907. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  2908. }
  2909. },
  2910. // 更改表格颜色
  2911. headerClassName(tab) {
  2912. //颜色间隔
  2913. let back = "";
  2914. if (tab.columnIndex >= 0 && tab.column.level === 1) {
  2915. if (tab.columnIndex % 2 === 0) {
  2916. back = "back-one";
  2917. } else if (tab.columnIndex % 2 === 1) {
  2918. back = "back-two";
  2919. }
  2920. }
  2921. return back;
  2922. },
  2923. goBack(type) {
  2924. if (this.form.issueStatus > 0 && this.form.whetherModify == 0) {
  2925. for (let item of this.form.preContainersList) {
  2926. const names = item.cntrTypeCode + "+" + item.quantity;
  2927. if (names != item.whetherModifyJson) {
  2928. return this.$message.error("请提交箱型");
  2929. }
  2930. }
  2931. }
  2932. this.$emit("goBack");
  2933. }
  2934. }
  2935. };
  2936. </script>
  2937. <style lang="scss" scoped>
  2938. ::v-deep .el-form-item__error {
  2939. display: none !important;
  2940. }
  2941. ::v-deep .el-form-item {
  2942. margin-bottom: 8px !important;
  2943. }
  2944. ::v-deep .el-table .cell {
  2945. padding: 0 2px !important;
  2946. .el-form-item {
  2947. margin-bottom: 0px !important;
  2948. }
  2949. }
  2950. ::v-deep .avue-crud .el-table .el-form-item__label {
  2951. left: -1px;
  2952. }
  2953. // ::v-deep#out-table .back-one {
  2954. // background: #ecf5ff !important;
  2955. // }
  2956. // ::v-deep#out-table .back-two {
  2957. // background: #ecf5ff !important;
  2958. // }
  2959. ::v-deep #out-table .back-one {
  2960. background: #ecf5ff !important;
  2961. text-align: center;
  2962. padding: 4px 0;
  2963. }
  2964. ::v-deep #out-table .back-two {
  2965. background: #ecf5ff !important;
  2966. text-align: center;
  2967. padding: 4px 0;
  2968. }
  2969. ::v-deep .el-table--small td,
  2970. .el-table--small th {
  2971. padding: 2px !important;
  2972. }
  2973. ::v-deep .el-card__body {
  2974. padding: 3px 10px;
  2975. }
  2976. ::v-deep .box-card .el-card__body {
  2977. padding: 4px !important;
  2978. }
  2979. ::v-deep .el-form-item__content {
  2980. line-height: 32px !important;
  2981. }
  2982. .disabledBox {
  2983. display: flex;
  2984. align-items: center;
  2985. }
  2986. .meetSize {
  2987. font-size: 16px;
  2988. color: #54bcbd;
  2989. }
  2990. </style>