detailPage.vue 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866
  1. <template>
  2. <div>
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <el-button
  6. type="danger"
  7. style="border: none;background: none;color: red"
  8. icon="el-icon-arrow-left"
  9. @click="backToList"
  10. >返回列表
  11. </el-button>
  12. </div>
  13. </div>
  14. <containerTitle title="委托信息" style="margin-top: 50px"></containerTitle>
  15. <basic-container>
  16. <avue-form :option="goodsOptionForm" v-model="goodsForm">
  17. <template slot-scope="scope" slot="corpId">
  18. <crop-select
  19. v-model="goodsForm.corpId"
  20. disabled
  21. ></crop-select>
  22. </template>
  23. <template slot-scope="scope" slot="station">
  24. <port-info
  25. v-model="goodsForm.station"
  26. :disabled="goodsForm.status >= 1"
  27. />
  28. </template>
  29. <template slot-scope="scope" slot="agentId">
  30. <crop-select
  31. :disabled="goodsForm.status >= 1"
  32. v-model="goodsForm.agentId"
  33. ></crop-select>
  34. </template>
  35. <template slot-scope="scope" slot="polId">
  36. <port-info
  37. v-model="goodsForm.polId"
  38. :disabled="goodsForm.status >= 1"
  39. />
  40. </template>
  41. <template slot-scope="scope" slot="podId">
  42. <port-info
  43. v-model="goodsForm.podId"
  44. :disabled="goodsForm.status >= 1"
  45. />
  46. </template>
  47. </avue-form>
  48. </basic-container>
  49. <containerTitle title="其他信息"></containerTitle>
  50. <basic-container :showBtn="true" ref="other">
  51. <avue-form :option="goodsOptionFormTwo" v-model="goodsForm">
  52. <template slot-scope="scope" slot="corpId">
  53. <crop-select
  54. v-model="goodsForm.corpId"
  55. disabled
  56. ></crop-select>
  57. </template>
  58. <template slot-scope="scope" slot="station">
  59. <port-info
  60. v-model="goodsForm.station"
  61. :disabled="goodsForm.status >= 1"
  62. />
  63. </template>
  64. <template slot-scope="scope" slot="agentId">
  65. <crop-select
  66. :disabled="goodsForm.status >= 1"
  67. v-model="goodsForm.agentId"
  68. ></crop-select>
  69. </template>
  70. <template slot-scope="scope" slot="polId">
  71. <port-info
  72. v-model="goodsForm.polId"
  73. type="id"
  74. :disabled="goodsForm.status >= 1"
  75. />
  76. </template>
  77. <template slot-scope="scope" slot="podId">
  78. <port-info
  79. v-model="goodsForm.podId"
  80. type="id"
  81. :disabled="goodsForm.status >= 1"
  82. />
  83. </template>
  84. </avue-form>
  85. </basic-container>
  86. <containerTitle
  87. title="起止地信息"></containerTitle>
  88. <basic-container>
  89. <el-table
  90. ref="singleTable"
  91. :data="tableData"
  92. size="mini"
  93. :header-cell-style="{color:'#000',background:'#fafafa'}"
  94. style="width: 100%">
  95. <el-table-column
  96. property="date"
  97. align="center"
  98. width="40">
  99. <template slot-scope="scope">
  100. <span v-if="scope.$index == 0">
  101. <el-button type="primary" size="mini" circle>起</el-button>
  102. </span>
  103. <span v-else-if="scope.$index === tableData.length-1">
  104. <el-button type="success" size="mini" circle>止</el-button>
  105. </span>
  106. <span v-else>
  107. <el-button v-if="goodsForm.status === 2" type="warning" size="mini" circle>途</el-button>
  108. <el-tooltip v-else class="item" effect="dark" content="删除" placement="right">
  109. <el-button type="danger" icon="el-icon-delete" size="mini" circle
  110. @click="deleteAddress(scope)"></el-button>
  111. </el-tooltip>
  112. </span>
  113. </template>
  114. </el-table-column>
  115. <el-table-column
  116. type="index"
  117. label="序号"
  118. align="center"
  119. width="60">
  120. </el-table-column>
  121. <el-table-column
  122. property="corpName"
  123. label="货运地点"
  124. align="center"
  125. show-overflow-tooltip
  126. width="200">
  127. </el-table-column>
  128. <!-- <el-table-column-->
  129. <!-- property="province"-->
  130. <!-- label="省市区"-->
  131. <!-- align="center"-->
  132. <!-- width="280">-->
  133. <!-- <template slot-scope="scope">-->
  134. <!-- <el-cascader-->
  135. <!-- size="small"-->
  136. <!-- style="width: 100%;"-->
  137. <!-- v-model="scope.row.region"-->
  138. <!-- disabled-->
  139. <!-- :props="treeOption"></el-cascader>-->
  140. <!-- </template>-->
  141. <!-- </el-table-column>-->
  142. <el-table-column
  143. property="contacts"
  144. align="center"
  145. width="150"
  146. show-overflow-tooltip
  147. label="联系人">
  148. </el-table-column>
  149. <el-table-column
  150. property="tel"
  151. align="center"
  152. width="180"
  153. show-overflow-tooltip
  154. label="电话">
  155. </el-table-column>
  156. <el-table-column
  157. property="address"
  158. align="center"
  159. show-overflow-tooltip
  160. label="详细地址">
  161. </el-table-column>
  162. <el-table-column
  163. property="remarks"
  164. align="center"
  165. show-overflow-tooltip
  166. label="备注">
  167. </el-table-column>
  168. </el-table>
  169. </basic-container>
  170. <containerTitle title="车辆信息"></containerTitle>
  171. <basic-container>
  172. <avue-crud
  173. :data="entrustList"
  174. @selection-change="selectionChange"
  175. :option="entrustOptionTwoT"
  176. ref="crudBoxTwo"
  177. v-if="KeyBoxTwo>0"
  178. @resetColumn="resetColumnBoxTwo"
  179. @saveColumn="saveColumnBoxTwo"
  180. @row-save="(row,done,loading)=>{rowSaveT(row,0,done,loading)}"
  181. @row-update="rowSaveWell">
  182. <template slot="menuLeft" slot-scope="{size}">
  183. <el-button type="success" icon="el-icon-check" :size="size" @click="batchScheduling"
  184. :disabled="selectionList.length === 0">批量调度
  185. </el-button>
  186. </template>
  187. <template slot-scope="{row}" slot="fleetId">
  188. <crop-select
  189. v-if="row.$cellEdit"
  190. v-model="row.fleetId"
  191. @getCorpData="(data)=>{getfleetIdT(data,row)}"
  192. corpType="CD"
  193. ></crop-select>
  194. <span v-else>{{ row.fleetName }}</span>
  195. </template>
  196. <template slot-scope="{row,index}" slot="menu">
  197. <el-button
  198. type="text"
  199. size="small"
  200. v-if="row.status===0"
  201. @click="rowSaveT(row,index)"
  202. >{{ row.$cellEdit ? '保 存' : '修 改' }}
  203. </el-button>
  204. <el-button
  205. size="small"
  206. type="text"
  207. @click="designate(row, index)"
  208. v-if="row.status === 0"
  209. >调 度
  210. </el-button>
  211. <el-button
  212. size="small"
  213. type="text"
  214. @click="cancelDesignate(row, index)"
  215. v-if="row.status===1"
  216. >取消调度
  217. </el-button>
  218. <el-button
  219. size="small"
  220. type="text"
  221. @click="changeFleetT(row, index)"
  222. v-if="row.status===2||row.status===3"
  223. >变 更
  224. </el-button>
  225. <el-button
  226. size="small"
  227. type="text"
  228. @click="recordsOfChanges(row, index)"
  229. v-if="row.status > 1"
  230. >变更记录
  231. </el-button>
  232. </template>
  233. </avue-crud>
  234. </basic-container>
  235. <span>
  236. <!-- <containerTitle title="费用明细"></containerTitle>-->
  237. <!-- <basic-container>-->
  238. <!-- <el-tabs v-model="activeIndex" @tab-click="handleSelect">-->
  239. <!-- <el-tab-pane label="应收" name="1"></el-tab-pane>-->
  240. <!-- <el-tab-pane label="应付" name="2"></el-tab-pane>-->
  241. <!-- </el-tabs>-->
  242. <!-- <avue-crud-->
  243. <!-- v-if="activeIndex === '1'"-->
  244. <!-- :data="collectionList"-->
  245. <!-- :option="collectionOption"-->
  246. <!-- ref="collection"-->
  247. <!-- @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"-->
  248. <!-- @row-update="rowSave"-->
  249. <!-- @row-del="makeDel">-->
  250. <!-- <template slot-scope="{row}" slot="corpId">-->
  251. <!-- <crop-select-->
  252. <!-- v-if="row.$cellEdit"-->
  253. <!-- v-model="row.corpId"-->
  254. <!-- @getCorpData="(data)=>{getfleetId(data,row)}"-->
  255. <!-- ></crop-select>-->
  256. <!-- <span v-else>{{row.corpName}}</span>-->
  257. <!-- </template>-->
  258. <!-- <template slot-scope="{row}" slot="feeId">-->
  259. <!-- <breakdown-select-->
  260. <!-- v-if="row.$cellEdit"-->
  261. <!-- v-model="row.feeId"-->
  262. <!-- @selectValue="(value) => selectValue(value,row)"-->
  263. <!-- :configuration="breakConfiguration"-->
  264. <!-- >-->
  265. <!-- </breakdown-select>-->
  266. <!-- <span v-else>{{ row.feeName }}</span>-->
  267. <!-- </template>-->
  268. <!-- <template slot-scope="{row,index}" slot="menu">-->
  269. <!-- <el-button-->
  270. <!-- type="text"-->
  271. <!-- size="small"-->
  272. <!-- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
  273. <!-- @click="rowCell(row,index)"-->
  274. <!-- >{{row.$cellEdit?'保存':'编辑'}}</el-button>-->
  275. <!-- <el-button type="text"-->
  276. <!-- icon="el-icon-delete"-->
  277. <!-- size="small"-->
  278. <!-- @click="$refs.collection.rowDel(row,index)"-->
  279. <!-- >删除</el-button>-->
  280. <!-- </template>-->
  281. <!-- <template slot="menuLeft">-->
  282. <!-- <el-button type="primary" icon="el-icon-plus" @click="addRowCollection" size="small">录入明细</el-button>-->
  283. <!-- </template>-->
  284. <!-- </avue-crud>-->
  285. <!-- <avue-crud-->
  286. <!-- v-if="activeIndex === '2'"-->
  287. <!-- :data="paymentList"-->
  288. <!-- :option="paymentOption"-->
  289. <!-- ref="payment"-->
  290. <!-- @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"-->
  291. <!-- @row-update="rowSave"-->
  292. <!-- @row-del="feeDel"-->
  293. <!-- >-->
  294. <!-- <template slot-scope="{row}" slot="corpId">-->
  295. <!-- <crop-select-->
  296. <!-- v-if="row.$cellEdit"-->
  297. <!-- v-model="row.corpId"-->
  298. <!-- @getCorpData="(data)=>{getfleetId(data,row)}"-->
  299. <!-- ></crop-select>-->
  300. <!-- <span v-else>{{row.corpName}}</span>-->
  301. <!-- </template>-->
  302. <!-- <template slot-scope="{row}" slot="feeId">-->
  303. <!-- <breakdown-select-->
  304. <!-- v-if="row.$cellEdit"-->
  305. <!-- v-model="row.feeId"-->
  306. <!-- @selectValue="(value) => selectValue(value,row)"-->
  307. <!-- :configuration="breakConfiguration"-->
  308. <!-- >-->
  309. <!-- </breakdown-select>-->
  310. <!-- <span v-else>{{ row.feeName }}</span>-->
  311. <!-- </template>-->
  312. <!-- <template slot-scope="{row,index}" slot="menu">-->
  313. <!-- <el-button-->
  314. <!-- type="text"-->
  315. <!-- size="small"-->
  316. <!-- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
  317. <!-- @click="paymentRowCell(row,index)"-->
  318. <!-- >{{row.$cellEdit?'保存':'编辑'}}</el-button>-->
  319. <!-- <el-button type="text"-->
  320. <!-- icon="el-icon-delete"-->
  321. <!-- size="small"-->
  322. <!-- @click="$refs.payment.rowDel(row,index)"-->
  323. <!-- >删除</el-button>-->
  324. <!-- </template>-->
  325. <!-- <template slot="menuLeft">-->
  326. <!-- <el-button type="primary" icon="el-icon-plus" @click="addRowPayment" size="small">录入明细</el-button>-->
  327. <!-- </template>-->
  328. <!-- </avue-crud>-->
  329. <!-- </basic-container>-->
  330. </span>
  331. <containerTitle title="杂费明细"></containerTitle>
  332. <basic-container>
  333. <el-tabs v-model="activeIndex" @tab-click="handleSelect">
  334. <el-tab-pane label="应收" name="1"></el-tab-pane>
  335. <el-tab-pane label="应付" name="2"></el-tab-pane>
  336. </el-tabs>
  337. <avue-crud
  338. v-if="activeIndex === '1'"
  339. :data="collectionList"
  340. :key="key"
  341. :option="collectionOption"
  342. ref="collection"
  343. @resetColumn="resetColumnCollection"
  344. @saveColumn="saveColumnCollection"
  345. @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"
  346. @row-update="rowSave"
  347. @row-del="makeDel">
  348. <template slot-scope="{row}" slot="corpId">
  349. <crop-select
  350. v-if="row.$cellEdit"
  351. v-model="row.corpId"
  352. @getCorpData="(data)=>{getfleetId(data,row)}"
  353. ></crop-select>
  354. <span v-else>{{ row.corpName }}</span>
  355. </template>
  356. <template slot="plateNoHeader" slot-scope="{column}">
  357. {{ column.label }}<span style="color:#F56C6C">*</span>
  358. </template>
  359. <template slot-scope="{row}" slot="feeId">
  360. <breakdown-select
  361. v-if="row.$cellEdit"
  362. v-model="row.feeId"
  363. @selectValue="(value) => selectValue(value,row)"
  364. :configuration="breakConfiguration"
  365. >
  366. </breakdown-select>
  367. <span v-else>{{ row.feeName }}</span>
  368. </template>
  369. <template slot-scope="{row,index}" slot="menu">
  370. <el-button
  371. type="text"
  372. size="small"
  373. :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"
  374. @click="rowCell(row,index)"
  375. >{{ row.$cellEdit ? '保存' : '编辑' }}
  376. </el-button>
  377. <el-button type="text"
  378. icon="el-icon-delete"
  379. size="small"
  380. @click="$refs.collection.rowDel(row,index)"
  381. >删除
  382. </el-button>
  383. <el-button
  384. size="small"
  385. type="text"
  386. icon="el-icon-s-order"
  387. @click="annexOpen(row, index)"
  388. >附 件
  389. </el-button>
  390. </template>
  391. <template slot="menuLeft">
  392. <el-button type="primary" icon="el-icon-plus" @click="addRowCollection"
  393. size="small">录入明细
  394. </el-button>
  395. </template>
  396. </avue-crud>
  397. <avue-crud
  398. v-if="activeIndex === '2'"
  399. :data="paymentList"
  400. :option="paymentOption"
  401. ref="payment"
  402. @resetColumn="resetColumnPayment"
  403. @saveColumn="saveColumnPayment"
  404. @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"
  405. @row-update="rowSave"
  406. @row-del="feeDel"
  407. >
  408. <template slot-scope="{row}" slot="corpId">
  409. <crop-select
  410. v-if="row.$cellEdit"
  411. v-model="row.corpId"
  412. @getCorpData="(data)=>{getfleetId(data,row)}"
  413. ></crop-select>
  414. <span v-else>{{ row.corpName }}</span>
  415. </template>
  416. <template slot-scope="{row}" slot="feeId">
  417. <breakdown-select
  418. v-if="row.$cellEdit"
  419. v-model="row.feeId"
  420. @selectValue="(value) => selectValue(value,row)"
  421. :configuration="breakConfiguration"
  422. >
  423. </breakdown-select>
  424. <span v-else>{{ row.feeName }}</span>
  425. </template>
  426. <template slot-scope="{row,index}" slot="menu">
  427. <el-button
  428. type="text"
  429. size="small"
  430. :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"
  431. @click="paymentRowCell(row,index)"
  432. >{{ row.$cellEdit ? '保存' : '编辑' }}
  433. </el-button>
  434. <el-button type="text"
  435. icon="el-icon-delete"
  436. size="small"
  437. :disabled="goodsForm.status === 1"
  438. @click="$refs.payment.rowDel(row,index)"
  439. >删除
  440. </el-button>
  441. <el-button
  442. size="small"
  443. type="text"
  444. icon="el-icon-s-order"
  445. @click="annexOpen(row, index)"
  446. >附 件
  447. </el-button>
  448. </template>
  449. <template slot="menuLeft">
  450. <el-button type="primary" icon="el-icon-plus" @click="addRowPayment"
  451. size="small">录入明细
  452. </el-button>
  453. </template>
  454. </avue-crud>
  455. </basic-container>
  456. <containerTitle title="上传附件"></containerTitle>
  457. <c-upload
  458. typeUpload="CD"
  459. :data="orderFilesList"
  460. disabled
  461. :display="false"
  462. deleteUrl="/api/blade-client/common-file/remove"
  463. :enumerationValue="86.2"
  464. ></c-upload>
  465. <el-dialog
  466. title="批量调度"
  467. :visible.sync="dialogVisible"
  468. append-to-body
  469. width="70%">
  470. <avue-form :option="option" v-model="form" ref="form">
  471. <template slot="fleetId">
  472. <crop-select
  473. v-model="form.fleetId"
  474. corpType="CD"
  475. ></crop-select>
  476. </template>
  477. </avue-form>
  478. <span slot="footer" class="dialog-footer">
  479. <el-button @click="dialogVisible = false" size="small">取 消</el-button>
  480. <el-button type="primary" @click="saveScheduling" size="small">调 度</el-button>
  481. </span>
  482. </el-dialog>
  483. <el-dialog
  484. title="变更"
  485. :visible.sync="dialogChange"
  486. append-to-body
  487. width="70%">
  488. <avue-form :option="optionData" v-model="formData" ref="saveForm">
  489. <template slot="fleetId">
  490. <crop-select
  491. v-model="formData.fleetId"
  492. corpType="CD"
  493. @getCorpData="getCorpData"
  494. ></crop-select>
  495. </template>
  496. </avue-form>
  497. <span slot="footer" class="dialog-footer">
  498. <el-button @click="dialogChange = false" size="small">关 闭</el-button>
  499. <el-button type="primary" @click="confirmChange" size="small">确 定</el-button>
  500. </span>
  501. </el-dialog>
  502. <el-dialog
  503. title="变更记录"
  504. :visible.sync="dialogRecord"
  505. append-to-body
  506. width="70%">
  507. <avue-crud :data="dataRecord" :option="optionRecord" style="margin-top: -43px"></avue-crud>
  508. <span slot="footer" class="dialog-footer">
  509. <el-button @click="dialogRecord = false" size="small">关 闭</el-button>
  510. </span>
  511. </el-dialog>
  512. <el-dialog
  513. title="附件"
  514. :visible.sync="enclosure"
  515. append-to-body
  516. width="70%">
  517. <c-upload
  518. typeUpload="GZ"
  519. :basic="true"
  520. deleteUrl="/api/blade-client/common-file/remove"
  521. :data="orderList"
  522. :enumerationValue="76"
  523. ></c-upload>
  524. <span slot="footer" class="dialog-footer">
  525. <el-button @click="enclosure = false" size="small">取 消</el-button>
  526. <el-button type="primary" @click="saveAnnex" size="small">保 存</el-button>
  527. </span>
  528. </el-dialog>
  529. </div>
  530. </template>
  531. <script>
  532. import {getLazyTree} from "@/api/base/region";
  533. import {
  534. saveDelegationList,
  535. detailDelegationList,
  536. removeCollection,
  537. dispatchCollection,
  538. queryVehicle,
  539. cancelDispatchCollection,
  540. dispatchBatch,
  541. fleetDriverSave,
  542. recordingDetails,
  543. changeFleet,
  544. incidentalSubmit, saveFile, getFee
  545. } from "@/api/landTransportation";
  546. import website from "@/config/website";
  547. import {getDeptTree} from "@/api/system/dept";
  548. export default {
  549. props: {
  550. id: {
  551. type: String
  552. }
  553. },
  554. data() {
  555. return {
  556. formData: {},
  557. enclosure:false,
  558. formAnnex: {},
  559. key:0,
  560. formDataList: {},
  561. orderList:[],
  562. dialogChange: false,
  563. optionData: {
  564. span: 12,
  565. menuBtn: false,
  566. column: [{
  567. label: "车队",
  568. prop: "fleetId",
  569. }, {
  570. label: "应付陆运费",
  571. prop: "landAmountC",
  572. precision: 2,
  573. controls: false,
  574. type: 'number',
  575. }, {
  576. label: '应收场站费',
  577. width: 100,
  578. precision: 2,
  579. controls: false,
  580. type: 'number',
  581. prop: 'oneFeeD'
  582. }, {
  583. label: '应收港杂费',
  584. width: 100,
  585. precision: 2,
  586. controls: false,
  587. type: 'number',
  588. prop: 'twoFeeD'
  589. }, {
  590. label: '应收扣款',
  591. width: 100,
  592. precision: 2,
  593. controls: false,
  594. type: 'number',
  595. prop: 'threeFeeD'
  596. }, {
  597. label: '应收待时费',
  598. width: 100,
  599. precision: 2,
  600. controls: false,
  601. type: 'number',
  602. prop: 'fourFeeD'
  603. }, {
  604. label: '应收其他',
  605. width: 100,
  606. precision: 2,
  607. type: 'number',
  608. controls: false,
  609. prop: 'fiveFeeD'
  610. }, {
  611. label: '应收费用备注',
  612. width: 245,
  613. prop: 'feeRemarksD'
  614. }]
  615. },
  616. form: {},
  617. dataRecord: [],
  618. dialogRecord: false,
  619. optionRecord: {
  620. stripe: true,
  621. refreshBtn: false,
  622. columnBtn: false,
  623. menu: false,
  624. addBtn: false,
  625. align: 'center',
  626. column: [
  627. {
  628. label: '变更内容',
  629. prop: 'content'
  630. }, {
  631. label: '变更人',
  632. prop: 'changeUserName'
  633. }, {
  634. label: '变更时间',
  635. prop: 'changeTime'
  636. }
  637. ]
  638. },
  639. option: {
  640. span: 12,
  641. menuBtn: false,
  642. column: [{
  643. label: "车队",
  644. prop: "fleetId",
  645. rules: [{
  646. required: true,
  647. message: " ",
  648. trigger: "blur"
  649. }]
  650. }, {
  651. label: "应付陆运费",
  652. prop: "landAmountC",
  653. precision: 2,
  654. controls: false,
  655. type: 'number',
  656. }]
  657. },
  658. activeIndex: '1',
  659. dialogVisible: false,
  660. goodsForm: {},
  661. orderFilesList: [],
  662. selectionList: [],
  663. roleName: localStorage.getItem("roleName").split(',')[0],
  664. breakConfiguration: {
  665. multipleChoices: false,
  666. multiple: false,
  667. disabled: false,
  668. searchShow: true,
  669. collapseTags: false,
  670. clearable: true,
  671. placeholder: '请点击右边按钮选择',
  672. dicData: []
  673. },
  674. advantageProjectData: [],
  675. treeOption: {
  676. label: 'title',
  677. value: 'id',
  678. lazy: true,
  679. lazyLoad(node, resolve) {
  680. const parentId = node.level === 0 ? '00' : node.data.id;
  681. getLazyTree(parentId).then(res => {
  682. resolve(
  683. res.data.data.map(item => {
  684. return {
  685. ...item,
  686. leaf: !item.hasChildren
  687. };
  688. })
  689. );
  690. });
  691. }
  692. },
  693. tableData: [],
  694. entrustListT: [],
  695. KeyBoxTwo: 0,
  696. entrustOptionTwoTBackup: {
  697. selectable: (row, index) => {
  698. return row.status === 0
  699. },
  700. align: 'center',
  701. menuAlign: 'center',
  702. index: true,
  703. cellBtn: false,
  704. refreshBtn: false,
  705. selection: true,
  706. selectionWidth: 55,
  707. tip: false,
  708. addBtn: false,
  709. cancelBtn: false,
  710. editBtn: false,
  711. addRowBtn: false,
  712. delBtn: false,
  713. showSummary: true,
  714. // editBtn:false,
  715. summaryText: "合计",
  716. sumColumnList: [
  717. {
  718. name: 'landWeight',
  719. type: 'sum',
  720. decimals: 2
  721. }, {
  722. name: 'landAmountC',
  723. type: 'sum',
  724. decimals: 2
  725. }, {
  726. name: 'landAmountD',
  727. type: 'sum',
  728. decimals: 2
  729. }, {
  730. name: 'oneFeeD',
  731. type: 'sum',
  732. decimals: 2
  733. }, {
  734. name: 'twoFeeD',
  735. type: 'sum',
  736. decimals: 2
  737. }, {
  738. name: 'threeFeeD',
  739. type: 'sum',
  740. decimals: 2
  741. }, {
  742. name: 'fourFeeD',
  743. type: 'sum',
  744. decimals: 2
  745. }, {
  746. name: 'fiveFeeD',
  747. type: 'sum',
  748. decimals: 2
  749. }, {
  750. name: 'oneFeeC',
  751. type: 'sum',
  752. decimals: 2
  753. }, {
  754. name: 'twoFeeC',
  755. type: 'sum',
  756. decimals: 2
  757. }, {
  758. name: 'threeFeeC',
  759. type: 'sum',
  760. decimals: 2
  761. }, {
  762. name: 'fourFeeC',
  763. type: 'sum',
  764. decimals: 2
  765. }, {
  766. name: 'fiveFeeC',
  767. type: 'sum',
  768. decimals: 2
  769. }, {
  770. name: 'landAmountD',
  771. type: 'sum',
  772. decimals: 2
  773. }, {
  774. name: 'ctnQuantity',
  775. type: 'sum',
  776. decimals: 0
  777. }],
  778. column: [{
  779. label: '货运日期',
  780. type: "datetime",
  781. cell: true,
  782. format: 'yyyy-MM-dd HH:mm:ss',
  783. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  784. width: 200,
  785. index: 1,
  786. prop: 'arrivalTime'
  787. }, {
  788. label: '实际到厂时间',
  789. prop: 'realArrivalTime',
  790. overHidden: true,
  791. type: "date",
  792. searchRange: true,
  793. defaultTime: ['00:00:00', '23:59:59'],
  794. format: "yyyy-MM-dd HH:mm:ss",
  795. valueFormat: "yyyy-MM-dd HH:mm:ss",
  796. index: 2,
  797. width: 140,
  798. }, {
  799. label: '尺寸箱型',
  800. width: 100,
  801. slot: true,
  802. index: 3,
  803. prop: 'ctnType'
  804. }, {
  805. label: '箱量',
  806. width: 50,
  807. index: 4,
  808. prop: 'ctnQuantity'
  809. }, {
  810. label: '车队',
  811. width: 200,
  812. index: 5,
  813. prop: 'fleetId'
  814. }, {
  815. label: '车号',
  816. width: 150,
  817. index: 6,
  818. prop: 'plateNo'
  819. }, {
  820. label: '司机',
  821. width: 115,
  822. index: 7,
  823. prop: 'driverName'
  824. }, {
  825. label: '电话',
  826. width: 160,
  827. index: 8,
  828. prop: 'tel'
  829. }, {
  830. label: '完工日期',
  831. prop: 'finishedTime',
  832. overHidden: true,
  833. type: "date",
  834. searchRange: true,
  835. defaultTime: ['00:00:00', '23:59:59'],
  836. format: "yyyy-MM-dd HH:mm:ss",
  837. valueFormat: "yyyy-MM-dd HH:mm:ss",
  838. index: 9,
  839. width: 140,
  840. }, {
  841. label: '货物名称',
  842. overHidden: true,
  843. width: 160,
  844. index: 10,
  845. prop: 'goods'
  846. }, {
  847. label: '件数',
  848. width: 100,
  849. overHidden: true,
  850. controls: false,
  851. cell: true,
  852. index: 11,
  853. prop: 'quantity',
  854. type: 'number',
  855. precision: 0
  856. }
  857. // , {
  858. // label: '包装',
  859. // width: 100,
  860. // overHidden: true,
  861. // cell: true,
  862. // prop: 'packing',
  863. // type: 'select',
  864. // dicUrl: "/api/blade-system/dict-biz/dictionary?code=packaging",
  865. // props: {
  866. // label: "dictValue",
  867. // value: "dictValue"
  868. // },
  869. // }
  870. , {
  871. label: '重量',
  872. width: 160,
  873. prop: 'landWeight',
  874. controls: false,
  875. precision: 2,
  876. index: 12,
  877. type: 'number'
  878. }, {
  879. label: '尺码',
  880. width: 100,
  881. overHidden: true,
  882. cell: true,
  883. index: 13,
  884. prop: 'size',
  885. }, {
  886. label: '单柜运费',
  887. index: 14,
  888. prop: 'landAmountD'
  889. },
  890. {
  891. label: '状态',
  892. width: 100,
  893. index: 15,
  894. type: 'select',
  895. dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
  896. props: {
  897. label: "dictValue",
  898. value: "dictKey"
  899. },
  900. dataType: "string",
  901. prop: 'status'
  902. }, {
  903. label: '应付陆运费',
  904. cell: true,
  905. index: 16,
  906. prop: 'landAmountC'
  907. }, {
  908. label: '委托备注',
  909. width: 245,
  910. index: 17,
  911. prop: 'remarks'
  912. }, {
  913. label: '车队备注',
  914. width: 245,
  915. index: 18,
  916. prop: 'fleetRemarks'
  917. }, {
  918. label: '司机备注',
  919. width: 245,
  920. index: 19,
  921. prop: 'driverRemarks'
  922. }, {
  923. label: '应收场站费',
  924. width: 100,
  925. precision: 2,
  926. index: 20,
  927. controls: false,
  928. cell: true,
  929. type: 'number',
  930. prop: 'oneFeeD'
  931. }, {
  932. label: '应收港杂费',
  933. width: 100,
  934. precision: 2,
  935. cell: true,
  936. index: 21,
  937. controls: false,
  938. type: 'number',
  939. prop: 'twoFeeD'
  940. }, {
  941. label: '应收扣款',
  942. width: 100,
  943. index: 22,
  944. precision: 2,
  945. cell: true,
  946. controls: false,
  947. type: 'number',
  948. prop: 'threeFeeD'
  949. }, {
  950. label: '应收待时费',
  951. width: 100,
  952. precision: 2,
  953. index: 23,
  954. cell: true,
  955. controls: false,
  956. type: 'number',
  957. prop: 'fourFeeD'
  958. }, {
  959. label: '应收其他',
  960. width: 100,
  961. index: 24,
  962. precision: 2,
  963. cell: true,
  964. type: 'number',
  965. controls: false,
  966. prop: 'fiveFeeD'
  967. }, {
  968. label: '应收费用备注',
  969. width: 245,
  970. index: 25,
  971. cell: true,
  972. prop: 'feeRemarksD'
  973. }, {
  974. label: '应付场站费',
  975. width: 100,
  976. index: 26,
  977. precision: 2,
  978. cell: true,
  979. controls: false,
  980. type: 'number',
  981. prop: 'oneFeeC'
  982. }, {
  983. label: '应付港杂费',
  984. width: 100,
  985. precision: 2,
  986. index: 27,
  987. cell: true,
  988. controls: false,
  989. type: 'number',
  990. prop: 'twoFeeC'
  991. }, {
  992. label: '应付扣款',
  993. width: 100,
  994. index: 28,
  995. precision: 2,
  996. controls: false,
  997. type: 'number',
  998. cell: true,
  999. prop: 'threeFeeC'
  1000. }, {
  1001. label: '应付待时费',
  1002. width: 100,
  1003. precision: 2,
  1004. index: 29,
  1005. controls: false,
  1006. cell: true,
  1007. type: 'number',
  1008. prop: 'fourFeeC'
  1009. }, {
  1010. label: '应付其他',
  1011. width: 100,
  1012. precision: 2,
  1013. index: 30,
  1014. type: 'number',
  1015. cell: true,
  1016. controls: false,
  1017. prop: 'fiveFeeC'
  1018. }, {
  1019. label: '应付费用备注',
  1020. width: 245,
  1021. index: 31,
  1022. cell: true,
  1023. prop: 'feeRemarksC'
  1024. }
  1025. ]
  1026. },
  1027. entrustOptionTwoT: {},
  1028. entrustList: [],
  1029. goodsOptionForm: {
  1030. menuBtn: false,
  1031. disabled: true,
  1032. span: 8,
  1033. column: [{
  1034. label: '公司名称',
  1035. formslot: true,
  1036. prop: 'corpId',
  1037. rules: [{
  1038. required: true,
  1039. message: " ",
  1040. trigger: "change"
  1041. }],
  1042. }, {
  1043. label: '所属部门',
  1044. prop: 'salesmanDept',
  1045. type: "tree",
  1046. filter: false,
  1047. dicData: [],
  1048. props: {
  1049. label: "title"
  1050. }
  1051. }, {
  1052. label: '业务员',
  1053. prop: 'salesman',
  1054. type: "select",
  1055. dicUrl: "/api/blade-user/userList",
  1056. props: {
  1057. label: "realName",
  1058. value: "id"
  1059. },
  1060. rules: [{
  1061. required: true,
  1062. message: " ",
  1063. trigger: "blur"
  1064. }]
  1065. }, {
  1066. label: '委托日期',
  1067. prop: 'bsDate',
  1068. type: "datetime",
  1069. format: 'yyyy-MM-dd HH:mm:ss',
  1070. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  1071. }, {
  1072. label: '票据号',
  1073. prop: 'receiptNo'
  1074. }, {
  1075. label: '联系电话',
  1076. prop: 'tel'
  1077. }, {
  1078. label: '提单号',
  1079. prop: 'billNo',
  1080. rules: [{
  1081. required: true,
  1082. message: " ",
  1083. trigger: "blur"
  1084. }],
  1085. }, {
  1086. label: '场站',
  1087. prop: 'station',
  1088. rules: [{
  1089. required: true,
  1090. message: " ",
  1091. trigger: "blur"
  1092. }],
  1093. },
  1094. // {
  1095. // label: '货运日期',
  1096. // type: "datetime",
  1097. // format: 'yyyy-MM-dd HH:mm:ss',
  1098. // valueFormat: 'yyyy-MM-dd HH:mm:ss',
  1099. // prop: 'arrivalTime',
  1100. // rules: [{
  1101. // required: true,
  1102. // message: " ",
  1103. // trigger: "blur"
  1104. // }],
  1105. // },
  1106. {
  1107. label: '备注',
  1108. span: 24,
  1109. minRows: 2,
  1110. prop: 'remarks',
  1111. type: 'textarea'
  1112. }]
  1113. },
  1114. goodsOptionFormTwo: {
  1115. menuBtn: false,
  1116. disabled: true,
  1117. span: 8,
  1118. column: [
  1119. // {
  1120. // label: '所属公司',
  1121. // formslot: true,
  1122. // prop: 'belongCompany',
  1123. // rules: [{
  1124. // required: false,
  1125. // message: " ",
  1126. // trigger: "blur"
  1127. // }],
  1128. // },
  1129. {
  1130. label: '船名航次',
  1131. prop: 'factory',
  1132. rules: [{
  1133. required: false,
  1134. message: " ",
  1135. trigger: "blur"
  1136. }],
  1137. }
  1138. // , {
  1139. // label: '货物名称',
  1140. // prop: 'goods',
  1141. // rules: [{
  1142. // required: false,
  1143. // message: " ",
  1144. // trigger: "blur"
  1145. // }],
  1146. // }
  1147. , {
  1148. label: '开船日期',
  1149. prop: 'etd',
  1150. type: 'date'
  1151. }, {
  1152. label: '预配箱量',
  1153. prop: 'expectCtnQty',
  1154. }, {
  1155. label: '起运港',
  1156. prop: 'polId'
  1157. }, {
  1158. label: '目的港',
  1159. prop: 'podId'
  1160. }, {
  1161. label: '截港日期',
  1162. prop: 'etc',
  1163. type: 'date'
  1164. }, {
  1165. label: '截单日期',
  1166. prop: 'siCutoffDate',
  1167. type: 'date'
  1168. }, {
  1169. label: '订舱代理',
  1170. prop: 'agentId'
  1171. }]
  1172. },
  1173. entrustOptionTwo: {
  1174. align: 'center',
  1175. menuAlign: 'center',
  1176. addBtnText: '录入箱信息',
  1177. index: true,
  1178. cellBtn: true,
  1179. addBtn: false,
  1180. addRowBtn: true,
  1181. showSummary: true,
  1182. summaryText: "合计",
  1183. sumColumnList: [
  1184. {
  1185. name: 'landWeight',
  1186. type: 'sum',
  1187. decimals: 2
  1188. }, {
  1189. name: 'landAmountD',
  1190. type: 'sum',
  1191. decimals: 2
  1192. }, {
  1193. name: 'ctnQuantity',
  1194. type: 'sum',
  1195. decimals: 7
  1196. }],
  1197. column: [{
  1198. label: '尺寸箱型',
  1199. cell: true,
  1200. prop: 'ctnType',
  1201. type: 'select',
  1202. width: 100,
  1203. dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
  1204. props: {
  1205. label: "dictValue",
  1206. value: "dictKey"
  1207. }
  1208. }, {
  1209. label: '箱量',
  1210. cell: true,
  1211. prop: 'ctnQuantity',
  1212. controls: false,
  1213. precision: 0,
  1214. width: 100,
  1215. type: 'number'
  1216. }, {
  1217. label: '总重量(吨)',
  1218. cell: true,
  1219. prop: 'landWeight',
  1220. controls: false,
  1221. width: 200,
  1222. precision: 2,
  1223. type: 'number'
  1224. }, {
  1225. label: '单柜运费',
  1226. cell: true,
  1227. prop: 'landAmountD',
  1228. controls: false,
  1229. width: 200,
  1230. precision: 2,
  1231. type: 'number'
  1232. }, {
  1233. label: '备注',
  1234. cell: true,
  1235. width: 200,
  1236. prop: 'remarks'
  1237. }
  1238. ]
  1239. },
  1240. collectionList: [],
  1241. collectionOption:{},
  1242. collectionOptionBackup: {
  1243. align: 'center',
  1244. menuAlign: 'center',
  1245. index: true,
  1246. cancelBtn: false,
  1247. editBtn: false,
  1248. delBtn: false,
  1249. cellBtn: false,
  1250. addBtn: false,
  1251. addRowBtn: false,
  1252. showSummary: true,
  1253. addBtnText: '录入明细',
  1254. summaryText: "合计",
  1255. sumColumnList: [{
  1256. name: 'price',
  1257. type: 'sum',
  1258. decimals: 2
  1259. }, {
  1260. name: 'amount',
  1261. type: 'sum',
  1262. decimals: 2
  1263. }, {
  1264. name: 'quantity',
  1265. type: 'sum',
  1266. decimals: 1
  1267. }],
  1268. column: [{
  1269. label: '客户名称',
  1270. slot: true,
  1271. prop: 'corpId'
  1272. }, {
  1273. label: '费用名称',
  1274. slot: true,
  1275. prop: 'feeId'
  1276. }, {
  1277. label: '计价单位',
  1278. cell: true,
  1279. prop: 'unit',
  1280. type: "select",
  1281. dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
  1282. props: {
  1283. label: "dictValue",
  1284. value: "dictKey"
  1285. }
  1286. }, {
  1287. label: '数量',
  1288. cell: true,
  1289. prop: 'quantity'
  1290. }, {
  1291. label: '单价',
  1292. cell: true,
  1293. prop: 'price'
  1294. }, {
  1295. label: '金额',
  1296. cell: true,
  1297. prop: 'amount'
  1298. }, {
  1299. label: '税率',
  1300. cell: true,
  1301. prop: 'taxRate'
  1302. }, {
  1303. label: '币别',
  1304. cell: true,
  1305. prop: 'currency',
  1306. type: "select",
  1307. dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
  1308. props: {
  1309. label: "dictValue",
  1310. value: "dictKey"
  1311. },
  1312. }, {
  1313. label: '车号',
  1314. cell: true,
  1315. prop: 'plateNo',
  1316. type: "select",
  1317. props: {
  1318. label: "label",
  1319. value: "label"
  1320. },
  1321. }
  1322. ]
  1323. },
  1324. paymentList: [],
  1325. paymentOption:{},
  1326. paymentOptionBackup:{
  1327. align: 'center',
  1328. menuAlign: 'center',
  1329. index: true,
  1330. cancelBtn: false,
  1331. editBtn: false,
  1332. delBtn: false,
  1333. cellBtn: false,
  1334. addBtn: false,
  1335. addRowBtn: false,
  1336. showSummary: true,
  1337. addBtnText: '录入明细',
  1338. summaryText: "合计",
  1339. sumColumnList: [{
  1340. name: 'price',
  1341. type: 'sum',
  1342. decimals: 2
  1343. }, {
  1344. name: 'amount',
  1345. type: 'sum',
  1346. decimals: 2
  1347. }, {
  1348. name: 'quantity',
  1349. type: 'sum',
  1350. decimals: 1
  1351. }],
  1352. column: [{
  1353. label: '客户名称',
  1354. slot: true,
  1355. prop: 'corpId'
  1356. }, {
  1357. label: '费用名称',
  1358. slot: true,
  1359. prop: 'feeId'
  1360. }, {
  1361. label: '计价单位',
  1362. cell: true,
  1363. prop: 'unit',
  1364. type: "select",
  1365. dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
  1366. props: {
  1367. label: "dictValue",
  1368. value: "dictKey"
  1369. }
  1370. }, {
  1371. label: '数量',
  1372. cell: true,
  1373. prop: 'quantity'
  1374. }, {
  1375. label: '单价',
  1376. cell: true,
  1377. prop: 'price'
  1378. }, {
  1379. label: '金额',
  1380. cell: true,
  1381. prop: 'amount'
  1382. }, {
  1383. label: '税率(默认6)',
  1384. cell: true,
  1385. prop: 'taxRate'
  1386. }, {
  1387. label: '币别(默认RMB)',
  1388. cell: true,
  1389. prop: 'currency',
  1390. type: "select",
  1391. dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
  1392. props: {
  1393. label: "dictValue",
  1394. value: "dictKey"
  1395. },
  1396. }, {
  1397. label: '车号',
  1398. cell: true,
  1399. prop: 'plateNo',
  1400. type: "select",
  1401. props: {
  1402. label: "label",
  1403. value: "label"
  1404. },
  1405. }
  1406. ]
  1407. }
  1408. };
  1409. },
  1410. async created() {
  1411. this.entrustOptionTwoT = await this.getColumnData(this.getColumnName(86.1), this.entrustOptionTwoTBackup);
  1412. this.collectionOption = await this.getColumnData(this.getColumnName(86.4), this.collectionOptionBackup);
  1413. this.paymentOption = await this.getColumnData(this.getColumnName(86.5), this.paymentOptionBackup);
  1414. this.KeyBoxTwo++
  1415. if (this.id) {
  1416. detailDelegationList({id: this.id, kind: '2'}).then(res => {
  1417. this.goodsForm = res.data.data
  1418. this.tableData = res.data.data.orderAddressList
  1419. this.entrustList = res.data.data.orderItemList
  1420. this.goodsList = res.data.data.orderItemList
  1421. this.orderFilesList = res.data.data.fileList
  1422. if (res.data.data.orderFeeList.length > 0) {
  1423. res.data.data.orderFeeList.forEach(item => {
  1424. if (item.type == 1) {
  1425. this.collectionList.push(item)
  1426. } else {
  1427. this.paymentList.push(item)
  1428. }
  1429. })
  1430. }
  1431. delete this.goodsForm.orderAddressList
  1432. delete this.goodsForm.orderItemList
  1433. delete this.goodsForm.orderFeeList
  1434. // this.tableData.forEach(item => {
  1435. // if (item.region) item.region = item.region.split(',')
  1436. // })
  1437. })
  1438. }
  1439. queryVehicle({orderId: this.id}).then(res => {
  1440. const column = this.findObject(this.collectionOption.column, "plateNo");
  1441. const columnTwo = this.findObject(this.paymentOption.column, "plateNo");
  1442. column.dicData = []
  1443. columnTwo.dicData = []
  1444. res.data.data.forEach(item => {
  1445. column.dicData.push({label: item})
  1446. columnTwo.dicData.push({label: item})
  1447. })
  1448. this.key++
  1449. });
  1450. this.$refs.other.show = false
  1451. // 非租户模式默认加载管理组数据
  1452. if (!website.tenantMode) {
  1453. this.initData(website.tenantId);
  1454. } else {
  1455. this.initData();
  1456. }
  1457. },
  1458. methods: {
  1459. //自定义列保存
  1460. async saveColumnBoxTwo() {
  1461. /**
  1462. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1463. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1464. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1465. */
  1466. const inSave = await this.saveColumnData(this.getColumnName(86.1), this.entrustOptionTwoT);
  1467. if (inSave) {
  1468. this.$message.success("保存成功");
  1469. //关闭窗口
  1470. this.$refs.crudBoxTwo.$refs.dialogColumn.columnBox = false;
  1471. }
  1472. },
  1473. //自定义列重置
  1474. async resetColumnBoxTwo() {
  1475. this.entrustOptionTwoT = this.entrustOptionTwoTBackup;
  1476. const inSave = await this.delColumnData(this.getColumnName(86.1), this.entrustOptionTwoTBackup);
  1477. if (inSave) {
  1478. this.$message.success("重置成功");
  1479. this.$refs.crudBoxTwo.$refs.dialogColumn.columnBox = false;
  1480. }
  1481. },
  1482. //自定义列保存
  1483. async saveColumnCollection() {
  1484. /**
  1485. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1486. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1487. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1488. */
  1489. const inSave = await this.saveColumnData(this.getColumnName(85.4), this.collectionOption);
  1490. if (inSave) {
  1491. this.$message.success("保存成功");
  1492. //关闭窗口
  1493. this.$refs.collection.$refs.dialogColumn.columnBox = false;
  1494. }
  1495. },
  1496. //自定义列重置
  1497. async resetColumnCollection() {
  1498. this.collectionOption = this.collectionOptionBackup;
  1499. const inSave = await this.delColumnData(this.getColumnName(85.4), this.collectionOptionBackup);
  1500. if (inSave) {
  1501. this.$message.success("重置成功");
  1502. this.$refs.collection.$refs.dialogColumn.columnBox = false;
  1503. }
  1504. },
  1505. //自定义列保存
  1506. async saveColumnPayment() {
  1507. /**
  1508. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1509. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1510. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1511. */
  1512. const inSave = await this.saveColumnData(this.getColumnName(86.5), this.paymentOption);
  1513. if (inSave) {
  1514. this.$message.success("保存成功");
  1515. //关闭窗口
  1516. this.$refs.payment.$refs.dialogColumn.columnBox = false;
  1517. }
  1518. },
  1519. //自定义列重置
  1520. async resetColumnPayment() {
  1521. this.paymentOption = this.paymentOptionBackup;
  1522. const inSave = await this.delColumnData(this.getColumnName(86.5), this.paymentOptionBackup);
  1523. if (inSave) {
  1524. this.$message.success("重置成功");
  1525. this.$refs.payment.$refs.dialogColumn.columnBox = false;
  1526. }
  1527. },
  1528. //打开附件
  1529. annexOpen(row, index){
  1530. this.enclosure = true
  1531. this.formAnnex = row
  1532. getFee({id:row.id}).then(res=>{
  1533. this.orderList = res.data.data
  1534. })
  1535. },
  1536. //保存
  1537. saveAnnex(){
  1538. saveFile({
  1539. id:this.formAnnex.id,
  1540. fileList:this.orderList
  1541. }).then(res=>{
  1542. this.$message.success("保存成功");
  1543. this.annexOpen(this.formAnnex)
  1544. })
  1545. },
  1546. getCorpData(val) {
  1547. this.formData.fleetName = val.cname
  1548. },
  1549. confirmChange() {
  1550. changeFleet({
  1551. ...this.formData,
  1552. id: this.formDataList.id,
  1553. orderId: this.goodsForm.id,
  1554. originalFleetName: this.formDataList.fleetName
  1555. }).then(res => {
  1556. this.$refs.saveForm.resetForm()
  1557. this.entrustList = res.data.data
  1558. this.dialogChange = false
  1559. this.$message.success("变更成功");
  1560. })
  1561. },
  1562. //查询业务部门
  1563. initData(tenantId) {
  1564. getDeptTree(tenantId).then(res => {
  1565. const column = this.findObject(this.goodsOptionForm.column, "salesmanDept");
  1566. column.dicData = res.data.data;
  1567. });
  1568. },
  1569. //多选触发
  1570. selectionChange(list) {
  1571. this.selectionList = list
  1572. },
  1573. //批量调度
  1574. batchScheduling() {
  1575. this.form = {}
  1576. this.dialogVisible = true
  1577. },
  1578. //提交调度
  1579. saveScheduling() {
  1580. this.$refs['form'].validate((valid, done) => {
  1581. done()
  1582. if (valid) {
  1583. let data = []
  1584. this.$confirm('是否确认调度?', '提示', {
  1585. confirmButtonText: '确定',
  1586. cancelButtonText: '取消',
  1587. type: 'warning'
  1588. }).then(() => {
  1589. this.selectionList.forEach(item => data.push(item.id))
  1590. dispatchBatch({
  1591. ...this.form,
  1592. idList: data,
  1593. orderId: this.goodsForm.id
  1594. }).then(res => {
  1595. this.entrustList = res.data.data
  1596. this.dialogVisible = false
  1597. })
  1598. }).catch(() => {
  1599. this.$message({
  1600. type: 'info',
  1601. message: '已取消'
  1602. });
  1603. });
  1604. } else {
  1605. return false
  1606. }
  1607. })
  1608. },
  1609. //刷新数据
  1610. refreshData() {
  1611. detailDelegationList({id: this.id, kind: '2'}).then(res => {
  1612. this.goodsForm = res.data.data
  1613. this.tableData = res.data.data.orderAddressList
  1614. this.entrustList = res.data.data.orderItemList
  1615. this.goodsList = res.data.data.orderItemList
  1616. this.orderFilesList = res.data.data.fileList
  1617. if (res.data.data.orderFeeList.length > 0) {
  1618. res.data.data.orderFeeList.forEach(item => {
  1619. if (item.type == 1) {
  1620. this.collectionList.push(item)
  1621. } else {
  1622. this.paymentList.push(item)
  1623. }
  1624. })
  1625. }
  1626. delete this.goodsForm.orderAddressList
  1627. delete this.goodsForm.orderItemList
  1628. delete this.goodsForm.orderFeeList
  1629. // this.tableData.forEach(item => {
  1630. // if (item.region) item.region = item.region.split(',')
  1631. // })
  1632. })
  1633. },
  1634. //切换收付费
  1635. handleSelect(tab, event) {
  1636. this.activeIndex = tab.name
  1637. },
  1638. //箱信息保存
  1639. rowSaveT(row, index, done, loading) {
  1640. if (row.$cellEdit) {
  1641. fleetDriverSave(row).then(res => {
  1642. this.$message.success("保存成功");
  1643. })
  1644. }
  1645. this.$refs.crudBoxTwo.rowCell(row, index)
  1646. },
  1647. rowSaveWell(row, index, done, loading) {
  1648. done()
  1649. },
  1650. //箱信息调度
  1651. designate(row, index) {
  1652. if (row.fleetId) {
  1653. this.$confirm('是否确定调度', '提示', {
  1654. confirmButtonText: '确定',
  1655. cancelButtonText: '取消',
  1656. type: 'warning'
  1657. }).then(() => {
  1658. dispatchCollection(row).then(res => {
  1659. this.$message.success('操作成功');
  1660. this.entrustList[index].status = res.data.data.status
  1661. })
  1662. }).catch(() => {
  1663. this.$message({
  1664. type: 'info',
  1665. message: '已取消'
  1666. });
  1667. });
  1668. } else {
  1669. this.$message.warning('请选择车队');
  1670. }
  1671. },
  1672. //变更车队
  1673. changeFleetT(row, index) {
  1674. this.formDataList = row
  1675. this.dialogChange = true
  1676. this.formData = {}
  1677. },
  1678. //打开变更记录
  1679. recordsOfChanges(row, index) {
  1680. this.dialogRecord = true
  1681. recordingDetails({itemId: row.id, kind: 2}).then(res => {
  1682. this.dataRecord = res.data.data
  1683. })
  1684. },
  1685. //取消调度
  1686. cancelDesignate(row, index) {
  1687. this.$confirm('是否确定取消调度', '提示', {
  1688. confirmButtonText: '确定',
  1689. cancelButtonText: '取消',
  1690. type: 'warning'
  1691. }).then(() => {
  1692. cancelDispatchCollection({id: row.id}).then(res => {
  1693. this.$message.success('操作成功');
  1694. this.entrustList[index].status = res.data.data.status
  1695. })
  1696. }).catch(() => {
  1697. this.$message({
  1698. type: 'info',
  1699. message: '已取消'
  1700. });
  1701. });
  1702. },
  1703. //箱信息选择车队
  1704. getfleetIdT(data, row) {
  1705. this.$set(row, 'fleetName', data.cname)
  1706. },
  1707. //地址新增
  1708. addAddress() {
  1709. this.tableData.splice(this.tableData.length - 1, 0, {leas: 1111})
  1710. },
  1711. //返回主列表
  1712. backToList() {
  1713. this.$emit('backToList')
  1714. },
  1715. //删除途径地址
  1716. deleteAddress(scope) {
  1717. this.tableData.splice(scope.$index, 1);
  1718. },
  1719. //箱信息保存
  1720. rowSave(row, index, done, loading) {
  1721. row.$cellEdit = false
  1722. done()
  1723. },
  1724. rowCell(row, index) {
  1725. if (row.$cellEdit) {
  1726. if (row.plateNo){
  1727. incidentalSubmit(row).then(res=>{
  1728. this.$refs.collection.rowCell(row, index)
  1729. row = res.data.data
  1730. this.$message.success("保存成功");
  1731. })
  1732. }else {
  1733. this.$message.error("请选择车号");
  1734. }
  1735. }else {
  1736. this.$refs.collection.rowCell(row, index)
  1737. }
  1738. },
  1739. paymentRowCell(row, index) {
  1740. if (row.$cellEdit) {
  1741. incidentalSubmit(row).then(res=>{
  1742. row = res.data.data
  1743. this.$message.success("保存成功");
  1744. })
  1745. }
  1746. this.$refs.payment.rowCell(row, index)
  1747. },
  1748. //箱信息移除
  1749. rowDel(row, index) {
  1750. this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
  1751. confirmButtonText: '确定',
  1752. cancelButtonText: '取消',
  1753. type: 'warning'
  1754. }).then(() => {
  1755. this.entrustList.splice(index, 1);
  1756. }).catch(() => {
  1757. this.$message({
  1758. type: 'info',
  1759. message: '已取消删除'
  1760. });
  1761. });
  1762. },
  1763. //保存
  1764. editCustomer() {
  1765. let data = JSON.parse(JSON.stringify(this.tableData))
  1766. // data.forEach(item => {
  1767. // if (item.region.length !== 0) item.region = item.region.join(',')
  1768. // })
  1769. saveDelegationList({
  1770. ...this.goodsForm,
  1771. kind: '2',
  1772. orderAddressList: data,
  1773. orderItemList: this.entrustList,
  1774. orderFeeList: this.collectionList.concat(this.paymentList)
  1775. }).then(res => {
  1776. this.$message.success('保存成功');
  1777. })
  1778. },
  1779. //收费新增
  1780. addRowCollection() {
  1781. this.$refs.collection.rowCellAdd({
  1782. currency: '1',
  1783. type: '1',
  1784. orderId:this.id,
  1785. $cellEdit: true
  1786. });
  1787. },
  1788. //付费新增
  1789. addRowPayment() {
  1790. this.$refs.payment.rowCellAdd({
  1791. currency: '1',
  1792. type: '2',
  1793. orderId:this.id,
  1794. $cellEdit: true
  1795. });
  1796. },
  1797. //选择费用
  1798. selectValue(value, row) {
  1799. this.$set(row, 'feeName', value.cname)
  1800. },
  1801. //选择客户信息触发
  1802. getfleetId(data, row) {
  1803. this.$set(row, 'corpName', data.cname)
  1804. },
  1805. //收款信息移除
  1806. makeDel(row, index) {
  1807. this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
  1808. confirmButtonText: '确定',
  1809. cancelButtonText: '取消',
  1810. type: 'warning'
  1811. }).then(() => {
  1812. if (row.id) removeCollection(row.id)
  1813. this.collectionList.splice(index, 1);
  1814. }).catch(() => {
  1815. this.$message({
  1816. type: 'info',
  1817. message: '已取消删除'
  1818. });
  1819. });
  1820. },
  1821. //付款信息移除
  1822. feeDel(row, index) {
  1823. this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
  1824. confirmButtonText: '确定',
  1825. cancelButtonText: '取消',
  1826. type: 'warning'
  1827. }).then(() => {
  1828. if (row.id) removeCollection(row.id)
  1829. this.paymentList.splice(index, 1);
  1830. }).catch(() => {
  1831. this.$message({
  1832. type: 'info',
  1833. message: '已取消删除'
  1834. });
  1835. });
  1836. },
  1837. //自定义表头
  1838. renderHeader(h) {
  1839. return (
  1840. <div>
  1841. <el-tooltip className="item" effect="dark" content="增加途径地址" placement="top">
  1842. <el-button type="primary" icon="el-icon-plus" size="mini" circle onClick={() => this.addAddress()}
  1843. style="margin-right: 1.25rem;"></el-button>
  1844. </el-tooltip>
  1845. </div>
  1846. )
  1847. }
  1848. }
  1849. }
  1850. </script>
  1851. <style scoped lang="scss">
  1852. ::v-deep .el-form-item {
  1853. margin-bottom: 8px;
  1854. }
  1855. ::v-deep .el-form-item__content {
  1856. line-height: 32px;
  1857. }
  1858. ::v-deep .el-card__body {
  1859. padding: 10px 15px;
  1860. font-size: 14px;
  1861. }
  1862. </style>