billsDetails.vue 88 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703
  1. <template>
  2. <div class="borderless" v-loading="pageLoading">
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <!-- <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
  6. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
  7. @click="backToList">返回列表
  8. </el-button>
  9. </div>
  10. <div class="add-customer-btn">
  11. <el-button size="small" style="margin-right: 8px"
  12. :loading="saveLoading" @click="previewDialogfun" >预 览
  13. </el-button>
  14. <el-button size="small" type="warning" :disabled="!form.id" v-if="form.status == 1"
  15. @click.stop="revokeDocumentApproval">撤销单据请核
  16. </el-button>
  17. <el-button size="small" type="success" :disabled="!form.id" v-if="form.status == 0 || form.status == 4"
  18. @click.stop="DocumentApproval">单据请核
  19. </el-button>
  20. <!--<el-button size="small" type="primary" style="margin-right: 8px" v-if="detailData.seeDisabled"-->
  21. <!-- :loading="saveLoading" @click="editHandle">编 辑-->
  22. <!--</el-button>-->
  23. <el-button size="small" type="primary" style="margin-right: 8px"
  24. :loading="saveLoading" @click="editCustomer">保 存
  25. </el-button>
  26. <el-dropdown style="line-height: 0">
  27. <el-button type="warning" :loading="saveLoading" :disabled="!form.id" size="small">
  28. 审 批<i class="el-icon-arrow-down el-icon--right"></i>
  29. </el-button>
  30. <el-dropdown-menu slot="dropdown">
  31. <!--<el-dropdown-item @click.native="examineBtn('审批')" :disabled="isExamineBtn && !detailData.check">审批-->
  32. <!--</el-dropdown-item>-->
  33. <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">审核进度
  34. </el-dropdown-item>
  35. </el-dropdown-menu>
  36. </el-dropdown>
  37. </div>
  38. </div>
  39. <div style="margin-top: 65px">
  40. <el-tabs type="border-card" v-model="bigtabs" @tab-click="bigHandleClick">
  41. <el-tab-pane label="委托信息" name="wt">
  42. <div>
  43. <el-form :model="form" ref="form" label-width="90px" class="demo-ruleForm">
  44. <containerTitle title="基础资料"></containerTitle>
  45. <basic-container :showBtn="true">
  46. <el-row :gutter="60">
  47. <el-col v-for="(item, index) in basicData.column" :key="index" :span="8">
  48. <!--数组-->
  49. <div v-if="item instanceof Array" style="display: flex;align-items: center;justify-content: space-between">
  50. <el-row>
  51. <el-col :span="item[0].span?item[0].span:12">
  52. <el-form-item :label="item[0].label" :prop="item[0].prop" :rules="item[0].rules"
  53. :label-width="item[0].labelWidth">
  54. <span slot="label" v-if="item[0].label">
  55. <span v-if="item[0].label == 'HB/L NO'"
  56. style="color: #4c9e44;cursor: pointer;text-decoration: underline;"
  57. @click="applyforfun(item[0].label)">{{item[0].label}}
  58. </span>
  59. <span v-else style="color: #1e9fff">{{item[0].label}}</span>
  60. </span>
  61. <span v-if="item[0].type == 'button'"></span>
  62. <!--<el-button v-if="item[0].type == 'button'" :disabled="detailData.seeDisabled || item[0].disabled"-->
  63. <!-- size="mini" type="success" icon="el-icon-circle-plus" circle-->
  64. <!-- @click="applyforfun(item[0].label)" >-->
  65. <!--</el-button>-->
  66. <search-query v-else-if="item[0].type == 'select'"
  67. :datalist="item[0].dicData"
  68. :selectValue="form[item[0].prop]"
  69. :filterable="true"
  70. :allowCreate="item[0].allowCreate || false"
  71. :clearable="true"
  72. :remote="true"
  73. :disabled="detailData.seeDisabled || item[0].disabled"
  74. :buttonIf="false"
  75. :placeholder="`请选择${item[0].text || ''}`"
  76. :forParameter="item[0].forParameter"
  77. @remoteMethod="remoteMethod($event,item[0].prop)"
  78. @corpChange="corpChange($event,item[0].prop)"
  79. @corpFocus="remoteMethod($event,item[0].prop)" >
  80. </search-query>
  81. <el-input v-else type="age" style="width: 100%;" v-model="form[item[0].prop]"
  82. size="small" autocomplete="off"
  83. :disabled="detailData.seeDisabled || item[0].disabled"
  84. clearable :placeholder="'请输入' + item[0].label" ></el-input>
  85. </el-form-item>
  86. </el-col>
  87. <el-col v-if="item[1]" :span="item[1].span?item[1].span:12">
  88. <el-form-item :label="item[1].label" :prop="item[1].prop" :rules="item[1].rules"
  89. :label-width="item[1].labelWidth">
  90. <span slot="label" v-if="item[1].label">
  91. <span style="color: #1e9fff">{{item[1].label}}</span>
  92. </span>
  93. <el-date-picker v-if="item[1].type == 'date'"
  94. v-model="form[item[1].prop]" clearable style="width: 100%;"
  95. type="date" size="small" :disabled="detailData.seeDisabled || item[1].disabled"
  96. value-format="yyyy-MM-dd HH:mm"
  97. placeholder="选择日期">
  98. </el-date-picker>
  99. <search-query v-else-if="item[1].type == 'select'"
  100. :datalist="item[1].dicData"
  101. :selectValue="form[item[1].prop]"
  102. :filterable="true"
  103. :clearable="true"
  104. :remote="true"
  105. :disabled="detailData.seeDisabled || item[1].disabled"
  106. :buttonIf="false"
  107. :placeholder="`请选择${item[1].text || ''}`"
  108. :forParameter="item[1].forParameter"
  109. @remoteMethod="remoteMethod($event,item[1].prop)"
  110. @corpChange="corpChange($event,item[1].prop)"
  111. @corpFocus="remoteMethod($event,item[1].prop)" >
  112. </search-query>
  113. <tree-select v-else-if="item[1].type == 'tree'"
  114. v-model="form[item[1].prop]" filterable
  115. :data="item[1].dicData"
  116. :props="item[1].forParameter"
  117. nodeKey="title"
  118. size="small"
  119. :disabled="detailData.seeDisabled || item[1].disabled"
  120. :multiple="false"
  121. :placeholder="`请选择${item[1].text || ''}`"
  122. @input="corpChange($event,item[1].prop)">
  123. </tree-select>
  124. <el-input v-else type="age" style="width: 100%;" v-model="form[item[1].prop]"
  125. size="small" autocomplete="off"
  126. :disabled="detailData.seeDisabled || item[1].disabled"
  127. clearable :placeholder="'请输入' + item[1].text || ''" ></el-input>
  128. </el-form-item>
  129. </el-col>
  130. <el-col v-if="item[2]" :span="item[2].span?item[2].span:12">
  131. <el-form-item :label="item[2].label" :prop="item[2].prop" :rules="item[2].rules"
  132. :label-width="item[2].labelWidth">
  133. <span slot="label" v-if="item[2].label">
  134. <span style="color: #1e9fff">{{item[2].label}}</span>
  135. </span>
  136. <search-query v-if="item[2].type == 'select'"
  137. :datalist="item[2].dicData"
  138. :selectValue="form[item[2].prop]"
  139. :filterable="true"
  140. :clearable="true"
  141. :remote="true"
  142. :disabled="detailData.seeDisabled || item[2].disabled"
  143. :buttonIf="false"
  144. :forParameter="item[2].forParameter"
  145. :placeholder="`请选择${item[2].text || ''}`"
  146. @remoteMethod="remoteMethod($event,item[2].prop)"
  147. @corpChange="corpChange($event,item[2].prop)"
  148. @corpFocus="remoteMethod($event,item[2].prop)" >
  149. </search-query>
  150. <el-input v-else type="age" style="width: 100%;" v-model="form[item[2].prop]"
  151. size="small" autocomplete="off"
  152. :disabled="detailData.seeDisabled || item[1].disabled"
  153. clearable :placeholder="'请输入' + item[2].text || ''" ></el-input>
  154. </el-form-item>
  155. </el-col>
  156. </el-row>
  157. </div>
  158. <!--对象-->
  159. <div v-else>
  160. <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
  161. <span slot="label" v-if="item.label">
  162. <span style="color: #1e9fff">{{item.label}}</span>
  163. </span>
  164. <search-query v-if="item.type == 'select'"
  165. :datalist="item.dicData"
  166. :selectValue="form[item.prop]"
  167. :filterable="true"
  168. :clearable="true"
  169. :remote="true"
  170. :disabled="detailData.seeDisabled || item.disabled"
  171. :buttonIf="item.buttonIf"
  172. :forParameter="item.forParameter"
  173. :placeholder="`请选择${item.text || ''}`"
  174. @remoteMethod="remoteMethod($event,item.prop)"
  175. @corpChange="corpChange($event,item.prop)"
  176. @corpFocus="remoteMethod($event,item.prop)">
  177. <bcorps v-if="item.slot == 'bcorps'"></bcorps>
  178. <bcorpstypedefine v-if="item.slot == 'bcorpstypedefine'"></bcorpstypedefine>
  179. </search-query>
  180. <el-input v-else type="age" style="width: 100%;" v-model="form[item.prop]"
  181. size="small" autocomplete="off"
  182. :disabled="detailData.seeDisabled || item.disabled"
  183. clearable :placeholder="'请输入' + item.text || ''" ></el-input>
  184. </el-form-item>
  185. </div>
  186. </el-col>
  187. </el-row>
  188. </basic-container>
  189. </el-form>
  190. </div>
  191. <div class="customer-main margintop">
  192. <containerTitle title="详细"></containerTitle>
  193. <basic-container :showBtn="true">
  194. <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
  195. <el-tab-pane label="委托详情" name="first">
  196. <entrustment-lnformation :assemblyForm="form"
  197. :detailData="detailData"
  198. :generateBillsfalse="generateBillsfalse"
  199. @billsDetailfun="billsDetailfun(form.id)">
  200. </entrustment-lnformation>
  201. </el-tab-pane>
  202. <el-tab-pane label="MB/L信息" name="third">
  203. <mbinformation :assemblyForm="form"
  204. :generateBillsfalse="generateBillsfalse"
  205. :detailData="detailData">
  206. </mbinformation>
  207. </el-tab-pane>
  208. <el-tab-pane label="报表管理" name="fourth">
  209. <reports :id="form.id" :assemblyForm="form" :disabled="detailData.seeDisabled" businessValue="KYCK"></reports>
  210. </el-tab-pane>
  211. <el-tab-pane label="文件中心" name="seventh">
  212. <filescenter :assemblyForm="form" :detailData="detailData"></filescenter>
  213. </el-tab-pane>
  214. </el-tabs>
  215. </basic-container>
  216. <!--<basic-container :showBtn="true" v-if="activeName == 'first' || activeName == 'third'">-->
  217. <!-- <formbottom :assemblyForm="form" :generateBillsfalse="generateBillsfalse" :detailData="detailData"></formbottom>-->
  218. <!--</basic-container>-->
  219. </div>
  220. </el-tab-pane>
  221. <el-tab-pane label="费用信息" name="fy">
  222. <feecenter :assemblyForm="form" :detailData="detailData" :pleasereviewType="pleasereviewType" :pid="form.id" @billsDetailfun="billsDetailfun(form.id)"></feecenter>
  223. </el-tab-pane>
  224. <el-tab-pane label="单证中心" name="dz">
  225. <document-center ref="documentCenter" :assemblyForm="form" ></document-center>
  226. </el-tab-pane>
  227. <el-tab-pane label="分单列表" name="fd" v-if="form.billType == 'MM'">
  228. <Split-list :detailData="detailData" :assemblyForm="form"
  229. :data="billsListAllData"
  230. @billsListAllfun="billsListAllfun(form.id)"></Split-list>
  231. </el-tab-pane>
  232. </el-tabs>
  233. </div>
  234. <!--审核弹窗-->
  235. <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
  236. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  237. <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
  238. </el-dialog>
  239. <!--预览报表弹窗-->
  240. <el-dialog append-to-body title="预览报表" class="el-dialogDeep" :visible.sync="previewDialog" width="60%"
  241. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  242. <business-reports :id="form.id" :disabled="detailData.seeDisabled"></business-reports>
  243. </el-dialog>
  244. </div>
  245. </template>
  246. <script>
  247. import EntrustmentLnformation from "@/views/iosBasicData/AirtransportExport/bills/assembly/EntrustmentLnformation.vue";
  248. import mbinformation from "@/views/iosBasicData/AirtransportExport/bills/assembly/mbinformation.vue";
  249. import reports from "@/views/iosBasicData/AirtransportExport/bills/assembly/reports.vue";
  250. import formbottom from "@/views/iosBasicData/AirtransportExport/bills/assembly/formbottom.vue";
  251. import edicode from '@/views/iosBasicData/AirtransportExport/bills/assembly/edicode.vue'
  252. import filescenter from "@/views/iosBasicData/AirtransportExport/bills/assembly/filescenter.vue";
  253. import DistributionBox from "@/views/iosBasicData/AirtransportExport/bills/assembly/DistributionBox.vue";
  254. import feecenter from '@/views/iosBasicData/AirtransportExport/bills/assembly/feecenter.vue'
  255. import {getList, getList as userGetList} from '@/api/system/user'
  256. import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
  257. import TreeSelect from "@/components/iosbasic-data/TreeSelect.vue";
  258. import bcorps from "@/views/iosBasicData/bcorps/index.vue";
  259. import bcorpstypedefine from "@/views/iosBasicData/bcorps/bcorpstypedefine.vue";
  260. import SplitList from "@/views/iosBasicData/AirtransportExport/bills/assembly/SplitList.vue";
  261. import {getLazylist} from "@/api/basicData/agreement";
  262. import {getBcorpsList, getBcorpslistByType} from "@/api/iosBasicData/bcorps";
  263. import {getBlocationsList} from "@/api/iosBasicData/blocations";
  264. import {getBcorpsattnList} from "@/api/iosBasicData/bcorpsattn";
  265. import {getWorkDicts} from "@/api/system/dictbiz";
  266. import {getDeptLazyTree, getDeptTree, getLazyList} from "@/api/system/dept";
  267. import {
  268. billsCheckBills, billsCopyBills,
  269. billsDetail,
  270. billsGetBillNo,
  271. billsListAll, billsRevokeCheckBills, editypesSendingEdi,
  272. billsSubmit,
  273. deptGetDetailPol,
  274. } from '@/api/iosBasicData/bills'
  275. import {dateFormat} from "@/util/date";
  276. import checkSchedule from "@/components/checkH/checkSchedule.vue";
  277. import {getBvesselsList} from "@/api/iosBasicData/bvessels";
  278. import DocumentCenter from "@/views/iosBasicData/AirtransportExport/bills/assembly/DocumentCenter.vue";
  279. import businessReports from "@/views/iosBasicData/AirtransportExport/bills/assembly/businessReports.vue";
  280. import {popupReminder} from "@/util/messageReminder";
  281. import editypes from "@/views/iosBasicData/editypes/index.vue";
  282. import {editypesList} from "@/api/iosBasicData/editypes";
  283. import {
  284. aeabillsCheckBills,
  285. aeabillsCopyBills,
  286. aeabillsDetail,
  287. aeabillsRevokeCheckBills, aeabillsSubmit
  288. } from "@/api/iosBasicData/aeabills";
  289. export default {
  290. components:{
  291. checkSchedule,
  292. SearchQuery,
  293. EntrustmentLnformation,
  294. formbottom,
  295. mbinformation,
  296. reports,
  297. edicode,
  298. filescenter,
  299. DistributionBox,
  300. feecenter,
  301. bcorps,
  302. bcorpstypedefine,
  303. SplitList,
  304. TreeSelect,
  305. DocumentCenter,
  306. businessReports,
  307. editypes,
  308. },
  309. props:{
  310. detailData: {
  311. type: Object
  312. }
  313. },
  314. data() {
  315. return {
  316. previewDialog:false, // 预览报表弹窗开启
  317. generateBillsfalse:false, // 如果生成账单就禁用
  318. pleasereviewType:false, // 如果请核就禁用
  319. checkScheduleDialog:false, // 审核弹窗
  320. checkId:'', // 审核需要的id
  321. batchNo:'',
  322. billsListAllData:[], // 分单列表数据
  323. pageLoading:false, // 全屏的动画
  324. saveLoading:false,
  325. // 详情数据
  326. form:{
  327. billDate:dateFormat(new Date(), "yyyy-MM-dd") + ' 00:00', // 单据日期 默认 当天
  328. operatorName:JSON.parse(localStorage.getItem('saber-userInfo')).content.user_name, // OP 默认登录人
  329. operatorId:JSON.parse(localStorage.getItem('saber-userInfo')).content.user_id, // OP 默认登录人
  330. businessType:'AE', // 业务类型 默认 海运出口
  331. billType:'DD', // 单据类型 默认 直单
  332. issueType:'正本', // 签单方式 默认 正本
  333. mpaymode:'PP', // 主单付费方式 默认PP
  334. hpaymode:'PP', // 分单付费方式 默认 PP
  335. loadType:'FCL', // 装箱方式默认整箱
  336. srcType:'OWN', // 业务来源默认公司 来源 内容 默认登录人所属公司
  337. numberOfObl:'THREE', // 正本份数 默认 THREE
  338. numberOfCopy:'ONE', // 副本份数 默认 ONE
  339. seaType:'直航', // 进出口 默认出口 E=出口 I=进口"
  340. marks:'N/M',
  341. filesList:[], // 文件中心
  342. feeCenterListD:[], // 收
  343. feeCenterListC:[], // 付
  344. preContainersList:[], // 箱
  345. },
  346. // 循环的配置
  347. basicData:{
  348. column:[
  349. {
  350. label: "客户名称", // 调往来单位接口
  351. prop: "corpCnName",
  352. text:"客户名称",
  353. type:'select',
  354. dicData:[],
  355. disabled:false,
  356. buttonIf:true,
  357. slot:'bcorps',
  358. forParameter:{
  359. key:'id',
  360. label:'cnName',
  361. value:'cnName',
  362. },
  363. rules: [{
  364. required: true,
  365. message: " ",
  366. trigger: "blur"
  367. }]
  368. },
  369. [
  370. {
  371. label: "客户OP", // 客户联系人姓名 电话和邮箱带出来,可以修改 往来单位接口 需要传一个客户名称的值过去
  372. prop: "corpAttnName",
  373. text:"姓名",
  374. allowCreate:true,
  375. type:'select',
  376. dicData:[],
  377. span:10,
  378. disabled:true,
  379. forParameter:{
  380. key:'id',
  381. label:'cname',
  382. value:'cname',
  383. },
  384. },
  385. {
  386. label: "", //客户联系人电话
  387. prop: "corpAttnTel",
  388. text:"电话",
  389. labelWidth:'10px',
  390. disabled:true,
  391. span:7,
  392. rules: [{
  393. required: true,
  394. message: "",
  395. trigger: "blur"
  396. }]
  397. },
  398. {
  399. label: "", // 客户联系人邮箱
  400. prop: "corpAttnEmail",
  401. text:"邮箱",
  402. labelWidth:'10px',
  403. disabled:true,
  404. span:7,
  405. rules: [{
  406. required: true,
  407. message: " ",
  408. trigger: "blur"
  409. }]
  410. },
  411. ],
  412. [
  413. {
  414. label: "业务来源", // OWN=公司 AGENT=代理 SALES=业务员
  415. prop: "srcType",
  416. text:"业务来源",
  417. type:'select',
  418. disabled:true,
  419. forParameter:{
  420. key:'dictKey',
  421. label:'dictValue',
  422. value:'dictKey',
  423. },
  424. dicData:[],
  425. },
  426. {
  427. label: "",
  428. prop: "srcCnName", // 来源中文 公司不是下拉写死公司两字 业务员调用户管理列表 代理调往来单位四个代理数据
  429. text:"来源",
  430. labelWidth:'30px',
  431. type:'select',
  432. disabled:true,
  433. dicData:[],
  434. forParameter:{
  435. key:'id',
  436. label:'cnName',
  437. value:'cnName',
  438. },
  439. },
  440. ],
  441. [
  442. {
  443. label: "MB/L NO",
  444. text:"MB/L NO",
  445. prop: "mblno",
  446. span:19,
  447. disabled:false,
  448. },
  449. {
  450. label: "", // MB/L 付款方式 PP=预付, CC=到付, FPA, Other
  451. text:"付款方式",
  452. prop: "mpaymode",
  453. type:'select',
  454. labelWidth:'30px',
  455. disabled:false,
  456. span:5,
  457. dicData:[],
  458. forParameter:{
  459. key:'dictKey',
  460. label:'dictValue',
  461. value:'dictKey',
  462. },
  463. },
  464. ],
  465. [
  466. {
  467. label: "HB/L NO", //弹窗点击确认还是取消申请 调后台接口获取到一个编号
  468. prop: "HB/L NO",
  469. type:'button',
  470. span:4,
  471. disabled:false,
  472. },
  473. {
  474. label: "",
  475. text:"HB/L NO",
  476. prop: "hblno",
  477. labelWidth:'6px',
  478. span:14,
  479. disabled:true,
  480. },
  481. {
  482. label: "", // HB/L 付款方式 PP=预付, CC=到付, FPA, Other', 申请之后默认 PP
  483. text:"付款方式",
  484. prop: "hpaymode",
  485. labelWidth:'30px',
  486. disabled:false,
  487. type:'select',
  488. span:6,
  489. dicData:[],
  490. forParameter:{
  491. key:'dictKey',
  492. label:'dictValue',
  493. value:'dictKey',
  494. },
  495. },
  496. ],
  497. {
  498. label: "RET MBLNO", // Co-Loader 中文名称 往来单位 类别
  499. text:"RET MBLNO",
  500. prop: "refno",
  501. disabled:false,
  502. },
  503. [
  504. {
  505. label: "业务编号",
  506. text:"业务编号",
  507. prop: "billNo",
  508. disabled:true,
  509. },
  510. {
  511. label: "创建日期",
  512. prop: "createTime",
  513. type:'date',
  514. disabled:true,
  515. },
  516. ],
  517. {
  518. label: "制单人",
  519. text:"制单人",
  520. prop: "createUserName",
  521. type:'select',
  522. dicData:[],
  523. disabled:false,
  524. buttonIf:false,
  525. forParameter:{
  526. key:'id',
  527. label:'name',
  528. value:'name',
  529. },
  530. },
  531. [
  532. {
  533. label: "委托人",
  534. text:"委托人",
  535. prop: "clientName",
  536. type:'select',
  537. dicData:[],
  538. disabled:false,
  539. buttonIf:false,
  540. forParameter:{
  541. key:'id',
  542. label:'cnName',
  543. value:'cnName',
  544. },
  545. },
  546. {
  547. label: "运输类型", // HB/L 付款方式 PP=预付, CC=到付, FPA, Other', 申请之后默认 PP
  548. text:"运输类型",
  549. prop: "transportType",
  550. disabled:false,
  551. type:'select',
  552. dicData:[],
  553. forParameter:{
  554. key:'dictKey',
  555. label:'dictValue',
  556. value:'dictKey',
  557. },
  558. },
  559. ]
  560. ]
  561. },
  562. activeName:'first',
  563. bigtabs:'wt',
  564. saberUserInfo:{}, // 当前登录人信息
  565. // 需要加判断是否必填的数据
  566. messageData:[
  567. {
  568. name:'客户',
  569. value:'corpCnName',
  570. },
  571. {
  572. name:'业务来源',
  573. value:'srcType',
  574. },
  575. {
  576. name:'MBLNO',
  577. value:'mblno',
  578. },
  579. {
  580. name:'Reference NO',
  581. value:'refno',
  582. },
  583. {
  584. name:'航班号',
  585. value:'voyageNo',
  586. },
  587. {
  588. name:'目的港',
  589. value:'finalDestinationName',
  590. },
  591. {
  592. name:'包装单位',
  593. value:'packingUnit',
  594. },
  595. {
  596. name:'航空公司',
  597. value:'carrierCnName',
  598. },
  599. {
  600. name:'航站',
  601. value:'cyCnName',
  602. },
  603. ],
  604. }
  605. },
  606. watch:{
  607. // 监听业务类型 如果不是分单 可以编辑分单号
  608. 'form.billType':{
  609. // 执行方法
  610. handler(oldValue,newValue) {
  611. // if (oldValue == 'MM') {
  612. // this.form.hblno = ''
  613. // }
  614. // 只要分单不能编辑
  615. if (oldValue == 'MH') {
  616. this.columnforfun('hblno').disabled = true
  617. }else {
  618. this.columnforfun('hblno').disabled = false
  619. }
  620. },
  621. deep: true, // 深度监听
  622. immediate: true // 第一次改变就执行
  623. },
  624. // 监听箱信息数据 箱信息中有温度 自动切换 冻货
  625. 'form.preContainersList':{
  626. // 执行方法
  627. handler(oldValue,newValue) {
  628. // 判断是否是数组
  629. if (oldValue instanceof Array) {
  630. // 循环 有温度反 true 没有反 false
  631. const arr = oldValue.map(item=>{
  632. if (Number(item.temperature)) {
  633. return true
  634. }else {
  635. return false
  636. }
  637. })
  638. // 判断是否有温度
  639. if (arr[0]) {
  640. // 判断之前是否是冻货
  641. if (this.form.cargoType == 'reefer') return
  642. this.$message({
  643. message: '箱信息里有温度已将货描切换为冻柜',
  644. type: 'warning'
  645. });
  646. this.$set(this.form,'cargoType','reefer')
  647. }
  648. }
  649. },
  650. deep: true, // 深度监听
  651. immediate: true // 第一次改变就执行
  652. }
  653. },
  654. created() {
  655. this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content
  656. // 判断是否员id, 有id 就不显示
  657. if (!this.form.id) {
  658. this.deptGetDetailPolfun() // 收货地 起运港 当前登录人的默认
  659. this.userGetListfun(undefined,true) // 获取用户管理数据
  660. }
  661. this.ownDeptLazyTreefun() // 获取公司数据
  662. this.mpaymodeWorkDictsfun() // 获取 付款方式字典
  663. this.srcTypeWorkDictsfun()
  664. },
  665. methods:{
  666. // 报表弹窗
  667. previewDialogfun(){
  668. this.previewDialog = true
  669. },
  670. //请核关闭
  671. choceScheduleFun() {
  672. this.checkScheduleDialog = false
  673. },
  674. // 收货地 起运港 当前登录人的默认
  675. deptGetDetailPolfun(){
  676. deptGetDetailPol(this.saberUserInfo.dept_id).then(res=>{
  677. // 收货地
  678. this.form.placeReceiptName = res.data.data.departureEnName
  679. this.form.placeReceiptId = res.data.data.departureId
  680. this.form.placeReceiptNamePrint = res.data.data.departureEnName
  681. // 起运港
  682. this.form.departureCnName = res.data.data.departureCnName
  683. this.form.departureEnName = res.data.data.departureEnName
  684. this.form.departureId = res.data.data.departureId
  685. this.form.departureNamePrint = res.data.data.departureEnName
  686. // 签单地点 默认 起运港
  687. this.$set(this.form,'issueAt',this.form.departureEnName)
  688. // 主单单付费地点 默认 如果主单付费方式 为PP 取起运港 如果主单付费地点为CC 取卸货港
  689. if (this.form.mpaymode == 'PP') {
  690. this.$set(this.form,'mpayplace',this.form.departureEnName)
  691. }
  692. // 分单单付费地点 默认 如果分单付费方式 为PP 取起运港 如果分单付费地点为CC 取卸货港
  693. if (this.form.hpaymode == 'PP') {
  694. this.$set(this.form,'hpayplace',this.form.departureEnName)
  695. }
  696. })
  697. },
  698. // 获取运输类型字典数据
  699. transportTypeWorkDictsfun(){
  700. getWorkDicts('transportation_type_los').then(res=>{
  701. this.columnforfun('transportType').dicData = res.data.data
  702. })
  703. },
  704. // 获取用户管理数据
  705. userGetListfun(account = undefined,type = false,){
  706. userGetList(1,10,{account}).then(res=>{
  707. this.columnforfun('operatorName').dicData = res.data.data.records
  708. })
  709. },
  710. // 获取付款方式字典数据
  711. mpaymodeWorkDictsfun(){
  712. console.log(787)
  713. getWorkDicts('payment_method_los').then((res) => {
  714. console.log(res,789)
  715. this.columnforfun('mpaymode').dicData = res.data.data
  716. this.columnforfun('hpaymode').dicData = res.data.data
  717. console.log(this.columnforfun('hpaymode'),792)
  718. })
  719. },
  720. // 获取客户名称数据 往来单位数据
  721. getBcorpsListfun(cnName){
  722. getBcorpsList(1,10,{cnName}).then(res=>{
  723. this.columnforfun('corpCnName').dicData = res.data.data.records.map(item=>{
  724. item.cnName = item.cnName + ' - ' + item.shortName
  725. return item
  726. })
  727. })
  728. },
  729. // 获取委托人数据 往来单位数据
  730. clientNameBcorpsListfun(cnName){
  731. getBcorpsList(1,10,{cnName}).then(res=>{
  732. this.columnforfun('clientName').dicData = res.data.data.records
  733. })
  734. },
  735. // 获取客户联系人 客户OP
  736. getBcorpsattnListfun(cnName){
  737. getBcorpsattnList(1,10,{pid:this.form.corpId,cnName}).then(res=>{
  738. this.columnforfun('corpAttnName').dicData = res.data.data.records
  739. if(res.data.data.records.length == 0) {
  740. this.form.corpAttnName = ''
  741. this.form.corpAttnId = ''
  742. this.$set(this.form,'corpAttnTel','')
  743. this.$set(this.form,'corpAttnEmail','')
  744. return
  745. }
  746. this.form.corpAttnName = res.data.data.records[0].cname
  747. this.form.corpAttnId = res.data.data.records[0].id
  748. this.$set(this.form,'corpAttnTel',res.data.data.records[0].tel)
  749. this.$set(this.form,'corpAttnEmail',res.data.data.records[0].email)
  750. })
  751. },
  752. // 获取地点信息
  753. getBlocationsListfun(cnName){
  754. getBlocationsList(1,10,{cnName}).then(res=>{
  755. this.columnforfun('mPayplace').dicData = res.data.data.records
  756. })
  757. },
  758. // 获取业务来源数据
  759. srcTypeWorkDictsfun(){
  760. getWorkDicts('src_type_los').then(res=>{
  761. this.columnforfun('srcType').dicData = res.data.data
  762. })
  763. },
  764. // 获取业务来源代理数据
  765. agentBcorpsListfun(cnName){
  766. let corpType = '1712285382575398914,1712285645314990082,1712285842321448962,1712286433378574338'
  767. getBcorpslistByType(1,10,{cnName,corpType}).then(res=>{
  768. this.columnforfun('srcCnName').dicData = res.data.data.records
  769. })
  770. },
  771. // 获取业务来源业务员数据
  772. salesUserGetListfun(account){
  773. userGetList(1,10,{account}).then(res=>{
  774. this.columnforfun('srcCnName').dicData = res.data.data.records
  775. })
  776. },
  777. // 获取制单人数据 用户数据
  778. createUserUserGetListfun(account){
  779. userGetList(1,10,{account}).then(res=>{
  780. this.columnforfun('createUserName').dicData = res.data.data.records
  781. })
  782. },
  783. // 获取公司名称 用户管理左侧
  784. ownDeptLazyTreefun(){
  785. getDeptLazyTree(0).then(res=>{
  786. this.columnforfun('srcCnName').dicData = res.data.data
  787. // 来源 内容 默认登录人所属公司
  788. for(let item of this.columnforfun('srcCnName').dicData) {
  789. if (item.id == JSON.parse(localStorage.getItem('saber-userInfo')).content.dept_id) {
  790. this.$set(this.form,'srcId',item.id)
  791. this.$set(this.form,'srcCnName',item.title)
  792. this.$set(this.form,'srcEnName',item.title)
  793. }
  794. }
  795. })
  796. },
  797. // 申请B/L NO
  798. billsGetBillNofun(){
  799. let billNoFormat = 'KYCK'
  800. // if (this.form.cargoType == 'dry') {
  801. // billNoFormat = 'KYCK-PH'
  802. // }else if (this.form.cargoType == 'danger') {
  803. // billNoFormat = 'KYCK-WXP'
  804. // }else if (this.form.cargoType == 'reefer') {
  805. // billNoFormat = 'KYCK-DG'
  806. // }else {}
  807. if (this.form.cargoType) {
  808. billNoFormat = 'KYCK-WXP'
  809. }
  810. billsGetBillNo({
  811. businessTypeCode:'KYCK',
  812. billNoFormat:billNoFormat
  813. }).then(res=>{
  814. this.columnforfun('hpaymode').disabled = false
  815. this.$set(this.form,'hblno',res.data.data)
  816. this.billsSubmitfun()
  817. })
  818. },
  819. /* 远程模糊查询操作用户 */
  820. remoteMethod(value,name) {
  821. if (name == 'operatorName') {
  822. this.userGetListfun(value)
  823. }else if (name == 'corpCnName') {
  824. this.getBcorpsListfun(value)
  825. }else if (name == 'mPayplace') {
  826. this.getBlocationsListfun(value)
  827. }else if (name == 'corpAttnName') {
  828. this.getBcorpsattnListfun(value)
  829. }else if (name == 'srcType') {
  830. this.srcTypeWorkDictsfun()
  831. }else if (name == 'srcCnName') {
  832. if (this.form.srcType == 'SALES') {
  833. // 业务员
  834. this.columnforfun('srcCnName').forParameter = { key:'id', label:'name', value:'name'}
  835. this.salesUserGetListfun(value)
  836. }else if (this.form.srcType == 'AGENT') {
  837. // 代理
  838. this.columnforfun('srcCnName').forParameter = { key:'id', label:'cnName', value:'cnName'}
  839. this.agentBcorpsListfun(value)
  840. }else if (this.form.srcType == 'OWN') {
  841. // 公司
  842. this.columnforfun('srcCnName').forParameter = { key:'id', label:'title', value:'title'}
  843. this.ownDeptLazyTreefun()
  844. }else {}
  845. }else if (name == 'transportType') {
  846. this.transportTypeWorkDictsfun()
  847. }else if (name == 'clientName') {
  848. this.clientNameBcorpsListfun(value)
  849. }else if (name == 'createUserName') {
  850. this.createUserUserGetListfun(value)
  851. } else {
  852. }
  853. },
  854. // 下拉的监听事件
  855. corpChange(value,name){
  856. if (name == 'operatorName') {
  857. // OP 下拉赋值 用户管理列表
  858. for(let item of this.columnforfun('operatorName').dicData) {
  859. if (item.name == value) {
  860. this.form.operatorName = item.name
  861. this.form.operatorId = item.id
  862. }
  863. }
  864. }
  865. else if (name == 'corpCnName') {
  866. if (value) {
  867. this.columnforfun('corpAttnName').disabled = false
  868. this.columnforfun('corpAttnTel').disabled = false
  869. this.columnforfun('corpAttnEmail').disabled = false
  870. }else {
  871. this.columnforfun('corpAttnName').disabled = true
  872. this.columnforfun('corpAttnTel').disabled = true
  873. this.columnforfun('corpAttnEmail').disabled = true
  874. // 如果点击清空按钮把值赋值为空
  875. this.form.corpCnName = ''
  876. this.form.corpEnName = ''
  877. this.form.corpId = ''
  878. this.form.corpCode = ''
  879. // 清空 客户OP
  880. this.form.corpAttnName = ''
  881. this.form.corpAttnId = ''
  882. this.$set(this.form,'corpAttnTel','')
  883. this.$set(this.form,'corpAttnEmail','')
  884. // 清空 业务来源和来源详情
  885. this.$set(this.form,'srcType','')
  886. this.$set(this.form,'srcId','')
  887. this.$set(this.form,'srcCnName','')
  888. this.$set(this.form,'srcEnName','')
  889. }
  890. // 往来单位
  891. for(let item of this.columnforfun('corpCnName').dicData) {
  892. if (item.cnName == value) {
  893. this.form.corpCnName = item.cnName
  894. this.form.corpEnName = item.enName
  895. this.form.corpId = item.id
  896. this.form.corpCode = item.code
  897. // 获取 客户op数据
  898. this.getBcorpsattnListfun()
  899. // 业务来源参数带出
  900. this.$set(this.form,'srcType',item.sourceType)
  901. this.$set(this.form,'srcId',item.srcId)
  902. this.$set(this.form,'srcCnName',item.srcCnName)
  903. this.$set(this.form,'srcEnName',item.srcEnName)
  904. this.columnforfun('srcType').disabled = false
  905. this.columnforfun('srcCnName').disabled = false
  906. // 航线带出往来单位的优势航线
  907. this.$set(this.form,'lineCnName',item.advantageRoute)
  908. // 带出发货人数据
  909. this.$set(this.form,'hshipperId',item.id)
  910. this.$set(this.form,'hshipperCnName',item.cnName)
  911. this.$set(this.form,'hshipperEnName',item.enName)
  912. this.$set(this.form,'hshipperCode',item.code)
  913. this.$set(this.form,'hshipperDetails',item.details)
  914. this.$set(this.form,'hshipperCntyName',item.cntyName)
  915. this.$set(this.form,'hshipperCntyCode',item.cntyCode)
  916. }
  917. }
  918. }
  919. else if (name == 'corpAttnName') {
  920. for(let item of this.columnforfun('corpAttnName').dicData) {
  921. if (item.cname == value) {
  922. this.form.corpAttnName = item.cname
  923. this.form.corpAttnId = item.id
  924. this.$set(this.form,'corpAttnTel',item.tel)
  925. this.$set(this.form,'corpAttnEmail',item.email)
  926. }
  927. }
  928. }
  929. else if (name == 'srcType') {
  930. if (!value) {
  931. this.$set(this.form,'srcType','')
  932. // this.columnforfun('srcCnName').disabled = true
  933. return
  934. }
  935. this.$set(this.form,'srcId','')
  936. this.$set(this.form,'srcCnName','')
  937. this.$set(this.form,'srcEnName','')
  938. this.form[name] = value
  939. if (value == 'OWN') {
  940. // 公司
  941. this.columnforfun('srcCnName').forParameter = { key:'id', label:'title', value:'title'}
  942. this.ownDeptLazyTreefun()
  943. }else if (value == 'AGENT') {
  944. // 代理
  945. this.columnforfun('srcCnName').type = 'select'
  946. this.columnforfun('srcCnName').forParameter = { key:'id', label:'cnName', value:'cnName'}
  947. this.columnforfun('srcCnName').disabled = false
  948. this.agentBcorpsListfun()
  949. }else if (value == 'SALES') {
  950. // 业务员
  951. this.columnforfun('srcCnName').type = 'select'
  952. this.columnforfun('srcCnName').forParameter = { key:'id', label:'name', value:'name'}
  953. this.columnforfun('srcCnName').disabled = false
  954. this.salesUserGetListfun()
  955. }else {}
  956. }
  957. else if (name == 'srcCnName'){
  958. for(let item of this.columnforfun('srcCnName').dicData) {
  959. if (item[this.columnforfun('srcCnName').forParameter.value] == value) {
  960. if (this.form.srcType == 'SALES') {
  961. // 业务员
  962. this.$set(this.form,'srcId',item.id)
  963. this.$set(this.form,'srcCnName',item.name)
  964. this.$set(this.form,'srcEnName',item.name)
  965. }else if (this.form.srcType == 'AGENT') {
  966. // 代理
  967. this.$set(this.form,'srcId',item.id)
  968. this.$set(this.form,'srcCnName',item.cnName)
  969. this.$set(this.form,'srcEnName',item.enName)
  970. }else {}
  971. }
  972. }
  973. }
  974. else if (name == 'coloaderCnName') {
  975. for(let item of this.columnforfun('coloaderCnName').dicData) {
  976. if (item.cnName == value) {
  977. this.$set(this.form,'coloaderId',item.id)
  978. this.$set(this.form,'coloaderCnName',item.cnName)
  979. this.$set(this.form,'coloaderEnName',item.enName)
  980. }
  981. }
  982. }
  983. else if (name == 'mpaymode') {
  984. // 主单付费方式
  985. this.form[name] = value
  986. }
  987. else if (name == 'hpaymode') {
  988. // 分单付费方式
  989. this.form[name] = value
  990. }
  991. else if (name == 'clientName') {
  992. for(let item of this.columnforfun('clientName').dicData) {
  993. if (item.cnName == value) {
  994. this.$set(this.form,'clientName',item.cnName)
  995. this.$set(this.form,'clientId',item.id)
  996. }
  997. }
  998. }
  999. else if (name == 'createUserName') {
  1000. for(let item of this.columnforfun('createUserName').dicData) {
  1001. if (item.cnName == value) {
  1002. this.$set(this.form,'createUserName',item.name)
  1003. this.$set(this.form,'createUserId',item.id)
  1004. }
  1005. }
  1006. }
  1007. else {
  1008. this.form[name] = value
  1009. }
  1010. },
  1011. // 申请B/L NO
  1012. applyforfun(text){
  1013. if (!this.form.id) {
  1014. this.$message({
  1015. message: '请先保存数据',
  1016. type: 'warning'
  1017. });
  1018. return
  1019. }
  1020. // 如果不是分单
  1021. if (this.form.billType != 'MH') {
  1022. this.$message({
  1023. message: '只要分单需要申请',
  1024. type: 'warning'
  1025. });
  1026. return
  1027. }
  1028. if (this.form.hblno) {
  1029. this.$message({
  1030. message: 'B/L NO 只能申请一次',
  1031. type: 'warning'
  1032. });
  1033. return
  1034. }
  1035. if (!this.form.businessType) {
  1036. this.$message({
  1037. message: '请先选择业务类型',
  1038. type: 'warning'
  1039. });
  1040. return
  1041. }
  1042. if (!this.form.corpCnName) {
  1043. this.$message({
  1044. message: '请先选择客户名称',
  1045. type: 'warning'
  1046. });
  1047. return
  1048. }
  1049. this.$confirm(`确定${text}?`, {
  1050. confirmButtonText: "确定",
  1051. cancelButtonText: "取消",
  1052. type: "warning"
  1053. }).then(res=>{
  1054. this.billsGetBillNofun()
  1055. })
  1056. },
  1057. // 配置项
  1058. columnforfun(value){
  1059. for(let item of this.basicData.column) {
  1060. if (item instanceof Array) {
  1061. for(let ite of item) {
  1062. if (value == ite.prop) {
  1063. return ite
  1064. }
  1065. }
  1066. }else {
  1067. if (value == item.prop) {
  1068. return item
  1069. }
  1070. }
  1071. }
  1072. },
  1073. //返回列表
  1074. backToList() {
  1075. this.$emit('goBack')
  1076. },
  1077. // 单据请核
  1078. DocumentApproval(){
  1079. if(this.form.billType == 'MH') {
  1080. this.$message.warning('分单不能提交请核')
  1081. return
  1082. }
  1083. if (popupReminder(this.form,this.messageData)){
  1084. this.$confirm(popupReminder(this.form,this.messageData), {
  1085. confirmButtonText: "确定",
  1086. cancelButtonText: "取消",
  1087. type: "warning"
  1088. })
  1089. }
  1090. if (popupReminder(this.form,this.messageData)) {
  1091. return;
  1092. }
  1093. this.$confirm("确定要请核数据?", {
  1094. confirmButtonText: "确定",
  1095. cancelButtonText: "取消",
  1096. type: "warning"
  1097. }).then(()=>{
  1098. this.pageLoading = true
  1099. aeabillsCheckBills({
  1100. id:this.form.id,
  1101. url: '/iosBasicData/AirtransportExport/bills/approvalDetails',
  1102. pageStatus: "this.$store.getters.approvalDetails",
  1103. pageLabel: "审批详情(F)",
  1104. }).then(res=>{
  1105. this.pageLoading = false
  1106. this.$message({
  1107. type: "success",
  1108. message: "操作成功!"
  1109. });
  1110. // 详情
  1111. this.billsDetailfun(this.form.id)
  1112. })
  1113. })
  1114. },
  1115. // 撤销单据请核
  1116. revokeDocumentApproval(){
  1117. this.$confirm("确定要撤销请核数据?", {
  1118. confirmButtonText: "确定",
  1119. cancelButtonText: "取消",
  1120. type: "warning"
  1121. }).then(()=>{
  1122. this.pageLoading = true
  1123. aeabillsRevokeCheckBills({
  1124. id:this.form.id
  1125. }).then(res=>{
  1126. this.pageLoading = false
  1127. this.$message({
  1128. type: "success",
  1129. message: "操作成功!"
  1130. });
  1131. // 详情
  1132. this.billsDetailfun(this.form.id)
  1133. })
  1134. })
  1135. },
  1136. // 编辑按钮
  1137. editHandle(){
  1138. this.detailData.seeDisabled = false
  1139. },
  1140. // 大保存按钮
  1141. editCustomer(){
  1142. this.$refs.form.validate((valid)=>{
  1143. if (valid) {
  1144. // 判断必填项
  1145. let sum = '请填写'
  1146. if (!this.form.length) {
  1147. sum += ` 长度`
  1148. }
  1149. if (!this.form.width) {
  1150. sum += ` 宽度`
  1151. }
  1152. if (!this.form.height) {
  1153. sum += ` 高度`
  1154. }
  1155. if (!this.form.quantity) {
  1156. sum += ` 件数`
  1157. }
  1158. if (!this.form.packingUnit) {
  1159. sum += ` 包装`
  1160. }
  1161. if (!this.form.grossWeight) {
  1162. sum += ` 毛重`
  1163. }
  1164. if (!this.form.measurement) {
  1165. sum += ` 尺码`
  1166. }
  1167. if (!this.form.goodsValue) {
  1168. sum += ` 货物价值`
  1169. }
  1170. if (!this.form.billingWeight) {
  1171. sum += ` 计费重量`
  1172. }
  1173. if (!this.form.unit) {
  1174. sum += ` 计量单位`
  1175. }
  1176. if (!this.form.freightRateGrade) {
  1177. sum += ` 运价等级`
  1178. }
  1179. for (let item of this.form.feeCenterListD) {
  1180. if (!item.corpId) {
  1181. sum += ` 应收序号${item.$index + 1}往来单位`
  1182. }
  1183. if (!item.feeId) {
  1184. sum += ` 应收序号${item.$index + 1}费用简称`
  1185. }
  1186. if (!item.elementsCode) {
  1187. sum += ` 应收序号${item.$index + 1}核算要素`
  1188. }
  1189. if (!item.curCode) {
  1190. sum += ` 应收序号${item.$index + 1}币种`
  1191. }
  1192. }
  1193. for (let item of this.form.feeCenterListC) {
  1194. if (!item.corpId) {
  1195. sum += ` 应付序号${item.$index + 1}往来单位`
  1196. }
  1197. if (!item.feeId) {
  1198. sum += ` 应付序号${item.$index + 1}费用简称`
  1199. }
  1200. if (!item.elementsCode) {
  1201. sum += ` 应付序号${item.$index + 1}核算要素`
  1202. }
  1203. if (!item.curCode) {
  1204. sum += ` 应付序号${item.$index + 1}币种`
  1205. }
  1206. }
  1207. if(sum != '请填写') {
  1208. this.$confirm(sum, {
  1209. confirmButtonText: "确定",
  1210. cancelButtonText: "取消",
  1211. type: "warning"
  1212. })
  1213. return;
  1214. }
  1215. // 赋值 ETD 日期
  1216. this.form.billDate = this.form.etd?this.form.etd.slice(0,10) + ' 00:00:00':null // 单据日期
  1217. // 调用保存接口
  1218. this.billsSubmitfun()
  1219. }
  1220. })
  1221. },
  1222. // 主表保存接口大保存
  1223. billsSubmitfun(){
  1224. // if (this.form.cargoType = 'dry') {
  1225. // // 普货
  1226. // this.form.billNoFormat = 'KYCK-PH'
  1227. // }else if (this.form.cargoType = 'danger'){
  1228. // // 危险品
  1229. // this.form.billNoFormat = 'KYCK-WXP'
  1230. // }else if (this.form.cargoType = 'reefer') {
  1231. // // 冻柜
  1232. // this.form.billNoFormat = 'KYCK-DG'
  1233. // }else {
  1234. //
  1235. // }
  1236. if (this.form.cargoType) {
  1237. this.form.billNoFormat = 'KYCK-WXP'
  1238. }else {
  1239. this.form.billNoFormat = 'KYCK'
  1240. }
  1241. this.form.businessTypeCode = 'KYCK'
  1242. // 把拼接的数据拆开 开始 🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒
  1243. this.searchSplit()
  1244. // 把拼接的数据拆开 结束 💩💩💩💩💩💩💩💩💩💩💩💩💩💩
  1245. // 费用 收 赋值数据
  1246. this.form.feeCenterListD.map((row,index)=>{
  1247. row.dc = 'D'
  1248. row.sort = Number(index) + 1
  1249. row.businessType = this.form.businessType // 业务类型
  1250. row.billType = this.form.billType // 单据类型
  1251. row.billNo = this.form.billNo // 单据编号
  1252. row.billDate = this.form.billDate
  1253. row.billCorpId = this.form.corpId // 主表客户 id
  1254. row.billCorpCnName = this.form.corpCnName // 主表客户中文名称
  1255. row.billCorpEnName = this.form.corpEnName // 主表客户英文名称
  1256. row.lineId = this.form.lineId // 航线 id
  1257. row.lineCnName = this.form.lineCnName // 航线中文名称
  1258. row.lineEnName = this.form.lineEnName // 航线英文名称
  1259. row.vesselId = this.form.vesselId // 船名 id
  1260. row.vesselCnName = this.form.vesselCnName // 中文船名
  1261. row.vesselEnName = this.form.vesselEnName // 英文船名
  1262. row.voyageNo = this.form.voyageNo // 航次
  1263. row.mblno = this.form.mblno // MB/L NO
  1264. row.hblno = this.form.hblno // HB/L NO
  1265. row.etd = this.form.etd // 开船日期
  1266. row.eta = this.form.eta // 到港日期
  1267. row.departureId = this.form.departureId // 起运港 id
  1268. row.departureCode = this.form.departureCode // 起运港代码
  1269. row.departureCnName = this.form.departureCnName // 起运港中文名称
  1270. row.departureEnName = this.form.departureEnName // 起运港英文名称
  1271. row.podId = this.form.podId // 卸货港 id
  1272. row.podCode = this.form.podCode // 卸货港代码
  1273. row.podCnName = this.form.podCnName // 卸货港中文名称
  1274. row.corpArgreementNo = this.form.corpArgreementNo // 客户约号
  1275. // 数量 * 单价 = 净额
  1276. // 总税率 = 税率 + 附件税率
  1277. // 税额 = 净额 * 总税率
  1278. // 含税
  1279. if (row.curCode == 'CNY') {
  1280. row.amount = row.rmbAmount?row.rmbAmount:(Number(row.quantity) * Number(row.price)).toFixed(2)
  1281. }else {
  1282. row.amount = row.usdAmount?row.usdAmount:(Number(row.quantity) * Number(row.price)).toFixed(2)
  1283. }
  1284. // 净额
  1285. if (row.curCode == 'CNY') {
  1286. row.amountNet = row.rmbAmountNet?row.rmbAmountNet:(Number(row.quantity) * Number(row.price)).toFixed(2)
  1287. }else {
  1288. row.amountNet = row.usdAmountNet?row.usdAmountNet:(Number(row.quantity) * Number(row.price)).toFixed(2)
  1289. }
  1290. })
  1291. // 费用 付 赋值数据
  1292. this.form.feeCenterListC.map((row,index)=>{
  1293. row.dc = 'C'
  1294. row.sort = Number(index) + 1
  1295. row.businessType = this.form.businessType // 业务类型
  1296. row.billType = this.form.billType // 单据类型
  1297. row.billNo = this.form.billNo // 单据编号
  1298. row.billDate = this.form.billDate // 单据日期
  1299. row.billCorpId = this.form.corpId // 主表客户 id
  1300. row.billCorpCnName = this.form.corpCnName // 主表客户中文名称
  1301. row.billCorpEnName = this.form.corpEnName // 主表客户英文名称
  1302. row.lineId = this.form.lineId // 航线 id
  1303. row.lineCnName = this.form.lineCnName // 航线中文名称
  1304. row.lineEnName = this.form.lineEnName // 航线英文名称
  1305. row.vesselId = this.form.vesselId // 船名 id
  1306. row.vesselCnName = this.form.vesselCnName // 中文船名
  1307. row.vesselEnName = this.form.vesselEnName // 英文船名
  1308. row.voyageNo = this.form.voyageNo // 航次
  1309. row.mblno = this.form.mblno // MB/L NO
  1310. row.hblno = this.form.hblno // HB/L NO
  1311. row.etd = this.form.etd // 开船日期
  1312. row.eta = this.form.eta // 到港日期
  1313. row.departureId = this.form.departureId // 起运港 id
  1314. row.departureCode = this.form.departureCode // 起运港代码
  1315. row.departureCnName = this.form.departureCnName // 起运港中文名称
  1316. row.departureEnName = this.form.departureEnName // 起运港英文名称
  1317. row.podId = this.form.podId // 卸货港 id
  1318. row.podCode = this.form.podCode // 卸货港代码
  1319. row.podCnName = this.form.podCnName // 卸货港中文名称
  1320. row.corpArgreementNo = this.form.corpArgreementNo // 客户约号
  1321. // 数量 * 单价 = 净额
  1322. // 总税率 = 税率 + 附件税率
  1323. // 税额 = 净额 * 总税率
  1324. // 含税
  1325. if (row.curCode == 'CNY') {
  1326. row.amount = row.rmbAmount?row.rmbAmount:(Number(row.quantity) * Number(row.price)).toFixed(2)
  1327. }else {
  1328. row.amount = row.usdAmount?row.usdAmount:(Number(row.quantity) * Number(row.price)).toFixed(2)
  1329. }
  1330. // 净额
  1331. if (row.curCode == 'CNY') {
  1332. row.amountNet = row.rmbAmountNet?row.rmbAmountNet:(Number(row.quantity) * Number(row.price)).toFixed(2)
  1333. }else {
  1334. row.amountNet = row.usdAmountNet?row.usdAmountNet:(Number(row.quantity) * Number(row.price)).toFixed(2)
  1335. }
  1336. })
  1337. this.pageLoading = true
  1338. aeabillsSubmit(this.form).then(res=>{
  1339. this.pageLoading = false
  1340. this.$message({
  1341. type: "success",
  1342. message: "操作成功!"
  1343. });
  1344. // this.detailData.seeDisabled = true
  1345. this.billsDetailfun(res.data.data.id)
  1346. }).catch(err=>{
  1347. this.pageLoading = false
  1348. })
  1349. },
  1350. // 复制单据接口
  1351. billsCopyBillsfun(id){
  1352. aeabillsCopyBills({id}).then(res=>{
  1353. this.form = res.data.data;
  1354. this.pageLoading = false
  1355. this.searchMontage() // 下拉 中文名称和编号拼接
  1356. // 配箱最上面可以编辑
  1357. for(let item of this.form.containersList) {
  1358. item.edit = false
  1359. }
  1360. // 先把状态改成可以编辑,然后判断是否可以编辑
  1361. this.generateBillsfalse = false
  1362. // 应收
  1363. for(let item of this.form.feeCenterListD) {
  1364. // 判断是否生成了账单
  1365. if (item.accStatus == 1) {
  1366. this.columnforfun('corpCnName').disabled = true
  1367. this.columnforfun('srcType').disabled = true
  1368. this.columnforfun('mblno').disabled = true
  1369. this.columnforfun('refno').disabled = true
  1370. this.generateBillsfalse = true
  1371. }
  1372. if (item.curCode == 'CNY') {
  1373. this.$set(item,'rmbAmount',item.amount)
  1374. this.$set(item,'usdAmount','')
  1375. this.$set(item,'rmbAmountNet',item.amountNet)
  1376. this.$set(item,'usdAmountNet','')
  1377. }else {
  1378. this.$set(item,'usdAmount',item.amount)
  1379. this.$set(item,'rmbAmount','')
  1380. this.$set(item,'usdAmountNet',item.amountNet)
  1381. this.$set(item,'rmbAmountNet','')
  1382. }
  1383. item.edit = false
  1384. }
  1385. // 应付
  1386. for(let item of this.form.feeCenterListC) {
  1387. // 判断是否生成了账单
  1388. if (item.accStatus == 1) {
  1389. this.generateBillsfalse = true
  1390. this.columnforfun('corpCnName').disabled = true
  1391. this.columnforfun('srcType').disabled = true
  1392. this.columnforfun('mblno').disabled = true
  1393. this.columnforfun('refno').disabled = true
  1394. }
  1395. if (item.curCode == 'CNY') {
  1396. this.$set(item,'rmbAmount',item.amount)
  1397. this.$set(item,'usdAmount','')
  1398. this.$set(item,'rmbAmountNet',item.amountNet)
  1399. this.$set(item,'usdAmountNet','')
  1400. }else {
  1401. this.$set(item,'usdAmount',item.amount)
  1402. this.$set(item,'rmbAmount','')
  1403. this.$set(item,'usdAmountNet',item.amountNet)
  1404. this.$set(item,'rmbAmountNet','')
  1405. }
  1406. item.edit = false
  1407. }
  1408. // 文件中心
  1409. for(let item of this.form.filesList) {
  1410. this.$set(item,'edit',false)
  1411. }
  1412. })
  1413. },
  1414. // 详情接口
  1415. async billsDetailfun(id){
  1416. const res = await aeabillsDetail(id)
  1417. this.form = res.data.data;
  1418. // 如果已经请核就禁用按钮
  1419. // if (this.form.status == 1 || this.form.status == 2 || this.form.status == 3) {
  1420. // this.detailData.seeDisabled = true
  1421. // }else {
  1422. // this.detailData.seeDisabled = false
  1423. // }
  1424. if (this.form.status == 1 || this.form.status == 2 || this.form.status == 3) {
  1425. this.columnforfun('corpCnName').disabled = true
  1426. this.columnforfun('srcType').disabled = true
  1427. this.columnforfun('mblno').disabled = true
  1428. this.columnforfun('refno').disabled = true
  1429. this.generateBillsfalse = true
  1430. this.pleasereviewType = true // 请核禁用
  1431. }else {
  1432. // 判断是否可以编辑
  1433. this.columnforfun('corpCnName').disabled = false
  1434. this.columnforfun('srcType').disabled = false
  1435. this.columnforfun('mblno').disabled = false
  1436. this.columnforfun('refno').disabled = false
  1437. this.generateBillsfalse = false
  1438. this.pleasereviewType = false
  1439. }
  1440. this.pageLoading = false
  1441. this.searchMontage() // 下拉 中文名称和编号拼接
  1442. // 配箱最上面可以编辑
  1443. for(let item of this.form.containersList) {
  1444. item.edit = false
  1445. }
  1446. // 配箱最下面的
  1447. for(let item of this.form.waitingBoxList) {
  1448. this.$set(item,'editQuantity',item.quantity)
  1449. this.$set(item,'editGrossWeight',item.grossWeight)
  1450. this.$set(item,'editMeasurement',item.measurement)
  1451. this.$set(item,'edit',false)
  1452. }
  1453. // 应收
  1454. for(let item of this.form.feeCenterListD) {
  1455. // 判断是否生成了账单
  1456. if (item.accStatus == 1) {
  1457. this.columnforfun('corpCnName').disabled = true
  1458. this.columnforfun('srcType').disabled = true
  1459. this.columnforfun('mblno').disabled = true
  1460. this.columnforfun('refno').disabled = true
  1461. this.generateBillsfalse = true
  1462. }
  1463. if (item.curCode == 'CNY') {
  1464. this.$set(item,'rmbAmount',item.amount)
  1465. this.$set(item,'usdAmount','')
  1466. this.$set(item,'rmbAmountNet',item.amountNet)
  1467. this.$set(item,'usdAmountNet','')
  1468. }else {
  1469. this.$set(item,'usdAmount',item.amount)
  1470. this.$set(item,'rmbAmount','')
  1471. this.$set(item,'usdAmountNet',item.amountNet)
  1472. this.$set(item,'rmbAmountNet','')
  1473. }
  1474. item.edit = false
  1475. }
  1476. // 应付
  1477. for(let item of this.form.feeCenterListC) {
  1478. // 判断是否生成了账单
  1479. if (item.accStatus == 1) {
  1480. this.generateBillsfalse = true
  1481. this.columnforfun('corpCnName').disabled = true
  1482. this.columnforfun('srcType').disabled = true
  1483. this.columnforfun('mblno').disabled = true
  1484. this.columnforfun('refno').disabled = true
  1485. }
  1486. if (item.curCode == 'CNY') {
  1487. this.$set(item,'rmbAmount',item.amount)
  1488. this.$set(item,'usdAmount','')
  1489. this.$set(item,'rmbAmountNet',item.amountNet)
  1490. this.$set(item,'usdAmountNet','')
  1491. }else {
  1492. this.$set(item,'usdAmount',item.amount)
  1493. this.$set(item,'rmbAmount','')
  1494. this.$set(item,'usdAmountNet',item.amountNet)
  1495. this.$set(item,'rmbAmountNet','')
  1496. }
  1497. item.edit = false
  1498. }
  1499. // 文件中心
  1500. for(let item of this.form.filesList) {
  1501. this.$set(item,'edit',false)
  1502. }
  1503. },
  1504. // tbas切换
  1505. handleClick(tba,event) {
  1506. },
  1507. // 大tbas切换
  1508. bigHandleClick(){
  1509. if (this.bigtabs == 'fd') {
  1510. if (this.form.id) {
  1511. this.billsListAllfun(this.form.id)
  1512. }
  1513. }
  1514. if (this.bigtabs == 'dz') {
  1515. if (this.form.id) {
  1516. this.$refs.documentCenter.reportslogListfun({currentPage:1,pageSize:10})
  1517. }
  1518. }
  1519. },
  1520. // 获取不分页的分单列表
  1521. billsListAllfun(masterId){
  1522. billsListAll({masterId}).then(res=>{
  1523. this.billsListAllData = res.data.data
  1524. })
  1525. },
  1526. // 下拉 把拼接的拆分
  1527. searchSplit(){
  1528. // 发货人
  1529. if (this.form.hshipperCnName) {
  1530. this.form.hshipperCnName = this.form.hshipperCnName.split(' - ')[0]
  1531. }
  1532. // 收货人
  1533. if (this.form.hconsigneeCnName) {
  1534. this.form.hconsigneeCnName = this.form.hconsigneeCnName.split(' - ')[0]
  1535. }
  1536. // 通知人
  1537. if (this.form.hnotifyCnName) {
  1538. this.form.hnotifyCnName = this.form.hnotifyCnName.split(' - ')[0]
  1539. }
  1540. // COLOADER
  1541. if (this.form.coloaderCnName) {
  1542. this.form.coloaderCnName = this.form.coloaderCnName.split(' - ')[0]
  1543. }
  1544. // 船公司
  1545. if (this.form.carrierCnName) {
  1546. this.form.carrierCnName = this.form.carrierCnName.split(' - ')[0]
  1547. }
  1548. // 收货地
  1549. if (this.form.placeReceiptName) {
  1550. this.form.placeReceiptName = this.form.placeReceiptName.split(' - ')[0]
  1551. this.form.placeReceiptNamePrint = this.form.placeReceiptNamePrint.split(' - ')[0]
  1552. }
  1553. // 起运港
  1554. if (this.form.departureEnName) {
  1555. this.form.departureEnName = this.form.departureEnName.split(' - ')[0]
  1556. this.form.departureNamePrint = this.form.departureNamePrint.split(' - ')[0]
  1557. }
  1558. // 起运地
  1559. if (this.form.departureAddrEnName) {
  1560. this.form.departureAddrEnName = this.form.departureAddrEnName.split(' - ')[0]
  1561. this.form.departureAddrNamePrint = this.form.departureAddrNamePrint.split(' - ')[0]
  1562. }
  1563. // 目的地
  1564. if (this.form.destinationName) {
  1565. this.form.destinationName = this.form.destinationName.split(' - ')[0]
  1566. this.form.destinationNamePrint = this.form.destinationNamePrint.split(' - ')[0]
  1567. }
  1568. // 目的地
  1569. if (this.form.finalDestinationName) {
  1570. this.form.finalDestinationName = this.form.finalDestinationName.split(' - ')[0]
  1571. this.form.finalDestinationNamePrint = this.form.finalDestinationNamePrint.split(' - ')[0]
  1572. }
  1573. // 中转港
  1574. if (this.form.potEnName) {
  1575. this.form.potEnName = this.form.potEnName.split(' - ')[0]
  1576. this.form.potNamePrint = this.form.potNamePrint.split(' - ')[0]
  1577. }
  1578. // 船名
  1579. if (this.form.vesselCnName) {
  1580. this.form.vesselCnName = this.form.vesselCnName.split(' - ')[0]
  1581. }
  1582. // 客户名称
  1583. if (this.form.corpCnName) {
  1584. this.form.corpCnName = this.form.corpCnName.split(' - ')[0]
  1585. }
  1586. },
  1587. // 下拉 中文名称和编号拼接
  1588. searchMontage(){
  1589. // 发货人
  1590. if (this.form.hshipperCnName) {
  1591. this.form.hshipperCnName = this.form.hshipperCnName + ' - ' + this.form.hshipperCode
  1592. }
  1593. // 收货人
  1594. if (this.form.hconsigneeCnName) {
  1595. this.form.hconsigneeCnName = this.form.hconsigneeCnName + ' - ' + this.form.hconsigneeCode
  1596. }
  1597. // 通知人
  1598. if (this.form.hnotifyCnName) {
  1599. this.form.hnotifyCnName = this.form.hnotifyCnName + ' - ' + this.form.hnotifyCode
  1600. }
  1601. // COLOADER
  1602. if (this.form.coloaderCnName) {
  1603. let corpType = '1712285382575398914,1712285645314990082,1712285842321448962,1712286433378574338'
  1604. getBcorpslistByType(1,10,{cnName:this.form.coloaderCnName,corpType}).then(res=>{
  1605. this.form.coloaderCnName = this.form.coloaderCnName + ' - ' + res.data.data.records[0].code
  1606. })
  1607. }
  1608. // 船公司
  1609. if (this.form.carrierCnName) {
  1610. let corpType = '1712286570540703745'
  1611. getBcorpslistByType(1,10,{cnName:this.form.carrierCnName,corpType}).then(res=>{
  1612. this.form.carrierCnName = this.form.carrierCnName + ' - ' + res.data.data.records[0].code
  1613. })
  1614. // this.form.carrierCnName = this.form.carrierCnName + ' - ' + this.form.carrierCode
  1615. }
  1616. // 收货地
  1617. if (this.form.placeReceiptName) {
  1618. this.form.placeReceiptName = this.form.placeReceiptName + ' - ' + this.form.placeReceiptCode
  1619. this.form.placeReceiptNamePrint = this.form.placeReceiptNamePrint + ' - ' + this.form.placeReceiptCode
  1620. }
  1621. // 起运港
  1622. if (this.form.departureEnName) {
  1623. this.form.departureEnName = this.form.departureEnName + ' - ' + this.form.departureCode
  1624. this.form.departureNamePrint = this.form.departureNamePrint + ' - ' + this.form.departureCode
  1625. }
  1626. // 起运地
  1627. if (this.form.departureAddrEnName) {
  1628. this.form.departureAddrEnName = this.form.departureAddrEnName + ' - ' + this.form.departureAddrCode
  1629. this.form.departureAddrNamePrint = this.form.departureAddrNamePrint + ' - ' + this.form.departureAddrCode
  1630. }
  1631. // 目的地
  1632. if (this.form.destinationName) {
  1633. this.form.destinationName = this.form.destinationName + ' - ' + this.form.destinationCode
  1634. this.form.destinationNamePrint = this.form.destinationNamePrint + ' - ' + this.form.destinationCode
  1635. }
  1636. // 目的港
  1637. if (this.form.finalDestinationName) {
  1638. this.form.finalDestinationName = this.form.finalDestinationName + ' - ' + this.form.finalDestinationCode
  1639. this.form.finalDestinationNamePrint = this.form.finalDestinationNamePrint + ' - ' + this.form.finalDestinationCode
  1640. }
  1641. // 中转港
  1642. if (this.form.potEnName) {
  1643. this.form.potEnName = this.form.potEnName + ' - ' + this.form.potCode
  1644. this.form.potNamePrint = this.form.potNamePrint + ' - ' + this.form.potCode
  1645. }
  1646. // 船名
  1647. if (this.form.vesselCnName) {
  1648. getBvesselsList(1,10,{cnName:this.form.vesselCnName}).then(res=>{
  1649. this.form.vesselCnName = this.form.vesselCnName + ' - ' + res.data.data.records[0].code
  1650. })
  1651. }
  1652. // 客户名称
  1653. if (this.form.corpCnName) {
  1654. getBcorpslistByType(1,10,{cnName:this.form.corpCnName}).then(res=>{
  1655. this.form.corpCnName = this.form.corpCnName + ' - ' + res.data.data.records[0].shortName
  1656. })
  1657. }
  1658. },
  1659. },
  1660. }
  1661. </script>
  1662. <style scoped>
  1663. .borderless {
  1664. height: 100%;
  1665. box-sizing: border-box
  1666. }
  1667. .customer-main {
  1668. margin-bottom: 15px;
  1669. }
  1670. .demo-ruleForm {
  1671. font-size: 14px;
  1672. }
  1673. .margintop {
  1674. margin-top: 10px;
  1675. }
  1676. ::v-deep.el-form-item {
  1677. margin-bottom: 0;
  1678. }
  1679. .isShow {
  1680. display: none;
  1681. }
  1682. </style>