detailPage.vue 58 KB

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