detailPage.vue 45 KB

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