detailsPage.vue 23 KB

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