billsDetails.vue 93 KB

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