detailPage.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792
  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. <el-button
  15. class="el-button--small-yh add-customer-btn"
  16. type="primary"
  17. :disabled="disabled"
  18. size="small"
  19. style="margin-right: 70px;"
  20. @click="editCustomer"
  21. >提交
  22. </el-button>
  23. <el-button
  24. class="el-button--small-yh add-customer-btn"
  25. type="primary"
  26. :disabled="disabled"
  27. size="small"
  28. @click="editCustomer"
  29. >保存
  30. </el-button>
  31. </div>
  32. </div>
  33. <containerTitle
  34. title="起止地信息"
  35. style="margin-top: 50px"></containerTitle>
  36. <basic-container>
  37. <el-table
  38. ref="singleTable"
  39. :data="tableData"
  40. size="mini"
  41. :header-cell-style="{color:'#000',background:'#fafafa'}"
  42. style="width: 100%">
  43. <el-table-column
  44. type="index"
  45. label="序号"
  46. align="center"
  47. width="60">
  48. </el-table-column>
  49. <el-table-column
  50. property="province"
  51. label="省市区"
  52. align="center"
  53. width="280">
  54. <template slot-scope="scope">
  55. <el-cascader
  56. size="small"
  57. style="width: 100%;"
  58. v-model="scope.row.region"
  59. disabled
  60. :props="treeOption"></el-cascader>
  61. </template>
  62. </el-table-column>
  63. <el-table-column
  64. property="address"
  65. align="center"
  66. show-overflow-tooltip
  67. label="详细地址">
  68. <!-- <template slot-scope="scope">-->
  69. <!-- <el-input v-model="scope.row.address" size="small" placeholder="请输入内容"></el-input>-->
  70. <!-- </template>-->
  71. </el-table-column>
  72. </el-table>
  73. </basic-container>
  74. <containerTitle title="箱信息"></containerTitle>
  75. <basic-container>
  76. <avue-crud
  77. :data="entrustList"
  78. ref="crudContact"
  79. :option="entrustOptionTwoT"
  80. @row-save="(row,done,loading)=>{rowSaveT(row,0,done,loading)}"
  81. @row-update="rowSaveT">
  82. <!-- <template slot-scope="{type,size,row}" slot="menu">-->
  83. <!-- <el-button icon="el-icon-edit" :size="size" :type="type" @click="designate(row)">指派</el-button>-->
  84. <!-- </template>-->
  85. <template slot-scope="{row,index}" slot="menu">
  86. <el-button
  87. type="text"
  88. size="small"
  89. @click="rowSaveT(row,index)"
  90. >{{ row.$cellEdit ? '保 存' : '修 改' }}
  91. </el-button>
  92. <el-button
  93. size="small"
  94. icon="el-icon-delete"
  95. type="text"
  96. @click="designate(row, index)"
  97. v-if="!row.$cellEdit"
  98. >指派</el-button>
  99. </template>
  100. </avue-crud>
  101. </basic-container>
  102. <containerTitle title="货物信息"></containerTitle>
  103. <basic-container>
  104. <avue-form :option="goodsOptionForm" v-model="goodsForm">
  105. <template slot-scope="scope" slot="corpId">
  106. <crop-select
  107. v-model="goodsForm.corpId"
  108. disabled
  109. ></crop-select>
  110. </template>
  111. </avue-form>
  112. </basic-container>
  113. <span>
  114. <!-- <containerTitle title="费用明细"></containerTitle>-->
  115. <!-- <basic-container>-->
  116. <!-- <el-tabs v-model="activeIndex" @tab-click="handleSelect">-->
  117. <!-- <el-tab-pane label="应收" name="1"></el-tab-pane>-->
  118. <!-- <el-tab-pane label="应付" name="2"></el-tab-pane>-->
  119. <!-- </el-tabs>-->
  120. <!-- <avue-crud-->
  121. <!-- v-if="activeIndex === '1'"-->
  122. <!-- :data="collectionList"-->
  123. <!-- :option="collectionOption"-->
  124. <!-- ref="collection"-->
  125. <!-- @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"-->
  126. <!-- @row-update="rowSave"-->
  127. <!-- @row-del="makeDel">-->
  128. <!-- <template slot-scope="{row}" slot="corpId">-->
  129. <!-- <crop-select-->
  130. <!-- v-if="row.$cellEdit"-->
  131. <!-- v-model="row.corpId"-->
  132. <!-- @getCorpData="(data)=>{getfleetId(data,row)}"-->
  133. <!-- ></crop-select>-->
  134. <!-- <span v-else>{{row.corpName}}</span>-->
  135. <!-- </template>-->
  136. <!-- <template slot-scope="{row}" slot="feeId">-->
  137. <!-- <breakdown-select-->
  138. <!-- v-if="row.$cellEdit"-->
  139. <!-- v-model="row.feeId"-->
  140. <!-- @selectValue="(value) => selectValue(value,row)"-->
  141. <!-- :configuration="breakConfiguration"-->
  142. <!-- >-->
  143. <!-- </breakdown-select>-->
  144. <!-- <span v-else>{{ row.feeName }}</span>-->
  145. <!-- </template>-->
  146. <!-- <template slot-scope="{row,index}" slot="menu">-->
  147. <!-- <el-button-->
  148. <!-- type="text"-->
  149. <!-- size="small"-->
  150. <!-- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
  151. <!-- @click="rowCell(row,index)"-->
  152. <!-- >{{row.$cellEdit?'保存':'编辑'}}</el-button>-->
  153. <!-- <el-button type="text"-->
  154. <!-- icon="el-icon-delete"-->
  155. <!-- size="small"-->
  156. <!-- @click="$refs.collection.rowDel(row,index)"-->
  157. <!-- >删除</el-button>-->
  158. <!-- </template>-->
  159. <!-- <template slot="menuLeft">-->
  160. <!-- <el-button type="primary" icon="el-icon-plus" @click="addRowCollection" size="small">录入明细</el-button>-->
  161. <!-- </template>-->
  162. <!-- </avue-crud>-->
  163. <!-- <avue-crud-->
  164. <!-- v-if="activeIndex === '2'"-->
  165. <!-- :data="paymentList"-->
  166. <!-- :option="paymentOption"-->
  167. <!-- ref="payment"-->
  168. <!-- @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"-->
  169. <!-- @row-update="rowSave"-->
  170. <!-- @row-del="feeDel"-->
  171. <!-- >-->
  172. <!-- <template slot-scope="{row}" slot="corpId">-->
  173. <!-- <crop-select-->
  174. <!-- v-if="row.$cellEdit"-->
  175. <!-- v-model="row.corpId"-->
  176. <!-- @getCorpData="(data)=>{getfleetId(data,row)}"-->
  177. <!-- ></crop-select>-->
  178. <!-- <span v-else>{{row.corpName}}</span>-->
  179. <!-- </template>-->
  180. <!-- <template slot-scope="{row}" slot="feeId">-->
  181. <!-- <breakdown-select-->
  182. <!-- v-if="row.$cellEdit"-->
  183. <!-- v-model="row.feeId"-->
  184. <!-- @selectValue="(value) => selectValue(value,row)"-->
  185. <!-- :configuration="breakConfiguration"-->
  186. <!-- >-->
  187. <!-- </breakdown-select>-->
  188. <!-- <span v-else>{{ row.feeName }}</span>-->
  189. <!-- </template>-->
  190. <!-- <template slot-scope="{row,index}" slot="menu">-->
  191. <!-- <el-button-->
  192. <!-- type="text"-->
  193. <!-- size="small"-->
  194. <!-- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
  195. <!-- @click="paymentRowCell(row,index)"-->
  196. <!-- >{{row.$cellEdit?'保存':'编辑'}}</el-button>-->
  197. <!-- <el-button type="text"-->
  198. <!-- icon="el-icon-delete"-->
  199. <!-- size="small"-->
  200. <!-- @click="$refs.payment.rowDel(row,index)"-->
  201. <!-- >删除</el-button>-->
  202. <!-- </template>-->
  203. <!-- <template slot="menuLeft">-->
  204. <!-- <el-button type="primary" icon="el-icon-plus" @click="addRowPayment" size="small">录入明细</el-button>-->
  205. <!-- </template>-->
  206. <!-- </avue-crud>-->
  207. <!-- </basic-container>-->
  208. </span>
  209. <containerTitle title="上传附件"></containerTitle>
  210. <c-upload
  211. typeUpload="CD"
  212. :data="orderFilesList"
  213. :enumerationValue="76"
  214. ></c-upload>
  215. </div>
  216. </template>
  217. <script>
  218. import {getLazyTree} from "@/api/base/region";
  219. import {saveDelegationList, detailDelegationList, removeCollection} from "@/api/landTransportation";
  220. export default {
  221. props: {
  222. id: {
  223. type: String
  224. }
  225. },
  226. data() {
  227. return {
  228. activeIndex: '1',
  229. goodsForm: {},
  230. orderFilesList: [],
  231. roleName: localStorage.getItem("roleName").split(',')[0],
  232. breakConfiguration: {
  233. multipleChoices: false,
  234. multiple: false,
  235. disabled: false,
  236. searchShow: true,
  237. collapseTags: false,
  238. clearable: true,
  239. placeholder: '请点击右边按钮选择',
  240. dicData: []
  241. },
  242. advantageProjectData: [],
  243. treeOption: {
  244. label: 'title',
  245. value: 'id',
  246. lazy: true,
  247. lazyLoad(node, resolve) {
  248. const parentId = node.level === 0 ? '00' : node.data.id;
  249. getLazyTree(parentId).then(res => {
  250. resolve(
  251. res.data.data.map(item => {
  252. return {
  253. ...item,
  254. leaf: !item.hasChildren
  255. };
  256. })
  257. );
  258. });
  259. }
  260. },
  261. tableData: [],
  262. entrustListT: [],
  263. entrustOptionTwoT: {
  264. align: 'center',
  265. menuAlign: 'center',
  266. index: true,
  267. cellBtn: false,
  268. addBtn: false,
  269. cancelBtn:false,
  270. editBtn:false,
  271. addRowBtn: false,
  272. delBtn: false,
  273. showSummary: true,
  274. // editBtn:false,
  275. summaryText: "合计",
  276. sumColumnList: [
  277. {
  278. name: 'landWeight',
  279. type: 'sum',
  280. decimals: 6
  281. }, {
  282. name: 'landAmountC',
  283. type: 'sum',
  284. decimals: 2
  285. }, {
  286. name: 'landAmountD',
  287. type: 'sum',
  288. decimals: 2
  289. }, {
  290. name: 'ctnQuantity',
  291. type: 'count'
  292. }],
  293. column: [
  294. {
  295. label: '状态',
  296. width: 200,
  297. type: 'select',
  298. dicUrl: "/api/blade-client/corpsdesc/fleet-list",
  299. props: {
  300. label: "cname",
  301. value: "id"
  302. },
  303. cell: true,
  304. prop: 'status'
  305. },{
  306. label: '车队',
  307. width: 200,
  308. type: 'select',
  309. dicUrl: "/api/blade-client/corpsdesc/fleet-list",
  310. props: {
  311. label: "cname",
  312. value: "id"
  313. },
  314. cell: true,
  315. prop: 'fleetId'
  316. }, {
  317. label: '尺寸箱型',
  318. width: 100,
  319. slot: true,
  320. prop: 'ctnType'
  321. }, {
  322. label: '箱量',
  323. width: 50,
  324. prop: 'ctnQuantity'
  325. }, {
  326. label: '重量',
  327. width: 160,
  328. prop: 'landWeight',
  329. controls: false,
  330. precision: 6,
  331. type: 'number'
  332. }, {
  333. label: '车号',
  334. width: 150,
  335. prop: 'plateNo'
  336. }, {
  337. label: '司机',
  338. width: 115,
  339. prop: 'driverId'
  340. }, {
  341. label: '电话',
  342. width: 160,
  343. prop: 'tel'
  344. }, {
  345. label: '陆运费(D)',
  346. prop: 'landAmountD'
  347. }, {
  348. label: '陆运费(C)',
  349. cell: true,
  350. prop: 'landAmountC'
  351. }, {
  352. label: '备注',
  353. cell: true,
  354. prop: 'remarks'
  355. }
  356. ]
  357. },
  358. entrustList: [],
  359. goodsOptionForm: {
  360. menuBtn: false,
  361. disabled: true,
  362. column: [{
  363. label: '客户名称',
  364. formslot: true,
  365. prop: 'corpId'
  366. }, {
  367. label: '订单号',
  368. prop: 'id',
  369. disabled: true
  370. }, {
  371. label: '提单号',
  372. prop: 'billNo'
  373. }, {
  374. label: '场站',
  375. prop: 'station'
  376. }, {
  377. label: '到厂时间',
  378. type: "datetime",
  379. format: 'yyyy-MM-dd HH:mm:ss',
  380. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  381. prop: 'arrivalTime'
  382. }, {
  383. label: '工厂名称',
  384. prop: 'factory'
  385. }, {
  386. label: '货物名称',
  387. prop: 'goods'
  388. }, {
  389. label: '备注',
  390. prop: 'remarks'
  391. }
  392. ]
  393. },
  394. entrustOptionTwo: {
  395. align: 'center',
  396. menuAlign: 'center',
  397. addBtnText: '录入箱信息',
  398. index: true,
  399. cellBtn: true,
  400. addBtn: false,
  401. addRowBtn: true,
  402. showSummary: true,
  403. summaryText: "合计",
  404. sumColumnList: [
  405. {
  406. name: 'landWeight',
  407. type: 'sum',
  408. decimals: 6
  409. }, {
  410. name: 'landAmountD',
  411. type: 'sum',
  412. decimals: 2
  413. }, {
  414. name: 'ctnQuantity',
  415. type: 'sum',
  416. decimals: 1
  417. }],
  418. column: [{
  419. label: '尺寸箱型',
  420. cell: true,
  421. prop: 'ctnType',
  422. type: 'select',
  423. width: 100,
  424. dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
  425. props: {
  426. label: "dictValue",
  427. value: "dictKey"
  428. }
  429. }, {
  430. label: '箱量',
  431. cell: true,
  432. prop: 'ctnQuantity',
  433. controls: false,
  434. precision: 0,
  435. width: 100,
  436. type: 'number'
  437. }, {
  438. label: '总重量(吨)',
  439. cell: true,
  440. prop: 'landWeight',
  441. controls: false,
  442. width: 200,
  443. precision: 6,
  444. type: 'number'
  445. }, {
  446. label: '陆运费(D)',
  447. cell: true,
  448. prop: 'landAmountD',
  449. controls: false,
  450. width: 200,
  451. precision: 2,
  452. type: 'number'
  453. }, {
  454. label: '备注',
  455. cell: true,
  456. prop: 'remarks'
  457. }
  458. ]
  459. },
  460. collectionList: [],
  461. collectionOption: {
  462. align: 'center',
  463. menuAlign: 'center',
  464. index: true,
  465. cancelBtn: false,
  466. editBtn: false,
  467. delBtn: false,
  468. cellBtn: false,
  469. addBtn: false,
  470. addRowBtn: false,
  471. showSummary: true,
  472. addBtnText: '录入明细',
  473. summaryText: "合计",
  474. sumColumnList: [{
  475. name: 'price',
  476. type: 'sum',
  477. decimals: 2
  478. }, {
  479. name: 'amount',
  480. type: 'sum',
  481. decimals: 2
  482. }, {
  483. name: 'quantity',
  484. type: 'sum',
  485. decimals: 1
  486. }],
  487. column: [{
  488. label: '客户名称',
  489. slot: true,
  490. prop: 'corpId'
  491. }, {
  492. label: '费用名称',
  493. slot: true,
  494. prop: 'feeId'
  495. }, {
  496. label: '计价单位',
  497. cell: true,
  498. prop: 'unit',
  499. type: "select",
  500. dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
  501. props: {
  502. label: "dictValue",
  503. value: "dictKey"
  504. }
  505. }, {
  506. label: '数量',
  507. cell: true,
  508. prop: 'quantity'
  509. }, {
  510. label: '单价',
  511. cell: true,
  512. prop: 'price'
  513. }, {
  514. label: '金额',
  515. cell: true,
  516. prop: 'amount'
  517. }, {
  518. label: '税率(默认6)',
  519. cell: true,
  520. prop: 'taxRate'
  521. }, {
  522. label: '币别',
  523. cell: true,
  524. prop: 'currency',
  525. type: "select",
  526. dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
  527. props: {
  528. label: "dictValue",
  529. value: "dictKey"
  530. },
  531. }
  532. ]
  533. },
  534. paymentList: [],
  535. paymentOption: {
  536. align: 'center',
  537. menuAlign: 'center',
  538. index: true,
  539. cancelBtn: false,
  540. editBtn: false,
  541. delBtn: false,
  542. cellBtn: false,
  543. addBtn: false,
  544. addRowBtn: false,
  545. showSummary: true,
  546. addBtnText: '录入明细',
  547. summaryText: "合计",
  548. sumColumnList: [{
  549. name: 'price',
  550. type: 'sum',
  551. decimals: 2
  552. }, {
  553. name: 'amount',
  554. type: 'sum',
  555. decimals: 2
  556. }, {
  557. name: 'quantity',
  558. type: 'sum',
  559. decimals: 1
  560. }],
  561. column: [{
  562. label: '客户名称',
  563. slot: true,
  564. prop: 'corpId'
  565. }, {
  566. label: '费用名称',
  567. slot: true,
  568. prop: 'feeId'
  569. }, {
  570. label: '计价单位',
  571. cell: true,
  572. prop: 'unit',
  573. type: "select",
  574. dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
  575. props: {
  576. label: "dictValue",
  577. value: "dictKey"
  578. }
  579. }, {
  580. label: '数量',
  581. cell: true,
  582. prop: 'quantity'
  583. }, {
  584. label: '单价',
  585. cell: true,
  586. prop: 'price'
  587. }, {
  588. label: '金额',
  589. cell: true,
  590. prop: 'amount'
  591. }, {
  592. label: '税率(默认6)',
  593. cell: true,
  594. prop: 'taxRate'
  595. }, {
  596. label: '币别(默认RMB)',
  597. cell: true,
  598. prop: 'currency',
  599. type: "select",
  600. dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
  601. props: {
  602. label: "dictValue",
  603. value: "dictKey"
  604. },
  605. }
  606. ]
  607. }
  608. };
  609. },
  610. created() {
  611. if (this.id) {
  612. detailDelegationList({id: this.id, kind: '2'}).then(res => {
  613. this.goodsForm = res.data.data
  614. this.tableData = res.data.data.orderAddressList
  615. this.entrustList = res.data.data.orderItemList
  616. this.goodsList = res.data.data.orderItemList
  617. if (res.data.data.orderFeeList.length > 0) {
  618. res.data.data.orderFeeList.forEach(item => {
  619. if (item.type == 1) {
  620. this.collectionList.push(item)
  621. } else {
  622. this.paymentList.push(item)
  623. }
  624. })
  625. }
  626. delete this.goodsForm.orderAddressList
  627. delete this.goodsForm.orderItemList
  628. delete this.goodsForm.orderFeeList
  629. this.tableData.forEach(item => {
  630. if (item.region) item.region = item.region.split(',')
  631. })
  632. })
  633. }
  634. },
  635. methods: {
  636. //切换收付费
  637. handleSelect(tab, event) {
  638. this.activeIndex = tab.name
  639. },
  640. //箱信息保存
  641. rowSaveT(row, index, done, loading) {
  642. this.$refs.crudContact.rowCell(row, index)
  643. done()
  644. },
  645. //箱信息指派
  646. designate(row){
  647. this.$confirm('是否确定指派车队', '提示', {
  648. confirmButtonText: '确定',
  649. cancelButtonText: '取消',
  650. type: 'warning'
  651. }).then(() => {
  652. console.log('11111')
  653. }).catch(() => {
  654. this.$message({
  655. type: 'info',
  656. message: '已取消'
  657. });
  658. });
  659. },
  660. //箱信息选择车队
  661. getfleetIdT(data, row) {
  662. this.$set(row, 'fleetName', data.cname)
  663. },
  664. //地址新增
  665. addAddress() {
  666. this.tableData.splice(this.tableData.length - 1, 0, {leas: 1111})
  667. },
  668. //返回主列表
  669. backToList() {
  670. this.$emit('backToList')
  671. },
  672. //删除途径地址
  673. deleteAddress(scope) {
  674. this.tableData.splice(scope.$index, 1);
  675. },
  676. //箱信息保存
  677. rowSave(row, index, done, loading) {
  678. row.$cellEdit = false
  679. done()
  680. },
  681. rowCell(row, index) {
  682. this.$refs.collection.rowCell(row, index)
  683. },
  684. paymentRowCell(row, index) {
  685. this.$refs.payment.rowCell(row, index)
  686. },
  687. //箱信息移除
  688. rowDel(row, index) {
  689. this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
  690. confirmButtonText: '确定',
  691. cancelButtonText: '取消',
  692. type: 'warning'
  693. }).then(() => {
  694. this.entrustList.splice(index, 1);
  695. }).catch(() => {
  696. this.$message({
  697. type: 'info',
  698. message: '已取消删除'
  699. });
  700. });
  701. },
  702. //保存
  703. editCustomer() {
  704. let data = JSON.parse(JSON.stringify(this.tableData))
  705. data.forEach(item => {
  706. if (item.region.length !== 0) item.region = item.region.join(',')
  707. })
  708. saveDelegationList({
  709. ...this.goodsForm,
  710. kind: '2',
  711. orderAddressList: data,
  712. orderItemList: this.entrustList,
  713. orderFeeList: this.collectionList.concat(this.paymentList)
  714. }).then(res => {
  715. this.$message.success('保存成功');
  716. })
  717. },
  718. //收费新增
  719. addRowCollection() {
  720. this.$refs.collection.rowCellAdd({
  721. currency: '1',
  722. type: '1',
  723. $cellEdit: true
  724. });
  725. },
  726. //付费新增
  727. addRowPayment() {
  728. this.$refs.payment.rowCellAdd({
  729. currency: '1',
  730. type: '2',
  731. $cellEdit: true
  732. });
  733. },
  734. //选择费用
  735. selectValue(value, row) {
  736. this.$set(row, 'feeName', value.cname)
  737. },
  738. //选择客户信息触发
  739. getfleetId(data, row) {
  740. this.$set(row, 'corpName', data.cname)
  741. },
  742. //收款信息移除
  743. makeDel(row, index) {
  744. this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
  745. confirmButtonText: '确定',
  746. cancelButtonText: '取消',
  747. type: 'warning'
  748. }).then(() => {
  749. if (row.id) removeCollection(row.id)
  750. this.collectionList.splice(index, 1);
  751. }).catch(() => {
  752. this.$message({
  753. type: 'info',
  754. message: '已取消删除'
  755. });
  756. });
  757. },
  758. //付款信息移除
  759. feeDel(row, index) {
  760. this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
  761. confirmButtonText: '确定',
  762. cancelButtonText: '取消',
  763. type: 'warning'
  764. }).then(() => {
  765. if (row.id) removeCollection(row.id)
  766. this.paymentList.splice(index, 1);
  767. }).catch(() => {
  768. this.$message({
  769. type: 'info',
  770. message: '已取消删除'
  771. });
  772. });
  773. },
  774. //自定义表头
  775. renderHeader(h) {
  776. return (
  777. <div>
  778. <el-tooltip className="item" effect="dark" content="增加途径地址" placement="top">
  779. <el-button type="primary" icon="el-icon-plus" size="mini" circle onClick={() => this.addAddress()}
  780. style="margin-right: 1.25rem;"></el-button>
  781. </el-tooltip>
  782. </div>
  783. )
  784. }
  785. }
  786. }
  787. </script>
  788. <style scoped>
  789. </style>