detailsPage.vue 24 KB

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