detailsPage.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706
  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. <el-button v-if="detailData.id" type="danger" style="border: none;background: none;color: red"
  9. icon="el-icon-arrow-left"
  10. @click="backToList(1)">返回审核列表
  11. </el-button>
  12. </div>
  13. <div class="add-customer-btn">
  14. <el-button class="el-button--small-yh" style="margin-right: 10px" type="primary" size="small"
  15. :disabled="form.status>0"
  16. @click="confirmEdit" v-if="optionForm.disabled === true">编辑
  17. </el-button>
  18. <el-dropdown style="margin-right: 10px">
  19. <el-button type="primary" size="small">
  20. 审核处理<i class="el-icon-arrow-down el-icon--right"></i>
  21. </el-button>
  22. <el-dropdown-menu slot="dropdown">
  23. <el-dropdown-item @click.native="pleaseCheck" :disabled="form.status>0">请核数据</el-dropdown-item>
  24. <el-dropdown-item @click.native="checkScheduleDialog = true,checkId = form.id">审核进度</el-dropdown-item>
  25. <el-dropdown-item @click.native="repealCancel" :disabled="form.status === 0 || !form.status"
  26. v-if="!detailData.id">撤销请核
  27. </el-dropdown-item>
  28. <!-- <el-dropdown-item @click.native="changeApproveOpen">特殊审批</el-dropdown-item>-->
  29. </el-dropdown-menu>
  30. </el-dropdown>
  31. <el-button class="el-button--small-yh" type="primary" size="small" :disabled="form.status>0"
  32. @click="editCustomer">保存数据
  33. </el-button>
  34. </div>
  35. </div>
  36. <trade-card title="基础资料" style="margin-top: 50px">
  37. <avue-form :option="optionForm" v-model="form" ref="form">
  38. <template slot="companyId" slot-scope="scope">
  39. <crop-select v-model="form.companyId" @getCorpData="(row)=>{getGSData(row,['form','company'])}"
  40. :disabled="scope.disabled"
  41. corpType="GS"/>
  42. </template>
  43. <template slot="addressId" slot-scope="scope">
  44. <port-info :disabled="scope.disabled" v-model="form.addressId" type="id"
  45. @balabalaTow="(val)=>{balabala(val,['form','address'])}"/>
  46. </template>
  47. <template slot="shippingCompany" slot-scope="scope">
  48. <crop-select v-model="form.shippingCompanyId"
  49. @getCorpData="(row)=>{getGSData(row,['form','shippingCompany'])}" :disabled="scope.disabled"
  50. corpType="GS"/>
  51. </template>
  52. <template slot="departureHarbor" slot-scope="scope">
  53. <port-info :disabled="scope.disabled" v-model="form.departureHarborId" type="id"
  54. @balabalaTow="(val)=>{balabala(val,['form','departureHarbor'])}"/>
  55. </template>
  56. <template slot="objectiveHarbor" slot-scope="scope">
  57. <port-info :disabled="scope.disabled" v-model="form.objectiveHarborId" type="id"
  58. @balabalaTow="(val)=>{balabala(val,['form','objectiveHarbor'])}"/>
  59. </template>
  60. </avue-form>
  61. </trade-card>
  62. <trade-card title="箱信息">
  63. <avue-crud
  64. :option="option"
  65. :data="dataList"
  66. v-model="formTwo"
  67. ref="crud"
  68. :key="key"
  69. :upload-delete="uploadDelete"
  70. @row-save="rowSave"
  71. @row-update="rowUpdate"
  72. @selection-change="selectionChange"
  73. @resetColumn="resetColumnTwo('crud','option','optionBack',243.1)"
  74. @saveColumn="saveColumnTwo('crud','option','optionBack',243.1)">
  75. <template slot-scope="{type,size,row,index,disabled}" slot="menu">
  76. <el-button icon="el-icon-edit" :size="size" :disabled="disabled" :type="type"
  77. @click="$refs.crud.rowEdit(row,index)">编辑
  78. </el-button>
  79. <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
  80. @click="rowDel(row,index,'MX')">删除
  81. </el-button>
  82. </template>
  83. <template slot="addressForm" slot-scope="scope">
  84. <port-info v-model="formTwo.addressId" type="id" :disabled="scope.disabled"
  85. @balabalaTow="(val)=>{balabala(val,['formTwo','address'])}"/>
  86. </template>
  87. <!-- <template slot="boxMakingCompanyIdForm" slot-scope="scope">-->
  88. <!-- <crop-select v-model="formTwo.boxMakingCompanyId" :disabled="scope.disabled" :refresh="false"-->
  89. <!-- @getCorpData="(row)=>{getGSData(row,['formTwo','boxMakingCompany'])}" corpType="GS"/>-->
  90. <!-- </template>-->
  91. </avue-crud>
  92. </trade-card>
  93. <!-- 费用信息组件-->
  94. <box-cost :listData="dataListTwo" :codeValue="243.2" :tabShow="3" activeName="second" ref="boxCost"
  95. url="/api/blade-box-tube/files/remove" @resetTrigger="resetTrigger"></box-cost>
  96. <trade-card title="附件明细">
  97. <c-upload
  98. basic
  99. :data="tradingBoxFilesList"
  100. :disabled="disabled"
  101. deleteUrl="/api/blade-box-tube/transportFiles/remove"
  102. :enumerationValue="243.3"
  103. display
  104. />
  105. </trade-card>
  106. <el-dialog
  107. append-to-body
  108. title="审批进度"
  109. class="el-dialogDeep"
  110. :visible.sync="checkScheduleDialog"
  111. width="40%"
  112. :close-on-click-modal="false"
  113. :destroy-on-close="true"
  114. :close-on-press-escape="false"
  115. v-dialog-drag
  116. >
  117. <check-schedule
  118. :checkId="checkId"
  119. :batchNo="batchNo"
  120. @choceScheduleFun="choceScheduleFun"
  121. ></check-schedule>
  122. </el-dialog>
  123. </div>
  124. </template>
  125. <script>
  126. import {
  127. detail,
  128. submit,
  129. tradingBoxItem,
  130. tradingBoxFees,
  131. pleaseCheck,
  132. repealCancel,
  133. tradingBoxFiles
  134. } from "@/api/boxManagement/exportShipment/index.js";
  135. import checkSchedule from "@/components/check/checkSchedule";
  136. import {selectByName} from "@/api/boxManagement";
  137. export default {
  138. name: "detailsPage",
  139. props: {
  140. onLoad: Object,
  141. detailData: Object
  142. },
  143. components: {checkSchedule},
  144. data() {
  145. return {
  146. key: 0,
  147. checkScheduleDialog: false,
  148. checkId: '',
  149. batchNo: '',
  150. breakConfiguration: {
  151. multipleChoices: false,
  152. multiple: false,
  153. disabled: false,
  154. searchShow: true,
  155. collapseTags: false,
  156. clearable: true,
  157. placeholder: "请点击右边按钮选择",
  158. dicData: []
  159. },
  160. form: {},
  161. formTwo: {},
  162. formSearch: {},
  163. optionForm: {
  164. menuBtn: false,
  165. span: 6,
  166. column: [{
  167. label: '系统号',
  168. prop: 'sysNo',
  169. disabled: true
  170. }, {
  171. label: '客户',
  172. prop: 'companyId',
  173. width: 100,
  174. search: true,
  175. overHidden: true,
  176. rules: [{
  177. required: true,
  178. message: " ",
  179. trigger: "blur"
  180. }]
  181. }, {
  182. label: '地点',
  183. prop: 'addressId'
  184. }, {
  185. label: '业务日期',
  186. prop: 'newDate',
  187. type: "date",
  188. searchRange: true,
  189. searchDefaultTime: ["00:00:00", "23:59:59"],
  190. format: "yyyy-MM-dd",
  191. valueFormat: "yyyy-MM-dd HH:mm:ss"
  192. }, {
  193. label: '备注',
  194. prop: 'remarks',
  195. type: 'textarea',
  196. minRows: 3,
  197. span: 24,
  198. }]
  199. },
  200. option: {},
  201. optionBack: {
  202. align: 'center',
  203. index: true,
  204. selection: false,
  205. addBtnText: "录入明细",
  206. refreshBtn: false,
  207. addBtn: true,
  208. span: 8,
  209. addRowBtn: false,
  210. cellBtn: false,
  211. editBtn: false,
  212. delBtn: false,
  213. menuWidth: 200,
  214. dialogTop: 25,
  215. dialogWidth: "80%",
  216. column: [{
  217. label: '箱号',
  218. prop: 'code',
  219. overHidden: true,
  220. remote: true,
  221. filterable: true,
  222. type: "select",
  223. dicUrl: "/api/blade-box-tube/archives/selectArchivesList?size=10&current=1&code={{key}}",
  224. props: {
  225. label: "code",
  226. value: "code"
  227. },
  228. rules: [{
  229. required: true,
  230. message: " ",
  231. trigger: "blur"
  232. }]
  233. }, {
  234. label: '位置',
  235. prop: 'position',
  236. overHidden: true,
  237. rules: [{
  238. required: true,
  239. message: " ",
  240. trigger: "blur"
  241. }]
  242. }, {
  243. label: '照片',
  244. prop: 'itemFilesList',
  245. overHidden: true,
  246. type: 'upload',
  247. span: 24,
  248. listType: 'picture-card',
  249. tip: '只能上传jpg/png文件,且不超过500kb',
  250. propsHttp: {
  251. url: 'link',
  252. name: 'originalName',
  253. res: 'data'
  254. },
  255. action: '/api/blade-resource/oss/endpoint/put-file'
  256. }, {
  257. label: '备注',
  258. prop: 'remarks',
  259. overHidden: true,
  260. type: 'textarea',
  261. minRows: 3,
  262. span: 24,
  263. width: 200
  264. }]
  265. },
  266. dataList: [],
  267. dataListTwo: [],
  268. tradingBoxFilesList: [],
  269. selectionList: [],
  270. disabled: false,
  271. costData: {}
  272. }
  273. },
  274. async created() {
  275. this.option = await this.getColumnData(this.getColumnName(243.1), this.optionBack);
  276. this.optionTrack = await this.getColumnData(this.getColumnName(243.4), this.optionTrackBack);
  277. this.option.selectable = (row, index) => {
  278. return row.id;
  279. }
  280. selectByName("租金").then(res => {
  281. this.costData = res.data.data
  282. })
  283. if (this.onLoad.id && this.detailData.id) {
  284. this.refresh(this.onLoad.id, true)
  285. } else if (this.onLoad.id) {
  286. this.refresh(this.onLoad.id, true)
  287. }
  288. this.key++
  289. },
  290. methods: {
  291. confirmEdit() {
  292. if (this.form.status > 0) {
  293. //基础资料
  294. this.$set(this.optionForm, "disabled", true)
  295. //箱信息
  296. this.$set(this.option, "disabled", true)
  297. this.$set(this.option, "addBtn", false)
  298. this.$set(this.option, "menu", false)
  299. //费用信息
  300. this.$set(this.$refs.boxCost.option, "disabled", true)
  301. this.$set(this.$refs.boxCost.option, "addBtn", false)
  302. this.$set(this.$refs.boxCost.option, "menu", false)
  303. //附件和顶部按钮
  304. this.disabled = true
  305. } else {
  306. //基础资料
  307. this.$set(this.optionForm, "disabled", false)
  308. //箱信息
  309. this.$set(this.option, "disabled", false)
  310. this.$set(this.option, "addBtn", true)
  311. this.$set(this.option, "menu", true)
  312. //费用信息
  313. this.$set(this.$refs.boxCost.option, "disabled", false)
  314. this.$set(this.$refs.boxCost.option, "addBtn", true)
  315. this.$set(this.$refs.boxCost.option, "menu", true)
  316. //附件和顶部按钮
  317. this.disabled = false
  318. }
  319. },
  320. selectionChange(list) {
  321. this.selectionList = list
  322. },
  323. track(row) {
  324. // this.dataTrackList = row
  325. this.formSearch = row
  326. this.boxTrack = true
  327. },
  328. // 明细删除
  329. rowDel(row, index, type) {
  330. this.$confirm("确定将选择数据删除?", {
  331. confirmButtonText: "确定",
  332. cancelButtonText: "取消",
  333. type: "warning"
  334. }).then(() => {
  335. if (row.id) {
  336. tradingBoxItem(row.id).then(res => {
  337. if (res.data.success) {
  338. this.$message.success("操作成功!");
  339. this.dataList.splice(index, 1);
  340. if (this.dataListTwo.length > 0) {
  341. for (let item in this.dataListTwo) {
  342. if (this.dataListTwo[item].code == row.code) {
  343. if (this.dataListTwo[item].autoGenerate == 1) {
  344. if (this.dataListTwo[item].id) {
  345. tradingBoxFees(this.dataListTwo[item].id).then(res => {
  346. if (res.data.success) {
  347. this.dataListTwo.splice(index, 1);
  348. }
  349. });
  350. } else {
  351. this.dataListTwo.splice(Number(item), 1);
  352. }
  353. }
  354. }
  355. }
  356. }
  357. }
  358. });
  359. } else {
  360. this.dataList.splice(index, 1);
  361. this.$message.success("操作成功!");
  362. if (this.dataListTwo.length > 0) {
  363. for (let item in this.dataListTwo) {
  364. if (this.dataListTwo[item].code === row.code) {
  365. if (this.dataListTwo[item].autoGenerate == 1) {
  366. this.dataListTwo.splice(Number(item), 1);
  367. }
  368. }
  369. }
  370. }
  371. }
  372. }
  373. )
  374. ;
  375. },
  376. balabala(val, type) {
  377. if (val === null) {
  378. this[type[0]][type[1]] = ''
  379. } else {
  380. this[type[0]][type[1]] = val.name
  381. }
  382. },
  383. //撤销
  384. repealCancel() {
  385. this.$confirm("您确定撤回此次申请吗?", {
  386. confirmButtonText: "确定",
  387. cancelButtonText: "取消",
  388. type: "warning"
  389. }).then(() => {
  390. const data = {
  391. id: this.form.id,
  392. pageLabel: "出库装运",
  393. checkFlag: 1,
  394. }
  395. const loading = this.$loading({
  396. lock: true,
  397. text: '加载中',
  398. spinner: 'el-icon-loading',
  399. background: 'rgba(255,255,255,0.7)'
  400. });
  401. repealCancel(data).then(res => {
  402. loading.close();
  403. this.$message.success('撤回成功')
  404. this.refresh(this.form.id)
  405. })
  406. })
  407. },
  408. // 请核
  409. pleaseCheck() {
  410. if (this.dataList.length === 0) {
  411. return this.$message.error("箱信息不能为空")
  412. }
  413. if (this.$refs.boxCost.dataList.length === 0) {
  414. return this.$message.error("费用信息不能为空")
  415. }else {
  416. for (let item of this.$refs.boxCost.dataList){
  417. if (!item.id){
  418. return this.$message.error("费用信息未保存")
  419. }
  420. }
  421. }
  422. this.$confirm("您确定提交请核申请吗?", {
  423. confirmButtonText: "确定",
  424. cancelButtonText: "取消",
  425. type: "warning"
  426. }).then(() => {
  427. this.$refs["form"].validate((valid, done) => {
  428. done()
  429. if (valid) {
  430. let data = {
  431. ...this.form,
  432. repairItemList: this.dataList,
  433. repairFeesList: this.dataListTwo,
  434. filesList: this.tradingBoxFilesList,
  435. billType: "WASH",
  436. checkFlag: 2
  437. }
  438. const loading = this.$loading({
  439. lock: true,
  440. text: '加载中',
  441. spinner: 'el-icon-loading',
  442. background: 'rgba(255,255,255,0.7)'
  443. });
  444. submit(data).then(res => {
  445. const data = {
  446. id: res.data.data.id,
  447. url: '/boxManagement/exportShipment/index',
  448. pageStatus: "this.$store.getters.domSaleStatus",
  449. pageLabel: "出口装运",
  450. checkFlag: 1,
  451. }
  452. pleaseCheck({
  453. ...data,
  454. billType: "WASH"
  455. }).then(rest => {
  456. loading.close();
  457. this.$message.success('请核成功')
  458. this.refresh(res.data.data.id)
  459. }).catch(() => {
  460. loading.close();
  461. })
  462. }).catch(() => {
  463. loading.close();
  464. })
  465. }
  466. });
  467. })
  468. },
  469. //审核关闭
  470. choceScheduleFun() {
  471. this.checkScheduleDialog = false
  472. },
  473. refresh(id, type) {
  474. const loading = this.$loading({
  475. lock: true,
  476. text: '加载中',
  477. spinner: 'el-icon-loading',
  478. background: 'rgba(255,255,255,0.7)'
  479. });
  480. detail({id: id}).then(res => {
  481. this.form = res.data.data
  482. this.dataList = res.data.data.repairItemList
  483. this.dataListTwo = res.data.data.repairFeesList
  484. this.tradingBoxFilesList = res.data.data.filesList
  485. delete this.form.repairItemList
  486. delete this.form.repairFeesList
  487. delete this.form.filesList
  488. loading.close();
  489. if (type) {
  490. //基础资料
  491. this.$set(this.optionForm, "disabled", true)
  492. //箱信息
  493. this.$set(this.option, "disabled", true)
  494. this.$set(this.option, "addBtn", false)
  495. this.$set(this.option, "menu", false)
  496. //费用信息
  497. this.$set(this.$refs.boxCost.option, "disabled", true)
  498. this.$set(this.$refs.boxCost.option, "addBtn", false)
  499. this.$set(this.$refs.boxCost.option, "menu", false)
  500. //附件和顶部按钮
  501. this.disabled = true
  502. } else {
  503. if (this.form.status > 0) {
  504. //基础资料
  505. this.$set(this.optionForm, "disabled", true)
  506. //箱信息
  507. this.$set(this.option, "disabled", true)
  508. this.$set(this.option, "addBtn", false)
  509. this.$set(this.option, "menu", false)
  510. //费用信息
  511. this.$set(this.$refs.boxCost.option, "disabled", true)
  512. this.$set(this.$refs.boxCost.option, "addBtn", false)
  513. this.$set(this.$refs.boxCost.option, "menu", false)
  514. //附件和顶部按钮
  515. this.disabled = true
  516. } else {
  517. //基础资料
  518. this.$set(this.optionForm, "disabled", false)
  519. //箱信息
  520. this.$set(this.option, "disabled", false)
  521. this.$set(this.option, "addBtn", true)
  522. this.$set(this.option, "menu", true)
  523. //费用信息
  524. this.$set(this.$refs.boxCost.option, "disabled", false)
  525. this.$set(this.$refs.boxCost.option, "addBtn", true)
  526. this.$set(this.$refs.boxCost.option, "menu", true)
  527. //附件和顶部按钮
  528. this.disabled = false
  529. }
  530. }
  531. })
  532. },
  533. //新增修改
  534. editCustomer() {
  535. this.$refs["form"].validate((valid, done) => {
  536. done()
  537. if (valid) {
  538. let data = {
  539. ...this.form,
  540. repairItemList: this.dataList,
  541. repairFeesList: this.dataListTwo,
  542. filesList: this.tradingBoxFilesList,
  543. billType: "WASH"
  544. }
  545. const loading = this.$loading({
  546. lock: true,
  547. text: '加载中',
  548. spinner: 'el-icon-loading',
  549. background: 'rgba(255,255,255,0.7)'
  550. });
  551. submit(data).then(res => {
  552. if (this.form.id) {
  553. this.$message.success("修改成功")
  554. } else {
  555. this.$message.success("新增成功")
  556. }
  557. loading.close();
  558. this.refresh(res.data.data.id)
  559. }).catch(() => {
  560. loading.close();
  561. })
  562. }
  563. });
  564. },
  565. //删除图片
  566. uploadDelete(file, column) {
  567. return new Promise((resolve, reject) => {
  568. this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
  569. confirmButtonText: '确定',
  570. cancelButtonText: '取消',
  571. type: 'warning'
  572. }).then(() => {
  573. if (this.formTwo.itemFilesList[file.uid].id) {
  574. tradingBoxFiles(this.formTwo.itemFilesList[file.uid].id).then(res => {
  575. this.$message({
  576. type: 'success',
  577. message: '删除成功!'
  578. });
  579. resolve();
  580. })
  581. } else {
  582. resolve()
  583. }
  584. }).catch(()=>{
  585. reject();
  586. this.$message({
  587. type: "info",
  588. message: "已取消删除"
  589. });
  590. })
  591. })
  592. },
  593. rowSave(form, done, loading) {
  594. let result = this.dataList.some((item) => {
  595. if (item.code == form.code) {
  596. return true
  597. }
  598. })
  599. if (result === true) {
  600. this.$message.error("已存在此箱号");
  601. return loading();
  602. }
  603. done(form)
  604. },
  605. rowUpdate(form, index, done, loading) {
  606. form.boxType = form.$boxTypeId
  607. done(form)
  608. },
  609. getGSData(row, type) {
  610. this[type[0]][type[1]] = row.cname
  611. },
  612. backToList(type) {
  613. if (type == 0) {
  614. if (this.detailData.id) {
  615. this.$router.push({
  616. path: '/boxManagement/exportShipment/index'
  617. });
  618. }
  619. this.$emit("backToList", type);
  620. } else if (type == 1) {
  621. this.$router.push({
  622. path: '/approveData/index'
  623. });
  624. this.$emit("backToList", type);
  625. }
  626. },
  627. //自定义列保存
  628. async saveColumnTwo(ref, option, optionBack, code) {
  629. /**
  630. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  631. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  632. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  633. */
  634. const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
  635. if (inSave) {
  636. this.$message.success("保存成功");
  637. //关闭窗口
  638. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  639. }
  640. },
  641. resetTrigger() {
  642. if (this.optionForm.disabled == true) {
  643. if (this.form.status > 0) {
  644. //基础资料
  645. this.$set(this.optionForm, "disabled", true)
  646. //箱信息
  647. this.$set(this.option, "disabled", true)
  648. this.$set(this.option, "addBtn", false)
  649. this.$set(this.option, "menu", false)
  650. //费用信息
  651. this.$set(this.$refs.boxCost.option, "disabled", true)
  652. this.$set(this.$refs.boxCost.option, "addBtn", false)
  653. this.$set(this.$refs.boxCost.option, "menu", false)
  654. //附件和顶部按钮
  655. this.disabled = true
  656. } else {
  657. //基础资料
  658. this.$set(this.optionForm, "disabled", false)
  659. //箱信息
  660. this.$set(this.option, "disabled", false)
  661. this.$set(this.option, "addBtn", true)
  662. this.$set(this.option, "menu", true)
  663. //费用信息
  664. this.$set(this.$refs.boxCost.option, "disabled", false)
  665. this.$set(this.$refs.boxCost.option, "addBtn", true)
  666. this.$set(this.$refs.boxCost.option, "menu", true)
  667. //附件和顶部按钮
  668. this.disabled = false
  669. }
  670. } else {
  671. //基础资料
  672. this.$set(this.optionForm, "disabled", false)
  673. //箱信息
  674. this.$set(this.option, "disabled", false)
  675. this.$set(this.option, "addBtn", true)
  676. this.$set(this.option, "menu", true)
  677. //费用信息
  678. this.$set(this.$refs.boxCost.option, "disabled", false)
  679. this.$set(this.$refs.boxCost.option, "addBtn", true)
  680. this.$set(this.$refs.boxCost.option, "menu", true)
  681. //附件和顶部按钮
  682. this.disabled = false
  683. }
  684. },
  685. //自定义列重置
  686. async resetColumnTwo(ref, option, optionBack, code) {
  687. this[option] = this[optionBack];
  688. const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
  689. if (inSave) {
  690. this.resetTrigger()
  691. this.$message.success("重置成功");
  692. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  693. }
  694. }
  695. }
  696. }
  697. </script>
  698. <style scoped>
  699. ::v-deep .el-form-item {
  700. margin-bottom: 8px;
  701. }
  702. </style>