detailsPageEdit.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854
  1. <template>
  2. <div class="borderless">
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <!-- <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
  6. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
  7. @click="backToList">返回列表
  8. </el-button>
  9. </div>
  10. <el-button
  11. class="el-button--small-yh add-customer-btn"
  12. type="primary"
  13. :disabled="disabled"
  14. @click="editCustomer"
  15. >{{ form.id ? '确认修改' : '确认新增' }}
  16. </el-button>
  17. </div>
  18. <div style="margin-top: 60px">
  19. <el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
  20. <containerTitle title="基础资料"></containerTitle>
  21. <basic-container style="margin-bottom: 10px">
  22. <el-row>
  23. <el-col v-for="(item,index) in basicData.column" :key="index" :span="item.span?item.span:8">
  24. <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
  25. <!-- <avue-input-tree v-if="item.prop === 'corpsTypeId'" leaf-only multiple :props="{label:'title'}" v-model="form[item.prop]" placeholder="请选择内容" type="tree" :dic="dic"-->
  26. <!-- ></avue-input-tree>-->
  27. <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]"
  28. size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
  29. <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off"></el-input>
  30. </el-form-item>
  31. </el-col>
  32. </el-row>
  33. </basic-container>
  34. <containerTitle title="商品信息"></containerTitle>
  35. <basic-container style="margin-bottom: 10px">
  36. <avue-crud
  37. :option="customerContact"
  38. v-model="contactsForm"
  39. :data="contactsData"
  40. ref="crudContact"
  41. @row-save="rowSave"
  42. @row-click="handleRowClick"
  43. @row-update="rowUpdate"
  44. @row-del="rowDel"
  45. >
  46. <template slot="code" slot-scope="{row,index}">
  47. <span style="float: left;padding-top: 2px">{{ row.code }}</span>
  48. <el-button type="text" size="mini" style="float: right" @click="commodityChoice(row)">选择</el-button>
  49. </template>
  50. <template slot-scope="{row,index}" slot="menu">
  51. <el-button
  52. type="text"
  53. size="small"
  54. @click="rowCell(row,index)"
  55. >{{ row.$cellEdit ? '保存' : '修改' }}
  56. </el-button>
  57. </template>
  58. <template slot="menuLeft" slot-scope="{size}">
  59. <el-button type="primary"
  60. icon="el-icon-plus"
  61. size="small"
  62. @click="commoditySelection"
  63. >新增
  64. </el-button>
  65. </template>
  66. </avue-crud>
  67. </basic-container>
  68. <containerTitle title="费用明细"></containerTitle>
  69. <basic-container style="margin-bottom: 10px">
  70. <avue-crud
  71. :option="advantageProject"
  72. v-model="advantageProjectForm"
  73. :data="advantageProjectData"
  74. ref="crudProject"
  75. @row-save="rowSaveProject"
  76. @row-update="rowUpdateProject"
  77. @row-del="rowDelProject"
  78. >
  79. <template slot="code" slot-scope="{row,index}">
  80. <span style="float: left;padding-top: 2px">{{ row.code }}</span>
  81. <el-button type="text" size="mini" style="float: right" @click="choice(row)">选择</el-button>
  82. </template>
  83. <template slot-scope="{row,index}" slot="menu">
  84. <el-button
  85. type="text"
  86. size="small"
  87. @click="rowCellTwo(row,index)"
  88. >{{ row.$cellEdit ? '保存' : '修改' }}
  89. </el-button>
  90. </template>
  91. <template slot="menuLeft" slot-scope="{size}">
  92. <el-button type="primary"
  93. icon="el-icon-plus"
  94. size="small"
  95. @click="costIncrease"
  96. >新增
  97. </el-button>
  98. </template>
  99. </avue-crud>
  100. </basic-container>
  101. <containerTitle title="附件上传"></containerTitle>
  102. <basic-container style="margin-bottom: 40px">
  103. <avue-crud
  104. :option="bankOfDeposit"
  105. v-model="bankOfDepositForm"
  106. :data="bankOfDepositData"
  107. @row-save="rowSaveBankOfDeposit"
  108. @row-update="rowUpdateBankOfDeposit"
  109. @row-del="rowDelBankOfDeposit"
  110. ></avue-crud>
  111. </basic-container>
  112. </el-form>
  113. </div>
  114. <el-dialog
  115. title="导入商品"
  116. append-to-body
  117. class="el-dialogDeep"
  118. :visible.sync="dialogVisible"
  119. width="80%"
  120. :close-on-click-modal="false"
  121. :destroy-on-close="true"
  122. :close-on-press-escape="false">
  123. <el-row style="height: 0;">
  124. <el-col :span="5">
  125. <div>
  126. <el-scrollbar>
  127. <basic-container>
  128. <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/>
  129. </basic-container>
  130. </el-scrollbar>
  131. </div>
  132. </el-col>
  133. <el-col :span="19">
  134. <basic-container>
  135. <avue-crud :option="optionTwo"
  136. :table-loading="loading"
  137. :data="data"
  138. ref="crud"
  139. @refresh-change="refreshChange"
  140. @selection-change="selectionChange"
  141. :page.sync="page"
  142. @on-load="onLoad"></avue-crud>
  143. </basic-container>
  144. </el-col>
  145. </el-row>
  146. <span slot="footer" class="dialog-footer">
  147. <el-button @click="dialogVisible = false">取 消</el-button>
  148. <el-button type="primary" @click="importGoods" v-if="commodityData !== true">导入</el-button>
  149. <el-button type="primary" @click="importChoice" v-if="commodityData === true"
  150. :disabled="tableData.length !== 1">导入</el-button>
  151. </span>
  152. </el-dialog>
  153. <el-dialog
  154. title="导入费用"
  155. append-to-body
  156. class="el-dialogDeep"
  157. :visible.sync="dialogCost"
  158. width="80%"
  159. :close-on-click-modal="false"
  160. :destroy-on-close="true"
  161. :close-on-press-escape="false">
  162. <el-row style="height: 0;">
  163. <el-col :span="5">
  164. <div>
  165. <el-scrollbar>
  166. <basic-container>
  167. <avue-tree :option="treeOptionCost" :data="treeData" @node-click="nodeClickCost"/>
  168. </basic-container>
  169. </el-scrollbar>
  170. </div>
  171. </el-col>
  172. <el-col :span="19">
  173. <basic-container>
  174. <avue-crud :option="optionTwoCost"
  175. :table-loading="loadingCost"
  176. :data="dataCost"
  177. ref="crud"
  178. @refresh-change="refreshChangeCost"
  179. @selection-change="selectionChangeCost"
  180. :page.sync="pageCost"
  181. @on-load="onLoadCost">
  182. </avue-crud>
  183. </basic-container>
  184. </el-col>
  185. </el-row>
  186. <span slot="footer" class="dialog-footer">
  187. <el-button @click="dialogCost = false">取 消</el-button>
  188. <el-button type="primary" @click="importCost" v-if="choiceData !== true">导入</el-button>
  189. <el-button type="primary" @click="choiceCost" v-if="choiceData === true"
  190. :disabled="tableDataCost.length !== 1">导入</el-button>
  191. </span>
  192. </el-dialog>
  193. </div>
  194. </template>
  195. <script>
  196. import {
  197. typeSave, detail,
  198. corpstypeTree,
  199. corpsattn,
  200. corpsbank,
  201. corpsitem,
  202. getList
  203. } from "@/api/basicData/deliveryNotice"
  204. import customerContact from "./configuration/customerContact.json"
  205. import advantageProject from "./configuration/advantageProject.json"
  206. import bankOfDeposit from "./configuration/bankOfDeposit.json"
  207. import commodity from "./configuration/commodity.json"
  208. import optionTwoCost from "./configuration/mainListCost.json"
  209. import {getDeptLazyTree, customerList} from "@/api/basicData/basicFeesDesc";
  210. export default {
  211. name: "detailsPage",
  212. data() {
  213. return {
  214. form: {},
  215. data: [],
  216. loadingCost: false,
  217. choiceData: false,
  218. commodityData: false,
  219. dataCost: [],
  220. choiceIndex: '',
  221. dialogCost: false,
  222. treeDeptId: '',
  223. treeDeptIdCost: '',
  224. pageCost: {
  225. pageSize: 10,
  226. currentPage: 1,
  227. total: 0
  228. },
  229. page: {
  230. pageSize: 10,
  231. currentPage: 1,
  232. total: 0
  233. },
  234. loading: false,
  235. contactsForm: {},
  236. optionTwo: commodity,
  237. optionTwoCost: optionTwoCost,
  238. treeOptionCost: {
  239. nodeKey: 'id',
  240. lazy: true,
  241. treeLoad: function (node, resolve) {
  242. const parentId = (node.level === 0) ? 0 : node.data.id;
  243. getDeptLazyTree(parentId).then(res => {
  244. resolve(res.data.data.map(item => {
  245. return {
  246. ...item,
  247. leaf: !item.hasChildren
  248. }
  249. }))
  250. });
  251. },
  252. addBtn: false,
  253. menu: false,
  254. size: 'small',
  255. props: {
  256. labelText: '标题',
  257. label: 'title',
  258. value: 'value',
  259. children: 'children'
  260. }
  261. },
  262. treeOption: {
  263. nodeKey: 'id',
  264. lazy: true,
  265. treeLoad: function (node, resolve) {
  266. const parentId = (node.level === 0) ? 0 : node.data.id;
  267. getDeptLazyTree(parentId).then(res => {
  268. resolve(res.data.data.map(item => {
  269. return {
  270. ...item,
  271. leaf: !item.hasChildren
  272. }
  273. }))
  274. });
  275. },
  276. addBtn: false,
  277. menu: false,
  278. size: 'small',
  279. props: {
  280. labelText: '标题',
  281. label: 'title',
  282. value: 'value',
  283. children: 'children'
  284. }
  285. },
  286. dialogVisible: false,
  287. advantageProjectForm: {},
  288. bankOfDepositForm: {},
  289. contactsData: [],
  290. advantageProjectData: [],
  291. disabled: false,
  292. bankOfDepositData: [],
  293. tableDataCost: [],
  294. dic: [],
  295. tableData: [],
  296. customerContact: customerContact,
  297. advantageProject: advantageProject,
  298. bankOfDeposit: bankOfDeposit,
  299. basicData: {
  300. column: [
  301. {
  302. label: '系统编号',//发货通知(点击)
  303. prop: 'sysNo',
  304. rules: [
  305. {
  306. required: true,
  307. message: ' ',
  308. trigger: 'blur'
  309. }
  310. ]
  311. }, {
  312. label: '客户名名称',
  313. prop: 'corpId',
  314. rules: [
  315. {
  316. required: true,
  317. message: ' ',
  318. trigger: 'blur'
  319. }
  320. ]
  321. }, {
  322. label: '单据状态',
  323. prop: 'status',
  324. rules: [
  325. {
  326. required: true,
  327. message: ' ',
  328. trigger: 'blur'
  329. }
  330. ]
  331. }, {
  332. label: '所属公司',
  333. prop: 'salesCompany',
  334. rules: [
  335. {
  336. required: true,
  337. message: ' ',
  338. trigger: 'blur'
  339. }
  340. ]
  341. }, {
  342. label: '匹配订单号',
  343. prop: 'srcOrderNo',
  344. rules: [
  345. {
  346. required: true,
  347. message: ' ',
  348. trigger: 'blur'
  349. }
  350. ]
  351. }, {
  352. label: '仓库名称',
  353. prop: 'storageId',
  354. rules: [
  355. {
  356. required: true,
  357. message: ' ',
  358. trigger: 'blur'
  359. }
  360. ]
  361. }, {
  362. label: '仓库类型',
  363. prop: 'warehouseType',//字典表
  364. rules: [
  365. {
  366. required: true,
  367. message: ' ',
  368. trigger: 'blur'
  369. }
  370. ]
  371. }, {
  372. label: '出库金额',
  373. prop: 'deliveryAmount',
  374. rules: [
  375. {
  376. required: true,
  377. message: ' ',
  378. trigger: 'blur'
  379. }
  380. ]
  381. }, {
  382. label: '出库数量',
  383. prop: 'totalQuantity',
  384. rules: [
  385. {
  386. required: true,
  387. message: ' ',
  388. trigger: 'blur'
  389. }
  390. ]
  391. }, {
  392. label: '出库日期',
  393. prop: 'businessDate',
  394. type: 'datetime',
  395. rules: [
  396. {
  397. required: true,
  398. message: ' ',
  399. trigger: 'blur'
  400. }
  401. ]
  402. }, {
  403. label: '制单时间',
  404. type: 'datetime',
  405. prop: 'createTime',
  406. rules: [
  407. {
  408. required: false,
  409. message: ' ',
  410. trigger: 'blur'
  411. }
  412. ]
  413. }, {
  414. label: '费用合计',
  415. prop: 'totalCost',
  416. rules: [
  417. {
  418. required: true,
  419. message: ' ',
  420. trigger: 'blur'
  421. }
  422. ]
  423. }, {
  424. label: "备注",
  425. span: 24,
  426. prop: "otherRemarks",
  427. mock: {
  428. type: 'county'
  429. }
  430. }
  431. ]
  432. }
  433. }
  434. },
  435. //初始化查询
  436. created() {
  437. if (this.$route.query.id) {
  438. let id = this.$route.query.id.replace(/\"/g, "")
  439. detail(id).then(res => {
  440. console.log(res.data.data)
  441. this.form = res.data.data;
  442. this.contactsData = this.form.deliveryItemsList
  443. this.advantageProjectData = this.form.deliveryFeesList
  444. this.bankOfDepositData = this.form.deliveryFilesList
  445. delete this.form.deliveryItemsList
  446. delete this.form.deliveryFeesList
  447. delete this.form.deliveryFilesList
  448. });
  449. }
  450. },
  451. watch: {
  452. '$route'(to, from) {
  453. console.log(to, from);
  454. if (this.$route.query.id) {
  455. let id = JSON.parse(this.$route.query.id).replace(/\"/g, "")
  456. detail(id).then(res => {
  457. console.log(res.data.data)
  458. this.form = res.data.data;
  459. });
  460. } else {
  461. this.form = {}
  462. }
  463. }
  464. },
  465. methods: {
  466. //点击行可编辑
  467. handleRowClick(row, event, column) {
  468. console.log(row.$index)
  469. },
  470. //商品编辑
  471. rowCell(row, index) {
  472. console.log(row)
  473. this.$refs.crudContact.rowCell(row, index)
  474. },
  475. //费用编辑
  476. rowCellTwo(row, index) {
  477. console.log(row)
  478. this.$refs.crudProject.rowCell(row, index)
  479. },
  480. //费用新增触发
  481. costIncrease() {
  482. this.dialogCost = !this.dialogCost
  483. this.choiceData = false
  484. },
  485. //商品新增触发
  486. commoditySelection() {
  487. this.dialogVisible = !this.dialogVisible
  488. this.commodityData = false
  489. },
  490. //点击费用明细选择触发
  491. choice(row) {
  492. this.dialogCost = !this.dialogCost
  493. this.choiceData = true
  494. console.log(row)
  495. this.choiceIndex = row.$index
  496. },
  497. //点击商品明细选择触发
  498. commodityChoice(row) {
  499. this.dialogVisible = !this.dialogVisible
  500. this.commodityData = true
  501. console.log(row)
  502. this.choiceIndexT = row.$index
  503. },
  504. //导入商品触发
  505. importChoice() {
  506. if (this.tableData.length === 1) {
  507. this.contactsData[this.choiceIndexT].cname = this.tableData[0].cname
  508. this.contactsData[this.choiceIndexT].code = this.tableData[0].code
  509. this.contactsData[this.choiceIndexT].typeno = this.tableData[0].typeno
  510. this.contactsData[this.choiceIndexT].specificationAndModel = this.tableData[0].specificationAndModel
  511. this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
  512. }
  513. this.dialogVisible = !this.dialogVisible
  514. this.commodityData = false
  515. },
  516. //费用编辑导入触发
  517. choiceCost() {
  518. console.log('1111')
  519. if (this.tableDataCost.length === 1) {
  520. this.advantageProjectData[this.choiceIndex].feeName = this.tableDataCost[0].cname
  521. this.advantageProjectData[this.choiceIndex].itemId = this.tableDataCost[0].id
  522. this.advantageProjectData[this.choiceIndex].code = this.tableDataCost[0].code
  523. }
  524. this.dialogCost = !this.dialogCost
  525. this.choiceData = false
  526. },
  527. //费用导入触发
  528. importCost() {
  529. console.log('111111')
  530. // this.advantageProjectForm = this.advantageProjectForm.concat(this.tableDataCost)
  531. if (this.tableDataCost.length > 0) {
  532. for (let item in this.tableDataCost) {
  533. console.log(this.tableDataCost[item])
  534. this.tableDataCost[item].itemId = this.tableDataCost[item].id
  535. this.tableDataCost[item].feeName = this.tableDataCost[item].cname
  536. delete this.tableDataCost[item].id
  537. this.$refs.crudProject.rowCellAdd(this.tableDataCost[item]);
  538. this.$refs.crudProject.rowCell(this.tableDataCost[item], this.advantageProjectForm.length - 1)
  539. }
  540. }
  541. this.tableDataCost = []
  542. this.dialogCost = false
  543. },
  544. //确认导入触发
  545. importGoods() {
  546. // this.contactsData = this.contactsData.concat(this.tableData)
  547. if (this.tableData.length > 0) {
  548. for (let item in this.tableData) {
  549. console.log(this.tableData[item])
  550. this.tableData[item].itemId = this.tableData[item].id
  551. delete this.tableData[item].id
  552. delete this.tableData[item].status
  553. delete this.tableData[item].isDeleted
  554. this.$refs.crudContact.rowCellAdd(this.tableData[item]);
  555. this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
  556. }
  557. }
  558. this.tableData = []
  559. this.dialogVisible = false
  560. },
  561. //选中触发
  562. selectionChange(list) {
  563. console.log(list);
  564. this.tableData = list
  565. },
  566. //费用选中触发
  567. selectionChangeCost(list) {
  568. console.log(list);
  569. this.tableDataCost = list
  570. },
  571. //导入页左商品类型查询
  572. nodeClick(data) {
  573. this.treeDeptId = data.id;
  574. this.page.currentPage = 1;
  575. this.onLoad(this.page);
  576. },
  577. //导入页左费用类型查询
  578. nodeClickCost(data) {
  579. this.treeDeptIdCost = data.id;
  580. this.pageCost.currentPage = 1;
  581. this.onLoadCost(this.pageCost);
  582. },
  583. //刷新触发
  584. refreshChange() {
  585. this.treeDeptId = '';
  586. this.page.currentPage = 1;
  587. this.onLoad(this.page);
  588. },
  589. //费用刷新触发
  590. refreshChangeCost() {
  591. this.treeDeptIdCost = '';
  592. this.pageCost.currentPage = 1;
  593. this.onLoadCost(this.pageCost);
  594. },
  595. //新增商品信息保存触发
  596. rowSave(row, done, loading) {
  597. console.log(row)
  598. console.log(this.contactsData)
  599. // this.contactsData.push(row)
  600. done()
  601. },
  602. //修改商品信息触发
  603. rowUpdate(row, index, done, loading) {
  604. done(row);
  605. },
  606. //删除商品信息触发
  607. rowDel(row, index, donerowDel) {
  608. this.$confirm("确定将选择数据删除?", {
  609. confirmButtonText: "确定",
  610. cancelButtonText: "取消",
  611. type: "warning"
  612. }).then(() => {
  613. //商品判断是否需要调用删除接口
  614. if (row.id) {
  615. corpsattn(row.id).then(res => {
  616. this.$message({
  617. type: "success",
  618. message: "操作成功!"
  619. });
  620. this.contactsData.splice(index, 1);
  621. })
  622. } else {
  623. this.$message({
  624. type: "success",
  625. message: "操作成功!"
  626. });
  627. this.contactsData.splice(index, 1);
  628. }
  629. })
  630. },
  631. //新增费用明细保存触发
  632. rowSaveProject(row, done, loading) {
  633. // this.advantageProjectData.push(row)
  634. done()
  635. },
  636. //修改费用明细触发
  637. rowUpdateProject(row, index, done, loading) {
  638. done(row);
  639. },
  640. //商品列表查询
  641. onLoad(page, params = {}) {
  642. this.loading = true;
  643. getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
  644. console.log(res)
  645. const data = res.data.data;
  646. this.page.total = data.total;
  647. this.data = data.records;
  648. this.loading = false;
  649. });
  650. },
  651. //费用查询
  652. onLoadCost(page, params = {}) {
  653. this.loadingCost = true;
  654. let queryParams = Object.assign({}, params, {
  655. pageSize: page.pageSize,
  656. pageNum: page.currentPage,
  657. parentId: 0,
  658. feesTypeId: this.treeDeptIdCost
  659. })
  660. customerList(queryParams).then(res => {
  661. console.log(res)
  662. const data = res.data.data;
  663. this.pageCost.total = data.total;
  664. this.dataCost = data.records;
  665. this.loadingCost = false;
  666. });
  667. },
  668. //删除费用明细触发
  669. rowDelProject(row, index, donerowDel) {
  670. this.$confirm("确定将选择数据删除?", {
  671. confirmButtonText: "确定",
  672. cancelButtonText: "取消",
  673. type: "warning"
  674. }).then(() => {
  675. //费用判断是否需要调用删除接口
  676. if (row.id) {
  677. corpsitem(row.id).then(res => {
  678. this.$message({
  679. type: "success",
  680. message: "操作成功!"
  681. });
  682. this.advantageProjectData.splice(index, 1);
  683. })
  684. } else {
  685. this.$message({
  686. type: "success",
  687. message: "操作成功!"
  688. });
  689. this.advantageProjectData.splice(index, 1);
  690. }
  691. })
  692. },
  693. //新增附件上传保存触发
  694. rowSaveBankOfDeposit(row, done, loading) {
  695. this.bankOfDepositData.push(row)
  696. done()
  697. },
  698. //修改附件上传触发
  699. rowUpdateBankOfDeposit(row, index, done, loading) {
  700. done(row);
  701. },
  702. //删除附件上传触发
  703. rowDelBankOfDeposit(row, index, donerowDel) {
  704. this.$confirm("确定将选择数据删除?", {
  705. confirmButtonText: "确定",
  706. cancelButtonText: "取消",
  707. type: "warning"
  708. }).then(() => {
  709. //附件判断是否需要调用删除接口
  710. if (row.id) {
  711. corpsbank(row.id).then(res => {
  712. this.$message({
  713. type: "success",
  714. message: "操作成功!"
  715. });
  716. this.bankOfDepositData.splice(index, 1);
  717. })
  718. } else {
  719. this.$message({
  720. type: "success",
  721. message: "操作成功!"
  722. });
  723. this.bankOfDepositData.splice(index, 1);
  724. }
  725. })
  726. },
  727. //修改提交触发
  728. editCustomer() {
  729. console.log(this.form)
  730. this.$refs["form"].validate((valid) => {
  731. if (valid) {
  732. //商品信息
  733. this.form.deliveryItemsList = this.contactsData
  734. this.form.deliveryFeesList = this.advantageProjectData
  735. this.form.deliveryFilesList = this.bankOfDepositData
  736. if (typeof this.form.corpsTypeId == 'object') {
  737. this.form.corpsTypeId = this.form.corpsTypeId.join(",")
  738. }
  739. this.disabled = true
  740. this.form.billType = 'FH'
  741. typeSave(this.form).then(res => {
  742. this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
  743. //成功关闭此页面回到列表页
  744. this.backToList()
  745. })
  746. } else {
  747. return false;
  748. }
  749. });
  750. },
  751. //返回列表
  752. backToList() {
  753. this.$router.$avueRouter.closeTag();
  754. this.$router.push({
  755. path: '/businessManagement/deliveryNotice/index',
  756. query: {}
  757. });
  758. }
  759. }
  760. }
  761. </script>
  762. <style lang="scss" scoped>
  763. .customer-head {
  764. position: fixed;
  765. top: 105px;
  766. width: 100%;
  767. margin-left: -10px;
  768. height: 62px;
  769. background: #ffffff;
  770. box-shadow: 0 4px 12px 0px rgba(232, 232, 235, 1);
  771. z-index: 999;
  772. /* display: flex;
  773. justify-content: left; */
  774. }
  775. .customer-back {
  776. cursor: pointer;
  777. line-height: 62px;
  778. font-size: 16px;
  779. color: #323233;
  780. font-weight: 400;
  781. }
  782. .back-icon {
  783. line-height: 64px;
  784. font-size: 20px;
  785. margin-right: 8px;
  786. }
  787. .add-customer-btn {
  788. position: fixed;
  789. right: 36px;
  790. top: 115px;
  791. }
  792. ::v-deep .el-form-item {
  793. margin-bottom: 0;
  794. }
  795. .el-dialogDeep {
  796. ::v-deep .el-dialog {
  797. margin: 1vh auto 0 !important;
  798. padding-bottom: 10px !important;
  799. .el-dialog__body, .el-dialog__footer {
  800. padding-bottom: 0 !important;
  801. padding-top: 0 !important;
  802. }
  803. }
  804. }
  805. .print-div {
  806. color: #000;
  807. }
  808. .print_table {
  809. table {
  810. border-right: 1px solid #000;
  811. border-bottom: 1px solid #000;
  812. font-size: 12px;
  813. margin-bottom: 5px;
  814. }
  815. table td {
  816. border-left: 1px solid #000;
  817. border-top: 1px solid #000;
  818. vertical-align: middle;
  819. padding: 2px;
  820. text-align: center;
  821. }
  822. }
  823. .table {
  824. border-collapse: collapse;
  825. border-spacing: 0;
  826. background-color: transparent;
  827. display: table;
  828. width: 99%;
  829. max-width: 100%;
  830. margin: 0 auto;
  831. }
  832. .table td {
  833. text-align: left;
  834. vertical-align: middle;
  835. font-size: 14px;
  836. color: #000000;
  837. padding: 10.5px 0 10.5px 30px;
  838. //border: 1px solid #000;
  839. }
  840. </style>