detailsPage.vue 89 KB

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