detailsPage.vue 23 KB

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