detailPage.vue 68 KB

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