detailsPage.vue 31 KB

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