detailsPage.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748
  1. <template>
  2. <div>
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
  6. @click="backToList(0)">返回列表
  7. </el-button>
  8. </div>
  9. <div class="add-customer-btn">
  10. <el-button class="el-button&#45;&#45;small-yh" type="primary" size="small" v-if="editButton"
  11. @click="confirmEditing">编辑
  12. </el-button>
  13. <el-button class="el-button--small-yh" type="primary" size="small" :disabled="isSave" @click="editCustomer">保存数据
  14. </el-button>
  15. <el-button class="el-button--small-yh" type="warning" size="small" v-if="form.statusName == '已出库'" @click="revoke"
  16. :disabled="isSave">撤销出库
  17. </el-button>
  18. <el-button class="el-button--small-yh" type="success" size="small" style="margin-left: 6px;"
  19. v-if="form.statusName == '待出库' || form.statusName == '撤销出库'" @click="complete" :disabled="isSave">出库完成
  20. </el-button>
  21. </div>
  22. </div>
  23. <div style="margin-top: 50px">
  24. <trade-card title="基础信息">
  25. <avue-form :option="optionForm" v-model="form" ref="form"></avue-form>
  26. </trade-card>
  27. <trade-card title="明细信息">
  28. <el-tabs v-model="activeName" type="card">
  29. <el-tab-pane label="出库明细" name="sale_detail">
  30. <avue-crud :option="optionContacts" v-model="formContacts" ref="formContacts" :data="form.shipItemsList"
  31. :key="key" @row-save="rowSave" @row-update="rowUpdate"
  32. @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 270.1)"
  33. @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 270.1)">
  34. <template slot-scope="scope" slot="menuLeft">
  35. <el-button type="primary" icon="el-icon-printer" size="small" @click="handlePrint">打印</el-button>
  36. </template>
  37. <template slot-scope="{type,size,row,index,disabled}" slot="menu">
  38. <el-button :size="size" :disabled="disabled || isAddDisabled" :type="type"
  39. :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="rowEdit(row, index)">编辑
  40. </el-button>
  41. <el-button icon="el-icon-delete" :size="size" :disabled="disabled || isDisabled" :type="type"
  42. @click="rowDelBox(row, index)">删除
  43. </el-button>
  44. </template>
  45. </avue-crud>
  46. </el-tab-pane>
  47. <el-tab-pane label="订单信息" name="payment_details">
  48. <avue-crud :option="optionPaymentDetails" v-model="formContacts" ref="payment_details" :data="form.shipVOList"
  49. :key="key" @row-save="rowSave" @row-update="rowUpdate"
  50. @resetColumn="resetColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 270.2)"
  51. @saveColumn="saveColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 270.2)">
  52. </avue-crud>
  53. </el-tab-pane>
  54. <el-tab-pane label="历史记录" name="outbound_records">
  55. <avue-crud :option="optionOutboundRecords" v-model="formContacts" ref="outbound_records"
  56. :data="form.historyList" :key="key" @row-save="rowSave" @row-update="rowUpdate"
  57. @resetColumn="resetColumnTwo('outbound_records', 'optionOutboundRecords', 'optionOutboundRecordsBack', 270.3)"
  58. @saveColumn="saveColumnTwo('outbound_records', 'optionOutboundRecords', 'optionOutboundRecordsBack', 270.3)">
  59. </avue-crud>
  60. </el-tab-pane>
  61. </el-tabs>
  62. </trade-card>
  63. <containerTitle title="上传附件"></containerTitle>
  64. <c-upload v-loading="loadingBtn" typeUpload="LT" :disabled="isAddDisabled"
  65. deleteUrl="/api/trade-purchase/woodHarvestingCloud/removeByFileId" :data="filesList" display
  66. :enumerationValue="35.1"></c-upload>
  67. <report-dialog :switchDialog="switchDialog" :reportId="form.id" @onClose="onClose()"></report-dialog>
  68. </div>
  69. </div>
  70. </template>
  71. <script>
  72. import { getDetails, tradingBox, submit, warehousingComplete, revokeOutboundCompleted } from "@/api/tirePartsMall/salesManagement/outboundWorkOrder";
  73. import { dateFormat } from "@/util/date";
  74. import reportDialog from "@/components/report-dialog/main";
  75. import { dotList } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
  76. export default {
  77. name: "detailsPage",
  78. data() {
  79. return {
  80. // 上传附件的需要参数
  81. loadingBtn:false,
  82. filesList:[],
  83. switchDialog: false,
  84. activeName: "sale_detail",
  85. editButton: true,
  86. isSave: true,
  87. disabled: false,
  88. isDisabled: false,
  89. isAddDisabled: false,
  90. form: {
  91. shipItemsList: [],
  92. shipVOList: [],
  93. historyList: []
  94. },
  95. key: 0,
  96. optionForm: {
  97. disabled: false,
  98. menuBtn: false,
  99. span: 8,
  100. column: [{
  101. label: '业务对象',
  102. disabled: false,
  103. prop: "customerId",
  104. type: 'select',
  105. props: {
  106. label: 'cname',
  107. value: 'id'
  108. },
  109. dicUrl: '/api/blade-sales-part/corpsDesc/listAll?corpType=KH&enableOrNot=1',
  110. rules: [{
  111. required: true,
  112. message: " ",
  113. trigger: "blur"
  114. }]
  115. }, {
  116. label: '仓库',
  117. prop: "storageId",
  118. disabled: false,
  119. type: 'select',
  120. props: {
  121. label: 'cname',
  122. value: 'id'
  123. },
  124. dicUrl: '/api/blade-sales-part/storageDesc/listAll',
  125. rules: [{
  126. required: true,
  127. message: " ",
  128. trigger: "blur"
  129. }]
  130. }, {
  131. label: '库管',
  132. prop: "stockClerkId",
  133. type: 'select',
  134. disabled: false,
  135. props: {
  136. label: 'realName',
  137. value: 'id'
  138. },
  139. dicUrl: '/api/blade-user/stockClerkList',
  140. rules: [{
  141. required: true,
  142. message: " ",
  143. trigger: "blur"
  144. }]
  145. },
  146. {
  147. label: '业务日期',
  148. prop: "businesDate",
  149. searchProp: "businesDateList",
  150. disabled: false,
  151. type: "datetime",
  152. value: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
  153. format: "yyyy-MM-dd HH:mm",
  154. valueFormat: "yyyy-MM-dd HH:mm:ss",
  155. rules: [
  156. {
  157. required: true,
  158. message: "",
  159. trigger: "blur"
  160. }
  161. ]
  162. },
  163. {
  164. label: '入库单号',
  165. disabled: false,
  166. prop: "billno",
  167. rules: [
  168. {
  169. required: true,
  170. message: " ",
  171. trigger: "blur"
  172. }
  173. ],
  174. },
  175. {
  176. label: '来源单号',
  177. prop: "ordNo",
  178. disabled: true
  179. },
  180. {
  181. label: '配送方式',
  182. prop: "shipType",
  183. type: 'select',
  184. disabled: false,
  185. props: {
  186. label: 'dictValue',
  187. value: 'dictKey'
  188. },
  189. dicUrl: '/api/blade-system/dict-biz/dictionary?code=deliveryMethod'
  190. },
  191. {
  192. label: '货运公司',
  193. prop: "logisticsCorpName",
  194. type: 'select',
  195. disabled: false,
  196. props: {
  197. label: 'dictValue',
  198. value: 'dictKey'
  199. },
  200. dicUrl: '/api/blade-system/dict-biz/dictionary?code=tyre_express_company'
  201. },
  202. {
  203. label: '货运单号',
  204. prop: "expressNo",
  205. disabled: false
  206. },
  207. {
  208. label: '订单数量',
  209. prop: "goodsTotalNum",
  210. disabled: true,
  211. rules: [
  212. {
  213. required: true,
  214. message: " ",
  215. trigger: "blur"
  216. }
  217. ]
  218. },
  219. {
  220. label: '出库数量',
  221. prop: "sendTotalNum",
  222. disabled: true,
  223. },
  224. {
  225. label: '备注',
  226. prop: "remarks",
  227. type: 'textarea',
  228. disabled: false,
  229. span: 16,
  230. minRows: 1
  231. }]
  232. },
  233. formContacts: {},
  234. optionContacts: {},
  235. optionContactsBack: {
  236. align: 'center',
  237. index: true,
  238. addBtnText: "录入明细",
  239. updateBtnText: '保存',
  240. refreshBtn: false,
  241. dialogDrag: true,
  242. addBtn: true,
  243. span: 8,
  244. height: 300,
  245. addRowBtn: false,
  246. editBtn: false,
  247. delBtn: false,
  248. menuWidth: 140,
  249. dialogTop: 25,
  250. dialogWidth: "80%",
  251. showSummary: true,
  252. sumColumnList: [
  253. {
  254. name: 'goodsNum',
  255. type: 'sum',
  256. }, {
  257. name: 'sendNum',
  258. type: 'sum',
  259. }],
  260. column: [{
  261. label: '轮胎名称',
  262. prop: 'goodsId',
  263. disabled: true,
  264. width: 200,
  265. overHidden: true,
  266. hide:true,
  267. type: 'select',
  268. props: {
  269. label: 'cname',
  270. value: 'id'
  271. },
  272. dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll'
  273. },{
  274. label: '轮胎名称',
  275. prop: 'goodsName',
  276. disabled: true,
  277. width: 200,
  278. overHidden: true,
  279. }, {
  280. label: '轮胎编码',
  281. disabled: true,
  282. prop: 'goodsNo',
  283. width: 100
  284. }, {
  285. label: '品牌',
  286. prop: 'brandId',
  287. disabled: true,
  288. width: 100,
  289. overHidden: true,
  290. type: 'select',
  291. props: {
  292. label: 'cname',
  293. value: 'id'
  294. },
  295. dicUrl: '/api/blade-sales-part/brandDesc/listAll?type=PP&enableOrNot=1'
  296. }, {
  297. label: '规格型号',
  298. prop: 'propertyName',
  299. disabled: true,
  300. width: 100
  301. }, {
  302. label: '花纹',
  303. prop: 'pattern',
  304. disabled: true,
  305. width: 100
  306. }, {
  307. label: '轮胎描述',
  308. prop: 'goodsDescription',
  309. disabled: true,
  310. }, {
  311. label: '批次号',
  312. prop: 'dot',
  313. type: 'select',
  314. disabled: true,
  315. dicData: [],
  316. props: {
  317. label: "dot",
  318. value: "dot"
  319. },
  320. dicUrl: "/api/blade-sales-part/stockDesc/dotList",
  321. }, {
  322. label: '单位',
  323. prop: 'units',
  324. type: "select",
  325. disabled: true,
  326. props: {
  327. label: "dictValue",
  328. value: "dictValue"
  329. },
  330. dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit"
  331. }, {
  332. label: '出库数量',
  333. prop: 'goodsNum',
  334. disabled: false,
  335. disabled: true,
  336. }, {
  337. label: '实际数量',
  338. prop: 'sendNum',
  339. disabled: false,
  340. }, {
  341. label: '备注',
  342. prop: 'remarks'
  343. }]
  344. },
  345. optionPaymentDetails: {},
  346. optionPaymentDetailsBack: {
  347. align: 'center',
  348. index: true,
  349. addBtnText: "录入明细",
  350. refreshBtn: false,
  351. dialogDrag: true,
  352. addBtn: false,
  353. span: 8,
  354. height: 600,
  355. addRowBtn: false,
  356. editBtn: false,
  357. delBtn: false,
  358. menuWidth: 140,
  359. dialogTop: 25,
  360. dialogWidth: "80%",
  361. menu: false,
  362. column: [{
  363. label: '出库单号',
  364. prop: 'billno',
  365. overHidden: true,
  366. }, {
  367. label: '来源单号',
  368. prop: 'ordNo',
  369. overHidden: true,
  370. }, {
  371. label: '业务来源',
  372. prop: 'bsType',
  373. overHidden: true,
  374. }, {
  375. label: '地址',
  376. prop: 'recAddress',
  377. overHidden: true,
  378. }, {
  379. label: '联系人',
  380. prop: 'contacts',
  381. overHidden: true,
  382. }, {
  383. label: '电话',
  384. prop: 'phone',
  385. overHidden: true,
  386. }, {
  387. label: '备注',
  388. prop: 'remarks',
  389. overHidden: true,
  390. }]
  391. },
  392. optionOutboundRecords: {},
  393. optionOutboundRecordsBack: {
  394. align: 'center',
  395. index: true,
  396. addBtnText: "录入明细",
  397. refreshBtn: false,
  398. dialogDrag: true,
  399. addBtn: false,
  400. span: 8,
  401. height: 600,
  402. addRowBtn: false,
  403. editBtn: false,
  404. delBtn: false,
  405. menuWidth: 140,
  406. dialogTop: 25,
  407. dialogWidth: "80%",
  408. menu: false,
  409. column: [{
  410. label: '操作人',
  411. prop: 'operatorName',
  412. overHidden: true,
  413. }, {
  414. label: '状态',
  415. prop: 'operateStatus',
  416. overHidden: true,
  417. }, {
  418. label: '时间',
  419. prop: 'operateTime',
  420. overHidden: true,
  421. }]
  422. }
  423. }
  424. },
  425. components: {
  426. reportDialog
  427. },
  428. props: {
  429. onLoad: Object,
  430. detailData: Object
  431. },
  432. async created() {
  433. this.optionContacts = await this.getColumnData(this.getColumnName(270.1), this.optionContactsBack);
  434. this.optionPaymentDetails = await this.getColumnData(this.getColumnName(270.2), this.optionPaymentDetailsBack);
  435. this.optionOutboundRecords = await this.getColumnData(this.getColumnName(270.3), this.optionOutboundRecordsBack);
  436. this.key++
  437. if (this.onLoad.id && this.detailData.id) {
  438. console.log(1);
  439. this.refresh(this.onLoad.id, true)
  440. this.$set(this.optionForm, 'disabled', true)
  441. } else if (this.onLoad.id) {
  442. console.log(2);
  443. this.refresh(this.onLoad.id, true)
  444. }
  445. if (this.detailData.id) {
  446. this.refresh()
  447. }
  448. this.$store.commit("DOMIO_IN_DETAIL");
  449. },
  450. activated(){
  451. if (this.detailData.id) {
  452. this.refresh()
  453. }
  454. this.$store.commit("DOMIO_IN_DETAIL");
  455. },
  456. methods: {
  457. // 撤销出库
  458. revoke() {
  459. this.$refs["form"].validate((valid, done) => {
  460. done();
  461. if (valid) {
  462. const loading = this.$loading({
  463. lock: true,
  464. text: '加载中',
  465. spinner: 'el-icon-loading',
  466. background: 'rgba(255,255,255,0.7)'
  467. });
  468. revokeOutboundCompleted({
  469. ...this.form,
  470. bizTypeName: "FHGD"
  471. }).then(res => {
  472. this.$message.success("撤销成功");
  473. this.refresh(res.data.data.id)
  474. loading.close();
  475. }).finally(() => {
  476. loading.close();
  477. });
  478. }
  479. })
  480. },
  481. rowEdit(row, index) {
  482. if (this.form.statusName == '待出库') {
  483. this.optionContactsBack.column.forEach(its => {
  484. if (its.prop == 'dot') {
  485. this.$set(its, 'disabled', false)
  486. }
  487. })
  488. }
  489. console.log('this.formContacts.goodsId', this.formContacts.goodsId);
  490. dotList({
  491. storageId: this.form.storageId,
  492. goodsId: row.goodsId
  493. }).then(res => {
  494. this.findObject(this.optionContactsBack.column, "dot").dicData = res.data.data
  495. })
  496. this.$refs.formContacts.rowEdit(row, index)
  497. },
  498. complete() {
  499. console.log(this.form.id);
  500. this.$refs["form"].validate((valid, done) => {
  501. done();
  502. if (valid) {
  503. const loading = this.$loading({
  504. lock: true,
  505. text: '加载中',
  506. spinner: 'el-icon-loading',
  507. background: 'rgba(255,255,255,0.7)'
  508. });
  509. this.form.shipItemsList.forEach(item => {
  510. item.goodsName = item.$goodsId
  511. })
  512. submit({
  513. ...this.form,
  514. bizTypeName: "FHGD"
  515. }).then(res => {
  516. warehousingComplete({
  517. ...this.form,
  518. bizTypeName: "FHGD"
  519. }).then(res => {
  520. this.$message.success("出库完成");
  521. this.refresh(res.data.data.id)
  522. loading.close();
  523. }).finally(() => {
  524. loading.close();
  525. });
  526. })
  527. } else {
  528. this.$message.error('请选择库管')
  529. }
  530. })
  531. },
  532. //修改提交触发
  533. editCustomer() {
  534. this.$refs["form"].validate((valid, done) => {
  535. done();
  536. if (valid) {
  537. const loading = this.$loading({
  538. lock: true,
  539. text: '加载中',
  540. spinner: 'el-icon-loading',
  541. background: 'rgba(255,255,255,0.7)'
  542. });
  543. console.log(this.form)
  544. this.form.shipItemsList.forEach(item => {
  545. item.goodsName = item.$goodsId
  546. })
  547. // this.goodsName;
  548. submit({
  549. ...this.form,
  550. bizTypeName: "FHGD",
  551. filesList:this.filesList
  552. }).then(res => {
  553. this.$message.success("保存成功");
  554. this.refresh(res.data.data.id)
  555. loading.close();
  556. }).finally(() => {
  557. loading.close();
  558. });
  559. } else {
  560. return false;
  561. }
  562. });
  563. },
  564. refresh(id, type) {
  565. this.$set(this.optionContactsBack, 'addBtn', false)
  566. this.$set(this.optionContacts, 'addBtn', false)
  567. this.isDisabled = true
  568. const loading = this.$loading({
  569. lock: true,
  570. text: '加载中',
  571. spinner: 'el-icon-loading',
  572. background: 'rgba(255,255,255,0.7)'
  573. })
  574. if (!this.detailData.id) {
  575. getDetails({ id: id }).then(res => {
  576. if (res.data.data.statusName == '已出库') {
  577. this.$set(this.optionForm, 'disabled', true)
  578. this.isAddDisabled = true
  579. this.optionContacts.column.forEach(item => {
  580. if (item.prop == 'sendNum') {
  581. item.disabled = true
  582. }
  583. })
  584. }
  585. this.isAddDisabled = true
  586. if (res.data.data.statusName == '待出库') {
  587. this.isAddDisabled = true
  588. this.isDisabled = true
  589. }
  590. this.form = res.data.data
  591. this.filesList = res.data.data.filesList
  592. this.$nextTick(() => {
  593. this.$refs.formContacts.refreshTable()
  594. })
  595. loading.close();
  596. }).catch(() => {
  597. loading.close();
  598. })
  599. } else {
  600. getDetails({ id: this.detailData.id }).then(res => {
  601. if (res.data.data.statusName == '已出库') {
  602. this.$set(this.optionForm, 'disabled', true)
  603. this.isAddDisabled = true
  604. this.optionContacts.column.forEach(item => {
  605. if (item.prop == 'sendNum') {
  606. item.disabled = true
  607. }
  608. })
  609. }
  610. this.isAddDisabled = true
  611. if (res.data.data.statusName == '待出库') {
  612. this.isAddDisabled = true
  613. this.isDisabled = true
  614. }
  615. this.form = res.data.data
  616. this.filesList = res.data.data.filesList
  617. this.$nextTick(() => {
  618. this.$refs.formContacts.refreshTable()
  619. })
  620. loading.close();
  621. }).catch(() => {
  622. loading.close();
  623. })
  624. }
  625. },
  626. rowDelBox(row, index) {
  627. this.$confirm("确定将选择数据删除?", {
  628. confirmButtonText: "确定",
  629. cancelButtonText: "取消",
  630. type: "warning"
  631. }).then(() => {
  632. if (row.id) {
  633. tradingBox(row.id).then(res => {
  634. this.form.shipItemsList.splice(index, 1);
  635. this.$message.success("操作成功!");
  636. });
  637. } else {
  638. this.form.shipItemsList.splice(index, 1);
  639. this.$message.success("操作成功!");
  640. }
  641. }
  642. )
  643. ;
  644. },
  645. rowSave(form, done, loading) {
  646. done(form)
  647. },
  648. rowUpdate(form, index, done, loading) {
  649. done(form)
  650. },
  651. //打印
  652. handlePrint() {
  653. this.switchDialog = !this.switchDialog;
  654. },
  655. onClose(val) {
  656. this.switchDialog = val;
  657. },
  658. //编辑
  659. confirmEditing() {
  660. if (this.form.statusName == '待出库' || this.form.statusName == '待入库' || this.form.statusName == '撤销出库') {
  661. this.isDisabled = false
  662. this.isSave = false
  663. this.$set(this.optionForm, 'disabled', false)
  664. this.optionForm.column.forEach(item => {
  665. if (item.prop == 'storageId'
  666. || item.prop == 'remarks'
  667. || item.prop == 'createTime'
  668. || item.prop == 'stockClerkId'
  669. || item.prop == 'shipType'
  670. || item.prop == 'logisticsCorpName'
  671. || item.prop == 'expressNo') {
  672. item.disabled = false
  673. } else {
  674. item.disabled = true
  675. }
  676. })
  677. this.isAddDisabled = false
  678. this.optionContactsBack.column.forEach(its => {
  679. if (its.prop == 'dot') {
  680. this.$set(its, 'disabled', false)
  681. }
  682. })
  683. } else {
  684. this.$set(this.optionForm, 'disabled', false)
  685. this.isAddDisabled = true
  686. this.isSave = false
  687. // this.optionForm.column.forEach(item => {
  688. // if (item.prop == 'remarks') {
  689. // item.disabled = false
  690. // } else {
  691. // item.disabled = true
  692. // }
  693. // })
  694. this.optionForm.column.forEach(item => {
  695. item.disabled = true
  696. })
  697. // this.isAddDisabled = false
  698. }
  699. },
  700. //自定义列保存
  701. async saveColumnTwo(ref, option, optionBack, code) {
  702. /**
  703. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  704. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  705. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  706. */
  707. const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
  708. if (inSave) {
  709. this.$message.success("保存成功");
  710. //关闭窗口
  711. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  712. }
  713. },
  714. //自定义列重置
  715. async resetColumnTwo(ref, option, optionBack, code) {
  716. this[option] = this[optionBack];
  717. const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
  718. if (inSave) {
  719. this.$message.success("重置成功");
  720. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  721. }
  722. },
  723. backToList(type) {
  724. this.$emit("backToList", type);
  725. // this.$store.commit("DOMIO_OUT_DETAIL");
  726. }
  727. }
  728. }
  729. </script>
  730. <style lang="scss" scoped>
  731. ::v-deep .el-form-item {
  732. margin-bottom: 8px !important;
  733. }
  734. </style>