billsDetails.vue 109 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235
  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-popover-->
  12. <!-- placement="bottom-end"-->
  13. <!-- width="100"-->
  14. <!-- trigger="hover">-->
  15. <!-- <div>-->
  16. <!-- </div>-->
  17. <el-button size="small" type="primary" @click="addEdit">新 建
  18. </el-button>
  19. <el-button type="success" size="small" style="margin-right: 8px" @click="CopyDocumentsfun">复制单据
  20. </el-button>
  21. <el-dropdown style="line-height: 0" v-if="saberTenantId == '409341'">
  22. <el-button size="small" type="warning" style="margin-right: 8px"
  23. :disabled="form.status > 0 || showLock">
  24. 导入模板<i class="el-icon-arrow-down el-icon--right"></i>
  25. </el-button>
  26. <el-dropdown-menu slot="dropdown">
  27. <el-dropdown-item v-for="item in imporiData" :key="item.id"
  28. @click.native="importData(item.id)">{{
  29. item.name }}
  30. </el-dropdown-item>
  31. </el-dropdown-menu>
  32. </el-dropdown>
  33. <el-dropdown style="line-height: 0">
  34. <el-button size="small" type="success" style="margin-right: 8px" :loading="saveLoading"
  35. :disabled="!form.id || showLock">
  36. 发送 EDI<i class="el-icon-arrow-down el-icon--right"></i>
  37. </el-button>
  38. <el-dropdown-menu slot="dropdown">
  39. <el-dropdown-item v-for="item in ediData" :key="item.id" class="dropdown-max"
  40. @click.native="editypesSendingEdifun(item)">{{ item.cnName }}
  41. </el-dropdown-item>
  42. </el-dropdown-menu>
  43. </el-dropdown>
  44. <el-button size="small" style="margin-right: 8px" :loading="saveLoading" @click="previewDialogfun">预 览
  45. </el-button>
  46. <el-button size="small" type="warning" :disabled="!form.id || detailData.seeDisabled || showLock"
  47. v-if="form.status == 1" @click.stop="revokeDocumentApproval">撤销单据请核
  48. </el-button>
  49. <el-button size="small" type="success" :disabled="!form.id || detailData.seeDisabled || showLock"
  50. v-if="form.status == 0 || form.status == 4" @click.stop="DocumentApproval">单据请核
  51. </el-button>
  52. <!--<el-button size="small" type="primary" style="margin-right: 8px" v-if="detailData.seeDisabled"-->
  53. <!-- :loading="saveLoading" @click="editHandle">编 辑-->
  54. <!--</el-button>-->
  55. <el-button size="small" type="primary" style="margin-right: 8px"
  56. :disabled="detailData.seeDisabled || showLock" :loading="saveLoading" @click="editCustomer">保 存
  57. </el-button>
  58. <el-dropdown style="line-height: 0">
  59. <el-button type="warning" :loading="saveLoading" :disabled="!form.id" size="small">
  60. 审 批<i class="el-icon-arrow-down el-icon--right"></i>
  61. </el-button>
  62. <el-dropdown-menu slot="dropdown">
  63. <!--<el-dropdown-item @click.native="examineBtn('审批')" :disabled="isExamineBtn && !detailData.check">审批-->
  64. <!--</el-dropdown-item>-->
  65. <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">审核进度
  66. </el-dropdown-item>
  67. </el-dropdown-menu>
  68. </el-dropdown>
  69. </div>
  70. </div>
  71. <div style="margin-top: 50px">
  72. <el-tabs type="border-card" v-model="bigtabs" @tab-click="bigHandleClick">
  73. <el-tab-pane label="委托信息" name="wt" class="scrollable-container">
  74. <div>
  75. <el-form :model="form" ref="form" label-width="90px" class="demo-ruleForm" :disabled="showLock">
  76. <containerTitle title="基础资料"></containerTitle>
  77. <basic-container :showBtn="true">
  78. <el-row :gutter="60">
  79. <el-col v-for="(item, index) in basicData.column" :key="index" :span="8">
  80. <!--数组-->
  81. <div v-if="item instanceof Array"
  82. style="display: flex;align-items: center;justify-content: space-between">
  83. <el-row>
  84. <el-col :span="item[0].span ? item[0].span : 12">
  85. <el-form-item :label="item[0].label" :prop="item[0].prop"
  86. :rules="item[0].rules" :label-width="item[0].labelWidth">
  87. <span slot="label" v-if="item[0].label">
  88. <span v-if="item[0].label == 'HB/L NO'"
  89. style="color: #4c9e44;cursor: pointer;text-decoration: underline;"
  90. @click="applyforfun(item[0].label)">{{ item[0].label }}
  91. </span>
  92. <span v-else style="color: #1e9fff">{{ item[0].label
  93. }}</span>
  94. </span>
  95. <span v-if="item[0].type == 'button'"></span>
  96. <!--<el-button v-if="item[0].type == 'button'" :disabled="detailData.seeDisabled || item[0].disabled"-->
  97. <!-- size="mini" type="success" icon="el-icon-circle-plus" circle-->
  98. <!-- @click="applyforfun(item[0].label)" >-->
  99. <!--</el-button>-->
  100. <search-query v-else-if="item[0].type == 'select'"
  101. :datalist="item[0].dicData"
  102. :selectValue="form[item[0].prop]" :filterable="true"
  103. :allowCreate="item[0].allowCreate || false" :remote="true"
  104. :disabled="detailData.seeDisabled || item[0].disabled"
  105. :buttonIf="false" :placeholder="`${item[0].text || ''}`"
  106. :forParameter="item[0].forParameter"
  107. @remoteMethod="remoteMethod($event, item[0].prop)"
  108. @corpChange="corpChange($event, item[0].prop)"
  109. @corpFocus="remoteMethod($event, item[0].prop)">
  110. </search-query>
  111. <el-input v-else type="age" style="width: 100%;"
  112. v-model="form[item[0].prop]" size="small" autocomplete="off"
  113. :disabled="detailData.seeDisabled || item[0].disabled"
  114. :placeholder="item[0].text || ''"></el-input>
  115. </el-form-item>
  116. </el-col>
  117. <el-col :span="item[1].span ? item[1].span : 12">
  118. <el-form-item :label="item[1].label" :prop="item[1].prop"
  119. :rules="item[1].rules" :label-width="item[1].labelWidth">
  120. <span slot="label" v-if="item[1].label">
  121. <span style="color: #1e9fff">{{ item[1].label }}</span>
  122. </span>
  123. <el-date-picker v-if="item[1].type == 'date'"
  124. v-model="form[item[1].prop]" clearable style="width: 100%;"
  125. type="date" size="small"
  126. :disabled="detailData.seeDisabled || item[1].disabled"
  127. value-format="yyyy-MM-dd HH:mm" placeholder="选择日期">
  128. </el-date-picker>
  129. <search-query v-else-if="item[1].type == 'select'"
  130. :datalist="item[1].dicData"
  131. :selectValue="form[item[1].prop]" :filterable="true"
  132. :remote="true"
  133. :disabled="detailData.seeDisabled || item[1].disabled"
  134. :buttonIf="false" :placeholder="`${item[1].text || ''}`"
  135. :forParameter="item[1].forParameter"
  136. @remoteMethod="remoteMethod($event, item[1].prop)"
  137. @corpChange="corpChange($event, item[1].prop)"
  138. @corpFocus="remoteMethod($event, item[1].prop)">
  139. </search-query>
  140. <tree-select v-else-if="item[1].type == 'tree'"
  141. v-model="form[item[1].prop]" :data="item[1].dicData"
  142. :props="item[1].forParameter" nodeKey="title" size="small"
  143. :clearable="false"
  144. :disabled="detailData.seeDisabled || item[1].disabled"
  145. :multiple="false" :placeholder="`${item[1].text || ''}`"
  146. @input="corpChange($event, item[1].prop)">
  147. </tree-select>
  148. <el-input v-else type="age" style="width: 100%;"
  149. v-model="form[item[1].prop]" size="small" autocomplete="off"
  150. :disabled="detailData.seeDisabled || item[1].disabled"
  151. :placeholder="item[1].text || ''"></el-input>
  152. </el-form-item>
  153. </el-col>
  154. <el-col v-if="item[2]" :span="item[2].span ? item[2].span : 12">
  155. <el-form-item :label="item[2].label" :prop="item[2].prop"
  156. :rules="item[2].rules" :label-width="item[2].labelWidth">
  157. <span slot="label" v-if="item[2].label">
  158. <span style="color: #1e9fff">{{ item[2].label }}</span>
  159. </span>
  160. <search-query v-if="item[2].type == 'select'"
  161. :datalist="item[2].dicData"
  162. :selectValue="form[item[2].prop]" :filterable="true"
  163. :clearable="false" :remote="true"
  164. :disabled="detailData.seeDisabled || item[2].disabled"
  165. :buttonIf="false" :forParameter="item[2].forParameter"
  166. :placeholder="`${item[2].text || ''}`"
  167. @remoteMethod="remoteMethod($event, item[2].prop)"
  168. @corpChange="corpChange($event, item[2].prop)"
  169. @corpFocus="remoteMethod($event, item[2].prop)">
  170. </search-query>
  171. <el-input v-else type="age" style="width: 100%;"
  172. v-model="form[item[2].prop]" size="small" autocomplete="off"
  173. :disabled="detailData.seeDisabled || item[1].disabled"
  174. :placeholder="item[2].text || ''"></el-input>
  175. </el-form-item>
  176. </el-col>
  177. </el-row>
  178. </div>
  179. <!--对象-->
  180. <div v-else>
  181. <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
  182. <span slot="label" v-if="item.label">
  183. <span style="color: #1e9fff">{{ item.label }}</span>
  184. </span>
  185. <search-query v-if="item.type == 'select'" ref="searchQueryRef"
  186. :datalist="item.dicData" :selectValue="form[item.prop]"
  187. :filterable="true" :clearable="false" :remote="true"
  188. :disabled="detailData.seeDisabled || item.disabled"
  189. :buttonIf="item.buttonIf" :forParameter="item.forParameter"
  190. :placeholder="`${item.text || ''}`" :joinData="item.joinData"
  191. @remoteMethod="remoteMethod($event, item.prop)"
  192. @corpChange="corpChange($event, item.prop)"
  193. @corpFocus="remoteMethod($event, item.prop)"
  194. @eldialogConfirm="eldialogConfirm(item.slot)">
  195. <bcorps v-show="item.slot == 'bcorps'" ref="bcorps" :eldialog="true"
  196. @selectionChange="eldialogMultipleChoice($event, item.slot)">
  197. </bcorps>
  198. <bcorpstypedefine v-show="item.slot == 'bcorpstypedefine'">
  199. </bcorpstypedefine>
  200. </search-query>
  201. <el-input v-else type="age" style="width: 100%;"
  202. v-model="form[item.prop]" size="small" autocomplete="off"
  203. :disabled="detailData.seeDisabled || item.disabled"
  204. :placeholder="item.text || ''"></el-input>
  205. </el-form-item>
  206. </div>
  207. </el-col>
  208. </el-row>
  209. </basic-container>
  210. </el-form>
  211. </div>
  212. <div class="customer-main margintop">
  213. <containerTitle title="详细"></containerTitle>
  214. <basic-container :showBtn="true">
  215. <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
  216. <el-tab-pane label="委托详情" name="first">
  217. <entrustment-lnformation :assemblyForm="form" :detailData="detailData"
  218. :disabled="showLock" :generateBillsfalse="generateBillsfalse"
  219. @billsDetailfun="billsDetailfun(form.id)">
  220. </entrustment-lnformation>
  221. </el-tab-pane>
  222. <el-tab-pane label="配箱信息" name="second">
  223. <DistributionBox :assemblyForm="form" :detailData="detailData" :showLock="showLock"
  224. :pleasereviewType="pleasereviewType" @billsAddfun="billsAddfun"
  225. @billsDetailfun="billsDetailfun(form.id)">
  226. </DistributionBox>
  227. </el-tab-pane>
  228. <el-tab-pane label="MB/L信息" name="third">
  229. <mbinformation :assemblyForm="form" :detailData="detailData" :disabled="showLock">
  230. </mbinformation>
  231. </el-tab-pane>
  232. <el-tab-pane label="报表管理" name="fourth"
  233. v-if="roleName.indexOf('admin') != -1 ? true : roleName.indexOf('报表管理') != -1 ? true : false">
  234. <reports :id="form.id" :assemblyForm="form"
  235. :disabled="detailData.seeDisabled || showLock" businessValue="HYCK"></reports>
  236. </el-tab-pane>
  237. <el-tab-pane label="EDI CODE" name="sixth">
  238. <edicode :assemblyForm="form" :detailData="detailData" :disabled="showLock">
  239. </edicode>
  240. </el-tab-pane>
  241. <el-tab-pane label="文件中心" name="seventh">
  242. <filescenter ref="filescenter" :assemblyForm="form" :pid="form.id"
  243. :detailData="detailData" :showLock="showLock"></filescenter>
  244. </el-tab-pane>
  245. </el-tabs>
  246. </basic-container>
  247. <basic-container :showBtn="true" v-if="activeName == 'first' || activeName == 'third'">
  248. <formbottom :assemblyForm="form" :generateBillsfalse="generateBillsfalse"
  249. :disabled="showLock" :detailData="detailData"></formbottom>
  250. </basic-container>
  251. </div>
  252. </el-tab-pane>
  253. <el-tab-pane label="费用信息" name="fy" class="scrollable-container"
  254. v-if="roleName.indexOf('admin') != -1 ? true : roleName.indexOf('应收修改') != -1 || roleName.indexOf('应付修改') != -1 || roleName.indexOf('应收查看') != -1 || roleName.indexOf('应付查看') != -1">
  255. <feecenter :assemblyForm="form" :copyFormData="copyFormData" :detailData="detailData"
  256. :disabled="detailData.seeDisabled || showLock" :pleasereviewType="pleasereviewType"
  257. :pid="form.id" @billsDetailfun="billsDetailfun(form.id)">
  258. </feecenter>
  259. </el-tab-pane>
  260. <el-tab-pane label="单证中心" name="dz" class="scrollable-container">
  261. <document-center ref="documentCenter" :detailData="detailData" :assemblyForm="form"
  262. :disabled="detailData.seeDisabled || showLock"></document-center>
  263. </el-tab-pane>
  264. <el-tab-pane label="分单列表" name="fd" v-if="form.billType == 'MM'" class="scrollable-container">
  265. <Split-list :detailData="detailData" :assemblyForm="form" :data="billsListAllData"
  266. :disabled="detailData.seeDisabled || showLock"
  267. @billsListAllfun="billsListAllfun(form.id)"></Split-list>
  268. </el-tab-pane>
  269. </el-tabs>
  270. </div>
  271. <!--导入模板-->
  272. <el-dialog title="导入模板" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
  273. v-dialog-drag>
  274. <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading"
  275. :upload-before="uploadBefore" :upload-after="onSuccess">
  276. </avue-form>
  277. </el-dialog>
  278. <!--审核弹窗-->
  279. <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
  280. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  281. <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
  282. </el-dialog>
  283. <!--预览报表弹窗-->
  284. <el-dialog append-to-body title="预览报表" class="el-dialogDeep" :visible.sync="previewDialog" width="60%"
  285. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  286. <business-reports :id="form.id" :disabled="detailData.seeDisabled"></business-reports>
  287. </el-dialog>
  288. </div>
  289. </template>
  290. <script>
  291. import EntrustmentLnformation from "@/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation.vue";
  292. import mbinformation from "@/views/iosBasicData/SeafreightExportF/bills/assembly/mbinformation.vue";
  293. import reports from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reports.vue";
  294. import formbottom from "@/views/iosBasicData/SeafreightExportF/bills/assembly/formbottom.vue";
  295. import edicode from '@/views/iosBasicData/SeafreightExportF/bills/assembly/edicode.vue'
  296. import filescenter from "@/views/iosBasicData/SeafreightExportF/bills/assembly/filescenter.vue";
  297. import DistributionBox from "@/views/iosBasicData/SeafreightExportF/bills/assembly/DistributionBox.vue";
  298. import feecenter from '@/views/iosBasicData/SeafreightExportF/bills/assembly/feecenter.vue'
  299. import { getList as userGetList } from '@/api/system/user'
  300. import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
  301. import TreeSelect from "@/components/iosbasic-data/TreeSelect.vue";
  302. import bcorps from "@/views/iosBasicData/bcorps/index.vue";
  303. import bcorpstypedefine from "@/views/iosBasicData/bcorps/bcorpstypedefine.vue";
  304. import SplitList from "@/views/iosBasicData/SeafreightExportF/bills/assembly/SplitList.vue";
  305. import { getLazylist } from "@/api/basicData/agreement";
  306. import { getBcorpsList, getBcorpslistByType } from "@/api/iosBasicData/bcorps";
  307. import { getBlocationsList } from "@/api/iosBasicData/blocations";
  308. import { getBcorpsattnList } from "@/api/iosBasicData/bcorpsattn";
  309. import { getWorkDicts } from "@/api/system/dictbiz";
  310. import { getDeptLazyTree, getDeptTree, getLazyList } from "@/api/system/dept";
  311. import {
  312. billsCheckBills, billsCopyBills,
  313. billsDetail,
  314. billsGetBillNo,
  315. billsListAll, billsRevokeCheckBills, editypesSendingEdi,
  316. billsSubmit,
  317. billsAdd,
  318. deptGetDetailPol, postSelectByUser,
  319. } from '@/api/iosBasicData/bills'
  320. import { dateFormat } from "@/util/date";
  321. import checkSchedule from "@/components/checkH/checkSchedule.vue";
  322. import { getBvesselsList } from "@/api/iosBasicData/bvessels";
  323. import DocumentCenter from "@/views/iosBasicData/SeafreightExportF/bills/assembly/DocumentCenter.vue";
  324. import businessReports from "@/views/iosBasicData/SeafreightExportF/bills/assembly/businessReports.vue";
  325. import { popupReminder } from "@/util/messageReminder";
  326. import editypes from "@/views/iosBasicData/editypes/index.vue";
  327. import { editypesList } from "@/api/iosBasicData/editypes";
  328. import { verifyEnglish, verifySymbol } from "@/util/date";
  329. import { contrastObj, contrastList } from "@/util/contrastData";
  330. import { selectListLos } from "@/api/approval/processConfig";
  331. import _ from "lodash";
  332. export default {
  333. components: {
  334. checkSchedule,
  335. SearchQuery,
  336. EntrustmentLnformation,
  337. formbottom,
  338. mbinformation,
  339. reports,
  340. edicode,
  341. filescenter,
  342. DistributionBox,
  343. feecenter,
  344. bcorps,
  345. bcorpstypedefine,
  346. SplitList,
  347. TreeSelect,
  348. DocumentCenter,
  349. businessReports,
  350. editypes,
  351. },
  352. props: {
  353. detailData: {
  354. type: Object
  355. }
  356. },
  357. data() {
  358. return {
  359. showLock: false,
  360. ediData: [], // edi 列表数据
  361. previewDialog: false, // 预览报表弹窗开启
  362. generateBillsfalse: false, // 如果生成账单就禁用
  363. pleasereviewType: false, // 如果请核就禁用
  364. checkScheduleDialog: false, // 审核弹窗
  365. checkId: '', // 审核需要的id
  366. batchNo: '',
  367. billsListAllData: [], // 分单列表数据
  368. pageLoading: false, // 全屏的动画
  369. saveLoading: false,
  370. copyFormData: {}, // 详情的备份数据
  371. // 详情数据
  372. form: {
  373. billDate: dateFormat(new Date(), "yyyy-MM-dd") + ' 00:00', // 单据日期 默认 当天
  374. operatorName: JSON.parse(localStorage.getItem('saber-userInfo')).content.user_name, // OP 默认登录人
  375. operatorId: JSON.parse(localStorage.getItem('saber-userInfo')).content.user_id, // OP 默认登录人
  376. businessType: 'SE', // 业务类型 默认 海运出口
  377. businessTypes: '海运',
  378. billType: 'DD', // 单据类型 默认 直单
  379. accDeptName: '',// 核算部门 默认登录人的部门
  380. issueType: "ORI", // 签单方式 默认 正本提单
  381. mpaymode: 'PP', // 主单付费方式 默认PP
  382. hpaymode: 'PP', // 分单付费方式 默认 PP
  383. loadType: 'FCL', // 装箱方式默认整箱
  384. srcType: 'OWN', // 业务来源默认公司 来源 内容 默认登录人所属公司
  385. numberOfObl: 'THREE', // 正本份数 默认 THREE
  386. numberOfCopy: 'ONE', // 副本份数 默认 ONE
  387. seaType: 'E', // 进出口 默认出口 E=出口 I=进口"
  388. cargoType: 'dry', // 货物类型默认普货
  389. marks: 'N/M',
  390. dgPackingLevel: '0', // 危险品包装等级
  391. serviceTerms: 'CY to CY', // 服务方式
  392. filesList: [], // 文件中心
  393. feeCenterListD: [], // 收
  394. feeCenterListC: [], // 付
  395. preContainersList: [], // 箱
  396. feeCenterAmendList: [],
  397. placeReceiptName: '',
  398. placeReceiptNamePrint: '',
  399. polEnName: '',
  400. polNamePrint: '',
  401. podEnName: '',
  402. podNamePrint: '',
  403. destinationName: '',
  404. destinationNamePrint: '',
  405. placeDeliveryName: '',
  406. placeDeliveryNamePrint: '',
  407. potEnName: '',
  408. potNamePrint: '',
  409. detail: {}
  410. },
  411. oldForm: {
  412. billDate: dateFormat(new Date(), "yyyy-MM-dd") + ' 00:00', // 单据日期 默认 当天
  413. operatorName: JSON.parse(localStorage.getItem('saber-userInfo')).content.user_name, // OP 默认登录人
  414. operatorId: JSON.parse(localStorage.getItem('saber-userInfo')).content.user_id, // OP 默认登录人
  415. businessType: 'SE', // 业务类型 默认 海运出口
  416. businessTypes: '海运',
  417. billType: 'DD', // 单据类型 默认 直单
  418. accDeptName: '',// 核算部门 默认登录人的部门
  419. issueType: "ORI", // 签单方式 默认 正本提单
  420. mpaymode: 'PP', // 主单付费方式 默认PP
  421. hpaymode: 'PP', // 分单付费方式 默认 PP
  422. loadType: 'FCL', // 装箱方式默认整箱
  423. srcType: 'OWN', // 业务来源默认公司 来源 内容 默认登录人所属公司
  424. numberOfObl: 'THREE', // 正本份数 默认 THREE
  425. numberOfCopy: 'ONE', // 副本份数 默认 ONE
  426. seaType: 'E', // 进出口 默认出口 E=出口 I=进口"
  427. cargoType: 'dry', // 货物类型默认普货
  428. marks: 'N/M',
  429. dgPackingLevel: '0', // 危险品包装等级
  430. serviceTerms: 'CY to CY', // 服务方式
  431. filesList: [], // 文件中心
  432. feeCenterListD: [], // 收
  433. feeCenterListC: [], // 付
  434. preContainersList: [], // 箱
  435. feeCenterAmendList: [],
  436. placeReceiptName: '',
  437. placeReceiptNamePrint: '',
  438. polEnName: '',
  439. polNamePrint: '',
  440. podEnName: '',
  441. podNamePrint: '',
  442. destinationName: '',
  443. destinationNamePrint: '',
  444. placeDeliveryName: '',
  445. placeDeliveryNamePrint: '',
  446. potEnName: '',
  447. potNamePrint: '',
  448. detail: {}
  449. },
  450. // 循环的配置
  451. basicData: {
  452. column: [
  453. {
  454. label: "客户名称", // 调往来单位接口
  455. prop: "corpCnName",
  456. text: "请选择客户名称",
  457. type: 'select',
  458. dicData: [],
  459. disabled: false,
  460. buttonIf: true,
  461. joinData: true,
  462. slot: 'bcorps',
  463. forParameter: {
  464. key: 'id',
  465. label: 'cnName',
  466. value: 'cnName',
  467. short: 'shortName'
  468. },
  469. rules: [{
  470. required: true,
  471. message: " ",
  472. trigger: "blur"
  473. }]
  474. },
  475. [
  476. {
  477. label: "客户OP", // 客户联系人姓名 电话和邮箱带出来,可以修改 往来单位接口 需要传一个客户名称的值过去
  478. prop: "corpAttnName",
  479. text: "姓名",
  480. type: 'select',
  481. dicData: [],
  482. span: 10,
  483. disabled: false,
  484. clearable: false,
  485. allowCreate: true,
  486. forParameter: {
  487. key: 'id',
  488. label: 'cname',
  489. value: 'cname',
  490. },
  491. },
  492. {
  493. label: "", //客户联系人电话
  494. prop: "corpAttnTel",
  495. text: "电话",
  496. labelWidth: '10px',
  497. disabled: false,
  498. clearable: false,
  499. span: 7,
  500. // rules: [{
  501. // required: true,
  502. // message: "",
  503. // trigger: "blur"
  504. // }]
  505. },
  506. {
  507. label: "", // 客户联系人邮箱
  508. prop: "corpAttnEmail",
  509. text: "邮箱",
  510. labelWidth: '10px',
  511. disabled: false,
  512. clearable: false,
  513. span: 7,
  514. // rules: [{
  515. // required: true,
  516. // message: " ",
  517. // trigger: "blur"
  518. // }]
  519. },
  520. ],
  521. [
  522. {
  523. label: "业务来源", // OWN=公司 AGENT=代理 SALES=业务员
  524. prop: "srcType",
  525. text: "请选择业务来源",
  526. type: 'select',
  527. disabled: true,
  528. forParameter: {
  529. key: 'dictKey',
  530. label: 'dictValue',
  531. value: 'dictKey',
  532. },
  533. dicData: [],
  534. },
  535. {
  536. label: "",
  537. prop: "srcCnName", // 来源中文 公司不是下拉写死公司两字 业务员调用户管理列表 代理调往来单位四个代理数据
  538. text: "请选择来源",
  539. labelWidth: '30px',
  540. type: 'select',
  541. disabled: true,
  542. dicData: [],
  543. forParameter: {
  544. key: 'id',
  545. label: 'cnName',
  546. value: 'cnName',
  547. },
  548. },
  549. ],
  550. [
  551. {
  552. label: "MB/L NO",
  553. text: "请输入MB/L NO",
  554. prop: "mblno",
  555. span: 18,
  556. disabled: false,
  557. },
  558. {
  559. label: "", // MB/L 付款方式 PP=预付, CC=到付, FPA, Other
  560. text: "请选择付款方式",
  561. prop: "mpaymode",
  562. type: 'select',
  563. labelWidth: '30px',
  564. disabled: false,
  565. span: 6,
  566. dicData: [],
  567. forParameter: {
  568. key: 'dictKey',
  569. label: 'dictValue',
  570. value: 'dictKey',
  571. },
  572. },
  573. ],
  574. {
  575. label: "booking NO", // 订舱号
  576. text: "请输入booking NO",
  577. prop: "bookingNo",
  578. disabled: false,
  579. },
  580. [
  581. {
  582. label: "HB/L NO", //弹窗点击确认还是取消申请 调后台接口获取到一个编号
  583. prop: "HB/L NO",
  584. type: 'button',
  585. span: 4,
  586. disabled: false,
  587. },
  588. {
  589. label: "",
  590. text: "请输入HB/L NO",
  591. prop: "hblno",
  592. labelWidth: '6px',
  593. span: 14,
  594. disabled: true,
  595. },
  596. {
  597. label: "", // HB/L 付款方式 PP=预付, CC=到付, FPA, Other', 申请之后默认 PP
  598. text: "请选择付款方式",
  599. prop: "hpaymode",
  600. labelWidth: '30px',
  601. disabled: false,
  602. type: 'select',
  603. span: 6,
  604. dicData: [],
  605. forParameter: {
  606. key: 'dictKey',
  607. label: 'dictValue',
  608. value: 'dictKey',
  609. },
  610. },
  611. ],
  612. {
  613. label: "REF MBLNO", // Co-Loader 中文名称 往来单位 类别
  614. text: "请输入REF MBLNO",
  615. prop: "refno",
  616. disabled: false,
  617. },
  618. [
  619. {
  620. label: "业务编号",
  621. text: "业务编号",
  622. prop: "billNo",
  623. disabled: true,
  624. },
  625. {
  626. label: "所属团队",
  627. text: "请选择所属团队",
  628. prop: "teamName",
  629. disabled: false,
  630. type: 'select',
  631. dicData: [],
  632. forParameter: {
  633. key: 'id',
  634. label: 'postName',
  635. value: 'id',
  636. },
  637. rules: [{
  638. required: true,
  639. message: " ",
  640. trigger: "blur"
  641. }]
  642. },
  643. ],
  644. [
  645. {
  646. label: "OP", // 操作id 用户管理下拉 模糊搜索
  647. text: "请选择OP",
  648. prop: "operatorName",
  649. type: 'select',
  650. dicData: [],
  651. disabled: false,
  652. forParameter: {
  653. key: 'id',
  654. label: 'name',
  655. value: 'name',
  656. },
  657. rules: [{
  658. required: true,
  659. message: " ",
  660. trigger: "blur"
  661. }]
  662. },
  663. {
  664. label: "核算部门", // 核算部门Id accDept 核算部门 accDeptName 调机构管理接口
  665. text: "请选择核算部门",
  666. prop: "accDeptName",
  667. type: 'tree',
  668. dicData: [],
  669. disabled: false,
  670. clearable: false,
  671. forParameter: {
  672. label: "title",
  673. children: 'children'
  674. },
  675. rules: [{
  676. required: true,
  677. message: " ",
  678. trigger: "blur"
  679. }]
  680. },
  681. ],
  682. ]
  683. },
  684. activeName: 'first',
  685. bigtabs: 'wt',
  686. saberUserInfo: {}, // 当前登录人信息
  687. roleName: [], // 当前的角色权限
  688. // 需要加判断是否必填的数据
  689. messageData: [
  690. {
  691. name: '客户',
  692. value: 'corpCnName',
  693. },
  694. {
  695. name: '业务来源',
  696. value: 'srcType',
  697. },
  698. {
  699. name: 'MBLNO',
  700. value: 'mblno',
  701. },
  702. {
  703. name: 'booking NO',
  704. value: 'bookingNo',
  705. },
  706. // {
  707. // name: 'REF MBLNO',
  708. // value: 'refno',
  709. // },
  710. {
  711. name: '船名(VSL)',
  712. value: 'vesselCnName',
  713. },
  714. {
  715. name: '航次(VOY)',
  716. value: 'voyageNo',
  717. },
  718. {
  719. name: 'ETD',
  720. value: 'etd',
  721. },
  722. {
  723. name: '装货港',
  724. value: 'polCnName',
  725. },
  726. {
  727. name: '目的港',
  728. value: 'destinationNamePrint',
  729. },
  730. {
  731. name: '包装单位',
  732. value: 'packingUnit',
  733. },
  734. {
  735. name: '船公司',
  736. value: 'carrierCnName',
  737. },
  738. {
  739. name: '场站',
  740. value: 'cyCnName',
  741. },
  742. ],
  743. imporiData: [{ id: 0, name: '导入 ONE 模板' }, { id: 1, name: '导入 PIL 订舱模板' }, { id: 2, name: '导入截单格式' }, { id: 3, name: '导入海信提单' }],
  744. excelForm: {},
  745. excelLoading: false,
  746. excelOption: {
  747. submitBtn: false,
  748. emptyBtn: false,
  749. column: [
  750. {
  751. label: "模板上传",
  752. prop: "excelFile",
  753. type: "upload",
  754. drag: true,
  755. loadText: "模板上传中,请稍等",
  756. span: 24,
  757. propsHttp: {
  758. res: "data"
  759. },
  760. tip: "请上传 .xls,.xlsx 标准格式文件",
  761. action: "api/blade-los/templateImport/importOne"
  762. }
  763. ]
  764. },
  765. excelBox: false,
  766. saberTenantId: 0,
  767. }
  768. },
  769. watch: {
  770. // 监听业务类型 如果不是分单 可以编辑分单号
  771. 'form.billType': {
  772. // 执行方法
  773. handler(oldValue, newValue) {
  774. // if (oldValue == 'MM') {
  775. // this.form.hblno = ''
  776. // }
  777. // 只有分单不能编辑
  778. if (oldValue == 'MH') {
  779. this.columnforfun('hblno').disabled = true
  780. } else {
  781. this.columnforfun('hblno').disabled = false
  782. }
  783. },
  784. deep: true, // 深度监听
  785. immediate: true // 第一次改变就执行
  786. },
  787. // 监听箱信息数据 箱信息中有温度 自动切换 冻货
  788. 'form.preContainersList': {
  789. // 执行方法
  790. handler(oldValue, newValue) {
  791. // 判断是否是数组
  792. if (oldValue instanceof Array) {
  793. // 循环 有温度反 true 没有反 false
  794. const arr = oldValue.map(item => {
  795. if (Number(item.temperature)) {
  796. return true
  797. } else {
  798. return false
  799. }
  800. })
  801. console.log(arr, 12345)
  802. // 判断是否有温度
  803. if (arr[0]) {
  804. // 判断之前是否是冻货
  805. if (this.form.cargoType == 'reefer') return
  806. this.$message({
  807. message: '箱信息里有温度已将货描切换为冻柜',
  808. type: 'warning'
  809. });
  810. this.$set(this.form, 'cargoType', 'reefer')
  811. }
  812. }
  813. },
  814. deep: true, // 深度监听
  815. immediate: true // 第一次改变就执行,
  816. }
  817. },
  818. created() {
  819. let Obj = JSON.parse(localStorage.getItem('saber-tenantId'))
  820. this.saberTenantId = Obj ? Obj.content : 0;
  821. this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content
  822. this.roleName = localStorage.getItem('roleName').split(',')
  823. // 判断是否员id, 有id 就不显示
  824. if (!this.form.id) {
  825. this.deptGetDetailPolfun() // 收货地 装货港 当前登录人的默认
  826. this.userGetListfun(undefined, true) // 获取用户管理数据
  827. }
  828. this.ownDeptLazyTreefun() // 获取公司数据
  829. this.getLazylistfun() // 获取审核数据
  830. this.mpaymodeWorkDictsfun() // 获取 付款方式字典
  831. this.srcTypeWorkDictsfun()
  832. // 获取EDI 数据
  833. this.editypesListfun()
  834. // 获取所属团队数据
  835. this.postSelectByUserfun()
  836. },
  837. methods: {
  838. inLock() {
  839. this.showLock = true;
  840. const data = {
  841. moduleName: "SE",
  842. tableName: "SE_order",
  843. billId: this.form.id,
  844. no: localStorage.getItem("browserID"),
  845. billNo: this.form.mblno
  846. };
  847. this.inDetailsKey(this.$route.name, {
  848. moduleName: "SE",
  849. tableName: "SE_order",
  850. billId: this.form.id,
  851. billNo: this.form.mblno
  852. });
  853. this.checkLock(data).then(res => {
  854. if (res.data.code == 200) {
  855. this.onLock(data).then(res => {
  856. if (res.data.code == 200) {
  857. this.showLock = false
  858. }
  859. });
  860. }
  861. });
  862. },
  863. addEdit() {
  864. if (this.form.billStatus >= 3) {
  865. this.$emit('toAddEdit')
  866. } else {
  867. if (contrastObj(this.form, this.oldForm)
  868. || contrastList(this.form.preContainersList, this.oldForm.preContainersList) || contrastList(this.form.containersList, this.oldForm.containersList)
  869. || contrastList(this.form.feeCenterListC, this.oldForm.feeCenterListC)
  870. || contrastList(this.form.feeCenterListD, this.oldForm.feeCenterListD)
  871. || contrastList(this.form.filesList, this.oldForm.filesList)
  872. || contrastList(this.form.waitingBoxList, this.oldForm.waitingBoxList)
  873. ) {
  874. this.$confirm('是否需要保存?', '提示', {
  875. confirmButtonText: '确定',
  876. cancelButtonText: '取消',
  877. type: 'warning'
  878. }).then(() => {
  879. this.editCustomer('toAddEdit')
  880. }).catch(() => {
  881. this.$emit('toAddEdit')
  882. });
  883. } else {
  884. this.$emit('toAddEdit')
  885. }
  886. }
  887. },
  888. CopyDocumentsfun() {
  889. if (!this.form.id) {
  890. return this.$message.error("请保存数据");
  891. }
  892. this.$DialogForm.show({
  893. title: '复制单据',
  894. width: '300px',
  895. menuPosition: 'right',
  896. data: { checkbox: '复制费用,复制箱型箱量' },
  897. option: {
  898. submitText: '确认',
  899. emptyText: '取消',
  900. span: 24,
  901. column: [{
  902. label: "复制类型",
  903. prop: "checkbox",
  904. type: 'checkbox',
  905. dicData: [{
  906. label: '复制费用',
  907. value: '复制费用',
  908. }, {
  909. label: '复制箱型箱量',
  910. value: '复制箱型箱量'
  911. }],
  912. dataType: 'string',
  913. span: 24,
  914. }]
  915. },
  916. beforeClose: (done) => {
  917. done()
  918. },
  919. callback: (res) => {
  920. res.done()
  921. this.billsCopyBillsfun(this.form.id,res.data.checkbox)
  922. res.close()
  923. }
  924. })
  925. },
  926. //文档导入
  927. importData(row) {
  928. if (row == 0) {
  929. this.excelOption.column[0].action = '/api/blade-los/templateImport/importOne'
  930. } else if (row == 1) {
  931. this.excelOption.column[0].action = '/api/blade-los/templateImport/importPilBooking'
  932. } else if (row == 2) {
  933. this.excelOption.column[0].action = '/api/blade-los/templateImport/importPilCutOffOrders'
  934. } else if (row == 3) {
  935. this.excelOption.column[0].action = '/api/blade-los/templateImport/importHisenseBill'
  936. }
  937. this.excelBox = true
  938. },
  939. uploadBefore(file, done, loading) {
  940. done();
  941. loading = true;
  942. },
  943. removeEmptyValues(obj) {
  944. Object.keys(obj).forEach(key => {
  945. if (obj[key] === null || obj[key] === undefined || obj[key] === '') {
  946. delete obj[key];
  947. }
  948. });
  949. return obj;
  950. },
  951. // 上传成功
  952. onSuccess(res, done, loading, column) {
  953. // const obj = Object.assign(res,this.removeEmptyValues(this.form));
  954. this.$confirm('此操作将覆盖数据, 是否继续?', '提示', {
  955. confirmButtonText: '确定',
  956. cancelButtonText: '取消',
  957. type: 'warning'
  958. }).then(() => {
  959. this.form = res;
  960. this.excelBox = false;
  961. this.$message.success("导入成功!");
  962. loading = false;
  963. done();
  964. }).catch(() => {
  965. this.$message({
  966. type: 'info',
  967. message: '已取消操作'
  968. });
  969. this.excelBox = false;
  970. loading = false;
  971. done();
  972. });
  973. },
  974. // 获取EDI列表数据
  975. editypesListfun() {
  976. editypesList(1, 30).then(res => {
  977. this.ediData = res.data.data.records
  978. })
  979. },
  980. // 发送edi
  981. editypesSendingEdifun(row) {
  982. row.billId = this.form.id
  983. let msgsList = []
  984. if (!verifyEnglish(this.form.detail.hshipperDetails)) {
  985. msgsList.push('发货人')
  986. }
  987. if (!verifyEnglish(this.form.detail.hconsigneeDetails)) {
  988. msgsList.push('收货人')
  989. }
  990. if (!verifyEnglish(this.form.detail.hnotifyDetails)) {
  991. msgsList.push('通知人')
  992. }
  993. if (!verifyEnglish(this.form.marks)) {
  994. msgsList.push('唛头')
  995. }
  996. if (!verifyEnglish(this.form.commodityDescr)) {
  997. msgsList.push('货描')
  998. }
  999. if (!verifyEnglish(this.form.forwarding)) {
  1000. msgsList.push('FORWARDING')
  1001. }
  1002. if (msgsList.length > 0) {
  1003. this.$message.error(`请正确输入${msgsList.join(",")}的英文`);
  1004. return;
  1005. }
  1006. if (!verifySymbol(this.form.detail.hshipperDetails)) {
  1007. msgsList.push('发货人')
  1008. }
  1009. if (!verifySymbol(this.form.detail.hconsigneeDetails)) {
  1010. msgsList.push('收货人')
  1011. }
  1012. if (!verifySymbol(this.form.detail.hnotifyDetails)) {
  1013. msgsList.push('通知人')
  1014. }
  1015. if (!verifySymbol(this.form.marks)) {
  1016. msgsList.push('唛头')
  1017. }
  1018. if (!verifySymbol(this.form.commodityDescr)) {
  1019. msgsList.push('货描')
  1020. }
  1021. if (!verifySymbol(this.form.forwarding)) {
  1022. msgsList.push('FORWARDING')
  1023. }
  1024. if (msgsList.length > 0) {
  1025. this.$message.error(`请正确输入${msgsList.join(",")}的英文符号`);
  1026. return;
  1027. }
  1028. this.saveLoading = true
  1029. editypesSendingEdi(row).then(res => {
  1030. this.saveLoading = false
  1031. // 判断data是否有值,没有值说明不成功给个弹窗返回
  1032. if (!res.data.data) {
  1033. let text = res.data.msg.replace("\r\n", "<br>");
  1034. console.log(text)
  1035. this.$message({
  1036. type: 'warning',
  1037. dangerouslyUseHTMLString: true,
  1038. message: text,
  1039. // message: `<p>${text.slice(text.indexOf('非空'), text.indexOf('特殊字符'))}</p><p>${text.slice(text.indexOf('特殊字符'), text.indexOf('长度超长'))}</p><p>${text.slice(text.indexOf('长度超长'), text.indexOf('其他'))}</p><p>${text.slice(text.indexOf('其他'))}</p>`,
  1040. duration: 5000
  1041. });
  1042. } else {
  1043. this.$message.success('操作成功,请去文件中心查看')
  1044. this.billsDetailfun(this.form.id) // 详情接口
  1045. }
  1046. }).catch((err) => {
  1047. this.saveLoading = false
  1048. })
  1049. },
  1050. // 报表弹窗
  1051. previewDialogfun() {
  1052. this.previewDialog = true
  1053. },
  1054. //请核关闭
  1055. choceScheduleFun() {
  1056. this.checkScheduleDialog = false
  1057. },
  1058. // 收货地 装货港 当前登录人的默认
  1059. deptGetDetailPolfun() {
  1060. deptGetDetailPol(this.saberUserInfo.dept_pid.split(',')[0]).then(res => {
  1061. // 收货地
  1062. this.form.placeReceiptName = res.data.data.polEnName
  1063. this.form.placeReceiptId = res.data.data.polId
  1064. this.form.placeReceiptCode = res.data.data.polCode
  1065. this.form.placeReceiptNamePrint = res.data.data.polEnName
  1066. // 装货港
  1067. this.form.polCnName = res.data.data.polCnName
  1068. this.form.polEnName = res.data.data.polEnName
  1069. this.form.polId = res.data.data.polId
  1070. this.form.polCode = res.data.data.polCode
  1071. this.form.polNamePrint = res.data.data.polEnName
  1072. // 签单地点 默认 装货港
  1073. this.$set(this.form, 'issueAtId', this.form.polId)
  1074. this.$set(this.form, 'issueAt', this.form.polEnName)
  1075. // 主单单付费地点 默认 如果主单付费方式 为PP 取装货港 如果主单付费地点为CC 取卸货港
  1076. if (this.form.mpaymode == 'PP') {
  1077. this.$set(this.form, 'mpayplace', this.form.polEnName)
  1078. }
  1079. // 分单单付费地点 默认 如果分单付费方式 为PP 取装货港 如果分单付费地点为CC 取卸货港
  1080. if (this.form.hpaymode == 'PP') {
  1081. this.$set(this.form, 'hpayplace', this.form.polEnName)
  1082. }
  1083. })
  1084. },
  1085. // 获取用户管理数据
  1086. userGetListfun(account = undefined, type = false,) {
  1087. userGetList(1, 10, { account }, this.saberUserInfo.dept_pid.split(',')[0]).then(res => {
  1088. this.columnforfun('operatorName').dicData = res.data.data.records
  1089. if (type) {
  1090. // 核算部门 默认登录人的部门
  1091. for (let item of this.columnforfun('operatorName').dicData) {
  1092. if (item.name == this.form.operatorName) {
  1093. this.$set(this.form, 'accDeptName', item.deptName)
  1094. this.$set(this.form, 'accDept', item.deptId)
  1095. this.$set(this.form, 'operatorDept', item.deptId.split(',').pop())
  1096. this.$set(this.form, 'operatorDeptName', item.deptId)
  1097. }
  1098. }
  1099. }
  1100. })
  1101. },
  1102. // 获取所属岗位数据
  1103. postSelectByUserfun() {
  1104. postSelectByUser(JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id).then(res => {
  1105. this.columnforfun('teamName').dicData = res.data.data
  1106. // 判断是否有值,没有的话默认第一个
  1107. if (!this.form.teamName) {
  1108. this.$set(this.form, 'teamId', res.data.data[0].id)
  1109. this.$set(this.form, 'teamName', res.data.data[0].postName)
  1110. }
  1111. })
  1112. },
  1113. // 获取付款方式字典数据
  1114. mpaymodeWorkDictsfun() {
  1115. getWorkDicts('payment_method_los').then((res) => {
  1116. this.columnforfun('mpaymode').dicData = res.data.data
  1117. this.columnforfun('hpaymode').dicData = res.data.data
  1118. })
  1119. },
  1120. // 获取核算部分数据 // 机构管理接口
  1121. getLazylistfun() {
  1122. getDeptTree().then(res => {
  1123. this.columnforfun('accDeptName').dicData = res.data.data
  1124. })
  1125. },
  1126. // 获取客户名称数据 往来单位数据
  1127. getBcorpsListfun(cnName) {
  1128. getBcorpsList(1, 10, { shortName: cnName, status: 0 }).then(res => {
  1129. this.columnforfun('corpCnName').dicData = res.data.data.records
  1130. })
  1131. },
  1132. // 获取客户联系人 客户OP
  1133. getBcorpsattnListfun(cname) {
  1134. getBcorpsattnList(1, 10, { pid: this.form.corpId, cname }).then(res => {
  1135. this.columnforfun('corpAttnName').dicData = res.data.data.records
  1136. // if (res.data.data.records.length == 0) {
  1137. // this.form.corpAttnName = ''
  1138. // this.form.corpAttnId = ''
  1139. // this.$set(this.form, 'corpAttnTel', '')
  1140. // this.$set(this.form, 'corpAttnEmail', '')
  1141. // return
  1142. // }
  1143. // this.form.corpAttnName = res.data.data.records[0].cname
  1144. // this.form.corpAttnId = res.data.data.records[0].id
  1145. // this.$set(this.form, 'corpAttnTel', res.data.data.records[0].tel)
  1146. // this.$set(this.form, 'corpAttnEmail', res.data.data.records[0].email)
  1147. })
  1148. },
  1149. // 获取地点信息
  1150. getBlocationsListfun(cnName) {
  1151. getBlocationsList(1, 10, { cnName }).then(res => {
  1152. this.columnforfun('mPayplace').dicData = res.data.data.records
  1153. })
  1154. },
  1155. // 获取业务来源数据
  1156. srcTypeWorkDictsfun() {
  1157. getWorkDicts('src_type_los').then(res => {
  1158. this.columnforfun('srcType').dicData = res.data.data
  1159. })
  1160. },
  1161. // 获取业务来源代理数据
  1162. agentBcorpsListfun(cnName) {
  1163. let corpTypeName = '国内直接客户,国内同行及代理,国外直接客户,国外同行及代理'
  1164. getBcorpslistByType(1, 10, { cnName, status: 0, corpTypeName }).then(res => {
  1165. this.columnforfun('srcCnName').dicData = res.data.data.records
  1166. })
  1167. },
  1168. // 获取业务来源业务员数据
  1169. salesUserGetListfun(account) {
  1170. if (this.$store.getters.userInfo.tenant_id === "263057") {
  1171. userGetList(1, 10, { roleId: '业务员' }).then(res => {
  1172. this.columnforfun('srcCnName').dicData = res.data.data.records
  1173. })
  1174. } else {
  1175. selectListLos('业务员').then(res => {
  1176. this.columnforfun('srcCnName').dicData = res.data.data
  1177. })
  1178. }
  1179. },
  1180. // 获取公司名称 用户管理左侧
  1181. ownDeptLazyTreefun() {
  1182. getDeptLazyTree(0).then(res => {
  1183. this.columnforfun('srcCnName').dicData = res.data.data
  1184. // 来源 内容 默认登录人所属公司
  1185. for (let item of this.columnforfun('srcCnName').dicData) {
  1186. if (item.id == JSON.parse(localStorage.getItem('saber-userInfo')).content.dept_pid.split(',')[0]) {
  1187. this.$set(this.form, 'srcId', item.id)
  1188. this.$set(this.form, 'srcCnName', item.title)
  1189. this.$set(this.form, 'srcEnName', item.title)
  1190. }
  1191. }
  1192. })
  1193. },
  1194. // 申请B/L NO
  1195. billsGetBillNofun() {
  1196. let billNoFormat = ''
  1197. if (this.form.cargoType == 'dry') {
  1198. billNoFormat = 'HYCK-PH'
  1199. } else if (this.form.cargoType == 'danger') {
  1200. billNoFormat = 'HYCK-WXP'
  1201. } else if (this.form.cargoType == 'reefer') {
  1202. billNoFormat = 'HYCK-DG'
  1203. }
  1204. billsGetBillNo({
  1205. businessTypeCode: 'HYCK',
  1206. billNoFormat: billNoFormat
  1207. }).then(res => {
  1208. this.columnforfun('hpaymode').disabled = false
  1209. this.$set(this.form, 'hblno', res.data.data)
  1210. this.billsSubmitfun()
  1211. })
  1212. },
  1213. // 下拉多选弹窗的确认
  1214. eldialogConfirm(name) {
  1215. if (name == 'bcorps') {
  1216. if (this.$refs.bcorps[0].isShow) {
  1217. console.log('列表确认')
  1218. this.form.corpCnName = this.$refs.bcorps[0].selectionList[0].cnName
  1219. this.form.corpEnName = this.$refs.bcorps[0].selectionList[0].enName
  1220. this.form.corpId = this.$refs.bcorps[0].selectionList[0].id
  1221. this.form.corpCode = this.$refs.bcorps[0].selectionList[0].code
  1222. this.form.corpSource = this.$refs.bcorps[0].selectionList[0].corpSource
  1223. // 获取 客户op数据
  1224. this.getBcorpsattnListfun()
  1225. // 业务来源参数带出
  1226. this.$set(this.form, 'srcType', this.$refs.bcorps[0].selectionList[0].sourceType)
  1227. this.$set(this.form, 'srcId', this.$refs.bcorps[0].selectionList[0].srcId)
  1228. this.$set(this.form, 'srcCnName', this.$refs.bcorps[0].selectionList[0].srcCnName)
  1229. this.$set(this.form, 'srcEnName', this.$refs.bcorps[0].selectionList[0].srcEnName)
  1230. this.columnforfun('srcType').disabled = false
  1231. this.columnforfun('srcCnName').disabled = false
  1232. // 航线带出往来单位的优势航线
  1233. this.$set(this.form, 'lineCnName', this.$refs.bcorps[0].selectionList[0].advantageRoute)
  1234. // 带出发货人数据
  1235. this.$set(this.form.detail, 'hshipperId', this.$refs.bcorps[0].selectionList[0].id)
  1236. this.$set(this.form.detail, 'hshipperCnName', this.$refs.bcorps[0].selectionList[0].cnName)
  1237. this.$set(this.form.detail, 'hshipperEnName', this.$refs.bcorps[0].selectionList[0].enName)
  1238. this.$set(this.form.detail, 'hshipperCode', this.$refs.bcorps[0].selectionList[0].code)
  1239. this.$set(this.form.detail, 'hshipperDetails', this.$refs.bcorps[0].selectionList[0].details)
  1240. this.$set(this.form.detail, 'hshipperCntyName', this.$refs.bcorps[0].selectionList[0].cntyName)
  1241. this.$set(this.form.detail, 'hshipperCntyCode', this.$refs.bcorps[0].selectionList[0].cntyCode)
  1242. this.columnforfun('corpAttnName').disabled = false
  1243. this.columnforfun('corpAttnTel').disabled = false
  1244. this.columnforfun('corpAttnEmail').disabled = false
  1245. } else {
  1246. console.log('详情确认')
  1247. console.log(this.$refs.bcorps, 962)
  1248. this.$refs.bcorps[0].$refs.detail.submitForm()
  1249. this.form.corpCnName = this.$refs.bcorps[0].$refs.detail.formData.cnName
  1250. this.form.corpEnName = this.$refs.bcorps[0].$refs.detail.formData.enName
  1251. this.form.corpId = this.$refs.bcorps[0].$refs.detail.formData.id
  1252. this.form.corpCode = this.$refs.bcorps[0].$refs.detail.formData.code
  1253. this.form.corpSource = this.$refs.bcorps[0].$refs.detail.formData.corpSource
  1254. // 获取 客户op数据
  1255. this.getBcorpsattnListfun()
  1256. // 业务来源参数带出
  1257. this.$set(this.form, 'srcType', this.$refs.bcorps[0].$refs.detail.formData.sourceType)
  1258. this.$set(this.form, 'srcId', this.$refs.bcorps[0].$refs.detail.formData.srcId)
  1259. this.$set(this.form, 'srcCnName', this.$refs.bcorps[0].$refs.detail.formData.srcCnName)
  1260. this.$set(this.form, 'srcEnName', this.$refs.bcorps[0].$refs.detail.formData.srcEnName)
  1261. this.columnforfun('srcType').disabled = false
  1262. this.columnforfun('srcCnName').disabled = false
  1263. // 航线带出往来单位的优势航线
  1264. this.$set(this.form, 'lineCnName', this.$refs.bcorps[0].$refs.detail.formData.advantageRoute)
  1265. // 带出发货人数据
  1266. this.$set(this.form.detail, 'hshipperId', this.$refs.bcorps[0].$refs.detail.formData.id)
  1267. this.$set(this.form.detail, 'hshipperCnName', this.$refs.bcorps[0].$refs.detail.formData.cnName)
  1268. this.$set(this.form.detail, 'hshipperEnName', this.$refs.bcorps[0].$refs.detail.formData.enName)
  1269. this.$set(this.form.detail, 'hshipperCode', this.$refs.bcorps[0].$refs.detail.formData.code)
  1270. this.$set(this.form.detail, 'hshipperDetails', this.$refs.bcorps[0].$refs.detail.formData.details)
  1271. this.$set(this.form.detail, 'hshipperCntyName', this.$refs.bcorps[0].$refs.detail.formData.cntyName)
  1272. this.$set(this.form.detail, 'hshipperCntyCode', this.$refs.bcorps[0].$refs.detail.formData.cntyCode)
  1273. this.columnforfun('corpAttnName').disabled = false
  1274. this.columnforfun('corpAttnTel').disabled = false
  1275. this.columnforfun('corpAttnEmail').disabled = false
  1276. }
  1277. }
  1278. this.$refs.searchQueryRef[0].corpVisible = false
  1279. },
  1280. // 下拉多选弹窗数据多选回调
  1281. eldialogMultipleChoice(list, name) {
  1282. if (name == 'bcorps') {
  1283. let arr = []
  1284. if (list.length > 1) {
  1285. this.$refs.bcorps[0].$refs.crud.toggleSelection() // 先清空所以选择的数据
  1286. arr = [list[list.length - 1]] // 获取最新点击的数组
  1287. this.$refs.bcorps[0].$refs.crud.toggleSelection(arr, true) // 把刚点击的数组变成选择状态
  1288. } else {
  1289. arr = list
  1290. }
  1291. this.$refs.bcorps[0].selectionList = arr
  1292. }
  1293. },
  1294. /* 远程模糊查询操作用户 */
  1295. remoteMethod(value, name) {
  1296. if (name == 'operatorName') {
  1297. this.userGetListfun(value)
  1298. } else if (name == 'accDeptName') {
  1299. this.getLazylistfun(value)
  1300. } else if (name == 'corpCnName') {
  1301. this.getBcorpsListfun(value)
  1302. } else if (name == 'mPayplace') {
  1303. this.getBlocationsListfun(value)
  1304. } else if (name == 'corpAttnName') {
  1305. this.getBcorpsattnListfun(value)
  1306. } else if (name == 'srcType') {
  1307. this.srcTypeWorkDictsfun()
  1308. } else if (name == 'srcCnName') {
  1309. if (this.form.srcType == 'SALES') {
  1310. // 业务员
  1311. this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'name', value: 'name' }
  1312. this.salesUserGetListfun(value)
  1313. } else if (this.form.srcType == 'AGENT') {
  1314. // 代理
  1315. this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'cnName', value: 'cnName' }
  1316. this.agentBcorpsListfun(value)
  1317. } else if (this.form.srcType == 'OWN') {
  1318. // 公司
  1319. this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'title', value: 'title' }
  1320. this.ownDeptLazyTreefun()
  1321. } else { }
  1322. } else if (name == 'teamName') {
  1323. this.postSelectByUserfun()
  1324. } else {
  1325. }
  1326. },
  1327. // 下拉的监听事件
  1328. corpChange(value, name) {
  1329. if (name == 'operatorName') {
  1330. // OP 下拉赋值 用户管理列表
  1331. for (let item of this.columnforfun('operatorName').dicData) {
  1332. if (item.name == value) {
  1333. this.form.operatorName = item.name
  1334. this.form.operatorId = item.id
  1335. this.form.operatorDept = item.deptId.split(',').pop()
  1336. this.form.operatorDeptName = item.deptName
  1337. }
  1338. }
  1339. }
  1340. else if (name == 'accDeptName') {
  1341. // OP 下拉赋值 用户管理列表
  1342. for (let item of this.columnforfun('accDeptName').dicData) {
  1343. if (item.title == value) {
  1344. this.form.accDeptName = item.title
  1345. this.form.accDept = item.id
  1346. }
  1347. }
  1348. }
  1349. else if (name == 'corpCnName') {
  1350. if (value) {
  1351. // this.columnforfun('corpAttnName').disabled = false
  1352. // this.columnforfun('corpAttnTel').disabled = false
  1353. // this.columnforfun('corpAttnEmail').disabled = false
  1354. } else {
  1355. // this.columnforfun('corpAttnName').disabled = true
  1356. // this.columnforfun('corpAttnTel').disabled = true
  1357. // this.columnforfun('corpAttnEmail').disabled = true
  1358. // 如果点击清空按钮把值赋值为空
  1359. this.form.corpCnName = ''
  1360. this.form.corpEnName = ''
  1361. this.form.corpId = ''
  1362. this.form.corpCode = ''
  1363. this.form.shortName = ''
  1364. this.form.corpSource = ""
  1365. // 清空 客户OP
  1366. // this.form.corpAttnName = ''
  1367. this.form.corpAttnId = ''
  1368. this.$set(this.form, 'corpAttnTel', '')
  1369. this.$set(this.form, 'corpAttnEmail', '')
  1370. // 清空 业务来源和来源详情
  1371. this.$set(this.form, 'srcType', '')
  1372. this.$set(this.form, 'srcId', '')
  1373. this.$set(this.form, 'srcCnName', '')
  1374. this.$set(this.form, 'srcEnName', '')
  1375. }
  1376. // 往来单位
  1377. for (let item of this.columnforfun('corpCnName').dicData) {
  1378. if (item.cnName == value) {
  1379. this.form.corpCnName = item.cnName
  1380. this.form.corpEnName = item.enName
  1381. this.form.corpId = item.id
  1382. this.form.corpCode = item.code
  1383. this.form.shortName = item.shortName
  1384. this.form.corpSource = item.corpSource
  1385. // 获取 客户op数据
  1386. this.getBcorpsattnListfun()
  1387. // 业务来源参数带出
  1388. this.$set(this.form, 'srcType', item.sourceType)
  1389. this.$set(this.form, 'srcId', item.srcId)
  1390. this.$set(this.form, 'srcCnName', item.srcCnName)
  1391. this.$set(this.form, 'srcEnName', item.srcEnName)
  1392. this.$set(this.form, 'srcDeptId', item.deptId.split(',').pop())
  1393. this.$set(this.form, 'srcDeptName', item.deptName)
  1394. this.columnforfun('srcType').disabled = false
  1395. this.columnforfun('srcCnName').disabled = false
  1396. // 航线带出往来单位的优势航线
  1397. this.$set(this.form, 'lineCnName', item.advantageRoute)
  1398. // 带出发货人数据
  1399. // this.$set(this.form,'hshipperId',item.id)
  1400. // this.$set(this.form,'hshipperCnName',item.cnName)
  1401. // this.$set(this.form,'hshipperEnName',item.enName)
  1402. // this.$set(this.form,'hshipperCode',item.code)
  1403. // this.$set(this.form,'hshipperDetails',item.details)
  1404. // this.$set(this.form,'hshipperCntyName',item.cntyName)
  1405. // this.$set(this.form,'hshipperCntyCode',item.cntyCode)
  1406. }
  1407. }
  1408. }
  1409. else if (name == 'corpAttnName') {
  1410. if (this.columnforfun('corpAttnName').dicData.length) {
  1411. for (let item of this.columnforfun('corpAttnName').dicData) {
  1412. if (item.cname == value) {
  1413. this.form.corpAttnName = item.cname
  1414. this.form.corpAttnId = item.id
  1415. this.$set(this.form, 'corpAttnTel', item.tel)
  1416. this.$set(this.form, 'corpAttnEmail', item.email)
  1417. }
  1418. }
  1419. } else {
  1420. if (value) {
  1421. this.form.corpAttnName = value
  1422. this.form.corpAttnId = null
  1423. }
  1424. }
  1425. }
  1426. else if (name == 'srcType') {
  1427. if (!value) {
  1428. this.$set(this.form, 'srcType', '')
  1429. // this.columnforfun('srcCnName').disabled = true
  1430. return
  1431. }
  1432. this.$set(this.form, 'srcId', '')
  1433. this.$set(this.form, 'srcCnName', '')
  1434. this.$set(this.form, 'srcEnName', '')
  1435. this.form[name] = value
  1436. if (value == 'OWN') {
  1437. // 公司
  1438. this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'title', value: 'title' }
  1439. this.ownDeptLazyTreefun()
  1440. } else if (value == 'AGENT') {
  1441. // 代理
  1442. this.columnforfun('srcCnName').type = 'select'
  1443. this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'cnName', value: 'cnName' }
  1444. this.columnforfun('srcCnName').disabled = false
  1445. this.agentBcorpsListfun()
  1446. } else if (value == 'SALES') {
  1447. // 业务员
  1448. this.columnforfun('srcCnName').type = 'select'
  1449. this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'name', value: 'name' }
  1450. this.columnforfun('srcCnName').disabled = false
  1451. this.salesUserGetListfun()
  1452. }
  1453. }
  1454. else if (name == 'srcCnName') {
  1455. for (let item of this.columnforfun('srcCnName').dicData) {
  1456. if (item[this.columnforfun('srcCnName').forParameter.value] == value) {
  1457. if (this.form.srcType == 'SALES') {
  1458. // 业务员
  1459. this.$set(this.form, 'srcId', item.id)
  1460. this.$set(this.form, 'srcCnName', item.name)
  1461. this.$set(this.form, 'srcEnName', item.name)
  1462. this.$set(this.form, 'srcDeptId', item.deptId.split(',').pop())
  1463. this.$set(this.form, 'srcDeptName', item.deptName)
  1464. } else if (this.form.srcType == 'AGENT') {
  1465. // 代理
  1466. this.$set(this.form, 'srcId', item.id)
  1467. this.$set(this.form, 'srcCnName', item.cnName)
  1468. this.$set(this.form, 'srcEnName', item.enName)
  1469. }
  1470. }
  1471. }
  1472. }
  1473. else if (name == 'coloaderCnName') {
  1474. for (let item of this.columnforfun('coloaderCnName').dicData) {
  1475. if (item.cnName == value) {
  1476. this.$set(this.form, 'coloaderId', item.id)
  1477. this.$set(this.form, 'coloaderCnName', item.cnName)
  1478. this.$set(this.form, 'coloaderEnName', item.enName)
  1479. }
  1480. }
  1481. }
  1482. else if (name == 'mpaymode') {
  1483. // 主单付费方式
  1484. this.form[name] = value
  1485. if (value == 'PP') {
  1486. this.$set(this.form, 'mpayplace', this.form.polEnName ? this.form.polEnName.split(' - ')[0] : '')
  1487. } else {
  1488. this.$set(this.form, 'mpayplace', this.form.podEnName ? this.form.podEnName.split(' - ')[0] : '')
  1489. }
  1490. }
  1491. else if (name == 'hpaymode') {
  1492. // 分单付费方式
  1493. this.form[name] = value
  1494. if (value == 'PP') {
  1495. this.$set(this.form, 'hpayplace', this.form.polEnName.split(' - ')[0])
  1496. } else {
  1497. this.$set(this.form, 'hpayplace', this.form.podEnName.split(' - ')[0])
  1498. }
  1499. }
  1500. else if (name == 'teamName') {
  1501. if (!value) {
  1502. this.$set(this.form, 'teamId', '')
  1503. this.$set(this.form, 'teamName', '')
  1504. }
  1505. for (let item of this.columnforfun('teamName').dicData) {
  1506. if (item.id == value) {
  1507. this.$set(this.form, 'teamId', item.id)
  1508. this.$set(this.form, 'teamName', item.postName)
  1509. }
  1510. }
  1511. }
  1512. else {
  1513. this.form[name] = value
  1514. }
  1515. },
  1516. // 申请B/L NO
  1517. applyforfun(text) {
  1518. if (!this.form.id) {
  1519. this.$message({
  1520. message: '请先保存数据',
  1521. type: 'warning'
  1522. });
  1523. return
  1524. }
  1525. // 如果不是分单
  1526. if (this.form.billType != 'MH') {
  1527. this.$message({
  1528. message: '只有分单需要申请',
  1529. type: 'warning'
  1530. });
  1531. return
  1532. }
  1533. if (this.form.hblno) {
  1534. this.$message({
  1535. message: 'B/L NO 只能申请一次',
  1536. type: 'warning'
  1537. });
  1538. return
  1539. }
  1540. if (!this.form.businessType) {
  1541. this.$message({
  1542. message: '请先选择业务类型',
  1543. type: 'warning'
  1544. });
  1545. return
  1546. }
  1547. if (!this.form.corpCnName) {
  1548. this.$message({
  1549. message: '请先选择客户名称',
  1550. type: 'warning'
  1551. });
  1552. return
  1553. }
  1554. this.$confirm(`确定${text}?`, {
  1555. confirmButtonText: "确定",
  1556. cancelButtonText: "取消",
  1557. type: "warning"
  1558. }).then(res => {
  1559. this.billsGetBillNofun()
  1560. })
  1561. },
  1562. // 配置项
  1563. columnforfun(value) {
  1564. for (let item of this.basicData.column) {
  1565. if (item instanceof Array) {
  1566. for (let ite of item) {
  1567. if (value == ite.prop) {
  1568. return ite
  1569. }
  1570. }
  1571. } else {
  1572. if (value == item.prop) {
  1573. return item
  1574. }
  1575. }
  1576. }
  1577. },
  1578. //返回列表
  1579. backToList() {
  1580. if (contrastObj(this.form, this.oldForm)
  1581. || contrastList(this.form.preContainersList, this.oldForm.preContainersList) || contrastList(this.form.containersList, this.oldForm.containersList)
  1582. || contrastList(this.form.feeCenterListC, this.oldForm.feeCenterListC)
  1583. || contrastList(this.form.feeCenterListD, this.oldForm.feeCenterListD)
  1584. || contrastList(this.form.filesList, this.oldForm.filesList)
  1585. || contrastList(this.form.waitingBoxList, this.oldForm.waitingBoxList)
  1586. ) {
  1587. this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
  1588. confirmButtonText: "确定",
  1589. cancelButtonText: "取消",
  1590. type: "warning"
  1591. })
  1592. .then(() => {
  1593. this.editCustomer('goBack')
  1594. })
  1595. .catch(() => {
  1596. if (this.form.id) {
  1597. this.unLock({
  1598. moduleName: "SE",
  1599. tableName: "SE_order",
  1600. billId: this.form.id,
  1601. billNo: this.form.mblno
  1602. });
  1603. }
  1604. this.$emit('goBack')
  1605. });
  1606. } else {
  1607. if (this.form.id) {
  1608. this.unLock({
  1609. moduleName: "SE",
  1610. tableName: "SE_order",
  1611. billId: this.form.id,
  1612. billNo: this.form.mblno
  1613. });
  1614. }
  1615. this.$emit('goBack')
  1616. }
  1617. },
  1618. // 单据请核
  1619. DocumentApproval() {
  1620. if (this.form.billType == 'MH') {
  1621. this.$message.warning('分单不能提交请核')
  1622. return
  1623. }
  1624. if (popupReminder(this.form, this.messageData)) {
  1625. this.$confirm(popupReminder(this.form, this.messageData), {
  1626. confirmButtonText: "确定",
  1627. cancelButtonText: "取消",
  1628. type: "warning"
  1629. })
  1630. }
  1631. if (popupReminder(this.form, this.messageData)) {
  1632. return;
  1633. }
  1634. if (this.form.feeCenterListC.length == 0 && this.form.feeCenterListD == 0) {
  1635. return this.$message.warning('请添加费用信息')
  1636. }
  1637. this.$confirm("确定要请核数据?", {
  1638. confirmButtonText: "确定",
  1639. cancelButtonText: "取消",
  1640. type: "warning"
  1641. }).then(() => {
  1642. this.pageLoading = true
  1643. billsCheckBills({
  1644. id: this.form.id,
  1645. url: '/iosBasicData/SeafreightExportF/bills/approvalDetails',
  1646. pageStatus: "this.$store.getters.approvalDetails",
  1647. pageLabel: "审批详情(F)",
  1648. }).then(res => {
  1649. this.pageLoading = false
  1650. this.$message({
  1651. type: "success",
  1652. message: "操作成功!"
  1653. });
  1654. // 详情
  1655. this.billsDetailfun(this.form.id)
  1656. }).catch(() => {
  1657. this.pageLoading = false
  1658. })
  1659. })
  1660. },
  1661. // 撤销单据请核
  1662. revokeDocumentApproval() {
  1663. this.$confirm("确定要撤销请核数据?", {
  1664. confirmButtonText: "确定",
  1665. cancelButtonText: "取消",
  1666. type: "warning"
  1667. }).then(() => {
  1668. this.pageLoading = true
  1669. billsRevokeCheckBills({
  1670. id: this.form.id
  1671. }).then(res => {
  1672. this.pageLoading = false
  1673. this.$message({
  1674. type: "success",
  1675. message: "操作成功!"
  1676. });
  1677. // 详情
  1678. this.billsDetailfun(this.form.id)
  1679. })
  1680. })
  1681. },
  1682. // 编辑按钮
  1683. editHandle() {
  1684. this.detailData.seeDisabled = false
  1685. },
  1686. //去除文本框的空格
  1687. getTextTirim(data) {
  1688. if (data) {
  1689. let obj = data.split('\n')
  1690. let res = []
  1691. obj.forEach(item => {
  1692. res.push(_.trimEnd(item))
  1693. })
  1694. return res.join('\n')
  1695. } else {
  1696. return null
  1697. }
  1698. },
  1699. // 大保存按钮
  1700. editCustomer(status) {
  1701. this.$refs.form.validate((valid) => {
  1702. if (valid) {
  1703. // 判断必填项
  1704. let msgs = []
  1705. if (!this.form.quantity) {
  1706. msgs.push('件数')
  1707. }
  1708. if (!this.form.packingUnit) {
  1709. msgs.push('包装')
  1710. }
  1711. if (!this.form.grossWeight) {
  1712. msgs.push('毛重')
  1713. }
  1714. if (!this.form.measurement) {
  1715. msgs.push('尺码')
  1716. }
  1717. if (!this.form.etd) {
  1718. msgs.push('ETD')
  1719. }
  1720. if (!this.form.teamName) {
  1721. msgs.push('所属团队')
  1722. }
  1723. for (let item of this.form.preContainersList) {
  1724. if (!item.cntrTypeCode) {
  1725. this.$message.warning('请选择尺码箱型')
  1726. return;
  1727. }
  1728. if (!item.quantity) {
  1729. this.$message.warning('请输入箱量')
  1730. return;
  1731. }
  1732. }
  1733. for (let item of this.form.feeCenterListD) {
  1734. if (!item.corpId || !item.feeId || !item.elementsId || !item.curCode) {
  1735. msgs.push(`应收第${item.$index + 1}行${!item.corpId ? ' 往来单位' : ''}${!item.feeId ? ' 费用简称' : ''}${!item.elementsId ? ' 核算要素' : ''}${!item.curCode ? ' 币种' : ''}`)
  1736. }
  1737. }
  1738. for (let item of this.form.feeCenterListC) {
  1739. if (!item.corpId || !item.feeId || !item.elementsId || !item.curCode) {
  1740. msgs.push(`应付第${item.$index + 1}行${!item.corpId ? ' 往来单位' : ''}${!item.feeId ? ' 费用简称' : ''}${!item.elementsId ? ' 核算要素' : ''}${!item.curCode ? ' 币种' : ''}`)
  1741. }
  1742. }
  1743. if (msgs.length > 0) {
  1744. this.$confirm(`请填写下列信息:${msgs.join(" ,")}!`, {
  1745. confirmButtonText: "确定",
  1746. cancelButtonText: "取消",
  1747. type: "warning"
  1748. })
  1749. return;
  1750. }
  1751. // let msgsList = []
  1752. // if (!verifyEnglish(this.form.hshipperDetails)) {
  1753. // msgsList.push('发货人')
  1754. // }
  1755. // if (!verifyEnglish(this.form.hconsigneeDetails)) {
  1756. // msgsList.push('收货人')
  1757. // }
  1758. // if (!verifyEnglish(this.form.hnotifyDetails)) {
  1759. // msgsList.push('通知人')
  1760. // }
  1761. // if (!verifyEnglish(this.form.marks)) {
  1762. // msgsList.push('唛头')
  1763. // }
  1764. // if (!verifyEnglish(this.form.commodityDescr)) {
  1765. // msgsList.push('货描')
  1766. // }
  1767. // if (!verifyEnglish(this.form.forwarding)) {
  1768. // msgsList.push('FORWARDING')
  1769. // }
  1770. // if (msgsList.length > 0) {
  1771. // this.$message.error(`请正确输入${msgsList.join(",")}的英文和英文符号`);
  1772. // return;
  1773. // }
  1774. this.form.detail.hshipperDetails = this.getTextTirim(this.form.detail.hshipperDetails)
  1775. this.form.detail.hconsigneeDetails = this.getTextTirim(this.form.detail.hconsigneeDetails)
  1776. this.form.detail.hnotifyDetails = this.getTextTirim(this.form.detail.hnotifyDetails)
  1777. this.form.detail.marks = this.getTextTirim(this.form.detail.marks)
  1778. this.form.detail.commodityDescr = this.getTextTirim(this.form.detail.commodityDescr)
  1779. this.form.forwarding = this.getTextTirim(this.form.forwarding)
  1780. // 赋值 ETD 日期
  1781. this.form.billDate = this.form.etd ? this.form.etd.slice(0, 10) + ' 00:00:00' : null // 单据日期
  1782. // 调用保存接口
  1783. this.billsSubmitfun(status)
  1784. }
  1785. })
  1786. },
  1787. // 主表保存接口大保存
  1788. billsSubmitfun(status) {
  1789. if (this.form.cargoType == 'dry') {
  1790. // 普货
  1791. this.form.billNoFormat = 'HYCK-PH'
  1792. } else if (this.form.cargoType == 'danger') {
  1793. // 危险品
  1794. this.form.billNoFormat = 'HYCK-WXP'
  1795. } else if (this.form.cargoType == 'reefer') {
  1796. // 冻柜
  1797. this.form.billNoFormat = 'HYCK-DG'
  1798. } else {
  1799. this.form.billNoFormat = 'HYCK'
  1800. }
  1801. this.form.businessTypeCode = 'HYCK'
  1802. delete this.form.extendedData
  1803. // 把拼接的数据拆开 开始 🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒
  1804. // this.searchSplit()
  1805. // 把拼接的数据拆开 结束 💩💩💩💩💩💩💩💩💩💩💩💩💩💩
  1806. // 费用 收 赋值数据
  1807. // this.form.shortName=this.form.corpCnName.split('-')[1]
  1808. this.form.feeCenterListD.map((row, index) => {
  1809. row.dc = 'D'
  1810. row.sort = Number(index) + 1
  1811. row.businessType = this.form.businessType // 业务类型
  1812. row.billType = this.form.billType // 单据类型
  1813. row.billNo = this.form.billNo // 单据编号
  1814. row.billDate = this.form.billDate
  1815. row.billCorpId = this.form.corpId // 主表客户 id
  1816. row.billCorpCnName = this.form.corpCnName // 主表客户中文名称
  1817. row.billCorpEnName = this.form.corpEnName // 主表客户英文名称
  1818. row.lineId = this.form.lineId // 航线 id
  1819. row.lineCnName = this.form.lineCnName // 航线中文名称
  1820. row.lineEnName = this.form.lineEnName // 航线英文名称
  1821. row.vesselId = this.form.vesselId // 船名 id
  1822. row.vesselCnName = this.form.vesselCnName // 中文船名
  1823. row.vesselEnName = this.form.vesselEnName // 英文船名
  1824. row.voyageNo = this.form.voyageNo // 航次
  1825. row.mblno = this.form.mblno // MB/L NO
  1826. row.hblno = this.form.hblno // HB/L NO
  1827. row.etd = this.form.etd // 开船日期
  1828. row.eta = this.form.eta // 到港日期
  1829. row.polId = this.form.polId // 装货港 id
  1830. row.polCode = this.form.polCode // 装货港代码
  1831. row.polCnName = this.form.polCnName // 装货港中文名称
  1832. row.polEnName = this.form.polEnName // 装货港英文名称
  1833. row.podId = this.form.podId // 卸货港 id
  1834. row.podCode = this.form.podCode // 卸货港代码
  1835. row.podCnName = this.form.podCnName // 卸货港中文名称
  1836. row.podEnName = this.form.podEnName // 卸货港英文名称
  1837. row.corpArgreementNo = this.form.corpArgreementNo // 客户约号
  1838. // 数量 * 单价 = 净额
  1839. // 总税率 = 税率 + 附件税率
  1840. // 税额 = 净额 * 总税率
  1841. // 含税
  1842. if (row.curCode == 'CNY') {
  1843. row.amount = row.rmbAmount ? row.rmbAmount : (Number(row.quantity) * Number(row.price)).toFixed(2)
  1844. } else {
  1845. row.amount = row.usdAmount ? row.usdAmount : (Number(row.quantity) * Number(row.price)).toFixed(2)
  1846. }
  1847. // 净额
  1848. if (row.curCode == 'CNY') {
  1849. row.amountNet = row.rmbAmountNet ? row.rmbAmountNet : (Number(row.quantity) * Number(row.price)).toFixed(2)
  1850. } else {
  1851. row.amountNet = row.usdAmountNet ? row.usdAmountNet : (Number(row.quantity) * Number(row.price)).toFixed(2)
  1852. }
  1853. })
  1854. // 费用 付 赋值数据
  1855. this.form.feeCenterListC.map((row, index) => {
  1856. row.dc = 'C'
  1857. row.sort = Number(index) + 1
  1858. row.businessType = this.form.businessType // 业务类型
  1859. row.billType = this.form.billType // 单据类型
  1860. row.billNo = this.form.billNo // 单据编号
  1861. row.billDate = this.form.billDate // 单据日期
  1862. row.billCorpId = this.form.corpId // 主表客户 id
  1863. row.billCorpCnName = this.form.corpCnName // 主表客户中文名称
  1864. row.billCorpEnName = this.form.corpEnName // 主表客户英文名称
  1865. row.lineId = this.form.lineId // 航线 id
  1866. row.lineCnName = this.form.lineCnName // 航线中文名称
  1867. row.lineEnName = this.form.lineEnName // 航线英文名称
  1868. row.vesselId = this.form.vesselId // 船名 id
  1869. row.vesselCnName = this.form.vesselCnName // 中文船名
  1870. row.vesselEnName = this.form.vesselEnName // 英文船名
  1871. row.voyageNo = this.form.voyageNo // 航次
  1872. row.mblno = this.form.mblno // MB/L NO
  1873. row.hblno = this.form.hblno // HB/L NO
  1874. row.etd = this.form.etd // 开船日期
  1875. row.eta = this.form.eta // 到港日期
  1876. row.polId = this.form.polId // 装货港 id
  1877. row.polCode = this.form.polCode // 装货港代码
  1878. row.polCnName = this.form.polCnName // 装货港中文名称
  1879. row.polEnName = this.form.polEnName // 装货港英文名称
  1880. row.podId = this.form.podId // 卸货港 id
  1881. row.podCode = this.form.podCode // 卸货港代码
  1882. row.podCnName = this.form.podCnName // 卸货港中文名称
  1883. row.podEnName = this.form.podEnName // 卸货港英文名称
  1884. row.corpArgreementNo = this.form.corpArgreementNo // 客户约号
  1885. // 数量 * 单价 = 净额
  1886. // 总税率 = 税率 + 附件税率
  1887. // 税额 = 净额 * 总税率
  1888. // 含税
  1889. if (row.curCode == 'CNY') {
  1890. row.amount = row.rmbAmount ? row.rmbAmount : (Number(row.quantity) * Number(row.price)).toFixed(2)
  1891. } else {
  1892. row.amount = row.usdAmount ? row.usdAmount : (Number(row.quantity) * Number(row.price)).toFixed(2)
  1893. }
  1894. // 净额
  1895. if (row.curCode == 'CNY') {
  1896. row.amountNet = row.rmbAmountNet ? row.rmbAmountNet : (Number(row.quantity) * Number(row.price)).toFixed(2)
  1897. } else {
  1898. row.amountNet = row.usdAmountNet ? row.usdAmountNet : (Number(row.quantity) * Number(row.price)).toFixed(2)
  1899. }
  1900. })
  1901. this.pageLoading = true
  1902. billsSubmit(this.form).then(res => {
  1903. this.pageLoading = false
  1904. this.$message({
  1905. type: "success",
  1906. message: "操作成功!"
  1907. });
  1908. if (status == 'goBack') {
  1909. if (this.form.id) {
  1910. this.unLock({
  1911. moduleName: "SE",
  1912. tableName: "SE_order",
  1913. billId: this.form.id,
  1914. billNo: this.form.mblno
  1915. });
  1916. }
  1917. this.$emit('goBack')
  1918. }
  1919. // this.detailData.seeDisabled = true
  1920. this.billsDetailfun(res.data.data.id, status)
  1921. }).catch(err => {
  1922. this.pageLoading = false
  1923. }).finally(() => {
  1924. })
  1925. },
  1926. // 提取箱专用的保存
  1927. billsAddfun() {
  1928. billsAdd(this.form).then(res => {
  1929. this.pageLoading = false
  1930. this.$message({
  1931. type: "success",
  1932. message: "操作成功!"
  1933. });
  1934. // this.detailData.seeDisabled = true
  1935. this.billsDetailfun(res.data.data.id)
  1936. }).catch(err => {
  1937. this.pageLoading = false
  1938. })
  1939. },
  1940. // 复制单据接口
  1941. billsCopyBillsfun(id,type) {
  1942. const loading = this.$loading({
  1943. lock: true,
  1944. text: '加载中',
  1945. spinner: 'el-icon-loading',
  1946. background: 'rgba(255,255,255,0.7)'
  1947. });
  1948. billsCopyBills({ id }).then(res => {
  1949. if (type == '复制费用'||type == '') {
  1950. res.data.data.preContainersList=[]
  1951. }
  1952. if (type == '复制箱型箱量'||type == '') {
  1953. res.data.data.feeCenterListD=[]
  1954. res.data.data.feeCenterListC=[]
  1955. }
  1956. this.form = res.data.data;
  1957. this.pageLoading = false
  1958. // this.searchMontage() // 下拉 中文名称和编号拼接
  1959. // 配箱最上面可以编辑
  1960. for (let item of this.form.containersList) {
  1961. item.edit = false
  1962. }
  1963. // 先把状态改成可以编辑,然后判断是否可以编辑
  1964. this.generateBillsfalse = false
  1965. // 应收
  1966. for (let item of this.form.feeCenterListD) {
  1967. // 判断是否生成了账单
  1968. if (item.accStatus == 1) {
  1969. this.columnforfun('corpCnName').disabled = true
  1970. this.columnforfun('srcType').disabled = true
  1971. this.columnforfun('mblno').disabled = true
  1972. this.columnforfun('bookingNo').disabled = true
  1973. this.columnforfun('refno').disabled = true
  1974. this.generateBillsfalse = true
  1975. }
  1976. if (item.curCode == 'CNY') {
  1977. this.$set(item, 'rmbAmount', item.amount)
  1978. this.$set(item, 'usdAmount', '')
  1979. this.$set(item, 'rmbAmountNet', item.amountNet)
  1980. this.$set(item, 'usdAmountNet', '')
  1981. } else {
  1982. this.$set(item, 'usdAmount', item.amount)
  1983. this.$set(item, 'rmbAmount', '')
  1984. this.$set(item, 'usdAmountNet', item.amountNet)
  1985. this.$set(item, 'rmbAmountNet', '')
  1986. }
  1987. item.edit = false
  1988. }
  1989. // 应付
  1990. for (let item of this.form.feeCenterListC) {
  1991. // 判断是否生成了账单
  1992. if (item.accStatus == 1) {
  1993. this.generateBillsfalse = true
  1994. this.columnforfun('corpCnName').disabled = true
  1995. this.columnforfun('srcType').disabled = true
  1996. this.columnforfun('mblno').disabled = true
  1997. this.columnforfun('bookingNo').disabled = true
  1998. this.columnforfun('refno').disabled = true
  1999. }
  2000. if (item.curCode == 'CNY') {
  2001. this.$set(item, 'rmbAmount', item.amount)
  2002. this.$set(item, 'usdAmount', '')
  2003. this.$set(item, 'rmbAmountNet', item.amountNet)
  2004. this.$set(item, 'usdAmountNet', '')
  2005. } else {
  2006. this.$set(item, 'usdAmount', item.amount)
  2007. this.$set(item, 'rmbAmount', '')
  2008. this.$set(item, 'usdAmountNet', item.amountNet)
  2009. this.$set(item, 'rmbAmountNet', '')
  2010. }
  2011. item.edit = false
  2012. }
  2013. // 文件中心
  2014. for (let item of this.form.filesList) {
  2015. this.$set(item, 'edit', false)
  2016. }
  2017. }).finally(() => {
  2018. loading.close();
  2019. })
  2020. },
  2021. // 详情接口
  2022. async billsDetailfun(id, status) {
  2023. const res = await billsDetail(id)
  2024. // this.form = res.data.data;
  2025. this.$set(this, 'form', res.data.data)
  2026. this.inLock()
  2027. // console.log('form', this.form)
  2028. // console.log(this.$refs)
  2029. this.copyFormData = JSON.parse(JSON.stringify(res.data.data))
  2030. // 如果已经请核就禁用按钮
  2031. // if (this.form.status == 1 || this.form.status == 2 || this.form.status == 3) {
  2032. // this.detailData.seeDisabled = true
  2033. // }else {
  2034. // this.detailData.seeDisabled = false
  2035. // }
  2036. this.columnforfun('teamName').disabled = true
  2037. this.columnforfun('operatorName').disabled = true
  2038. this.columnforfun('accDeptName').disabled = true
  2039. if (this.form.status == 1 || this.form.status == 2 || this.form.status == 3) {
  2040. this.columnforfun('corpCnName').disabled = true
  2041. this.columnforfun('srcType').disabled = true
  2042. this.columnforfun('mblno').disabled = true
  2043. this.columnforfun('bookingNo').disabled = true
  2044. this.columnforfun('refno').disabled = true
  2045. // this.columnforfun('teamId').disabled = true
  2046. this.generateBillsfalse = true
  2047. this.pleasereviewType = true // 请核禁用
  2048. } else {
  2049. // 判断是否可以编辑
  2050. this.columnforfun('corpCnName').disabled = false
  2051. this.columnforfun('srcType').disabled = false
  2052. this.columnforfun('mblno').disabled = false
  2053. this.columnforfun('bookingNo').disabled = false
  2054. this.columnforfun('refno').disabled = false
  2055. // this.columnforfun('teamId').disabled = false
  2056. this.generateBillsfalse = false
  2057. this.pleasereviewType = false
  2058. }
  2059. this.pageLoading = false
  2060. // this.searchMontage() // 下拉 中文名称和编号拼接
  2061. // 配箱最上面可以编辑
  2062. for (let item of this.form.containersList) {
  2063. item.edit = false
  2064. }
  2065. // 配箱最下面的
  2066. for (let item of this.form.waitingBoxList) {
  2067. this.$set(item, 'editQuantity', item.quantity)
  2068. this.$set(item, 'editGrossWeight', item.grossWeight)
  2069. this.$set(item, 'editMeasurement', item.measurement)
  2070. this.$set(item, 'edit', false)
  2071. }
  2072. // 应收
  2073. for (let item of this.form.feeCenterListD) {
  2074. // 判断是否生成了账单
  2075. if (item.accStatus == 1) {
  2076. this.columnforfun('corpCnName').disabled = true
  2077. this.columnforfun('srcType').disabled = true
  2078. this.columnforfun('mblno').disabled = true
  2079. this.columnforfun('bookingNo').disabled = true
  2080. this.columnforfun('refno').disabled = true
  2081. this.columnforfun('teamName').disabled = true
  2082. this.generateBillsfalse = true
  2083. }
  2084. if (item.curCode == 'CNY') {
  2085. this.$set(item, 'rmbAmount', item.amount)
  2086. this.$set(item, 'usdAmount', '')
  2087. this.$set(item, 'rmbAmountNet', item.amountNet)
  2088. this.$set(item, 'usdAmountNet', '')
  2089. } else {
  2090. this.$set(item, 'usdAmount', item.amount)
  2091. this.$set(item, 'rmbAmount', '')
  2092. this.$set(item, 'usdAmountNet', item.amountNet)
  2093. this.$set(item, 'rmbAmountNet', '')
  2094. }
  2095. item.edit = false
  2096. }
  2097. // 应付
  2098. for (let item of this.form.feeCenterListC) {
  2099. // 判断是否生成了账单
  2100. if (item.accStatus == 1) {
  2101. this.generateBillsfalse = true
  2102. this.columnforfun('corpCnName').disabled = true
  2103. this.columnforfun('srcType').disabled = true
  2104. this.columnforfun('mblno').disabled = true
  2105. this.columnforfun('bookingNo').disabled = true
  2106. this.columnforfun('refno').disabled = true
  2107. this.columnforfun('teamName').disabled = true
  2108. }
  2109. if (item.curCode == 'CNY') {
  2110. this.$set(item, 'rmbAmount', item.amount)
  2111. this.$set(item, 'usdAmount', '')
  2112. this.$set(item, 'rmbAmountNet', item.amountNet)
  2113. this.$set(item, 'usdAmountNet', '')
  2114. } else {
  2115. this.$set(item, 'usdAmount', item.amount)
  2116. this.$set(item, 'rmbAmount', '')
  2117. this.$set(item, 'usdAmountNet', item.amountNet)
  2118. this.$set(item, 'rmbAmountNet', '')
  2119. }
  2120. item.edit = false
  2121. }
  2122. // 文件中心
  2123. this.$refs.filescenter.getData(res.data.data)
  2124. for (let item of this.form.filesList) {
  2125. this.$set(item, 'edit', false)
  2126. }
  2127. if (status == 'toAddEdit') {
  2128. this.$emit(status)
  2129. }
  2130. this.oldForm = this.deepClone(this.form);
  2131. },
  2132. // tbas切换
  2133. handleClick(tba, event) {
  2134. },
  2135. // 大tbas切换
  2136. bigHandleClick() {
  2137. if (this.bigtabs == 'fd') {
  2138. if (this.form.id) {
  2139. this.billsListAllfun(this.form.id)
  2140. }
  2141. }
  2142. if (this.bigtabs == 'dz') {
  2143. if (this.form.id) {
  2144. this.$refs.documentCenter.reportslogListfun({ currentPage: 1, pageSize: 10 })
  2145. }
  2146. }
  2147. },
  2148. // 获取不分页的分单列表
  2149. billsListAllfun(masterId) {
  2150. billsListAll({ masterId }).then(res => {
  2151. this.billsListAllData = res.data.data
  2152. })
  2153. }
  2154. },
  2155. }
  2156. </script>
  2157. <style scoped lang="scss">
  2158. ::v-deep .el-tabs--border-card>.el-tabs__content {
  2159. padding: 4px !important;
  2160. }
  2161. .scrollable-container {
  2162. height: 84vh;
  2163. /* 设置容器高度 */
  2164. overflow-y: auto;
  2165. /* 添加垂直滚动条 */
  2166. }
  2167. .borderless {
  2168. height: 100%;
  2169. box-sizing: border-box
  2170. }
  2171. .customer-main {
  2172. margin-bottom: 15px;
  2173. }
  2174. .demo-ruleForm {
  2175. font-size: 14px;
  2176. }
  2177. .margintop {
  2178. margin-top: 0px !important;
  2179. }
  2180. ::v-deep.el-form-item {
  2181. margin-bottom: 0;
  2182. }
  2183. ::v-deep .basic-container .el-card__body {
  2184. padding: 6px 20px;
  2185. }
  2186. ::v-deep .el-tabs__header {
  2187. margin: 0 05px;
  2188. }
  2189. .isShow {
  2190. display: none;
  2191. }
  2192. .dropdown-max {
  2193. top: 150px !important;
  2194. max-width: 600px;
  2195. display: flex;
  2196. flex-flow: row wrap;
  2197. li {
  2198. margin-right: 5px;
  2199. white-space: nowrap;
  2200. }
  2201. }
  2202. </style>