detailsPage.vue 117 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648
  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"
  6. @click="goBack(0)">返回列表
  7. </el-button>
  8. </div>
  9. <div class="add-customer-btn">
  10. <el-button size="small" style="margin-right: 8px" :disabled="!form.id"
  11. @click="$refs.print.openDialog()">预 览
  12. </el-button>
  13. <el-button v-if="roleName.indexOf('admin') != -1" size="small" style="margin-right: 8px"
  14. :disabled="!form.id" @click="$refs.report.openDialog()">报表设计
  15. </el-button>
  16. <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
  17. v-if="editButton"
  18. :disabled="showLock || !(roleName.indexOf('admin') != -1 || roleName.indexOf('允许修改他人业务') != -1 || saberUserInfo.user_id == form.createUser || saberUserInfo.user_name == form.operatorName)"
  19. @click="inEdit">编 辑
  20. </el-button>
  21. <el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
  22. :disabled="isSaveBtn" @click="submit">保 存
  23. </el-button>
  24. <el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success"
  25. size="small" :disabled="(form.status != 0 && form.status != 4)" @click="application">单据请核
  26. </el-button>
  27. <el-button v-if="form.status == 1" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
  28. size="small" @click="revokeApplication">撤销单据请核
  29. </el-button>
  30. <el-dropdown style="line-height: 0">
  31. <el-button class="el-button--small-yh" style="margin-left: 6px;" type="warning" :disabled="!form.id"
  32. size="small">
  33. 审 批<i class="el-icon-arrow-down el-icon--right"></i>
  34. </el-button>
  35. <el-dropdown-menu slot="dropdown">
  36. <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">审核进度
  37. </el-dropdown-item>
  38. </el-dropdown-menu>
  39. </el-dropdown>
  40. </div>
  41. </div>
  42. <div style="margin-top: 50px">
  43. <trade-card title="基础信息">
  44. <avue-form :option="optionForm" v-model="form" ref="form">
  45. <template slot="corpCnNameLabel">
  46. <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">客户:</span>
  47. </template>
  48. <template slot="hshipperCnNameLabel">
  49. <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">发货人:</span>
  50. </template>
  51. <template slot="hconsigneeCnNameLabel">
  52. <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">收货人:</span>
  53. </template>
  54. <template slot="mnotifyCntyCodeLabel">
  55. <span style="color: #1e9fff;cursor: pointer;" @click="inJump('原产地')">原产地:</span>
  56. </template>
  57. <template slot="polCnNameLabel">
  58. <span style="color: #1e9fff;cursor: pointer;" @click="inJump('港口')">起运港:</span>
  59. </template>
  60. <template slot="podCnNameLabel">
  61. <span style="color: #1e9fff;cursor: pointer;" @click="inJump('港口')">目的港:</span>
  62. </template>
  63. <template slot="vesselCnNameLabel">
  64. <span style="color: #1e9fff;cursor: pointer;" @click="inJump('船名')">船名:</span>
  65. </template>
  66. <template slot="carrierCnNameLabel">
  67. <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">船公司:</span>
  68. </template>
  69. <template slot="bookingAgentCnNameLabel">
  70. <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">船代:</span>
  71. </template>
  72. <template slot="hscodeLabel">
  73. <span style="color: #1e9fff;cursor: pointer;" @click="inJump('HSCODE')">HSCODE:</span>
  74. </template>
  75. <template slot="packingUnitLabel">
  76. <span style="color: #1e9fff;cursor: pointer;" @click="inJump('包装')">包装:</span>
  77. </template>
  78. <tempalte slot="corpCnName">
  79. <dic-select v-model="form.corpCnName" placeholder="客户" key="id" label="cnName" res="records"
  80. url="/blade-los/bcorps/listByType?corpTypeName=客户" :filterable="true" :remote="true"
  81. dataName="cnName" @selectChange="dicChange('corpCnName', $event)"
  82. :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
  83. :searchShow="true"></dic-select>
  84. </tempalte>
  85. <tempalte slot="polCnName">
  86. <dic-select v-model="form.polCnName" placeholder="起运港" key="id" label="cnName" res="records"
  87. url="/blade-los/bports/list" :filterable="true" :remote="true" dataName="cnName"
  88. @selectChange="dicChange('polCnName', $event)"
  89. :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
  90. :searchShow="true"></dic-select>
  91. </tempalte>
  92. <tempalte slot="podCnName">
  93. <dic-select v-model="form.podCnName" placeholder="目的港" key="id" label="cnName" res="records"
  94. url="/blade-los/bports/list" :filterable="true" :remote="true" dataName="cnName"
  95. @selectChange="dicChange('podCnName', $event)"
  96. :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
  97. :searchShow="true"></dic-select>
  98. </tempalte>
  99. <tempalte slot="mnotifyCntyName" slot-scope="{ row }">
  100. <dic-select v-model="form.detail.mnotifyCntyName" placeholder="运输方式" key="dictKey"
  101. label="dictValue" url="/blade-system/dict-biz/dictionary?code=mode_transport"
  102. :filterable="true" :disabled="editDisabled"></dic-select>
  103. </tempalte>
  104. <tempalte slot="mshipperCntyName" slot-scope="{ row }">
  105. <dic-select v-model="form.detail.mshipperCntyName" placeholder="贸易方式" key="dictKey"
  106. label="dictValue" url="/blade-system/dict-biz/dictionary?code=trade_Mode" :filterable="true"
  107. :disabled="editDisabled"></dic-select>
  108. </tempalte>
  109. <tempalte slot="mconsigneeCntyCode" slot-scope="{ row }">
  110. <dic-select v-model="form.detail.mconsigneeCntyCode" placeholder="放单方式" key="dictKey"
  111. label="dictValue" url="/blade-system/dict-biz/dictionary?code=release_method"
  112. :filterable="true" :disabled="editDisabled"></dic-select>
  113. </tempalte>
  114. <tempalte slot="mnotify2CntyName" slot-scope="{ row }">
  115. <el-input v-model="form.detail.mnotify2CntyName" placeholder="请输入 报关单号" :disabled="editDisabled">
  116. </el-input>
  117. </tempalte>
  118. <!-- <tempalte slot="srcCnName">
  119. <dic-select v-model="form.srcCnName" placeholder="业务员" key="id" label="realName" res="records"
  120. url="/blade-user/page" :filterable="true" :remote="true" dataName="realName"
  121. @selectChange="dicChange('srcCnName', $event)" :disabled="editDisabled"></dic-select>
  122. </tempalte> -->
  123. <tempalte slot="srcType" slot-scope="{ row }">
  124. <div style="display: flex;">
  125. <dic-select style="margin-right: 4px;" v-model="form.srcType" placeholder="业务来源"
  126. key="dictKey" keyValue="dictKey" label="dictValue"
  127. url="/blade-system/dict-biz/dictionary?code=source_Type" :filterable="true"
  128. :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
  129. @selectChange="dicChange('srcType', $event)"></dic-select>
  130. <el-input v-show="!form.srcType" v-model="form.srcCnName" placeholder="请选择"
  131. :disabled="true">
  132. </el-input>
  133. <dic-select v-show="form.srcType == 'OWN'" v-model="form.srcCnName" placeholder="所属公司"
  134. key="id" label="deptName" url="/blade-system/dept/lazy-list?parentId=0"
  135. :filterable="true" @selectChange="dicChange('srcCnName', $event)"
  136. :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"></dic-select>
  137. <dic-select v-show="form.srcType == 'AGENT'" v-model="form.srcCnName" placeholder="代理"
  138. key="id" label="cnName" res="records"
  139. url="/blade-los/bcorps/listByType?corpTypeName=代理客户" :filterable="true" :remote="true"
  140. dataName="cnName" @selectChange="dicChange('srcCnName', $event)"
  141. :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"></dic-select>
  142. <dic-select v-show="form.srcType == 'SALES'" v-model="form.srcCnName" placeholder="业务员"
  143. key="id" label="realName" res="records" url="/blade-user/page" :filterable="true"
  144. :remote="true" dataName="realName" @selectChange="dicChange('srcCnName', $event)"
  145. :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"></dic-select>
  146. </div>
  147. </tempalte>
  148. <tempalte slot="hshipperCnName">
  149. <dic-select v-model="form.detail.hshipperCnName" placeholder="发货人" key="id" label="cnName"
  150. res="records" url="/blade-los/bcorps/listByType?corpTypeName=国外工厂" :filterable="true"
  151. :remote="true" dataName="cnName" @selectChange="dicChange('hshipperCnName', $event)"
  152. :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
  153. :searchShow="true"></dic-select>
  154. </tempalte>
  155. <tempalte slot="hconsigneeCnName">
  156. <dic-select v-model="form.detail.hconsigneeCnName" placeholder="收货人" key="id" label="cnName"
  157. res="records" url="/blade-los/bcorps/listByType?corpTypeName=国内贸易商" :filterable="true"
  158. :remote="true" dataName="cnName" @selectChange="dicChange('hconsigneeCnName', $event)"
  159. :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
  160. :searchShow="true"></dic-select>
  161. </tempalte>
  162. <tempalte slot="carrierCnName">
  163. <dic-select v-model="form.carrierCnName" placeholder="船公司" key="id" label="cnName" res="records"
  164. url="/blade-los/bcorps/listByType?corpTypeName=船公司" :filterable="true" :remote="true"
  165. dataName="cnName" @selectChange="dicChange('carrierCnName', $event)"
  166. :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"></dic-select>
  167. </tempalte>
  168. <tempalte slot="bookingAgentCnName">
  169. <dic-select v-model="form.bookingAgentCnName" placeholder="船代" key="id" label="cnName"
  170. res="records" url="/blade-los/bcorps/listByType?corpTypeName=船代" :filterable="true"
  171. :remote="true" dataName="cnName" @selectChange="dicChange('bookingAgentCnName', $event)"
  172. :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
  173. :searchShow="true"></dic-select>
  174. </tempalte>
  175. <!-- <template slot="hscode">
  176. <div style="display:flex;">
  177. <dic-select v-model="form.hscode" placeholder="品名" key="id" res="records" label="hsCode"
  178. url="/blade-los/bcommodity/list" :filterable="true" :remote="true" dataName="hsCode"
  179. @selectChange="dicChange('hscode', $event)"
  180. :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"></dic-select>
  181. <el-input style="margin-left: 10px;" v-model="form.commodityCnName" placeholder="请输入品名"
  182. :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"></el-input>
  183. </div>
  184. </template> -->
  185. <tempalte slot="mnotifyCntyCode" slot-scope="{ row }">
  186. <dic-select v-model="form.detail.mnotifyCntyCode" placeholder="原产地" key="id" label="cnName"
  187. res="records" url="/blade-los/bcountrys/list" :filterable="true" :remote="true"
  188. dataName="cnName"
  189. :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
  190. @selectChange="dicChange('mnotifyCntyCode', $event)" :searchShow="true"></dic-select>
  191. </tempalte>
  192. <tempalte slot="operatorName">
  193. <dic-select v-model="form.operatorName" placeholder="操作员" key="id" label="realName"
  194. res="records" url="/blade-user/page" :filterable="true" :remote="true" dataName="realName"
  195. :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
  196. @selectChange="dicChange('operatorName', $event)"></dic-select>
  197. </tempalte>
  198. <tempalte slot="remarks">
  199. <el-input type="textarea" :rows="2" placeholder="请输入 备注" v-model="form.remarks"
  200. :disabled="editButton">
  201. </el-input>
  202. </tempalte>
  203. </avue-form>
  204. </trade-card>
  205. <trade-card title="箱信息">
  206. <avue-crud :option="option" :data="form.preContainersList" id="out-table" ref="crud"
  207. @selection-change="selectionChange" @resetColumn="resetColumn('crud', 'option', 'optionBack', 388)"
  208. @saveColumn="saveColumn('crud', 'option', 'optionBack', 388)">
  209. <template slot="indexHeader" slot-scope="{row,index}">
  210. <el-button type="primary" size="mini" icon="el-icon-plus"
  211. :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
  212. circle @click="addRow()">
  213. </el-button>
  214. </template>
  215. <template slot="cntrTypeCodeHeader" slot-scope="{column}">
  216. <span style="color: #1e9fff;cursor: pointer;" @click="inJump('箱型')">{{ (column || {}).label
  217. }}</span>
  218. </template>
  219. <template slot="goodsNameHeader" slot-scope="{column}">
  220. <span style="color: #1e9fff;cursor: pointer;" @click="inJump('HSCODE')">{{ (column || {}).label
  221. }}</span>
  222. </template>
  223. <template slot="hsCodeHeader" slot-scope="{column}">
  224. <span style="color: #1e9fff;cursor: pointer;" @click="inJump('HSCODE')">{{ (column || {}).label
  225. }}</span>
  226. </template>
  227. <template slot="goodsTypeHeader" slot-scope="{column}">
  228. <span style="color: #1e9fff;cursor: pointer;" @click="inJump('类型')">{{ (column || {}).label
  229. }}</span>
  230. </template>
  231. <template slot="index" slot-scope="{row,index}">
  232. <span>{{ index + 1 }}</span>
  233. </template>
  234. <template slot="cntrTypeCode" slot-scope="{ row }">
  235. <dic-select v-if="row.$cellEdit && !row.srcId" v-model="row.cntrTypeCode" placeholder="箱型"
  236. key="id" res="records" label="cnName" url="/blade-los/bcntrtypes/list" :filterable="true"
  237. :remote="true" dataName="cnName"></dic-select>
  238. <span v-else>{{ row.cntrTypeCode }}</span>
  239. </template>
  240. <template slot="boxNo" slot-scope="{ row }">
  241. <el-input v-if="row.$cellEdit && !row.srcId" v-model="row.boxNo" placeholder="请输入内容"
  242. size="small"></el-input>
  243. <span v-else>{{ row.boxNo }}</span>
  244. </template>
  245. <template slot="hsCodeForm" slot-scope="{ row }">
  246. <dic-select v-if="row.$cellEdit" v-model="row.hsCode" placeholder="HSCODE" key="id"
  247. res="records" label="hsCode" url="/blade-los/bcommodity/list" :filterable="true"
  248. :remote="true" dataName="hsCode"
  249. @selectChange="rowDicChange('hsCode', $event, row)"></dic-select>
  250. <span v-else>{{ row.hsCode }}</span>
  251. </template>
  252. <template slot="goodsName" slot-scope="{ row }">
  253. <dic-select v-if="row.$cellEdit && !row.srcId" v-model="row.goodsName" placeholder="品名" key="id"
  254. res="records" label="cnName" url="/blade-los/bcommodity/list" :filterable="true"
  255. :remote="true" dataName="cnName"
  256. @selectChange="rowDicChange('goodsName', $event, row)"></dic-select>
  257. <span v-else>{{ row.goodsName }}</span>
  258. </template>
  259. <tempalte slot="goodsType" slot-scope="{ row }">
  260. <dic-select v-if="row.$cellEdit && !row.srcId" v-model="row.goodsType" placeholder="类型"
  261. key="dictKey" label="dictValue" url="/blade-system/dict-biz/dictionary?code=goods-type"
  262. :filterable="true"></dic-select>
  263. <span v-else>{{ row.goodsType }}</span>
  264. </tempalte>
  265. <tempalte slot="number" slot-scope="{ row }">
  266. <el-input-number v-if="row.$cellEdit && !row.srcId" v-model="row.number" :controls="false"
  267. placeholder="请输入 件数" size="small" style="width: 100%;"
  268. @change="amountChange(row)"></el-input-number>
  269. <span v-else>{{ row.number }}</span>
  270. </tempalte>
  271. <tempalte slot="netWeight" slot-scope="{ row }">
  272. <el-input-number v-if="row.$cellEdit && !row.srcId" v-model="row.netWeight" :controls="false"
  273. placeholder="请输入 净重" size="small" style="width: 100%;"></el-input-number>
  274. <span v-else>{{ row.netWeight }}</span>
  275. </tempalte>
  276. <tempalte slot="amount" slot-scope="{ row }">
  277. <el-input-number v-if="row.$cellEdit && !row.srcId" v-model="row.amount" :controls="false"
  278. placeholder="请输入 总金额" size="small" style="width: 100%;"
  279. @change="amountChange(row)"></el-input-number>
  280. <span v-else>{{ row.amount }}</span>
  281. </tempalte>
  282. <template slot="menu" slot-scope="{ row, index }">
  283. <el-button size="small" type="text" :disabled="editDisabled || row.whetherDispatchVehicles == 1"
  284. @click="rowCell('箱编辑', row, index)">{{ row.$cellEdit ? '保 存' : '编 辑' }}</el-button>
  285. <el-button size="small" type="text" :disabled="editDisabled || row.type == 2"
  286. @click="rowCell('派车', row, index)">{{ row.type == 1 ? '撤销派车' : '派车' }}</el-button>
  287. <el-button size="small" type="text" :disabled="editDisabled || row.type == 1"
  288. @click="rowCell('自提', row, index)">{{ row.type == 2 ? '撤销自提' : '自 提' }}</el-button>
  289. <el-button size="small" type="text" :disabled="editDisabled || row.whetherDispatchVehicles == 1"
  290. @click="rowCell('箱删除', row, index)">删 除</el-button>
  291. </template>
  292. </avue-crud>
  293. </trade-card>
  294. <trade-card title="派车">
  295. <avue-crud :option="option2" :data="form.dispatchVehiclesList" id="out-table" ref="crud2"
  296. @selection-change="selectionChange"
  297. @resetColumn="resetColumn('crud2', 'option2', 'optionBack2', 389)"
  298. @saveColumn="saveColumn('crud2', 'option2', 'optionBack2', 389)">
  299. <tempalte slot="fleetName" slot-scope="{ row, index }">
  300. <dic-select v-if="row.$cellEdit" v-model="row.fleetName" placeholder="承运车队" key="id"
  301. label="cnName" res="records" url="/blade-los/bcorps/listByType?corpTypeName=车队"
  302. :filterable="true" :remote="true" dataName="cnName"
  303. @selectChange="rowDicChange('fleetName', $event, row)"
  304. :disabled="editDisabled"></dic-select>
  305. <span v-else>{{ row.fleetName }}</span>
  306. </tempalte>
  307. <tempalte slot="pickupAddressName" slot-scope="{ row, index }">
  308. <dic-select v-if="row.$cellEdit" v-model="row.pickupAddressName" placeholder="提箱地点" key="id"
  309. label="cnName" res="records" url="/blade-los/blocations/list" :filterable="true"
  310. :remote="true" dataName="cnName"
  311. @selectChange="rowDicChange('pickupAddressName', $event, row)"
  312. :disabled="editDisabled"></dic-select>
  313. <span v-else>{{ row.pickupAddressName }}</span>
  314. </tempalte>
  315. <tempalte slot="deliveryAddressName" slot-scope="{ row, index }">
  316. <dic-select v-if="row.$cellEdit" v-model="row.deliveryAddressName" placeholder="送货地点" key="id"
  317. label="cnName" res="records" url="/blade-los/blocations/list" :filterable="true"
  318. :remote="true" dataName="cnName"
  319. @selectChange="rowDicChange('deliveryAddressName', $event, row)"
  320. :disabled="editDisabled"></dic-select>
  321. <span v-else>{{ row.deliveryAddressName }}</span>
  322. </tempalte>
  323. <!-- <template slot="returnCyName" slot-scope="{ row }">
  324. <dic-select v-if="row.$cellEdit" v-model="row.returnCyName" placeholder="返空场站" key="id"
  325. label="cnName" res="records" url="/blade-los/bcorps/listByType?corpTypeName=场站"
  326. :filterable="true" :remote="true" dataName="cnName"
  327. @selectChange="rowDicChange('returnCyName', $event, row)"></dic-select>
  328. <span v-else>{{ row.returnCyName }}</span>
  329. </template> -->
  330. <template slot="menu" slot-scope="{ row, index }">
  331. <el-button size="small" type="text"
  332. :disabled="editDisabled || row.whetherDispatchVehicles == 1 || row.whetherWarehouseEntry == 1"
  333. @click="rowCell('派车编辑', row, index)">
  334. {{ row.$cellEdit ? '保 存' : '编 辑' }}
  335. </el-button>
  336. <el-button size="small" type="text" :disabled="editDisabled || row.$cellEdit"
  337. @click="rowCell('还箱', row, index)">{{ row.whetherReturn == 1 ? '撤销还箱' : '确认还箱'
  338. }}</el-button>
  339. <el-button size="small" type="text" :disabled="editDisabled || row.$cellEdit"
  340. @click="rowCell('送货派车', row, index)">{{ row.whetherInspection == 1 ? '撤销送货派车' : '送货派车'
  341. }}</el-button>
  342. <el-button size="small" type="text"
  343. :disabled="editDisabled || row.whetherWarehouseEntry == 1 || row.$cellEdit"
  344. @click="rowCell('入库派车', row, index)">
  345. {{ row.whetherDispatchVehicles == 1 ? '撤销入库派车' : '入库派车' }}
  346. </el-button>
  347. <el-button size="small" type="text" :disabled="editDisabled || row.$cellEdit"
  348. @click="rowCell('生成入库', row, index)">{{ row.whetherWarehouseEntry == 1 ? '撤销入库' : '入 库'
  349. }}</el-button>
  350. <!-- <el-button size="small" type="text"
  351. :disabled="editDisabled || row.whetherDispatchVehicles == 1 || row.whetherWarehouseEntry == 1"
  352. @click="rowCell('派车删除', row, index)">删 除</el-button> -->
  353. </template>
  354. </avue-crud>
  355. </trade-card>
  356. <trade-card title="入库">
  357. <avue-crud :option="option3" :data="form.inStorageList" id="out-table" ref="crud3"
  358. @selection-change="selectionChange"
  359. @resetColumn="resetColumn('crud3', 'option3', 'optionBack3', 390)"
  360. @saveColumn="saveColumn('crud3', 'option3', 'optionBack3', 390)">
  361. <template slot="storageUnitHeader" slot-scope="{column}">
  362. <span style="color: #1e9fff;cursor: pointer;" @click="inJump('入库单位')">{{ (column || {}).label
  363. }}</span>
  364. </template>
  365. <template slot="warehouseName" slot-scope="{ row }">
  366. <dic-select v-if="row.$cellEdit" v-model="row.warehouseName" placeholder="入库" key="id"
  367. label="cname" url="/blade-los/storage/list" res="records" :filterable="true" :remote="true"
  368. dataName="cname" @selectChange="rowDicChange('warehouseName', $event, row)"></dic-select>
  369. <span v-else>{{ row.warehouseName }}</span>
  370. </template>
  371. <template slot="menu" slot-scope="{ row, index }">
  372. <el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1"
  373. @click="rowCell('入库编辑', row, index)">
  374. {{ row.$cellEdit ? '保 存' : '编 辑' }}
  375. </el-button>
  376. <el-button size="small" type="text"
  377. :disabled="editDisabled || row.whetherInOutStorage == 1 || row.$cellEdit"
  378. @click="rowCell('入库确认', row, index)">
  379. {{ row.confirmDispatchVehicles == 1 ? '撤销确认' : '入库确认' }}
  380. </el-button>
  381. <el-button size="small" type="text"
  382. :disabled="editDisabled || row.surplusQuantity == 0 || row.$cellEdit"
  383. @click="rowCell('生成出库', row, index)">
  384. 出 库
  385. </el-button>
  386. <el-button size="small" type="text"
  387. :disabled="editDisabled || row.surplusQuantity == 0 || row.$cellEdit"
  388. @click="rowCell('撤销出库', row, index)">
  389. 撤销出库
  390. </el-button>
  391. <!-- <el-button size="small" type="text"
  392. :disabled="editDisabled || row.confirmDispatchVehicles == 1 || row.whetherInOutStorage == 1"
  393. @click="rowCell('入库删除', row, index)">删 除</el-button> -->
  394. </template>
  395. </avue-crud>
  396. </trade-card>
  397. <trade-card title="出库">
  398. <avue-crud :option="option4" :data="form.outStorageList" id="out-table" ref="crud4"
  399. @selection-change="selectionChange"
  400. @resetColumn="resetColumn('crud4', 'option4', 'optionBack4', 391)"
  401. @saveColumn="saveColumn('crud4', 'option4', 'optionBack4', 391)">
  402. <template slot="menu" slot-scope="{ row, index }">
  403. <el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1"
  404. @click="rowCell('出库编辑', row, index)">{{ row.$cellEdit ? '保 存' : '编 辑' }}</el-button>
  405. <el-button size="small" type="text" :disabled="editDisabled"
  406. @click="rowCell('出库确认', row, index)">{{
  407. row.confirmDispatchVehicles ==
  408. 1 ? '撤销确认' : '出库确认' }}</el-button>
  409. <el-button size="small" type="text" :disabled="editDisabled"
  410. @click="rowCell('开票', row, index)">开
  411. 票</el-button>
  412. <el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1"
  413. @click="rowCell('出库删除', row, index)">删 除</el-button>
  414. </template>
  415. </avue-crud>
  416. </trade-card>
  417. <trade-card title="费用明细">
  418. <fee-info ref="feeInfo" :form="form" :disabled="editDisabled" @getDetails="getDetails"></fee-info>
  419. </trade-card>
  420. <containerTitle title="上传附件"></containerTitle>
  421. <c-upload :data="form.filesList" :enumerationValue="76" deleteUrl="/api/blade-los/filescenter/remove"
  422. display :disabled="editButton"></c-upload>
  423. </div>
  424. <business-reports :id="form.id" ref="print" businessValue="HYJK" classifyCode="业务" groupCode="销售报告"
  425. :type="1"></business-reports>
  426. <reports :id="form.id" :assemblyForm="form" businessValue="HYJK" ref="report"></reports>
  427. <!--审核弹窗-->
  428. <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
  429. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  430. <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
  431. </el-dialog>
  432. <el-dialog append-to-body title="送货派车" :visible.sync="carVisible" width="40%" :close-on-click-modal="false"
  433. v-dialog-drag @closed="carClosed">
  434. <span>
  435. <avue-form :option="carOption" v-model="carForm">
  436. <tempalte slot="inspectionFleetName">
  437. <dic-select v-model="carForm.inspectionFleetName" placeholder="承运车队" key="id" label="cnName"
  438. res="records" url="/blade-los/bcorps/listByType?corpTypeName=车队" :filterable="true"
  439. :remote="true" dataName="cnName"
  440. @selectChange="dicChange('inspectionFleetName', $event)"></dic-select>
  441. </tempalte>
  442. </avue-form>
  443. </span>
  444. <span slot="footer" class="dialog-footer">
  445. <el-button @click="carVisible = false">取 消</el-button>
  446. <el-button type="primary" @click="carSubmit(carForm)">确 定</el-button>
  447. </span>
  448. </el-dialog>
  449. <el-dialog append-to-body title="还箱" :visible.sync="boxVisible" width="40%" :close-on-click-modal="false"
  450. v-dialog-drag @closed="boxClosed()">
  451. <span>
  452. <avue-form :option="boxOption" v-model="boxForm">
  453. <template slot="returnCyName">
  454. <dic-select v-model="boxForm.returnCyName" placeholder="返空场站" key="id" label="cnName"
  455. res="records" url="/blade-los/bcorps/listByType?corpTypeName=场站" :filterable="true"
  456. :remote="true" dataName="cnName"></dic-select>
  457. </template>
  458. </avue-form>
  459. </span>
  460. <span slot="footer" class="dialog-footer">
  461. <el-button @click="boxVisible = false">取 消</el-button>
  462. <el-button type="primary" @click="boxSubmit(boxForm)">确 定</el-button>
  463. </span>
  464. </el-dialog>
  465. <el-dialog append-to-body title="出库确认" :visible.sync="ckVisible" width="40%" :close-on-click-modal="false"
  466. v-dialog-drag @closed="ckClosed()">
  467. <span>
  468. <avue-form :option="ckOption" v-model="ckForm">
  469. </avue-form>
  470. </span>
  471. <span slot="footer" class="dialog-footer">
  472. <el-button @click="ckVisible = false">取 消</el-button>
  473. <el-button type="primary" @click="ckSubmit(ckForm)">确 定</el-button>
  474. </span>
  475. </el-dialog>
  476. <dictbiz-dialog ref="dictbiz" :title="dicTitle" :code="dicCode" :parentId="parentId" @closed="getAllWorkDicts">
  477. </dictbiz-dialog>
  478. </div>
  479. </template>
  480. <script>
  481. import { storagefeeitems, submit, getDetail, detailTradeByMblno, remove, checkAgent, revokeCheckAgent, copyAgent, generateDispatchVehicles, confirmDispatchVehicles, generateWarehouseEntry, confirmWarehouseEntry, generateOutbound, dispatchvehiclesRemove, inoutstorageRemove, calculationWarehouseUnitPrice, billsCopyBills, submitList1, submitList2, revokePrecontainers, revokeDispatchVehicles, revokeWarehouseEntry, revokeInoutstorage, revokeOutbound, confirmInspection, revokeInspection, confirmReturnBox, revokeReturnBox } from "@/api/tradeAgency/oceanFreightImport";
  482. import { contrastObj, contrastList } from "@/util/contrastData";
  483. import feeInfo from "@/components/tradeAgency/fee-oceanFreight";
  484. import reports from "@/components/tradeAgency/reports.vue";
  485. import dicSelect from "@/components/dicSelect/main";
  486. import checkSchedule from "@/components/checkH/checkSchedule.vue";
  487. import businessReports from "@/components/tradeAgency/businessReportsJK.vue";
  488. import { precontainersRemove } from "@/api/iosBasicData/ReceivingOrders/precontainers";
  489. import _ from "lodash";
  490. export default {
  491. name: "detailsPage",
  492. data() {
  493. return {
  494. ckForm: {
  495. // id: null,
  496. // returnDate: null,
  497. // returnCyName: null,
  498. },
  499. ckVisible: false,
  500. dicTitle: null,
  501. parentId: null,
  502. dicCode: null,
  503. carForm: {
  504. // id: null,
  505. // inspectionFleetId: null,
  506. // inspectionFleetName: null,
  507. // inspectionLicenseNumber: null,
  508. // inspectionFullName: null,
  509. // inspectionContactInformation: null
  510. },
  511. boxForm: {
  512. // id: null,
  513. // returnDate: null,
  514. // returnCyName: null,
  515. },
  516. boxVisible: false,
  517. carVisible: false,
  518. checkId: '', // 审核需要的id
  519. batchNo: '',
  520. checkScheduleDialog: false, // 审核弹窗
  521. editButton: false,
  522. editDisabled: false,
  523. form: {
  524. billNoFormat: 'HYJK',
  525. businessTypeCode: 'HYJK',
  526. businessType: 'SI',
  527. status: 0,
  528. seaType: 'I',
  529. billingStatus: 0,
  530. feeCenterListC: [],
  531. feeCenterListD: [],
  532. filesList: [],
  533. inStorageList: [],//入库
  534. outStorageList: [],//出库
  535. dispatchVehiclesList: [],//派车
  536. preContainersList: [],//箱信息
  537. detail: {
  538. mnotifyCntyName: '海运',
  539. mshipperCntyName: '一般贸易',
  540. }
  541. },
  542. oldForm: {
  543. billNoFormat: 'HYJK',
  544. businessTypeCode: 'HYJK',
  545. businessType: 'SI',
  546. status: 0,
  547. seaType: 'I',
  548. billingStatus: 0,
  549. feeCenterListC: [],
  550. feeCenterListD: [],
  551. filesList: [],
  552. inStorageList: [],//入库
  553. outStorageList: [],//出库
  554. dispatchVehiclesList: [],//派车
  555. preContainersList: [],//箱信息
  556. detail: {
  557. mnotifyCntyName: '海运',
  558. mshipperCntyName: '一般贸易',
  559. }
  560. },
  561. optionForm: {
  562. menuBtn: false,
  563. span: 8,
  564. disabled: false,
  565. column: [
  566. {
  567. label: '客户',
  568. prop: "corpCnName",
  569. disabled: false,
  570. rules: [{
  571. required: true,
  572. message: " ",
  573. trigger: "blur"
  574. }]
  575. },
  576. {
  577. label: "委托编号",
  578. prop: "billNo",
  579. disabled: true,
  580. },
  581. {
  582. label: "提单号",
  583. prop: "mblno",
  584. disabled: false,
  585. rules: [{
  586. required: true,
  587. message: " ",
  588. trigger: "blur"
  589. }]
  590. },
  591. {
  592. label: '合同号',
  593. prop: "bookingNo",
  594. disabled: false,
  595. rules: [{
  596. required: true,
  597. message: " ",
  598. trigger: "blur"
  599. }]
  600. },
  601. {
  602. label: '原产地',
  603. prop: "mnotifyCntyCode",
  604. type: 'select',
  605. filterable: true,
  606. remote: true,
  607. dicUrl: "/api/blade-los/bcountrys/list",
  608. props: {
  609. label: 'cnName',
  610. value: 'cnName',
  611. res: 'data.records'
  612. },
  613. disabled: false,
  614. },
  615. {
  616. label: '运输方式',
  617. prop: "mnotifyCntyName",
  618. // type: 'select',
  619. // filterable: true,
  620. // dicUrl: "/api/blade-system/dict-biz/dictionary?code=mode_transport",
  621. // props: {
  622. // label: 'dictValue',
  623. // value: 'dictValue',
  624. // },
  625. // disabled: false,
  626. // rules: [{
  627. // required: true,
  628. // message: " ",
  629. // trigger: "blur"
  630. // }]
  631. },
  632. {
  633. label: "发货人",
  634. prop: "hshipperCnName",
  635. disabled: false,
  636. },
  637. {
  638. label: "收货人",
  639. prop: "hconsigneeCnName",
  640. disabled: false,
  641. },
  642. {
  643. label: "船名",
  644. prop: "vesselCnName",
  645. type: 'select',
  646. filterable: true,
  647. remote: true,
  648. allowCreate: true,
  649. dicUrl: "/api/blade-los/bvessels/list?cnName={{key}}",
  650. props: {
  651. label: 'cnName',
  652. value: 'cnName',
  653. res: 'data.records'
  654. },
  655. disabled: false,
  656. },
  657. {
  658. label: "航次",
  659. prop: "voyageNo",
  660. overHidden: true,
  661. },
  662. {
  663. label: '起运港',
  664. prop: "polCnName",
  665. disabled: false,
  666. },
  667. {
  668. label: '目的港',
  669. prop: "podCnName",
  670. disabled: false,
  671. },
  672. {
  673. label: "开船日期",
  674. prop: "etd",
  675. type: "date",
  676. format: "yyyy-MM-dd",
  677. valueFormat: "yyyy-MM-dd",
  678. },
  679. {
  680. label: "预计到港",
  681. prop: "bookingDate",
  682. type: "date",
  683. format: "yyyy-MM-dd",
  684. valueFormat: "yyyy-MM-dd",
  685. },
  686. {
  687. label: "实际到港",
  688. prop: "eta",
  689. type: "date",
  690. format: "yyyy-MM-dd",
  691. valueFormat: "yyyy-MM-dd",
  692. rules: [{
  693. required: true,
  694. message: " ",
  695. trigger: "blur"
  696. }]
  697. },
  698. {
  699. label: "船公司",
  700. prop: "carrierCnName",
  701. disabled: false,
  702. },
  703. {
  704. label: "船代",
  705. prop: "bookingAgentCnName",
  706. disabled: false,
  707. },
  708. {
  709. label: '装箱方式',
  710. prop: "loadType",
  711. type: 'select',
  712. dicData: [{
  713. label: '整箱',
  714. value: 'FCL'
  715. }, {
  716. label: '拼箱',
  717. value: 'LCL'
  718. }],
  719. disabled: false,
  720. },
  721. // {
  722. // label: "HSCODE",
  723. // prop: "hscode",
  724. // disabled: false,
  725. // },
  726. {
  727. label: "件数",
  728. prop: "quantity",
  729. disabled: false,
  730. },
  731. {
  732. label: "包装",
  733. prop: "packingUnit",
  734. type: 'select',
  735. filterable: true,
  736. remote: true,
  737. dicUrl: "/api/blade-los/bpackages/list?cnName={{key}}",
  738. props: {
  739. label: 'cnName',
  740. value: 'cnName',
  741. res: 'data.records'
  742. },
  743. disabled: false,
  744. },
  745. {
  746. label: "尺码",
  747. prop: "measurement",
  748. disabled: false,
  749. },
  750. {
  751. label: "毛重",
  752. prop: "grossWeight",
  753. disabled: false,
  754. },
  755. {
  756. label: "净重",
  757. prop: "netWeight",
  758. disabled: false,
  759. },
  760. {
  761. label: "是否退押",
  762. prop: "billingStatus",
  763. type: 'select',
  764. dicData: [{
  765. label: '是',
  766. value: 1
  767. }, {
  768. label: '否',
  769. value: 0
  770. }],
  771. disabled: true,
  772. },
  773. {
  774. label: "放单方式",
  775. prop: "mconsigneeCntyCode",
  776. type: 'select',
  777. filterable: true,
  778. dicUrl: "/api/blade-system/dict-biz/dictionary?code=release_method",
  779. props: {
  780. label: 'dictValue',
  781. value: 'dictValue',
  782. },
  783. disabled: false,
  784. },
  785. {
  786. label: "免箱期",
  787. prop: "iqNo",
  788. disabled: false,
  789. rules: [{
  790. required: true,
  791. message: " ",
  792. trigger: "blur"
  793. }],
  794. },
  795. {
  796. label: '报关单号',
  797. prop: "mnotify2CntyName",
  798. width: "100",
  799. overHidden: true
  800. },
  801. {
  802. label: "报关日期",
  803. prop: "issueDate",
  804. type: "date",
  805. format: "yyyy-MM-dd",
  806. valueFormat: "yyyy-MM-dd",
  807. },
  808. {
  809. label: "放行日期",
  810. prop: "cyReturnTime",
  811. type: "date",
  812. format: "yyyy-MM-dd",
  813. valueFormat: "yyyy-MM-dd",
  814. },
  815. {
  816. label: "提箱码头",
  817. prop: "charData",
  818. type: 'select',
  819. filterable: true,
  820. dicUrl: "/api/blade-system/dict-biz/dictionary?code=container_terminal",
  821. props: {
  822. label: 'dictValue',
  823. value: 'dictValue',
  824. },
  825. disabled: false,
  826. },
  827. {
  828. label: '业务来源',
  829. prop: "srcType",
  830. disabled: false,
  831. rules: [{
  832. required: true,
  833. message: " ",
  834. trigger: "blur"
  835. }],
  836. },
  837. {
  838. label: '贸易方式',
  839. prop: "mshipperCntyName",
  840. // type: "select",
  841. // dicUrl: "/api/blade-system/dict-biz/dictionary?code=trade_Mode",
  842. // props: {
  843. // label: "dictValue",
  844. // value: "dictValue"
  845. // },
  846. // disabled: false,
  847. // rules: [{
  848. // required: true,
  849. // message: " ",
  850. // trigger: "blur"
  851. // }],
  852. },
  853. {
  854. label: '操作员',
  855. prop: 'operatorName',
  856. },
  857. // {
  858. // label: '业务员',
  859. // prop: "srcCnName",
  860. // disabled: false,
  861. // rules: [{
  862. // required: true,
  863. // message: " ",
  864. // trigger: "blur"
  865. // }]
  866. // },
  867. {
  868. label: '备注',
  869. prop: "remarks",
  870. type: 'textarea',
  871. disabled: false,
  872. span: 18,
  873. minRows: 2,
  874. },
  875. ]
  876. },
  877. carOption: {
  878. labelWidth: 120,
  879. menuBtn: false,
  880. span: 12,
  881. disabled: false,
  882. column: [
  883. {
  884. label: '送货承运车队',
  885. prop: "inspectionFleetName",
  886. disabled: false,
  887. },
  888. {
  889. label: '送货车号',
  890. prop: "inspectionLicenseNumber",
  891. disabled: false,
  892. },
  893. {
  894. label: '送货姓名',
  895. prop: "inspectionFullName",
  896. disabled: false,
  897. },
  898. {
  899. label: '送货联系方式',
  900. prop: "inspectionContactInformation",
  901. disabled: false,
  902. }
  903. ]
  904. },
  905. boxOption: {
  906. // labelWidth: 120,
  907. menuBtn: false,
  908. span: 12,
  909. disabled: false,
  910. column: [
  911. {
  912. label: "返空时间",
  913. prop: "returnDate",
  914. type: "date",
  915. format: "yyyy-MM-dd",
  916. valueFormat: "yyyy-MM-dd 00:00:00",
  917. },
  918. {
  919. label: "返空场站",
  920. prop: "returnCyName",
  921. },
  922. ]
  923. },
  924. ckOption: {
  925. // labelWidth: 120,
  926. menuBtn: false,
  927. span: 24,
  928. disabled: false,
  929. column: [
  930. {
  931. label: "仓储费单价收",
  932. prop: "storageFeePriceD",
  933. },
  934. {
  935. label: "仓储费单价付",
  936. prop: "storageFeePriceC",
  937. },
  938. ]
  939. },
  940. option: {},
  941. optionBack: {
  942. height: 'auto',
  943. calcHeight: 30,
  944. menuWidth: 180,
  945. tip: false,
  946. border: true,
  947. addBtn: false,
  948. viewBtn: false,
  949. editBtn: false,
  950. delBtn: false,
  951. refreshBtn: false,
  952. selection: true,
  953. align: 'center',
  954. column: [
  955. {
  956. label: "index",
  957. prop: "index",
  958. width: "55",
  959. headerslot: true,
  960. },
  961. {
  962. label: "箱型",
  963. prop: "cntrTypeCode",
  964. width: "100",
  965. overHidden: true,
  966. },
  967. {
  968. label: "箱号",
  969. prop: "boxNo",
  970. width: "100",
  971. overHidden: true
  972. },
  973. {
  974. label: "HSCODE",
  975. prop: "hsCode",
  976. width: "100",
  977. overHidden: true,
  978. cell: true,
  979. slot: true,
  980. formslot: true,
  981. rules: [
  982. {
  983. required: true,
  984. message: '请输入HSCODE',
  985. trigger: 'blur'
  986. }
  987. ]
  988. },
  989. {
  990. label: "品名",
  991. prop: "goodsName",
  992. width: "100",
  993. overHidden: true
  994. },
  995. {
  996. label: "类型",
  997. prop: "goodsType",
  998. width: "80",
  999. overHidden: true
  1000. },
  1001. {
  1002. label: "件数",
  1003. prop: "number",
  1004. width: "100",
  1005. overHidden: true
  1006. },
  1007. {
  1008. label: "净重",
  1009. prop: "netWeight",
  1010. width: "100",
  1011. overHidden: true
  1012. },
  1013. {
  1014. label: "总金额",
  1015. prop: "amount",
  1016. width: "100",
  1017. overHidden: true
  1018. },
  1019. {
  1020. label: '币别',
  1021. prop: 'curCode',
  1022. type: 'select',
  1023. cell: true,
  1024. filterable: true,
  1025. dicData: [
  1026. { label: 'CNY', value: 'CNY' },
  1027. { label: 'USD', value: 'USD' }
  1028. ],
  1029. overHidden: true,
  1030. },
  1031. {
  1032. label: "查验类型",
  1033. prop: "inspectionType",
  1034. cell: true,
  1035. type: 'select',
  1036. filterable: true,
  1037. dicUrl: "/api/blade-system/dict-biz/dictionary?code=inspection_type",
  1038. props: {
  1039. label: 'dictValue',
  1040. value: 'dictValue',
  1041. },
  1042. width: "120",
  1043. overHidden: true
  1044. },
  1045. {
  1046. label: "查验时间",
  1047. prop: "inspectionDate",
  1048. width: "100",
  1049. cell: true,
  1050. type: "date",
  1051. format: "yyyy-MM-dd",
  1052. valueFormat: "yyyy-MM-dd 00:00:00",
  1053. overHidden: true
  1054. },
  1055. {
  1056. label: "是否机检",
  1057. prop: "whetherMachineInspection",
  1058. cell: true,
  1059. type: 'select',
  1060. dicData: [{
  1061. label: '是',
  1062. value: 1
  1063. }, {
  1064. label: '否',
  1065. value: 0
  1066. }],
  1067. width: "90",
  1068. overHidden: true
  1069. },
  1070. {
  1071. label: "是否取样",
  1072. prop: "whetherSampling",
  1073. cell: true,
  1074. type: 'select',
  1075. dicData: [{
  1076. label: '是',
  1077. value: 1
  1078. }, {
  1079. label: '否',
  1080. value: 0
  1081. }],
  1082. width: "90",
  1083. overHidden: true
  1084. },
  1085. {
  1086. label: "是否入库",
  1087. prop: "whetherWarehousing",
  1088. cell: true,
  1089. type: 'select',
  1090. dicData: [{
  1091. label: '是',
  1092. value: 1
  1093. }, {
  1094. label: '否',
  1095. value: 0
  1096. }],
  1097. width: "90",
  1098. overHidden: true
  1099. },
  1100. {
  1101. label: "是否返场",
  1102. prop: "whetherReturnSite",
  1103. cell: true,
  1104. type: 'select',
  1105. dicData: [{
  1106. label: '是',
  1107. value: 1
  1108. }, {
  1109. label: '否',
  1110. value: 0
  1111. }],
  1112. width: "90",
  1113. overHidden: true
  1114. },
  1115. // {
  1116. // label: "是否还箱",
  1117. // prop: "whetherReturn",
  1118. // cell: true,
  1119. // type: 'select',
  1120. // dicData: [{
  1121. // label: '是',
  1122. // value: 1
  1123. // }, {
  1124. // label: '否',
  1125. // value: 0
  1126. // }],
  1127. // width: "90",
  1128. // overHidden: true
  1129. // },
  1130. {
  1131. label: "备注",
  1132. prop: "remarks",
  1133. width: "120",
  1134. cell: true,
  1135. overHidden: true
  1136. }
  1137. ]
  1138. },
  1139. option2: {},
  1140. optionBack2: {
  1141. height: 'auto',
  1142. calcHeight: 30,
  1143. menuWidth: 360,
  1144. tip: false,
  1145. border: true,
  1146. index: true,
  1147. addBtn: false,
  1148. viewBtn: false,
  1149. editBtn: false,
  1150. delBtn: false,
  1151. refreshBtn: false,
  1152. selection: true,
  1153. align: 'center',
  1154. column: [
  1155. {
  1156. label: "承运车队",
  1157. prop: "fleetName",
  1158. width: "120",
  1159. overHidden: true,
  1160. },
  1161. {
  1162. label: "车号",
  1163. prop: "licenseNumber",
  1164. cell: true,
  1165. width: "120",
  1166. overHidden: true
  1167. },
  1168. {
  1169. label: "姓名",
  1170. prop: "fullName",
  1171. cell: true,
  1172. width: "120",
  1173. overHidden: true
  1174. },
  1175. {
  1176. label: "联系方式",
  1177. prop: "contactInformation",
  1178. cell: true,
  1179. width: "120",
  1180. overHidden: true
  1181. },
  1182. {
  1183. label: "是否入库",
  1184. prop: "whetherWarehousing",
  1185. type: 'select',
  1186. dicData: [{
  1187. label: '是',
  1188. value: 1
  1189. }, {
  1190. label: '否',
  1191. value: 0
  1192. }],
  1193. width: "120",
  1194. overHidden: true
  1195. },
  1196. {
  1197. label: "提箱时间",
  1198. prop: "pickupDate",
  1199. cell: true,
  1200. type: "date",
  1201. format: "yyyy-MM-dd",
  1202. valueFormat: "yyyy-MM-dd 00:00:00",
  1203. width: "120",
  1204. overHidden: true
  1205. },
  1206. {
  1207. label: "提箱地点",
  1208. prop: "pickupAddressName",
  1209. width: "120",
  1210. overHidden: true
  1211. },
  1212. {
  1213. label: "送货时间",
  1214. prop: "deliveryDate",
  1215. width: "120",
  1216. cell: true,
  1217. type: "date",
  1218. format: "yyyy-MM-dd",
  1219. valueFormat: "yyyy-MM-dd 00:00:00",
  1220. overHidden: true
  1221. },
  1222. {
  1223. label: "送货地点",
  1224. prop: "deliveryAddressName",
  1225. width: "120",
  1226. overHidden: true
  1227. },
  1228. {
  1229. label: "是否打冷",
  1230. prop: "whetherChill",
  1231. cell: true,
  1232. type: 'select',
  1233. dicData: [{
  1234. label: '是',
  1235. value: 1
  1236. }, {
  1237. label: '否',
  1238. value: 0
  1239. }],
  1240. width: "120",
  1241. overHidden: true
  1242. },
  1243. {
  1244. label: "运费价格",
  1245. prop: "freightPrice",
  1246. cell: true,
  1247. type: 'number',
  1248. controls: false,
  1249. width: "120",
  1250. overHidden: true
  1251. },
  1252. {
  1253. label: "应还箱日期",
  1254. prop: "shouldBeReturnedDate",
  1255. // cell: true,
  1256. type: "date",
  1257. format: "yyyy-MM-dd",
  1258. width: "140",
  1259. overHidden: true
  1260. },
  1261. {
  1262. label: "返空时间",
  1263. prop: "returnDate",
  1264. // cell: true,
  1265. type: "date",
  1266. format: "yyyy-MM-dd",
  1267. valueFormat: "yyyy-MM-dd 00:00:00",
  1268. width: "120",
  1269. overHidden: true
  1270. },
  1271. {
  1272. label: "返空场站",
  1273. prop: "returnCyName",
  1274. width: "120",
  1275. overHidden: true
  1276. },
  1277. {
  1278. label: "送货承运车队",
  1279. prop: "inspectionFleetName",
  1280. width: "120",
  1281. overHidden: true
  1282. },
  1283. {
  1284. label: "送货车号",
  1285. prop: "inspectionLicenseNumber",
  1286. width: "120",
  1287. overHidden: true
  1288. },
  1289. {
  1290. label: "送货姓名",
  1291. prop: "inspectionFullName",
  1292. width: "120",
  1293. overHidden: true
  1294. },
  1295. {
  1296. label: "送货联系方式",
  1297. prop: "inspectionContactInformation",
  1298. width: "120",
  1299. overHidden: true
  1300. },
  1301. {
  1302. label: "箱号",
  1303. prop: "boxNo",
  1304. width: "120",
  1305. overHidden: true
  1306. },
  1307. {
  1308. label: "备注",
  1309. prop: "remarks",
  1310. width: "120",
  1311. cell: true,
  1312. overHidden: true
  1313. }
  1314. ]
  1315. },
  1316. option3: {},
  1317. optionBack3: {
  1318. height: 'auto',
  1319. calcHeight: 30,
  1320. menuWidth: 200,
  1321. tip: false,
  1322. border: true,
  1323. index: true,
  1324. addBtn: false,
  1325. viewBtn: false,
  1326. editBtn: false,
  1327. delBtn: false,
  1328. refreshBtn: false,
  1329. selection: true,
  1330. align: 'center',
  1331. column: [
  1332. {
  1333. label: "仓库",
  1334. prop: "warehouseName",
  1335. width: "120",
  1336. overHidden: true,
  1337. },
  1338. {
  1339. label: "品名",
  1340. prop: "goodsName",
  1341. width: "120",
  1342. overHidden: true
  1343. },
  1344. {
  1345. label: "箱号",
  1346. prop: "boxNo",
  1347. width: "120",
  1348. overHidden: true
  1349. },
  1350. {
  1351. label: "入库单位",
  1352. prop: "storageUnit",
  1353. width: "120",
  1354. cell: true,
  1355. type: 'select',
  1356. filterable: true,
  1357. remote: true,
  1358. dicUrl: "/api/blade-los/bunits/list",
  1359. props: {
  1360. label: 'cnName',
  1361. value: 'cnName',
  1362. res: 'data.records'
  1363. },
  1364. overHidden: true
  1365. },
  1366. {
  1367. label: "入库时间",
  1368. prop: "storageDate",
  1369. width: "120",
  1370. cell: true,
  1371. type: "date",
  1372. format: "yyyy-MM-dd",
  1373. valueFormat: "yyyy-MM-dd 00:00:00",
  1374. overHidden: true
  1375. },
  1376. {
  1377. label: "件数",
  1378. prop: "quantity",
  1379. width: "120",
  1380. overHidden: true
  1381. },
  1382. {
  1383. label: "净重",
  1384. prop: "grossWeight",
  1385. width: "120",
  1386. overHidden: true
  1387. },
  1388. {
  1389. label: "是否保税",
  1390. prop: "whetherBonded",
  1391. cell: true,
  1392. width: "120",
  1393. type: 'select',
  1394. dicData: [{
  1395. label: '是',
  1396. value: 1
  1397. }, {
  1398. label: '否',
  1399. value: 0
  1400. }],
  1401. overHidden: true
  1402. },
  1403. {
  1404. label: "是否分拣",
  1405. prop: "whetherSorting",
  1406. width: "120",
  1407. cell: true,
  1408. type: 'select',
  1409. dicData: [{
  1410. label: '是',
  1411. value: 1
  1412. }, {
  1413. label: '否',
  1414. value: 0
  1415. }],
  1416. overHidden: true
  1417. },
  1418. {
  1419. label: "平均单价",
  1420. prop: "warehouseUnitPrice",
  1421. cell: true,
  1422. type: 'number',
  1423. controls: false,
  1424. width: "120",
  1425. overHidden: true
  1426. },
  1427. {
  1428. label: "车号",
  1429. prop: "licenseNumber",
  1430. width: "120",
  1431. overHidden: true
  1432. },
  1433. {
  1434. label: "姓名",
  1435. prop: "fullName",
  1436. width: "120",
  1437. overHidden: true
  1438. },
  1439. {
  1440. label: "联系方式",
  1441. prop: "tel",
  1442. width: "120",
  1443. overHidden: true
  1444. },
  1445. {
  1446. label: "备注",
  1447. prop: "remarks",
  1448. width: "120",
  1449. cell: true,
  1450. overHidden: true
  1451. }
  1452. ]
  1453. },
  1454. option4: {},
  1455. optionBack4: {
  1456. height: 'auto',
  1457. calcHeight: 30,
  1458. menuWidth: 180,
  1459. tip: false,
  1460. border: true,
  1461. index: true,
  1462. addBtn: false,
  1463. viewBtn: false,
  1464. editBtn: false,
  1465. delBtn: false,
  1466. refreshBtn: false,
  1467. selection: true,
  1468. align: 'center',
  1469. column: [
  1470. {
  1471. label: "品名",
  1472. prop: "goodsName",
  1473. width: "120",
  1474. overHidden: true
  1475. },
  1476. {
  1477. label: "箱号",
  1478. prop: "boxNo",
  1479. width: "120",
  1480. overHidden: true
  1481. },
  1482. {
  1483. label: "出库时间",
  1484. prop: "outStorageDate",
  1485. width: "120",
  1486. cell: true,
  1487. type: "date",
  1488. format: "yyyy-MM-dd",
  1489. valueFormat: "yyyy-MM-dd 00:00:00",
  1490. overHidden: true
  1491. },
  1492. {
  1493. label: "出库件数",
  1494. prop: "outQuantity",
  1495. width: "120",
  1496. cell: true,
  1497. type: 'number',
  1498. controls: false,
  1499. overHidden: true
  1500. },
  1501. {
  1502. label: "出库净重",
  1503. prop: "outWeight",
  1504. width: "120",
  1505. cell: true,
  1506. type: 'number',
  1507. controls: false,
  1508. overHidden: true
  1509. },
  1510. {
  1511. label: "件数",
  1512. prop: "quantity",
  1513. width: "120",
  1514. overHidden: true
  1515. },
  1516. {
  1517. label: "净重",
  1518. prop: "grossWeight",
  1519. width: "120",
  1520. overHidden: true
  1521. },
  1522. {
  1523. label: "存储天数",
  1524. prop: "storageDays",
  1525. width: "120",
  1526. overHidden: true
  1527. },
  1528. {
  1529. label: "仓储费",
  1530. prop: "storageFeesAmount",
  1531. width: "120",
  1532. overHidden: true
  1533. },
  1534. {
  1535. label: "剩余件数",
  1536. prop: "surplusQuantity",
  1537. width: "120",
  1538. overHidden: true
  1539. },
  1540. {
  1541. label: "剩余重量",
  1542. prop: "surplusWeight",
  1543. width: "120",
  1544. overHidden: true
  1545. },
  1546. {
  1547. label: "剩余货值",
  1548. prop: "surplusGoodsAmount",
  1549. width: "120",
  1550. overHidden: true
  1551. },
  1552. {
  1553. label: "备注",
  1554. prop: "remarks",
  1555. width: "120",
  1556. cell: true,
  1557. overHidden: true
  1558. }
  1559. ]
  1560. },
  1561. showLock: false,
  1562. roleName: [],
  1563. saberUserInfo: ''
  1564. }
  1565. },
  1566. components: {
  1567. dicSelect,
  1568. feeInfo,
  1569. checkSchedule,
  1570. businessReports,
  1571. reports
  1572. },
  1573. props: {
  1574. detailData: Object
  1575. },
  1576. async created() {
  1577. this.roleName = localStorage.getItem('roleName').split(',')
  1578. this.saberUserInfo = JSON.parse(localStorage.getItem("saber-userInfo")).content
  1579. this.option = await this.getColumnData(this.getColumnName(388), this.optionBack);
  1580. this.option2 = await this.getColumnData(this.getColumnName(389), this.optionBack2);
  1581. this.option3 = await this.getColumnData(this.getColumnName(390), this.optionBack3);
  1582. this.option4 = await this.getColumnData(this.getColumnName(391), this.optionBack4);
  1583. if (this.detailData.id) {
  1584. this.showLock = true
  1585. this.editButton = true
  1586. this.editDisabled = true
  1587. this.optionForm.disabled = true
  1588. this.getDetails(this.detailData.id)
  1589. }
  1590. if (this.$route.query.billNo) {
  1591. this.showLock = true
  1592. this.editButton = true
  1593. this.editDisabled = true
  1594. this.optionForm.disabled = true
  1595. this.getDetaiByMblno(this.$route.query.billNo)
  1596. }
  1597. if (this.$route.query.billId) {
  1598. this.showLock = true
  1599. this.editButton = true
  1600. this.editDisabled = true
  1601. this.optionForm.disabled = true
  1602. this.getDetails(this.$route.query.billId)
  1603. }
  1604. if (this.$route.query.id) {
  1605. this.showLock = true
  1606. this.editButton = true
  1607. this.editDisabled = true
  1608. this.optionForm.disabled = true
  1609. this.getDetails(this.$route.query.id)
  1610. }
  1611. if (this.detailData.copyId) {
  1612. this.getCopydate(this.detailData.copyId)
  1613. }
  1614. },
  1615. methods: {
  1616. inLock() {
  1617. const data = {
  1618. moduleName: "SI",
  1619. tableName: "SI_Detail",
  1620. billId: this.form.id,
  1621. no: localStorage.getItem("browserID"),
  1622. billNo: this.form.mblno
  1623. };
  1624. this.inDetailsKey(this.$route.name, {
  1625. moduleName: "SI",
  1626. tableName: "SI_Detail",
  1627. billId: this.form.id,
  1628. billNo: this.form.mblno
  1629. });
  1630. this.checkLock(data).then(res => {
  1631. if (res.data.code == 200) {
  1632. this.onLock(data).then(res => {
  1633. if (res.data.code == 200) {
  1634. this.showLock = false
  1635. }
  1636. });
  1637. }
  1638. });
  1639. },
  1640. inJump(name) {
  1641. if (name == '客户') {
  1642. this.$router.push({
  1643. path: "/iosBasicData/bcorps/index",
  1644. query: { type: 'new' },
  1645. })
  1646. }
  1647. if (name == '原产地') {
  1648. this.$router.push({
  1649. path: "/iosBasicData/bcountrys/index",
  1650. query: { type: 'new' },
  1651. })
  1652. }
  1653. if (name == '港口') {
  1654. this.$router.push({
  1655. path: "/iosBasicData/bports/index",
  1656. query: { type: 'new' },
  1657. })
  1658. }
  1659. if (name == 'HSCODE') {
  1660. this.$router.push({
  1661. path: "/iosBasicData/bcommodity/index",
  1662. query: { type: 'new' },
  1663. })
  1664. }
  1665. if (name == '船名') {
  1666. this.$router.push({
  1667. path: "/iosBasicData/bvessels/index",
  1668. query: { type: 'new' },
  1669. })
  1670. }
  1671. if (name == '包装') {
  1672. this.$router.push({
  1673. path: "/iosBasicData/bpackages/index",
  1674. query: { type: 'new' },
  1675. })
  1676. }
  1677. if (name == '箱型') {
  1678. this.$router.push({
  1679. path: "/iosBasicData/bcntrtypes/index",
  1680. query: { type: 'new' },
  1681. })
  1682. }
  1683. if (name == '类型') {
  1684. this.$refs.dictbiz.open()
  1685. this.dicTitle = '添加类型'
  1686. this.parentId = '1813125517193330690'
  1687. this.dicCode = 'goods-type'
  1688. }
  1689. if (name == '入库单位') {
  1690. this.$router.push({
  1691. path: "/iosBasicData/bunits/index",
  1692. query: { type: 'new' },
  1693. })
  1694. }
  1695. },
  1696. getAllWorkDicts() {
  1697. this.dicTitle = null
  1698. this.parentId = null
  1699. this.dicCode = null
  1700. },
  1701. getDetaiByMblno(billNo) {
  1702. this.editButton = true
  1703. this.editDisabled = true
  1704. this.optionForm.disabled = true
  1705. const loading = this.$loading({
  1706. lock: true,
  1707. text: '加载中',
  1708. spinner: 'el-icon-loading',
  1709. background: 'rgba(255,255,255,0.7)'
  1710. });
  1711. detailTradeByMblno({ mblno: this.$route.query.billNo }).then(res => {
  1712. this.form = res.data.data
  1713. this.$refs.crud.dicInit();
  1714. this.$refs.crud3.dicInit();
  1715. }).finally(() => {
  1716. loading.close()
  1717. })
  1718. },
  1719. addRow() {
  1720. if (!this.form.corpId) return this.$message.error("请选择客户名称");
  1721. this.form.preContainersList.push({
  1722. whetherMachineInspection: 0,
  1723. whetherSampling: 0,
  1724. whetherWarehousing: 0,
  1725. whetherReturnSite: 0,
  1726. curCode: 'CNY',
  1727. $cellEdit: true
  1728. })
  1729. this.$nextTick(() => {
  1730. this.$refs.crud.doLayout();
  1731. this.$refs.crud.dicInit();
  1732. });
  1733. },
  1734. amountChange(row) {
  1735. if (!row.number) row.number = 1
  1736. row.price = _.round(_.divide(row.amount, row.number ? row.number : 1), 2)
  1737. },
  1738. boxClosed() {
  1739. this.boxForm = {
  1740. // id: null,
  1741. // returnDate: null,
  1742. // returnCyName: null,
  1743. }
  1744. },
  1745. ckClosed() {
  1746. this.ckForm = {
  1747. // id: null,
  1748. // returnDate: null,
  1749. // returnCyName: null,
  1750. }
  1751. },
  1752. carClosed() {
  1753. this.carForm = {
  1754. // id: null,
  1755. // inspectionFleetId: null,
  1756. // inspectionFleetName: null,
  1757. // inspectionLicenseNumber: null,
  1758. // inspectionFullName: null,
  1759. // inspectionContactInformation: null
  1760. }
  1761. },
  1762. carSubmit(row) {
  1763. this.form.dispatchVehiclesList.forEach(e => {
  1764. if (e.id == row.id) {
  1765. this.$set(e, 'inspectionFleetId', row.inspectionFleetId)
  1766. this.$set(e, 'inspectionFleetName', row.inspectionFleetName)
  1767. this.$set(e, 'inspectionLicenseNumber', row.inspectionLicenseNumber)
  1768. this.$set(e, 'inspectionFullName', row.inspectionFullName)
  1769. this.$set(e, 'inspectionContactInformation', row.inspectionContactInformation)
  1770. const loading = this.$loading({
  1771. lock: true,
  1772. text: '加载中',
  1773. spinner: 'el-icon-loading',
  1774. background: 'rgba(255,255,255,0.7)'
  1775. });
  1776. confirmInspection(row).then(res => {
  1777. this.$message.success("送货派车成功");
  1778. this.carVisible = false
  1779. this.getDetails(this.form.id)
  1780. }).finally(() => {
  1781. loading.close()
  1782. })
  1783. }
  1784. })
  1785. },
  1786. boxSubmit(row) {
  1787. this.form.dispatchVehiclesList.forEach(e => {
  1788. if (e.id == row.id) {
  1789. this.$set(e, 'returnDate', row.returnDate)
  1790. this.$set(e, 'returnCyName', row.returnCyName)
  1791. const loading = this.$loading({
  1792. lock: true,
  1793. text: '加载中',
  1794. spinner: 'el-icon-loading',
  1795. background: 'rgba(255,255,255,0.7)'
  1796. });
  1797. confirmReturnBox(row).then(res => {
  1798. this.$message.success("还箱成功");
  1799. this.boxVisible = false
  1800. this.getDetails(this.form.id)
  1801. }).finally(() => {
  1802. loading.close()
  1803. })
  1804. }
  1805. })
  1806. },
  1807. ckSubmit(row) {
  1808. if (row.storageFeePriceD == 0 || row.storageFeePriceD == null || row.storageFeePriceC == 0 || row.storageFeePriceC == null) return this.$message.success("仓储费单价收和仓储费单价付不能为空或0");
  1809. const loading = this.$loading({
  1810. lock: true,
  1811. text: '加载中',
  1812. spinner: 'el-icon-loading',
  1813. background: 'rgba(255,255,255,0.7)'
  1814. });
  1815. confirmWarehouseEntry(row).then(res => {
  1816. this.$message.success("出库成功");
  1817. this.ckVisible = false
  1818. this.getDetails(this.form.id)
  1819. }).finally(() => {
  1820. loading.close()
  1821. })
  1822. },
  1823. dicChange(name, row) {
  1824. if (name == 'inspectionFleetName') {
  1825. if (row) {
  1826. this.carForm.inspectionFleetId = row.id
  1827. this.carForm.inspectionFullName = row.mgrName
  1828. this.carForm.inspectionContactInformation = row.tel
  1829. } else {
  1830. this.carForm.inspectionFleetId = null
  1831. this.carForm.inspectionFullName = null
  1832. this.carForm.inspectionContactInformation = null
  1833. }
  1834. }
  1835. if (name == 'corpCnName') {
  1836. if (row) {
  1837. this.form.corpId = row.id
  1838. this.form.corpCnName = row.cnName
  1839. this.form.srcType = row.sourceType
  1840. this.form.srcCnName = row.srcCnName
  1841. this.form.srcId = row.srcId
  1842. } else {
  1843. this.form.corpId = null
  1844. this.form.srcType = null
  1845. this.form.srcCnName = null
  1846. this.form.srcId = null
  1847. }
  1848. }
  1849. if (name == 'polCnName') {
  1850. console.log(row)
  1851. if (row) {
  1852. this.form.polId = row.id
  1853. this.form.polCode = row.code
  1854. this.form.polCnName = row.cnName
  1855. this.form.polEnName = row.enName
  1856. } else {
  1857. this.form.polId = null
  1858. this.form.polCode = null
  1859. this.form.polEnName = null
  1860. }
  1861. }
  1862. if (name == 'podCnName') {
  1863. if (row) {
  1864. this.form.polId = row.id
  1865. this.form.polCode = row.code
  1866. this.form.podCnName = row.cnName
  1867. this.form.polEnName = row.enName
  1868. } else {
  1869. this.form.polId = null
  1870. this.form.polCode = null
  1871. this.form.polEnName = null
  1872. }
  1873. }
  1874. if (name == 'srcType') {
  1875. if (!row) {
  1876. this.form.srcId = null
  1877. this.form.srcCnName = null
  1878. }
  1879. }
  1880. if (name == 'srcCnName') {
  1881. if (row) {
  1882. this.form.srcId = row.id
  1883. } else {
  1884. this.form.srcId = null
  1885. }
  1886. }
  1887. if (name == 'hshipperCnName') {
  1888. if (row) {
  1889. this.form.detail.hshipperId = row.id
  1890. this.form.detail.hshipperCnName = row.cnName
  1891. } else {
  1892. this.form.detail.hshipperId = null
  1893. }
  1894. }
  1895. if (name == 'hconsigneeCnName') {
  1896. if (row) {
  1897. this.form.detail.hconsigneeId = row.id
  1898. this.form.detail.hconsigneeCnName = row.cnName
  1899. } else {
  1900. this.form.detail.hconsigneeId = null
  1901. }
  1902. }
  1903. if (name == 'carrierCnName') {
  1904. if (row) {
  1905. this.form.carrierId = row.id
  1906. } else {
  1907. this.form.carrierId = null
  1908. }
  1909. }
  1910. // if (name == 'hscode') {
  1911. // if (row) {
  1912. // this.form.commodityCnName = row.cnName
  1913. // } else {
  1914. // this.form.commodityCnName = null
  1915. // }
  1916. // }
  1917. if (name == 'bookingAgentCnName') {
  1918. if (row) {
  1919. this.form.bookingAgentId = row.id
  1920. this.form.bookingAgentCnName = row.cnName
  1921. } else {
  1922. this.form.bookingAgentId = null
  1923. }
  1924. }
  1925. if (name == 'mnotifyCntyCode') {
  1926. if (row) {
  1927. this.form.detail.mnotifyCntyCode = row.cnName
  1928. }
  1929. }
  1930. if (name == 'operatorName') {
  1931. if (row) {
  1932. this.form.operatorId = row.id
  1933. } else {
  1934. this.form.operatorId = null
  1935. }
  1936. }
  1937. },
  1938. rowDicChange(name, row, el) {
  1939. if (name == 'hsCode') {
  1940. if (row) {
  1941. el.goodsName = row.cnName
  1942. } else {
  1943. el.goodsName = null
  1944. }
  1945. }
  1946. // if (name == 'goodsName') {
  1947. // if (row) {
  1948. // el.hsCode = row.hsCode
  1949. // } else {
  1950. // el.hsCode = null
  1951. // }
  1952. // }
  1953. if (name == 'fleetName') {
  1954. if (row) {
  1955. el.fleetId = row.id
  1956. el.fullName = row.mgrName
  1957. el.contactInformation = row.tel
  1958. } else {
  1959. el.fleetId = null
  1960. el.fullName = null
  1961. el.contactInformation = null
  1962. }
  1963. }
  1964. if (name == 'pickupAddressName') {
  1965. if (row) {
  1966. el.pickupAddressId = row.id
  1967. } else {
  1968. el.pickupAddressId = null
  1969. }
  1970. }
  1971. if (name == 'deliveryAddressName') {
  1972. if (row) {
  1973. el.deliveryAddressId = row.id
  1974. } else {
  1975. el.deliveryAddressId = null
  1976. }
  1977. }
  1978. if (name == 'warehouseName') {
  1979. if (row) {
  1980. el.warehouseId = row.id
  1981. } else {
  1982. el.warehouseId = null
  1983. }
  1984. }
  1985. },
  1986. rowCell(name, row, index) {
  1987. if (name == '箱编辑') {
  1988. if (row.$cellEdit == true) {
  1989. if (!row.cntrTypeCode || !row.boxNo || !row.goodsName || !row.goodsType || !row.number || !row.netWeight || !row.amount) {
  1990. return this.$message.error((!row.cntrTypeCode ? "箱型," : '') + (!row.boxNo ? "箱号," : '') + (!row.goodsName ? "品名," : '') + (!row.goodsType ? "类型," : '') + (!row.number ? "件数," : '') + (!row.netWeight ? "净重," : '') + (!row.amount ? "总金额" : '') + "不能为空");
  1991. }
  1992. this.$set(row, "$cellEdit", false);
  1993. } else {
  1994. this.$set(row, "$cellEdit", true);
  1995. }
  1996. }
  1997. if (name == '箱删除') {
  1998. if (row.id) {
  1999. const loading = this.$loading({
  2000. lock: true,
  2001. text: '加载中',
  2002. spinner: 'el-icon-loading',
  2003. background: 'rgba(255,255,255,0.7)'
  2004. });
  2005. precontainersRemove(row.id).then(res => {
  2006. this.$message.success("删除成功");
  2007. this.form.preContainersList.splice(index, 1);
  2008. }).finally(() => {
  2009. loading.close()
  2010. })
  2011. } else {
  2012. this.$message.success("删除成功");
  2013. this.form.preContainersList.splice(index, 1);
  2014. }
  2015. }
  2016. if (name == '派车编辑') {
  2017. if (row.$cellEdit == true) {
  2018. const loading = this.$loading({
  2019. lock: true,
  2020. text: '加载中',
  2021. spinner: 'el-icon-loading',
  2022. background: 'rgba(255,255,255,0.7)'
  2023. });
  2024. submitList1(this.form.dispatchVehiclesList).then(res => {
  2025. this.form.dispatchVehiclesList = res.data.data
  2026. this.$message.success("保存成功");
  2027. }).finally(() => {
  2028. loading.close()
  2029. })
  2030. this.$set(row, "$cellEdit", false);
  2031. } else {
  2032. this.$set(row, "$cellEdit", true);
  2033. }
  2034. }
  2035. if (name == '入库编辑') {
  2036. if (row.$cellEdit == true) {
  2037. const loading = this.$loading({
  2038. lock: true,
  2039. text: '加载中',
  2040. spinner: 'el-icon-loading',
  2041. background: 'rgba(255,255,255,0.7)'
  2042. });
  2043. submitList2(this.form.inStorageList).then(res => {
  2044. this.form.inStorageList = res.data.data
  2045. this.$message.success("保存成功");
  2046. }).finally(() => {
  2047. loading.close()
  2048. })
  2049. this.$set(row, "$cellEdit", false);
  2050. } else {
  2051. this.$set(row, "$cellEdit", true);
  2052. }
  2053. }
  2054. if (name == '出库编辑') {
  2055. if (row.$cellEdit == true) {
  2056. const loading = this.$loading({
  2057. lock: true,
  2058. text: '加载中',
  2059. spinner: 'el-icon-loading',
  2060. background: 'rgba(255,255,255,0.7)'
  2061. });
  2062. submitList2(this.form.outStorageList).then(res => {
  2063. this.form.outStorageList = res.data.data
  2064. this.$message.success("保存成功");
  2065. }).finally(() => {
  2066. loading.close()
  2067. })
  2068. this.$set(row, "$cellEdit", false);
  2069. } else {
  2070. this.$set(row, "$cellEdit", true);
  2071. }
  2072. }
  2073. if (name == '派车') {
  2074. if (!row.id) {
  2075. return this.$message.error('请保存数据');
  2076. }
  2077. if (row.whetherMachineInspection == 1) {
  2078. if (!row.inspectionType || !row.inspectionDate) {
  2079. return this.$message.error((!row.inspectionType ? "查验类型," : '') + (!row.inspectionDate ? "查验时间" : '') + "不能为空");
  2080. }
  2081. }
  2082. let obj = {
  2083. ...row,
  2084. type: 1,
  2085. }
  2086. if (row.whetherDispatchVehicles == 1) {
  2087. const loading = this.$loading({
  2088. lock: true,
  2089. text: '加载中',
  2090. spinner: 'el-icon-loading',
  2091. background: 'rgba(255,255,255,0.7)'
  2092. });
  2093. revokePrecontainers(obj).then(res => {
  2094. this.$message.success("撤销成功");
  2095. this.getDetails(this.form.id)
  2096. }).finally(() => {
  2097. loading.close()
  2098. })
  2099. } else {
  2100. const loading = this.$loading({
  2101. lock: true,
  2102. text: '加载中',
  2103. spinner: 'el-icon-loading',
  2104. background: 'rgba(255,255,255,0.7)'
  2105. });
  2106. generateDispatchVehicles(obj).then(res => {
  2107. this.$message.success("派车成功");
  2108. this.getDetails(this.form.id)
  2109. }).finally(() => {
  2110. loading.close()
  2111. })
  2112. }
  2113. }
  2114. if (name == '自提') {
  2115. if (!row.id) {
  2116. return this.$message.error('请保存数据');
  2117. }
  2118. let obj = {
  2119. ...row,
  2120. type: 2,
  2121. }
  2122. if (row.whetherDispatchVehicles == 1) {
  2123. const loading = this.$loading({
  2124. lock: true,
  2125. text: '加载中',
  2126. spinner: 'el-icon-loading',
  2127. background: 'rgba(255,255,255,0.7)'
  2128. });
  2129. revokePrecontainers(obj).then(res => {
  2130. this.$message.success("撤销成功");
  2131. this.getDetails(this.form.id)
  2132. }).finally(() => {
  2133. loading.close()
  2134. })
  2135. } else {
  2136. const loading = this.$loading({
  2137. lock: true,
  2138. text: '加载中',
  2139. spinner: 'el-icon-loading',
  2140. background: 'rgba(255,255,255,0.7)'
  2141. });
  2142. generateDispatchVehicles(obj).then(res => {
  2143. this.$message.success("自提成功");
  2144. this.getDetails(this.form.id)
  2145. }).finally(() => {
  2146. loading.close()
  2147. })
  2148. }
  2149. }
  2150. // if (name == '派车删除') {
  2151. // const loading = this.$loading({
  2152. // lock: true,
  2153. // text: '加载中',
  2154. // spinner: 'el-icon-loading',
  2155. // background: 'rgba(255,255,255,0.7)'
  2156. // });
  2157. // dispatchvehiclesRemove({ ids: row.id }).then(res => {
  2158. // this.$message.success("删除成功");
  2159. // this.form.dispatchVehiclesList.splice(index, 1);
  2160. // }).finally(() => {
  2161. // loading.close()
  2162. // })
  2163. // }
  2164. if (name == '还箱') {
  2165. if (row.whetherReturn == 1) {
  2166. const loading = this.$loading({
  2167. lock: true,
  2168. text: '加载中',
  2169. spinner: 'el-icon-loading',
  2170. background: 'rgba(255,255,255,0.7)'
  2171. });
  2172. revokeReturnBox(row).then(res => {
  2173. this.$message.success("撤销成功");
  2174. this.getDetails(this.form.id)
  2175. }).finally(() => {
  2176. loading.close()
  2177. })
  2178. } else {
  2179. this.boxForm = row
  2180. this.boxVisible = true
  2181. }
  2182. }
  2183. if (name == '送货派车') {
  2184. if (row.whetherInspection == 1) {
  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. revokeInspection(row).then(res => {
  2192. this.$message.success("撤销成功");
  2193. this.getDetails(this.form.id)
  2194. }).finally(() => {
  2195. loading.close()
  2196. })
  2197. } else {
  2198. this.carForm = row
  2199. this.carVisible = true
  2200. }
  2201. }
  2202. if (name == '入库派车') {
  2203. if (!row.fleetName || !row.licenseNumber || !row.fullName || !row.contactInformation) {
  2204. return this.$message.error((!row.fleetName ? "承运车队," : '') + (!row.licenseNumber ? "车号," : '') + (!row.fullName ? "姓名," : '') + (!row.contactInformation ? "联系方式" : '') + "不能为空");
  2205. }
  2206. if (row.whetherDispatchVehicles == 1) {
  2207. const loading = this.$loading({
  2208. lock: true,
  2209. text: '加载中',
  2210. spinner: 'el-icon-loading',
  2211. background: 'rgba(255,255,255,0.7)'
  2212. });
  2213. revokeDispatchVehicles(row).then(res => {
  2214. this.$message.success("撤销成功");
  2215. this.optionForm.disabled = false
  2216. this.getDetails(this.form.id)
  2217. }).finally(() => {
  2218. loading.close()
  2219. })
  2220. } else {
  2221. console.log(row)
  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. confirmDispatchVehicles(row).then(res => {
  2229. this.$message.success("派车成功");
  2230. this.optionForm.disabled = true
  2231. this.getDetails(this.form.id)
  2232. }).finally(() => {
  2233. loading.close()
  2234. })
  2235. }
  2236. }
  2237. if (name == '生成入库') {
  2238. if (!row.fleetName || !row.licenseNumber || !row.fullName || !row.contactInformation) {
  2239. return this.$message.error((!row.fleetName ? "承运车队," : '') + (!row.licenseNumber ? "车号," : '') + (!row.fullName ? "姓名," : '') + (!row.contactInformation ? "联系方式" : '') + "不能为空");
  2240. }
  2241. if (row.whetherWarehouseEntry == 1) {
  2242. const loading = this.$loading({
  2243. lock: true,
  2244. text: '加载中',
  2245. spinner: 'el-icon-loading',
  2246. background: 'rgba(255,255,255,0.7)'
  2247. });
  2248. revokeWarehouseEntry(row).then(res => {
  2249. this.$message.success("撤销成功");
  2250. this.getDetails(this.form.id)
  2251. }).finally(() => {
  2252. loading.close()
  2253. })
  2254. } else {
  2255. const loading = this.$loading({
  2256. lock: true,
  2257. text: '加载中',
  2258. spinner: 'el-icon-loading',
  2259. background: 'rgba(255,255,255,0.7)'
  2260. });
  2261. generateWarehouseEntry(row).then(res => {
  2262. this.$message.success("生成入库成功");
  2263. this.getDetails(this.form.id)
  2264. }).finally(() => {
  2265. loading.close()
  2266. })
  2267. }
  2268. }
  2269. if (name == '入库确认') {
  2270. if (!this.form.eta || !row.storageDate || !row.warehouseName) {
  2271. return this.$message.error((!this.form.eta ? "基础信息的实际到港," : '') + (!row.storageDate ? "入库时间," : '') + (!row.warehouseName ? "仓库" : '') + "不能为空");
  2272. }
  2273. if (row.confirmDispatchVehicles == 1) {
  2274. const loading = this.$loading({
  2275. lock: true,
  2276. text: '加载中',
  2277. spinner: 'el-icon-loading',
  2278. background: 'rgba(255,255,255,0.7)'
  2279. });
  2280. revokeInoutstorage(row).then(res => {
  2281. this.$message.success("撤销成功");
  2282. this.getDetails(this.form.id)
  2283. }).finally(() => {
  2284. loading.close()
  2285. })
  2286. } else {
  2287. calculationWarehouseUnitPrice(row).then(res => {
  2288. this.$confirm(res.data.data, '提示', {
  2289. confirmButtonText: '确定',
  2290. cancelButtonText: '取消',
  2291. dangerouslyUseHTMLString: true,
  2292. }).then(() => {
  2293. const loading = this.$loading({
  2294. lock: true,
  2295. text: '加载中',
  2296. spinner: 'el-icon-loading',
  2297. background: 'rgba(255,255,255,0.7)'
  2298. });
  2299. confirmWarehouseEntry(row).then(res => {
  2300. this.$message.success("入库成功");
  2301. this.getDetails(this.form.id)
  2302. }).finally(() => {
  2303. loading.close()
  2304. })
  2305. })
  2306. })
  2307. }
  2308. }
  2309. if (name == '生成出库') {
  2310. if (!row.warehouseName || !row.warehouseUnitPrice) {
  2311. return this.$message.error((!row.warehouseName ? "仓库," : '') + (!row.warehouseUnitPrice ? "仓储单价" : '') + "不能为空");
  2312. }
  2313. const loading = this.$loading({
  2314. lock: true,
  2315. text: '加载中',
  2316. spinner: 'el-icon-loading',
  2317. background: 'rgba(255,255,255,0.7)'
  2318. });
  2319. generateOutbound(row).then(res => {
  2320. this.$message.success("生成出库成功");
  2321. this.getDetails(this.form.id)
  2322. }).finally(() => {
  2323. loading.close()
  2324. })
  2325. }
  2326. if (name == '撤销出库') {
  2327. if (!row.warehouseName || !row.warehouseUnitPrice) {
  2328. return this.$message.error((!row.warehouseName ? "仓库," : '') + (!row.warehouseUnitPrice ? "仓储单价" : '') + "不能为空");
  2329. }
  2330. const loading = this.$loading({
  2331. lock: true,
  2332. text: '加载中',
  2333. spinner: 'el-icon-loading',
  2334. background: 'rgba(255,255,255,0.7)'
  2335. });
  2336. revokeOutbound(row).then(res => {
  2337. this.$message.success("撤销成功");
  2338. this.getDetails(this.form.id)
  2339. }).finally(() => {
  2340. loading.close()
  2341. })
  2342. }
  2343. if (name == '出库确认') {
  2344. if (!row.outStorageDate || !row.outQuantity || !row.outWeight) {
  2345. return this.$message.error((!row.outStorageDate ? "出库时间," : '') + (!row.outQuantity ? "出库件数," : '') + (!row.outWeight ? "出库重量" : '') + "不能为空");
  2346. }
  2347. if (row.confirmDispatchVehicles == 1) {
  2348. const loading = this.$loading({
  2349. lock: true,
  2350. text: '加载中',
  2351. spinner: 'el-icon-loading',
  2352. background: 'rgba(255,255,255,0.7)'
  2353. });
  2354. revokeInoutstorage(row).then(res => {
  2355. this.$message.success("撤销成功");
  2356. this.getDetails(this.form.id)
  2357. }).finally(() => {
  2358. loading.close()
  2359. })
  2360. } else {
  2361. storagefeeitems({ pid: row.warehouseId, goodsType: row.goodsType }).then(res => {
  2362. this.ckForm = {
  2363. ...row,
  2364. storageFeePriceD: res.data.data.price,
  2365. storageFeePriceC: res.data.data.priceC
  2366. }
  2367. this.ckVisible = true
  2368. })
  2369. // const loading = this.$loading({
  2370. // lock: true,
  2371. // text: '加载中',
  2372. // spinner: 'el-icon-loading',
  2373. // background: 'rgba(255,255,255,0.7)'
  2374. // });
  2375. // confirmWarehouseEntry(row).then(res => {
  2376. // this.$message.success("出库成功");
  2377. // this.getDetails(this.form.id)
  2378. // }).finally(() => {
  2379. // loading.close()
  2380. // })
  2381. }
  2382. }
  2383. if (name == '开票') {
  2384. this.$message.error("待开发");
  2385. }
  2386. if (name == '出库删除') {
  2387. const loading = this.$loading({
  2388. lock: true,
  2389. text: '加载中',
  2390. spinner: 'el-icon-loading',
  2391. background: 'rgba(255,255,255,0.7)'
  2392. });
  2393. inoutstorageRemove({ ids: row.id }).then(res => {
  2394. this.$message.success("删除成功");
  2395. this.form.outStorageList.splice(index, 1);
  2396. }).finally(() => {
  2397. loading.close()
  2398. })
  2399. }
  2400. },
  2401. getDetails(id) {
  2402. const loading = this.$loading({
  2403. lock: true,
  2404. text: '加载中',
  2405. spinner: 'el-icon-loading',
  2406. background: 'rgba(255,255,255,0.7)'
  2407. });
  2408. getDetail({ id: id }).then(res => {
  2409. this.form = res.data.data
  2410. this.oldForm = this.deepClone(res.data.data)
  2411. this.inLock()
  2412. this.$refs.crud.dicInit();
  2413. this.$refs.crud3.dicInit();
  2414. }).finally(() => {
  2415. loading.close()
  2416. })
  2417. },
  2418. getCopydate(id) {
  2419. const loading = this.$loading({
  2420. lock: true,
  2421. text: '加载中',
  2422. spinner: 'el-icon-loading',
  2423. background: 'rgba(255,255,255,0.7)'
  2424. });
  2425. billsCopyBills({ id: id }).then(res => {
  2426. console.log(res.data.data, 33333333333333)
  2427. res.data.data.billNoFormat = 'HYJK'
  2428. res.data.data.businessTypeCode = 'HYJK'
  2429. this.form = res.data.data
  2430. }).finally(() => {
  2431. loading.close()
  2432. })
  2433. },
  2434. inEdit() {
  2435. this.editButton = false
  2436. if (this.form.status == 0 || this.form.status == 4) {
  2437. if (this.form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') == -1) {
  2438. this.optionForm.disabled = false
  2439. }
  2440. this.editDisabled = false
  2441. }
  2442. },
  2443. allClick(name) {
  2444. },
  2445. submit(type) {
  2446. this.$refs["form"].validate((valid, done) => {
  2447. done();
  2448. if (valid) {
  2449. for (let row of this.form.preContainersList) {
  2450. if (!row.cntrTypeCode || !row.boxNo || !row.goodsName || !row.goodsType || !row.number || !row.netWeight || !row.amount) {
  2451. return this.$message.error("箱信息:" + (!row.cntrTypeCode ? "箱型," : '') + (!row.boxNo ? "箱号," : '') + (!row.goodsName ? "品名," : '') + (!row.goodsType ? "类型," : '') + (!row.number ? "件数," : '') + (!row.netWeight ? "净重," : '') + (!row.amount ? "总金额" : '') + "不能为空");
  2452. }
  2453. }
  2454. if (this.$refs.feeInfo.submitValidate()) {
  2455. const loading = this.$loading({
  2456. lock: true,
  2457. text: '加载中',
  2458. spinner: 'el-icon-loading',
  2459. background: 'rgba(255,255,255,0.7)'
  2460. });
  2461. submit(this.form).then(res => {
  2462. this.$message.success("保存成功");
  2463. if (type == 'goBack') {
  2464. if (this.form.id) {
  2465. this.unLock({
  2466. moduleName: "SI",
  2467. tableName: "SI_Detail",
  2468. billId: this.form.id,
  2469. billNo: this.form.mblno
  2470. });
  2471. }
  2472. this.$emit("goBack", type);
  2473. this.$emit('updateKey')
  2474. }
  2475. this.getDetails(res.data.data.id)
  2476. }).finally(() => {
  2477. loading.close();
  2478. })
  2479. }
  2480. } else {
  2481. return false;
  2482. }
  2483. });
  2484. },
  2485. application() {
  2486. if (this.form.feeCenterListD.length == 0 && this.form.feeCenterListC.length == 0) return this.$message.error("费用不能为空");
  2487. if (this.$refs.feeInfo.submitValidate()) {
  2488. this.$confirm("确定请核数据?", {
  2489. confirmButtonText: "确定",
  2490. cancelButtonText: "取消",
  2491. type: "warning"
  2492. }).then(() => {
  2493. let obj = {}
  2494. obj = {
  2495. id: this.form.id,
  2496. url: '/tradeAgency/oceanFreightImport/index',
  2497. pageStatus: '',
  2498. pageLabel: '海运进口(T)',
  2499. }
  2500. const loading = this.$loading({
  2501. lock: true,
  2502. text: '加载中',
  2503. spinner: 'el-icon-loading',
  2504. background: 'rgba(255,255,255,0.7)'
  2505. });
  2506. checkAgent(obj).then(res => {
  2507. this.$message.success("请核成功");
  2508. this.editDisabled = true
  2509. this.optionForm.disabled = true
  2510. this.getDetails(res.data.data.id)
  2511. }).finally(() => {
  2512. loading.close();
  2513. })
  2514. });
  2515. }
  2516. },
  2517. revokeApplication() {
  2518. this.$confirm("确定撤销请核?", {
  2519. confirmButtonText: "确定",
  2520. cancelButtonText: "取消",
  2521. type: "warning"
  2522. }).then(() => {
  2523. let obj = {}
  2524. obj = {
  2525. id: this.form.id,
  2526. }
  2527. const loading = this.$loading({
  2528. lock: true,
  2529. text: '加载中',
  2530. spinner: 'el-icon-loading',
  2531. background: 'rgba(255,255,255,0.7)'
  2532. });
  2533. revokeCheckAgent(obj).then(res => {
  2534. this.$message.success("撤销请核成功");
  2535. this.getDetails(res.data.data.id)
  2536. this.editDisabled = false
  2537. this.optionForm.disabled = false
  2538. }).finally(() => {
  2539. loading.close();
  2540. })
  2541. });
  2542. },
  2543. //请核关闭
  2544. choceScheduleFun() {
  2545. this.checkScheduleDialog = false
  2546. },
  2547. //自定义列保存
  2548. async saveColumn(ref, option, optionBack, code) {
  2549. const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
  2550. if (inSave) {
  2551. this.$message.success("保存成功");
  2552. //关闭窗口
  2553. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  2554. }
  2555. },
  2556. //自定义列重置
  2557. async resetColumn(ref, option, optionBack, code) {
  2558. this[option] = this[optionBack];
  2559. const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
  2560. if (inSave) {
  2561. this.$message.success("重置成功");
  2562. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  2563. }
  2564. },
  2565. goBack(type) {
  2566. if (contrastObj(this.form, this.oldForm) || contrastList(this.form.preContainersList, this.oldForm.preContainersList) || contrastList(this.form.feeCenterListD, this.oldForm.feeCenterListD) || contrastList(this.form.feeCenterListC, this.oldForm.feeCenterListC) || contrastList(this.form.filesList, this.oldForm.filesList)) {
  2567. this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
  2568. confirmButtonText: "确定",
  2569. cancelButtonText: "取消",
  2570. type: "warning"
  2571. })
  2572. .then(() => {
  2573. this.submit('goBack')
  2574. })
  2575. .catch(() => {
  2576. if (this.form.id) {
  2577. this.unLock({
  2578. moduleName: "SI",
  2579. tableName: "SI_Detail",
  2580. billId: this.form.id,
  2581. billNo: this.form.mblno
  2582. });
  2583. }
  2584. this.$emit("goBack", type);
  2585. this.$emit('updateKey')
  2586. });
  2587. } else {
  2588. if (this.form.id) {
  2589. this.unLock({
  2590. moduleName: "SI",
  2591. tableName: "SI_Detail",
  2592. billId: this.form.id,
  2593. billNo: this.form.mblno
  2594. });
  2595. }
  2596. this.$emit("goBack", type);
  2597. this.$emit('updateKey')
  2598. }
  2599. },
  2600. }
  2601. }
  2602. </script>
  2603. <style lang="scss" scoped>
  2604. ::v-deep .el-form-item {
  2605. margin-bottom: 8px !important;
  2606. }
  2607. ::v-deep .el-table .cell {
  2608. padding: 0 2px !important;
  2609. .el-form-item {
  2610. margin-bottom: 0px !important;
  2611. }
  2612. }
  2613. ::v-deep .avue-crud .el-table .el-form-item__label {
  2614. left: -1px;
  2615. }
  2616. ::v-deep#out-table .back-one {
  2617. background: #ecf5ff !important;
  2618. }
  2619. ::v-deep#out-table .back-two {
  2620. background: #ecf5ff !important;
  2621. }
  2622. ::v-deep .el-table--small td,
  2623. .el-table--small th {
  2624. padding: 2px !important;
  2625. }
  2626. ::v-deep .el-card__body {
  2627. padding: 3px 10px;
  2628. }
  2629. </style>