detailPage.vue 66 KB

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