detailsPage.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847
  1. <template>
  2. <div>
  3. <div class="borderless">
  4. <div class="customer-head">
  5. <div class="customer-back">
  6. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
  7. @click="backToList">
  8. 返回列表
  9. </el-button>
  10. </div>
  11. <div class="add-customer-btn">
  12. <el-button v-if="form.enableOrNot == 0" size="small" @click="disabled(1)">
  13. 启用
  14. </el-button>
  15. <el-button v-if="form.enableOrNot == 1" size="small" @click="disabled(0)">
  16. 禁用
  17. </el-button>
  18. <el-button type="primary" size="small" @click="editCustomer">
  19. 保存数据
  20. </el-button>
  21. </div>
  22. </div>
  23. <trade-card title="基础资料" style="margin-top: 60px">
  24. <avue-form ref="form" class="trading-form" v-model="form" :option="option" :key="key">
  25. <template slot="goodsTypeId" slot-scope="{disabled}">
  26. <div style="display:flex;">
  27. <avue-cascader :disabled="disabled" :emit-path="false" check-strictly :show-all-levels="false"
  28. v-model="form.goodsTypeId" placeholder="请选择产品分类" :dic="goodsTypeList"
  29. :props="props"></avue-cascader>
  30. <i class="el-icon-circle-plus-outline" style="font-size:18px;line-height: 32px;margin-left:4px"
  31. @click="goodsTypeVisible = true"></i>
  32. </div>
  33. </template>
  34. <template slot="unit" slot-scope="{disabled}">
  35. <div style="display:flex;">
  36. <avue-select :disabled="disabled" v-model="form.unit" filterable placeholder="请选择单位"
  37. :dic="unitList" :props="props2"></avue-select>
  38. <i class="el-icon-circle-plus-outline" style="font-size:18px;line-height: 32px;margin-left:4px"
  39. @click="$refs.dictbiz.open()"></i>
  40. </div>
  41. </template>
  42. <template slot="whether" slot-scope="{disabled}">
  43. <!--<el-switch v-model="form.whether" active-text="是" inactive-text="否" active-value="1" inactive-value="0" @change="whetherChange"/>-->
  44. <el-switch v-model="form.whether" :disabled="disabled || isWhether" active-text="是"
  45. inactive-text="否" active-value="1" inactive-value="0" />
  46. </template>
  47. <template slot="explosionProof" slot-scope="{disabled}">
  48. <!--<el-switch v-model="form.explosionProof" :disabled="disabled" active-text="是" inactive-text="否"-->
  49. <!-- active-value="1" inactive-value="0" />-->
  50. <!--<el-radio v-model="form.explosionProof"></el-radio>-->
  51. <el-checkbox v-model="form.explosionProof" :checked="form.explosionProof == 1" :true-label="1" :false-label="0"></el-checkbox>
  52. </template>
  53. <template slot="originalFactory" slot-scope="{disabled}">
  54. <!--<el-switch v-model="form.originalFactory" :disabled="disabled" active-text="是" inactive-text="否"-->
  55. <!-- active-value="1" inactive-value="0" />-->
  56. <el-checkbox v-model="form.originalFactory" :checked="form.originalFactory == 1" :true-label="1" :false-label="0"></el-checkbox>
  57. </template>
  58. <template slot="selfRecovery" slot-scope="{disabled}">
  59. <!--<el-switch v-model="form.selfRecovery" :disabled="disabled" active-text="是" inactive-text="否"-->
  60. <!-- active-value="1" inactive-value="0" />-->
  61. <el-checkbox v-model="form.selfRecovery" :checked="form.selfRecovery == 1" :true-label="1" :false-label="0"></el-checkbox>
  62. </template>
  63. </avue-form>
  64. </trade-card>
  65. <containerTitle title="附件信息"></containerTitle>
  66. <c-upload :data="filesList" display deleteUrl="/api/blade-sales-part/goodsfiles/remove"
  67. :enumerationValue="160.1" />
  68. <el-dialog title="设置产品分类" v-dialogDrag :visible.sync="goodsTypeVisible" class="avue-dialog" width="80%"
  69. append-to-body @closed="goodsTypeClosed">
  70. <span>
  71. <!-- <avue-form :key="reload" ref="goodsType" v-model="form2" :option="option2" style="margin-top:20px"></avue-form> -->
  72. <!--<goods-type></goods-type>-->
  73. <corp-type></corp-type>
  74. </span>
  75. <div class="avue-dialog__footer">
  76. <el-button @click="goodsTypeVisible = false" size="mini">取 消</el-button>
  77. <el-button @click="saveGoodstype" type="primary" size="mini">确 定</el-button>
  78. </div>
  79. </el-dialog>
  80. <!--<el-dialog title="添加仓库" v-dialogDrag :visible.sync="storageVisible" class="avue-dialog avue-dialog&#45;&#45;top" width="30%" append-to-body @closed="storageClosed">-->
  81. <!-- <span>-->
  82. <!-- <avue-form :key="reload2" ref="storage" v-model="form3" :option="option3" style="margin-top:20px"></avue-form>-->
  83. <!-- </span>-->
  84. <!-- <div class="avue-dialog__footer">-->
  85. <!-- <el-button @click="storageVisible = false" size="mini">取 消</el-button>-->
  86. <!-- <el-button @click="savestorage" type="primary" size="mini">确 定</el-button>-->
  87. <!-- </div>-->
  88. <!--</el-dialog>-->
  89. <dictbiz-dialog ref="dictbiz" title="添加单位" code="unit" parentId="1585962784498225154"
  90. @closed="getAllWorkDicts"></dictbiz-dialog>
  91. </div>
  92. </div>
  93. </template>
  94. <script>
  95. import {
  96. getGoodstype,
  97. // getDetails,
  98. goodsTypesubmit,
  99. getStoragetype,
  100. // submit,
  101. itemRemove,
  102. // disabled,
  103. getStoragelist,
  104. storagesubmit
  105. } from "@/api/basicData/product";
  106. import {
  107. getDetails,
  108. getCorpType,
  109. submit,
  110. customerList,
  111. itemDel,
  112. disabled
  113. } from "@/api/tirePartsMall/basicData/commodityInformation"
  114. import { optionList } from "./js/optionList";
  115. import goodsType from '@/components/goodsType/index'
  116. import corpType from './components/index'
  117. export default {
  118. name: "index",
  119. data() {
  120. return {
  121. loadingBtn: false,
  122. goodsTypeVisible: false,
  123. storageVisible: false,
  124. isWhether: false,
  125. form: {},
  126. form2: {},
  127. form3: {},
  128. data: [],
  129. key: 0,
  130. option: {
  131. menuBtn: false,
  132. labelWidth: 100,
  133. disabled: false,
  134. column: [
  135. {
  136. label: "名称",
  137. prop: "cname",
  138. span: 16,
  139. rules: [{
  140. required: true,
  141. message: " ",
  142. trigger: "blur"
  143. }]
  144. },
  145. {
  146. label: "产品分类",
  147. prop: "goodsTypeId",
  148. type: 'select',
  149. dicData: [],
  150. props: {
  151. label: 'detailedAddress',
  152. value: 'detailedAddress'
  153. },
  154. filterable: true,
  155. span: 8,
  156. rules: [{
  157. required: true,
  158. message: " ",
  159. trigger: "blur"
  160. }]
  161. },
  162. {
  163. label: "单位",
  164. prop: "unit",
  165. type: "select",
  166. props: {
  167. label: "dictValue",
  168. value: "dictValue"
  169. },
  170. dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
  171. span: 8,
  172. rules: [{
  173. required: true,
  174. message: " ",
  175. trigger: "blur"
  176. }]
  177. },
  178. {
  179. label: "品牌",
  180. prop: "brandId",
  181. span: 8,
  182. type: 'select',
  183. props: {
  184. label: 'cname',
  185. value: 'id',
  186. disabled: 'disabled'
  187. },
  188. dicUrl: '/api/blade-sales-part/brandDesc/listAllV1?type=PP&enableOrNot=1',
  189. rules: [{
  190. required: true,
  191. message: " ",
  192. trigger: "blur"
  193. }]
  194. },
  195. {
  196. label: "轮胎编码",
  197. prop: "code",
  198. span: 8,
  199. rules: [{
  200. required: true,
  201. message: " ",
  202. trigger: "blur"
  203. }]
  204. },
  205. {
  206. label: "规格型号",
  207. prop: "specificationAndModel",
  208. span: 8,
  209. rules: [{
  210. required: true,
  211. message: " ",
  212. trigger: "blur"
  213. }]
  214. },
  215. {
  216. label: "花纹",
  217. prop: "brandItem",
  218. span: 8,
  219. rules: [{
  220. required: true,
  221. message: " ",
  222. trigger: "blur"
  223. }]
  224. },
  225. {
  226. label: "产地",
  227. prop: "placeProduction",
  228. span: 8,
  229. },
  230. {
  231. label: "供应商",
  232. prop: "corpId",
  233. span: 8,
  234. type: 'select',
  235. props: {
  236. label: 'cname',
  237. value: 'id'
  238. },
  239. dicUrl: '/api/blade-sales-part/corpsDesc/listAll?corpType=GYS'
  240. },
  241. {
  242. label: "所属公司",
  243. prop: "salesCompanyId",
  244. span: 8,
  245. type: 'select',
  246. props: {
  247. label: 'fullName',
  248. value: 'id'
  249. },
  250. display:false,
  251. rules: [{
  252. required: true,
  253. message: " ",
  254. trigger: "blur"
  255. }],
  256. dicUrl: '/api/blade-system/dept/top-list'
  257. },
  258. {
  259. label: "快捷品名查询",
  260. prop: "cnameInt",
  261. span: 8,
  262. },
  263. {
  264. label: "轮胎描述",
  265. prop: "goodsDescription",
  266. span: 8,
  267. },
  268. // {
  269. // label: "采购价",
  270. // prop: "purchasePrice",
  271. // type: 'number',
  272. // minRows: 0,
  273. // controls: false,
  274. // span: 8,
  275. // rules: [{
  276. // required: true,
  277. // message: " ",
  278. // trigger: "blur"
  279. // }]
  280. // },
  281. // {
  282. // label: "销售价",
  283. // prop: "salesPrice",
  284. // type: 'number',
  285. // minRows: 0,
  286. // controls: false,
  287. // span: 8,
  288. // rules: [{
  289. // required: true,
  290. // message: " ",
  291. // trigger: "blur"
  292. // }]
  293. // },
  294. // {
  295. // label: "售价1",
  296. // prop: "priceOne",
  297. // type: 'number',
  298. // minRows: 0,
  299. // controls: false,
  300. // span: 8,
  301. // rules: [{
  302. // required: true,
  303. // message: " ",
  304. // trigger: "blur"
  305. // }]
  306. // },
  307. // {
  308. // label: "售价2",
  309. // prop: "priceTwo",
  310. // type: 'number',
  311. // minRows: 0,
  312. // controls: false,
  313. // span: 8,
  314. // rules: [{
  315. // required: true,
  316. // message: " ",
  317. // trigger: "blur"
  318. // }]
  319. // },
  320. // {
  321. // label: "售价3",
  322. // prop: "priceThree",
  323. // type: 'number',
  324. // minRows: 0,
  325. // controls: false,
  326. // span: 8,
  327. // rules: [{
  328. // required: true,
  329. // message: " ",
  330. // trigger: "blur"
  331. // }]
  332. // },
  333. // {
  334. // label: "售价4",
  335. // prop: "priceFour",
  336. // type: 'number',
  337. // minRows: 0,
  338. // controls: false,
  339. // span: 8,
  340. // rules: [{
  341. // required: true,
  342. // message: " ",
  343. // trigger: "blur"
  344. // }]
  345. // },
  346. // {
  347. // label: "售价5",
  348. // prop: "priceFive",
  349. // type: 'number',
  350. // minRows: 0,
  351. // controls: false,
  352. // span: 8,
  353. // rules: [{
  354. // required: true,
  355. // message: " ",
  356. // trigger: "blur"
  357. // }]
  358. // },
  359. // {
  360. // label: "售价6",
  361. // prop: "priceSix",
  362. // type: 'number',
  363. // minRows: 0,
  364. // controls: false,
  365. // span: 8,
  366. // rules: [{
  367. // required: true,
  368. // message: " ",
  369. // trigger: "blur"
  370. // }]
  371. // },
  372. // {
  373. // label: "售价7",
  374. // prop: "priceSeven",
  375. // type: 'number',
  376. // minRows: 0,
  377. // controls: false,
  378. // span: 8,
  379. // rules: [{
  380. // required: true,
  381. // message: " ",
  382. // trigger: "blur"
  383. // }]
  384. // },
  385. // {
  386. // label: "售价8",
  387. // prop: "priceEight",
  388. // type: 'number',
  389. // minRows: 0,
  390. // controls: false,
  391. // span: 8,
  392. // rules: [{
  393. // required: true,
  394. // message: " ",
  395. // trigger: "blur"
  396. // }]
  397. // },
  398. {
  399. label: "配套标记",
  400. prop: "matchedMarkings",
  401. span: 8
  402. },
  403. {
  404. label: "库存预警",
  405. prop: "inventoryAlert",
  406. span: 8
  407. },
  408. {
  409. label: "防爆",
  410. prop: "explosionProof",
  411. span: 2,
  412. type: 'select',
  413. dicData: [{
  414. label: '否',
  415. value: 0
  416. }, {
  417. label: '是',
  418. value: 1
  419. }],
  420. },
  421. {
  422. label: "静音棉",
  423. prop: "originalFactory",
  424. span: 2,
  425. type: 'select',
  426. dicData: [{
  427. label: '否',
  428. value: 0
  429. }, {
  430. label: '是',
  431. value: 1
  432. }],
  433. },
  434. {
  435. label: "自修补",
  436. prop: "selfRecovery",
  437. span: 2,
  438. type: 'select',
  439. dicData: [{
  440. label: '否',
  441. value: 0
  442. }, {
  443. label: '是',
  444. value: 1
  445. }],
  446. },{
  447. label: "是否管理批次号",
  448. prop: "whether",
  449. labelWidth: 120,
  450. span: 8,
  451. rules: [{
  452. required: true,
  453. message: " ",
  454. trigger: "blur"
  455. }]
  456. },
  457. {
  458. label: "备注",
  459. prop: "remarks",
  460. type: "textarea",
  461. minRows: 3,
  462. span: 24,
  463. }
  464. ]
  465. },
  466. option2: {
  467. menuBtn: false,
  468. labelWidth: 80,
  469. column: [
  470. {
  471. label: "分类名称",
  472. prop: "cname",
  473. rules: [
  474. {
  475. required: true,
  476. message: "",
  477. trigger: "blur"
  478. }
  479. ],
  480. span: 24,
  481. },
  482. {
  483. label: "上级类型",
  484. prop: "parentId",
  485. dicData: [],
  486. type: "tree",
  487. props: {
  488. label: "title",
  489. value: "id"
  490. },
  491. span: 24,
  492. }
  493. ]
  494. },
  495. option3: {
  496. menuBtn: false,
  497. labelWidth: 80,
  498. column: [
  499. {
  500. label: "仓库名称",
  501. prop: "cname",
  502. rules: [
  503. {
  504. required: true,
  505. message: "",
  506. trigger: "blur"
  507. }
  508. ],
  509. span: 24,
  510. },
  511. {
  512. label: "仓库编码",
  513. prop: "code",
  514. rules: [
  515. {
  516. required: true,
  517. message: "",
  518. trigger: "blur"
  519. }
  520. ],
  521. span: 24,
  522. },
  523. {
  524. label: "上级类型",
  525. prop: "parentId",
  526. dicData: [],
  527. type: "tree",
  528. props: {
  529. label: 'cname',
  530. value: 'id'
  531. },
  532. span: 24,
  533. }
  534. ]
  535. },
  536. filesList: [],
  537. props: {
  538. label: 'title',
  539. value: 'value'
  540. },
  541. props2: {
  542. label: 'dictValue',
  543. value: 'dictValue'
  544. },
  545. goodsTypeList: [],
  546. unitList: [],
  547. optionList: {}
  548. };
  549. },
  550. components: {
  551. goodsType,
  552. corpType
  553. },
  554. props: {
  555. detailData: {
  556. type: Object
  557. }
  558. },
  559. async created() {
  560. this.optionList = await this.getColumnData(
  561. this.getColumnName(218),
  562. optionList
  563. );
  564. if (await this.detailData.goodsTypeId) {
  565. this.form.goodsTypeId = this.detailData.goodsTypeId;
  566. }
  567. if (this.detailData.id) {
  568. this.getDetail(this.detailData.id);
  569. }
  570. if (this.detailData.status == 1) {
  571. this.option.disabled = true;
  572. }
  573. this.getAllWorkDicts()
  574. },
  575. methods: {
  576. getAllWorkDicts() {
  577. // getGoodstype().then(res => {
  578. // this.goodsTypeList = res.data.data;
  579. // this.findObject(this.option2.column, "parentId").dicData = res.data.data;
  580. // });
  581. getCorpType({ corpType: "SP" }).then(res => {
  582. console.log(res);
  583. this.goodsTypeList = res.data.data;
  584. })
  585. customerList({ corpType: "SP" }).then(res => {
  586. console.log('kk', res);
  587. // this.goodsTypeList = res.data.data.records;
  588. this.findObject(this.option2.column, "parentId").dicData = res.data.data.records;
  589. });
  590. // getStoragelist().then(res => {
  591. // this.findObject(this.optionList.column, "storageId").dicData = res.data;
  592. // this.findObject(this.option3.column, "parentId").dicData = res.data;
  593. // });
  594. this.getWorkDicts("unit").then(res => {
  595. this.unitList = res.data.data;
  596. });
  597. },
  598. cellStyle() {
  599. return "padding:0;height:40px;";
  600. },
  601. addRow() {
  602. this.data.push({ $cellEdit: true })
  603. },
  604. rowCell(row, index) {
  605. this.$refs.crud.rowCell(row, index)
  606. },
  607. rowSave(form, done) {
  608. done()
  609. },
  610. rowUpdate(form, index, done) {
  611. done()
  612. },
  613. rowDel(row, index) {
  614. this.$confirm("确定删除数据?", {
  615. confirmButtonText: "确定",
  616. cancelButtonText: "取消",
  617. type: "warning"
  618. }).then(() => {
  619. if (row.id) {
  620. itemRemove({ ids: row.id }).then(res => {
  621. this.$message({
  622. type: "success",
  623. message: "删除成功!"
  624. });
  625. this.data.splice(index, 1);
  626. });
  627. } else {
  628. this.$message({
  629. type: "success",
  630. message: "删除成功!"
  631. });
  632. this.data.splice(index, 1);
  633. }
  634. });
  635. },
  636. disabled(val) {
  637. disabled({ id: this.form.id, enableOrNot: val }).then(res => {
  638. this.$message({
  639. type: "success",
  640. message: val ? '启用成功' : '禁用成功'
  641. });
  642. this.getDetail(this.detailData.id);
  643. if (val == 0) {
  644. console.log('禁用中');
  645. this.option.disabled = false;
  646. for (let item of this.option.column) {
  647. this.$set(item, 'disabled', false)
  648. }
  649. }
  650. })
  651. },
  652. saveGoodstype() {
  653. this.$refs["goodsType"].validate((valid, done) => {
  654. done();
  655. if (valid) {
  656. goodsTypesubmit({ ...this.form2, status: 0 }).then(res => {
  657. this.getAllWorkDicts()
  658. })
  659. this.goodsTypeVisible = false
  660. } else {
  661. return false;
  662. }
  663. });
  664. },
  665. savestorage() {
  666. // this.$refs["storage"].validate((valid, done) => {
  667. // done();
  668. // if (valid) {
  669. // storagesubmit({ ...this.form3, status: 0 }).then(res => {
  670. // this.getAllWorkDicts()
  671. // })
  672. // this.storageVisible = false
  673. // } else {
  674. // return false;
  675. // }
  676. // });
  677. this.getAllWorkDicts()
  678. this.goodsTypeVisible = false
  679. },
  680. goodsTypeClosed() {
  681. // this.reload = Math.random();
  682. // this.form2 = this.$options.data().form2
  683. },
  684. storageClosed() {
  685. this.reload2 = Math.random();
  686. this.form3 = this.$options.data().form3
  687. },
  688. getDetail(id) {
  689. this.loadingBtn = true
  690. getDetails({ id: id }).then(res => {
  691. this.form = res.data.data;
  692. this.form.explosionProof += ''
  693. // this.data = res.data.data.stockGoodsList;
  694. this.filesList = res.data.data.goodsFilesList
  695. // 把详情得到的主图附图状态从数值型转化成字符串型
  696. for(let item of this.filesList) {
  697. item.mainImage = item.mainImage + ''
  698. }
  699. this.whetherChange(res.data.data.whether)
  700. //如果modifiable为0则不能修改
  701. if (this.form.modifiable == 0) {
  702. console.log(this.form.modifiable, '0');
  703. for (let item of this.option.column) {
  704. this.$set(item, 'disabled', true)
  705. }
  706. this.isWhether = true
  707. } else if (this.form.modifiable == 1) {
  708. console.log(this.form.modifiable, '1');
  709. for (let item of this.option.column) {
  710. item.disabled = false
  711. }
  712. this.isWhether = false
  713. }
  714. if (this.form.enableOrNot == 1) {
  715. for (let item of this.option.column) {
  716. this.$set(item, 'disabled', false)
  717. }
  718. }
  719. this.key++
  720. }).finally(() => {
  721. this.loadingBtn = false;
  722. });
  723. },
  724. whetherChange(val) {
  725. if (val == 0 || val == null) {
  726. this.findObject(this.optionList.column, "lotNo").hide = true
  727. this.findObject(this.optionList.column, "lotNo").showColumn = false
  728. } else {
  729. this.findObject(this.optionList.column, "lotNo").hide = false
  730. this.findObject(this.optionList.column, "lotNo").showColumn = true
  731. }
  732. },
  733. //修改提交触发
  734. editCustomer() {
  735. this.$refs["form"].validate((valid, done) => {
  736. done();
  737. if (valid) {
  738. this.loadingBtn = true;
  739. submit({
  740. ...this.form,
  741. type: 0,
  742. // stockGoodsList: this.data,
  743. goodsFilesList: this.filesList
  744. }).then(res => {
  745. this.$message.success("保存成功");
  746. this.form = res.data.data;
  747. // this.data = res.data.data.stockGoodsList;
  748. this.filesList = res.data.data.goodsFilesList;
  749. this.getDetail(res.data.data.id);
  750. // setTimeout(() => {
  751. // this.backToList()
  752. // }, 1000);
  753. }).finally(() => {
  754. this.loadingBtn = false;
  755. });
  756. } else {
  757. return false;
  758. }
  759. });
  760. },
  761. async saveColumn() {
  762. const inSave = await this.saveColumnData(
  763. this.getColumnName(218),
  764. this.optionList
  765. );
  766. if (inSave) {
  767. this.$nextTick(() => {
  768. this.$refs.crud.doLayout();
  769. });
  770. this.$message.success("保存成功");
  771. //关闭窗口
  772. this.$refs.crud.$refs.dialogColumn.columnBox = false;
  773. }
  774. },
  775. async resetColumn() {
  776. this.optionList = optionList;
  777. const inSave = await this.delColumnData(
  778. this.getColumnName(218),
  779. optionList
  780. );
  781. if (inSave) {
  782. this.$nextTick(() => {
  783. this.$refs.crud.doLayout();
  784. });
  785. this.getAllWorkDicts()
  786. this.$message.success("重置成功");
  787. this.$refs.crud.$refs.dialogColumn.columnBox = false;
  788. }
  789. },
  790. //返回列表
  791. backToList() {
  792. this.$emit("goBack");
  793. }
  794. },
  795. };
  796. </script>
  797. <style lang="scss" scoped>
  798. .trading-form ::v-deep .el-form-item {
  799. margin-bottom: 8px !important;
  800. }
  801. ::v-deep .el-dialog__body {
  802. padding: 0px 20px 15px 20px;
  803. }
  804. ::v-deep .el-form-item__error {
  805. display: none !important;
  806. }
  807. .img-form ::v-deep .el-form-item {
  808. height: 150px;
  809. line-height: 150px;
  810. margin-bottom: 8px !important;
  811. }
  812. .img-form ::v-deep .avue-upload__icon {
  813. font-size: 20px;
  814. width: 150px;
  815. height: 150px;
  816. line-height: 150px;
  817. }
  818. ::v-deep .el-table .cell {
  819. padding: 0 2px !important;
  820. }
  821. ::v-deep .avue-crud .el-table .el-form-item__label {
  822. left: -1px;
  823. }
  824. .addressTabs {
  825. display: flex;
  826. justify-content: center;
  827. span {
  828. width: 100px;
  829. font-size: 18px;
  830. font-weight: 600;
  831. text-align: center;
  832. }
  833. }
  834. </style>