detailsPage.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789
  1. <template>
  2. <div class="borderless" v-loading="pageLoading">
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <!-- <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
  6. <el-button
  7. type="danger"
  8. style="border: none;background: none;color: red"
  9. icon="el-icon-arrow-left"
  10. @click="backToList"
  11. >返回列表
  12. </el-button>
  13. </div>
  14. <div class="add-customer-btn" v-if="showBut">
  15. <el-button
  16. type="primary"
  17. :disabled="detailData.status == 1"
  18. v-if="detailData.status != 1"
  19. @click="editCustomer('submit')"
  20. size="small"
  21. >提交
  22. </el-button>
  23. <el-button
  24. type="primary"
  25. :disabled="detailData.status == 1"
  26. @click="editCustomer('save')"
  27. :loading="subLoading"
  28. v-if="detailData.status != 1"
  29. size="small"
  30. >{{ form.id ? "确认修改" : "确认新增" }}
  31. </el-button>
  32. </div>
  33. </div>
  34. <div class="customer-main">
  35. <containerTitle title="基础信息"></containerTitle>
  36. <basic-container>
  37. <avue-form ref="form" v-model="form" :option="option">
  38. <template slot="corpId">
  39. <select-component
  40. v-model="form.corpId"
  41. :configuration="configuration"
  42. :disabled="detailData.status == 1"
  43. ></select-component>
  44. </template>
  45. </avue-form>
  46. </basic-container>
  47. <containerTitle title="商品信息"></containerTitle>
  48. <basic-container>
  49. <avue-crud
  50. ref="crud"
  51. :data="data"
  52. :option="tableOption"
  53. @row-del="rowDel"
  54. @saveColumn="saveColumn"
  55. :summary-method="summaryMethod"
  56. >
  57. <template slot="cname" slot-scope="{ row, index }">
  58. <el-button
  59. size="small"
  60. type="text"
  61. @click="rePick(row, index)"
  62. :disabled="detailData.status == 1"
  63. class="picker"
  64. style="padding:4px 10px;float:left"
  65. >选择</el-button
  66. >
  67. <span> {{ row.cname }}</span>
  68. </template>
  69. <template slot="price" slot-scope="{ row }">
  70. <el-input
  71. v-if="row.$cellEdit"
  72. v-model="row.price"
  73. size="small"
  74. oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
  75. @change="priceChange(row)"
  76. ></el-input>
  77. <span v-else>{{ row.price }}</span>
  78. </template>
  79. <template slot="orderQuantity" slot-scope="{ row }">
  80. <el-input
  81. v-if="row.$cellEdit"
  82. v-model="row.orderQuantity"
  83. size="small"
  84. oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
  85. @change="quantityChange(row)"
  86. ></el-input>
  87. <span v-else>{{ row.orderQuantity }}</span>
  88. </template>
  89. <template slot="itemType" slot-scope="{ row }">
  90. <el-select
  91. v-if="row.$cellEdit"
  92. v-model="row.itemType"
  93. filterable
  94. allow-create
  95. default-first-option
  96. placeholder="请输入"
  97. @focus="itemTypeFocus(row)"
  98. >
  99. <el-option
  100. v-for="(item, index) in itemtypeList"
  101. :key="index"
  102. :label="item.value"
  103. :value="item.value"
  104. >
  105. </el-option>
  106. </el-select>
  107. <span v-else>{{ row.itemType }}</span>
  108. </template>
  109. <template slot="priorityReferrer" slot-scope="{ row }">
  110. <el-checkbox
  111. :disabled="!row.$cellEdit"
  112. v-model="row.priorityReferrer"
  113. :true-label="1"
  114. :false-label="0"
  115. />
  116. </template>
  117. <template slot="corpId" slot-scope="{ row, index }">
  118. <customer-dialog
  119. v-if="row.$cellEdit"
  120. v-model="row.corpName"
  121. :cropIndex="index"
  122. @getcorpId="getcorpId"
  123. ></customer-dialog>
  124. <span v-else>{{ row.corpName }}</span>
  125. </template>
  126. <template slot="purchaseAmount" slot-scope="{ row }">
  127. <el-input
  128. v-if="row.$cellEdit"
  129. v-model="row.purchaseAmount"
  130. size="small"
  131. oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
  132. ></el-input>
  133. <span v-else>{{ row.purchaseAmount | micrometerFormat }}</span>
  134. </template>
  135. <template slot="menuLeft">
  136. <el-button
  137. type="primary"
  138. icon="el-icon-plus"
  139. size="small"
  140. @click.stop="newDetails"
  141. :disabled="detailData.status == 1"
  142. >新增明细</el-button
  143. >
  144. <el-button
  145. type="info"
  146. icon="el-icon-printer"
  147. size="small"
  148. @click.stop="openReport()"
  149. :disabled="detailData.status == 1"
  150. >报 表</el-button
  151. >
  152. </template>
  153. <template slot="menu" slot-scope="{ row, index }">
  154. <el-button
  155. size="small"
  156. icon="el-icon-edit"
  157. type="text"
  158. @click="rowCell(row, index)"
  159. :disabled="detailData.status == 1"
  160. >{{ row.$cellEdit ? "保存" : "修改" }}</el-button
  161. >
  162. <el-button
  163. size="small"
  164. icon="el-icon-edit"
  165. type="text"
  166. @click="rowDel(row, index)"
  167. :disabled="detailData.status == 1"
  168. >删 除</el-button
  169. >
  170. </template>
  171. </avue-crud>
  172. </basic-container>
  173. </div>
  174. <el-dialog
  175. title="导入商品"
  176. append-to-body
  177. class="el-dialogDeep"
  178. :visible.sync="dialogVisible"
  179. width="60%"
  180. :close-on-click-modal="false"
  181. :destroy-on-close="true"
  182. :close-on-press-escape="false"
  183. @close="closeGoods"
  184. top="10vh"
  185. >
  186. <span>
  187. <el-row>
  188. <el-col :span="5">
  189. <div>
  190. <el-scrollbar>
  191. <basic-container style="margin-top:45px">
  192. <avue-tree :option="treeOption" @node-click="nodeClick" />
  193. </basic-container>
  194. </el-scrollbar>
  195. </div>
  196. </el-col>
  197. <el-col :span="19">
  198. <avue-crud
  199. :option="goodsOption"
  200. :table-loading="loading"
  201. :data="goodsList"
  202. ref="goodsCrud"
  203. @refresh-change="refreshChange"
  204. @selection-change="selectionChange"
  205. @row-click="rowClick"
  206. :page.sync="page"
  207. @on-load="onLoad"
  208. @saveColumn="saveGoodsColumn"
  209. ></avue-crud>
  210. </el-col>
  211. </el-row>
  212. </span>
  213. <span slot="footer" class="dialog-footer">
  214. <el-button @click="dialogVisible = false">取 消</el-button>
  215. <el-button
  216. type="primary"
  217. @click="importGoods"
  218. :disabled="selectionList.length == 0"
  219. >导入</el-button
  220. >
  221. </span>
  222. </el-dialog>
  223. <report-dialog
  224. :switchDialog="switchDialog"
  225. :reportId="form.id"
  226. reportName="客户询价"
  227. @onClose="onClose()"
  228. ></report-dialog>
  229. </div>
  230. </template>
  231. <script>
  232. import tableOption from "./config/customerContact.json";
  233. import goodsOption from "./config/commodity.json";
  234. import {
  235. detail,
  236. submit,
  237. delItem,
  238. getDeptLazyTree,
  239. getGoods,
  240. getSpecification,
  241. submitMessage
  242. } from "@/api/basicData/purchaseInquiry";
  243. import customerDialog from "@/components/customer-dialog/main";
  244. import reportDialog from "@/components/report-dialog/main";
  245. import { micrometerFormat } from "@/util/validate";
  246. import { contrastObj, contrastList } from "@/util/contrastData";
  247. import _ from "lodash";
  248. export default {
  249. name: "detailsPageEdit",
  250. data() {
  251. return {
  252. configuration: {
  253. multipleChoices: false,
  254. multiple: false,
  255. collapseTags: false,
  256. placeholder: "请点击右边按钮选择",
  257. dicData: []
  258. },
  259. switchDialog: false,
  260. form: {
  261. orderStatus: "录入"
  262. },
  263. disabled: false,
  264. dialogVisible: false,
  265. tableOption: {},
  266. option: {
  267. menuBtn: false,
  268. labelWidth: 100,
  269. disabled: false,
  270. column: [
  271. {
  272. label: "客户名称",
  273. prop: "corpId",
  274. rules: [
  275. {
  276. required: true,
  277. message: "",
  278. trigger: "blur"
  279. }
  280. ],
  281. span: 16,
  282. slot: true
  283. },
  284. {
  285. label: "系统号",
  286. prop: "sysNo",
  287. span: 8
  288. },
  289. {
  290. label: "订单状态",
  291. prop: "orderStatus",
  292. span: 8,
  293. type: "select",
  294. dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
  295. props: {
  296. label: "dictValue",
  297. value: "dictValue"
  298. }
  299. },
  300. {
  301. label: "询价日期",
  302. prop: "businesDate",
  303. span: 8,
  304. type: "date",
  305. format: "yyyy-MM-dd",
  306. valueFormat: "yyyy-MM-dd 00:00:00"
  307. },
  308. {
  309. label: "有效日期",
  310. prop: "dateValidity",
  311. span: 8,
  312. type: "date",
  313. format: "yyyy-MM-dd",
  314. valueFormat: "yyyy-MM-dd 00:00:00"
  315. },
  316. {
  317. label: "订单号",
  318. prop: "orderNo",
  319. span: 8
  320. },
  321. {
  322. label: "币别",
  323. prop: "currency",
  324. span: 8,
  325. type: "select",
  326. dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
  327. props: {
  328. label: "dictValue",
  329. value: "dictValue"
  330. },
  331. change: ({ value }) => {
  332. if (value == "CNY") {
  333. this.form.exchangeRate = 1;
  334. }
  335. if (value == "USD") {
  336. this.form.exchangeRate = 6.3843;
  337. }
  338. }
  339. },
  340. {
  341. label: "汇率",
  342. prop: "exchangeRate",
  343. span: 8,
  344. slot: true,
  345. row: true,
  346. disabled: true
  347. },
  348. {
  349. label: "备注",
  350. prop: "orderRemark",
  351. type: "textarea",
  352. minRows: 2,
  353. span: 8
  354. },
  355. {
  356. label: "采购备注",
  357. prop: "purchaseRemark",
  358. type: "textarea",
  359. minRows: 2,
  360. span: 8
  361. },
  362. {
  363. label: "船务备注",
  364. prop: "shippingRemark",
  365. type: "textarea",
  366. minRows: 2,
  367. span: 8
  368. }
  369. ]
  370. },
  371. treeOption: {
  372. nodeKey: "id",
  373. lazy: true,
  374. treeLoad: function(node, resolve) {
  375. const parentId = node.level === 0 ? 0 : node.data.id;
  376. getDeptLazyTree(parentId).then(res => {
  377. resolve(
  378. res.data.data.map(item => {
  379. return {
  380. ...item,
  381. leaf: !item.hasChildren
  382. };
  383. })
  384. );
  385. });
  386. },
  387. addBtn: false,
  388. menu: false,
  389. size: "small",
  390. props: {
  391. label: "title",
  392. value: "value",
  393. children: "children"
  394. }
  395. },
  396. page: {
  397. pageSize: 10,
  398. currentPage: 1,
  399. total: 0
  400. },
  401. loading: false,
  402. goodsOption: {},
  403. data: [],
  404. goodsList: [],
  405. selectionList: [],
  406. treeDeptId: null,
  407. itemtypeList: [],
  408. reData: null,
  409. oldform: {
  410. orderStatus: "录入"
  411. },
  412. olddata: [],
  413. subLoading: false,
  414. pageLoading: false,
  415. showBut: true
  416. };
  417. },
  418. props: {
  419. detailData: {
  420. type: Object
  421. }
  422. },
  423. components: {
  424. reportDialog,
  425. customerDialog
  426. },
  427. async created() {
  428. this.tableOption = await this.getColumnData(
  429. this.getColumnName(11),
  430. tableOption
  431. );
  432. this.goodsOption = await this.getColumnData(
  433. this.getColumnName(31),
  434. goodsOption
  435. );
  436. if (this.detailData.id) {
  437. this.getDetail(this.detailData.id);
  438. }
  439. if (this.detailData.status == 1) {
  440. this.option.disabled = true;
  441. }
  442. let _this = this;
  443. this.tableOption.column.forEach(e => {
  444. if (e.prop == "taxRate") {
  445. e.formatter = function(row) {
  446. return _this.textFormat(
  447. Number(row.taxRate ? row.taxRate : 0) / 100,
  448. "0.00%"
  449. );
  450. };
  451. }
  452. if (e.prop == "amount" || e.prop == "price") {
  453. e.formatter = function(row) {
  454. return _this.textFormat(
  455. Number(row.amount ? row.amount : 0),
  456. "#,##0.00"
  457. );
  458. };
  459. }
  460. });
  461. this.getWorkDicts("product_properties").then(res => {
  462. this.findObject(this.tableOption.column, "itemProp").dicData =
  463. res.data.data;
  464. });
  465. this.getWorkDicts("unit").then(res => {
  466. this.findObject(this.tableOption.column, "unit").dicData = res.data.data;
  467. });
  468. },
  469. methods: {
  470. rePick(row, index) {
  471. this.reData = {
  472. ...row,
  473. index: index
  474. };
  475. this.newDetails();
  476. },
  477. getcorpId(row) {
  478. console.log(row);
  479. this.data[row.index].corpId = row.id;
  480. },
  481. rowCell(row, index) {
  482. if (row.$cellEdit == true) {
  483. this.$set(row, "$cellEdit", false);
  484. } else {
  485. this.$set(row, "$cellEdit", true);
  486. }
  487. },
  488. itemTypeFocus(row) {
  489. this.itemtypeList = [];
  490. getSpecification({ goodId: row.itemId }).then(res => {
  491. const data = res.data.data;
  492. this.itemtypeList = data.map(item => ({ value: item }));
  493. });
  494. },
  495. priceChange(row) {
  496. console.log(row);
  497. if (!row.price) {
  498. row.price = 0;
  499. } else {
  500. row.amount = _.multiply(row.price, row.orderQuantity).toFixed(2);
  501. }
  502. },
  503. quantityChange(row) {
  504. if (!row.orderQuantity) {
  505. row.orderQuantity = 0;
  506. } else {
  507. row.amount = _.multiply(row.price, row.orderQuantity).toFixed(2);
  508. }
  509. },
  510. rowSave(row) {
  511. console.log(row);
  512. this.$set(row, "$cellEdit", false);
  513. },
  514. rowDel(row, index) {
  515. if (row.id) {
  516. delItem(row.id).then(res => {
  517. this.$message({
  518. type: "success",
  519. message: "操作成功!"
  520. });
  521. this.data.splice(index, 1);
  522. });
  523. } else {
  524. this.$message({
  525. type: "success",
  526. message: "操作成功!"
  527. });
  528. this.data.splice(index, 1);
  529. }
  530. },
  531. importGoods() {
  532. if (this.reData) {
  533. console.log(this.reData);
  534. if (this.selectionList.length != 1) {
  535. return this.$message.error("重新选择的时候只能选择一条数据");
  536. } else {
  537. this.selectionList.forEach(e => {
  538. this.data.forEach((item, index) => {
  539. if (index == this.reData.index) {
  540. item.itemId = e.id;
  541. item.code = e.code;
  542. item.cname = e.cname;
  543. item.priceCategory = e.goodsTypeName;
  544. item.itemUrl = e.url;
  545. item.itemProp = this.reData.itemProp;
  546. item.itemDescription = e.cnameDescription;
  547. item.itemType = this.reData.itemType;
  548. item.tradeTerms = this.reData.tradeTerms;
  549. item.price = this.reData.price;
  550. item.orderQuantity = this.reData.orderQuantity;
  551. item.insurance = this.reData.insurance;
  552. item.freight = this.reData.freight;
  553. item.discount = this.reData.discount;
  554. item.amount = this.reData.amount;
  555. item.taxRate = this.reData.taxRate;
  556. item.unit = e.unit;
  557. item.remarks = this.reData.remarks;
  558. item.$cellEdit = true;
  559. }
  560. });
  561. });
  562. }
  563. } else {
  564. this.selectionList.forEach(e => {
  565. this.data.push({
  566. itemId: e.id,
  567. code: e.code,
  568. cname: e.cname,
  569. priceCategory: e.goodsTypeName,
  570. itemUrl: e.url,
  571. itemProp: null,
  572. itemDescription: e.cnameDescription,
  573. itemType: null,
  574. tradeTerms: null,
  575. price: 0,
  576. orderQuantity: 0,
  577. insurance: 0,
  578. freight: 0,
  579. discount: null,
  580. amount: 0,
  581. taxRate: 0,
  582. unit: e.unit,
  583. remarks: null,
  584. $cellEdit: true
  585. });
  586. });
  587. }
  588. this.dialogVisible = false;
  589. },
  590. closeGoods() {
  591. this.selectionList = [];
  592. this.treeDeptId = "";
  593. this.reData = null;
  594. },
  595. selectionChange(list) {
  596. this.selectionList = list;
  597. },
  598. rowClick(row) {
  599. this.$refs.goodsCrud.toggleSelection([this.goodsList[row.$index]]);
  600. },
  601. nodeClick(data) {
  602. this.treeDeptId = data.id;
  603. this.page.currentPage = 1;
  604. this.onLoad(this.page);
  605. },
  606. //费用查询
  607. onLoad(page, params = {}) {
  608. this.loading = true;
  609. getGoods(page.currentPage, page.pageSize, this.treeDeptId).then(res => {
  610. const data = res.data.data;
  611. this.page.total = data.total;
  612. this.goodsList = data.records;
  613. this.loading = false;
  614. if (this.page.total) {
  615. this.goodsOption.height = window.innerHeight - 550;
  616. } else {
  617. this.goodsOption.height = window.innerHeight - 475;
  618. }
  619. });
  620. },
  621. //商品明细导入
  622. newDetails() {
  623. this.dialogVisible = !this.dialogVisible;
  624. },
  625. getDetail(id) {
  626. this.showBut = false;
  627. this.pageLoading = true;
  628. detail(id)
  629. .then(res => {
  630. this.form = res.data.data;
  631. this.data = res.data.data.orderItemsList
  632. ? res.data.data.orderItemsList
  633. : [];
  634. this.configuration.dicData = this.form.corpsName;
  635. this.oldform = res.data.data;
  636. this.olddata = this.deepClone(
  637. res.data.data.orderItemsList ? res.data.data.orderItemsList : []
  638. );
  639. })
  640. .finally(() => {
  641. this.showBut = true;
  642. this.pageLoading = false;
  643. });
  644. },
  645. //修改提交触发
  646. editCustomer(status, status2) {
  647. this.$refs["form"].validate((valid, done) => {
  648. done();
  649. if (valid) {
  650. if (status == "save") {
  651. this.subLoading = true;
  652. submit({
  653. ...this.form,
  654. orderItemsList: this.data
  655. })
  656. .then(res => {
  657. this.form = res.data.data;
  658. this.data = res.data.data.orderItemsList
  659. ? res.data.data.orderItemsList
  660. : [];
  661. this.configuration.dicData = this.form.corpsName;
  662. this.$message.success("修改成功");
  663. this.oldform = res.data.data;
  664. this.olddata = this.deepClone(
  665. res.data.data.orderItemsList
  666. ? res.data.data.orderItemsList
  667. : []
  668. );
  669. if (status2 == "goBack") {
  670. this.$emit("goBack");
  671. }
  672. })
  673. .finally(() => {
  674. this.subLoading = false;
  675. });
  676. }
  677. if (status == "submit") {
  678. submitMessage({
  679. ...this.form,
  680. orderItemsList: this.data
  681. }).then(res => {
  682. this.form = res.data.data;
  683. this.data = res.data.data.orderItemsList
  684. ? res.data.data.orderItemsList
  685. : [];
  686. this.configuration.dicData = this.form.corpsName;
  687. this.$message.success("提交成功");
  688. this.oldform = res.data.data;
  689. this.olddata = this.deepClone(
  690. res.data.data.orderItemsList ? res.data.data.orderItemsList : []
  691. );
  692. });
  693. }
  694. } else {
  695. return false;
  696. }
  697. });
  698. },
  699. //返回列表
  700. backToList() {
  701. if (
  702. contrastObj(this.form, this.oldform) ||
  703. contrastList(this.data, this.olddata)
  704. ) {
  705. this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
  706. confirmButtonText: "确定",
  707. cancelButtonText: "取消",
  708. type: "warning"
  709. })
  710. .then(() => {
  711. this.editCustomer("save", "goBack");
  712. })
  713. .catch(() => {
  714. this.$emit("goBack");
  715. });
  716. } else {
  717. this.$emit("goBack");
  718. }
  719. },
  720. openReport() {
  721. this.switchDialog = !this.switchDialog;
  722. },
  723. onClose(val) {
  724. this.switchDialog = val;
  725. },
  726. summaryMethod({ columns, data }) {
  727. const sums = [];
  728. if (columns.length > 0) {
  729. columns.forEach((item, index) => {
  730. sums[0] = "合计";
  731. if (item.property == "orderQuantity" || item.property == "amount") {
  732. let qtySum = 0;
  733. let amountSum = 0;
  734. data.forEach(e => {
  735. qtySum = _.add(qtySum, Number(e.orderQuantity));
  736. amountSum = _.add(amountSum, Number(e.amount));
  737. });
  738. //数量总计
  739. if (item.property == "orderQuantity") {
  740. sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
  741. }
  742. //金额总计
  743. if (item.property == "amount") {
  744. sums[index] = micrometerFormat(amountSum);
  745. }
  746. }
  747. });
  748. }
  749. return sums;
  750. },
  751. async saveColumn() {
  752. const inSave = await this.saveColumnData(
  753. this.getColumnName(11),
  754. this.tableOption
  755. );
  756. if (inSave) {
  757. this.$message.success("保存成功");
  758. //关闭窗口
  759. this.$refs.crud.$refs.dialogColumn.columnBox = false;
  760. }
  761. },
  762. async saveGoodsColumn() {
  763. const inSave = await this.saveColumnData(
  764. this.getColumnName(31),
  765. this.goodsOption
  766. );
  767. if (inSave) {
  768. this.$message.success("保存成功");
  769. //关闭窗口
  770. this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
  771. }
  772. }
  773. }
  774. };
  775. </script>
  776. <style lang="scss" scoped>
  777. ::v-deep .el-form-item {
  778. margin-bottom: 8px;
  779. }
  780. ::v-deep .el-form-item__error {
  781. display: none;
  782. }
  783. ::v-deep .select-component {
  784. display: flex;
  785. }
  786. </style>