detail.vue 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436
  1. <template>
  2. <div class="borderless" v-loading="pageLoading">
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <el-button
  6. type="danger"
  7. style="border: none;background: none;color: red"
  8. icon="el-icon-arrow-left"
  9. @click="backToList"
  10. :loading="btnLoading"
  11. >返回列表</el-button>
  12. </div>
  13. <div class="add-customer-btn">
  14. <el-button
  15. type="primary"
  16. size="small"
  17. class="el-button--small-yh"
  18. @click.stop="openEdit"
  19. v-if="form.id && disabled"
  20. >编 辑</el-button>
  21. <el-button
  22. type="primary"
  23. size="small"
  24. class="el-button--small-yh"
  25. style="margin-right: 8px;"
  26. @click="dealerSubmit"
  27. :disabled="disabled"
  28. :loading="btnLoading"
  29. v-if="form.id"
  30. >
  31. {{ form.status == 0? '确认订单': form.status == 3? '撤销订单': '' }}
  32. </el-button>
  33. <el-dropdown style="margin-right: 8px;">
  34. <el-button type="warning" size="small">账单处理<i class="el-icon-arrow-down el-icon--right"></i></el-button>
  35. <el-dropdown-menu slot="dropdown">
  36. <el-dropdown-item
  37. @click.native="applySettlement('申请')"
  38. :disabled="disabled">申请货款
  39. </el-dropdown-item>
  40. </el-dropdown-menu>
  41. </el-dropdown>
  42. <el-button
  43. type="success"
  44. :disabled="!form.id"
  45. size="small"
  46. @click="copyDoc"
  47. :loading="btnLoading"
  48. >
  49. 复制单据
  50. </el-button>
  51. <el-button
  52. type="primary"
  53. @click="editCustomer"
  54. size="small"
  55. :loading="btnLoading"
  56. :disabled="disabled"
  57. >保存数据
  58. </el-button>
  59. </div>
  60. </div>
  61. <div class="customer-main">
  62. <containerTitle title="基础信息"/>
  63. <basic-container :showBtn="true">
  64. <avue-form
  65. ref="form"
  66. class="trading-form"
  67. v-model="form"
  68. :option="option"
  69. >
  70. <template slot="corpId">
  71. <crop-select
  72. v-model="form.corpId"
  73. @getCorpData="getCorpData"
  74. corpType="GYS"
  75. :disabled="disabled || confirmDisabled"
  76. ></crop-select>
  77. </template>
  78. <template slot="storageId">
  79. <warehouse-select
  80. v-model="form.storageId"
  81. :configuration="configurationWarehouse"
  82. :disabled="disabled || confirmDisabled"/>
  83. </template>
  84. </avue-form>
  85. </basic-container>
  86. <containerTitle title="商品信息"/>
  87. <basic-container>
  88. <avue-crud
  89. ref="crud"
  90. :data="dataList"
  91. :option="tableOption"
  92. :page.sync="goodPage"
  93. :table-loading="goodLoading"
  94. @current-change="currentChange"
  95. @size-change="sizeChange"
  96. :cell-style="cellStyle"
  97. @saveColumn="saveColumn"
  98. @resetColumn="resetColumn"
  99. >
  100. <template slot="headerSerial" slot-scope="{column}">
  101. <el-button
  102. type="primary"
  103. icon="el-icon-circle-plus-outline"
  104. circle
  105. size="mini"
  106. :disabled="disabled || confirmDisabled"
  107. @click="$refs.crud.rowCellAdd()"></el-button>
  108. </template>
  109. <template slot="menuLeft">
  110. <el-button
  111. type="primary"
  112. icon="el-icon-plus"
  113. size="small"
  114. @click.stop="newDetails"
  115. :disabled="disabled || confirmDisabled"
  116. >录入明细</el-button>
  117. <el-button
  118. type="info"
  119. icon="el-icon-printer"
  120. size="small"
  121. @click.stop="openReport()"
  122. >报表打印</el-button>
  123. <el-button
  124. type="primary"
  125. size="small"
  126. icon="el-icon-download"
  127. @click="downloadHandle"
  128. >下载模板</el-button>
  129. <el-upload
  130. :action="baseURL"
  131. :headers="headers"
  132. :disabled="disabled || confirmDisabled"
  133. :on-progress="uploading"
  134. :show-file-list=false
  135. accept=".xls,.xlsx"
  136. multiple
  137. :on-success="importTemplate"
  138. :on-error="uploadError"
  139. style="float: right"
  140. >
  141. <el-button
  142. type="primary"
  143. size="small"
  144. icon="el-icon-upload"
  145. :disabled="disabled || confirmDisabled"
  146. >导 入</el-button>
  147. </el-upload>
  148. </template>
  149. <template slot="menu" slot-scope="{ row, index }">
  150. <el-button
  151. size="small"
  152. icon="el-icon-edit"
  153. type="text"
  154. @click="rowCell(row, index)"
  155. :disabled="disabled || confirmDisabled"
  156. >{{ row.$cellEdit ? "保存" : "修改" }}</el-button
  157. >
  158. <el-button
  159. size="small"
  160. icon="el-icon-delete"
  161. type="text"
  162. @click="rowDel(row, index)"
  163. :disabled="disabled || confirmDisabled"
  164. >删除</el-button
  165. >
  166. </template>
  167. <template slot="code" slot-scope="{ row, index }">
  168. <span v-if="row.$cellEdit" style="display:flex">
  169. <el-select
  170. v-model="row.code"
  171. placeholder="请选择"
  172. filterable
  173. size="small"
  174. style="width:60%"
  175. @change="codeChange(row, index)"
  176. :disabled="!form.storageId"
  177. >
  178. <el-option
  179. v-for="item in goodsoptions"
  180. :key="item.id"
  181. :label="item.code"
  182. :value="item.code"
  183. >
  184. </el-option>
  185. </el-select>
  186. <el-button
  187. icon="el-icon-search"
  188. size="small"
  189. @click="rePick(row, index)"
  190. ></el-button>
  191. </span>
  192. <span v-else> {{ row.code }}</span>
  193. </template>
  194. <template slot="cname" slot-scope="{ row, index }">
  195. <span v-if="row.$cellEdit" style="display:flex">
  196. <el-select
  197. v-model="row.itemId"
  198. placeholder="请选择"
  199. size="small"
  200. style="width:60%"
  201. filterable
  202. @change="cnameChange(row, index)"
  203. :disabled="!form.lotNo"
  204. >
  205. <el-option
  206. v-for="item in goodsoptions"
  207. :key="item.id"
  208. :label="item.cname"
  209. :value="item.id"
  210. >
  211. </el-option>
  212. </el-select>
  213. <el-button
  214. icon="el-icon-search"
  215. size="small"
  216. @click="rePick(row, index)"
  217. ></el-button>
  218. </span>
  219. <span v-else> {{ row.cname }}</span>
  220. </template>
  221. <template slot="batch" slot-scope="{row, index}">
  222. <span>{{ row.batch == 0? '否': '是' }}</span>
  223. </template>
  224. <template slot="orderQuantity" slot-scope="{ row, index }">
  225. <el-input-number
  226. v-if="row.$cellEdit"
  227. v-model="row.orderQuantity"
  228. size="small"
  229. :controls="false"
  230. :precision="0"
  231. @input="amountChange(row)"
  232. style="width: 100%"
  233. :disabled="!form.lotNo"
  234. />
  235. <span v-else>{{ row.orderQuantity | IntegerFormat }}</span>
  236. </template>
  237. <template slot="price" slot-scope="{ row, index }">
  238. <el-input-number
  239. v-if="row.$cellEdit"
  240. v-model="row.price"
  241. size="small"
  242. :controls="false"
  243. :precision="2"
  244. @input="amountChange(row)"
  245. style="width: 100%"
  246. :disabled="!form.lotNo"
  247. ></el-input-number>
  248. <span v-else>{{ row.price }}</span>
  249. </template>
  250. <!-- 单位-->
  251. <template slot="unit" slot-scope="{ row, index }">
  252. <el-select
  253. v-if="row.$cellEdit"
  254. v-model="row.unit"
  255. size="small"
  256. :disabled="!form.lotNo"
  257. clearable
  258. filterable
  259. >
  260. <el-option
  261. v-for="(item, index) in unitOption"
  262. :key="index"
  263. :label="item.dictValue"
  264. :value="item.dictValue"
  265. />
  266. </el-select>
  267. <span v-else>{{ row.unit }}</span>
  268. </template>
  269. <template slot="amount" slot-scope="{ row, index }">
  270. <span>{{ row.amount | decimalFormat }}</span>
  271. </template>
  272. <template slot="storageQuantity" slot-scope="{ row, index }">
  273. <span>{{ row.storageQuantity | IntegerFormat }}</span>
  274. </template>
  275. <template slot="newJob" slot-scope="{ row, index }">
  276. <span style="color: #1e9fff;cursor: pointer" @click="openHistory(row)">{{ row.newJob }}</span>
  277. </template>
  278. <template slot="remarks" slot-scope="{ row, index }">
  279. <el-input
  280. v-if="row.$cellEdit"
  281. v-model="row.remarks"
  282. size="small"
  283. :disabled="!form.storageId"
  284. />
  285. <span v-else>{{ row.remarks }}</span>
  286. </template>
  287. </avue-crud>
  288. </basic-container>
  289. <containerTitle title="详细信息"/>
  290. <basic-container :showBtn="true">
  291. <avue-form
  292. ref="form1"
  293. class="trading-form"
  294. v-model="form"
  295. :option="detailOption"
  296. ></avue-form>
  297. </basic-container>
  298. <containerTitle title="附件管理"></containerTitle>
  299. <c-upload
  300. :data="uploadData"
  301. deleteUrl="/api/blade-client/corpsbank/update"
  302. :enumerationValue="84"
  303. :disabled="disabled || confirmDisabled"
  304. />
  305. </div>
  306. <el-dialog
  307. title="导入商品"
  308. append-to-body
  309. class="el-dialogDeep"
  310. :visible.sync="dialogVisible"
  311. width="80%"
  312. :close-on-click-modal="false"
  313. :destroy-on-close="true"
  314. :close-on-press-escape="false"
  315. @close="closeGoods"
  316. top="5vh"
  317. v-dialog-drag
  318. >
  319. <span>
  320. <el-row>
  321. <el-col :span="4">
  322. <div>
  323. <el-scrollbar>
  324. <basic-container>
  325. <avue-tree
  326. :option="treeOption"
  327. @node-click="nodeClick"
  328. :style="treeStyle"
  329. />
  330. </basic-container>
  331. </el-scrollbar>
  332. </div>
  333. </el-col>
  334. <el-col :span="20">
  335. <avue-crud
  336. :option="goodsOption"
  337. :table-loading="loading"
  338. :data="goodsList"
  339. ref="goodsCrud"
  340. :search.sync="search"
  341. @search-change="searchChange"
  342. @selection-change="selectionChange"
  343. @row-click="rowClick"
  344. :page.sync="page"
  345. @on-load="onLoad"
  346. @saveColumn="saveGoodsColumn"
  347. @resetColumn="resetGoodsColumn"
  348. :cell-style="cellStyle"
  349. >
  350. <template slot="menuLeft">
  351. <el-tabs v-model="activeName" @tab-click="tabHandle">
  352. <el-tab-pane label="查询结果" name="searchList"></el-tab-pane>
  353. <el-tab-pane label="已选定数据" name="importStaging"></el-tab-pane>
  354. </el-tabs>
  355. </template>
  356. <template slot-scope="scope" slot="menu">
  357. <el-button
  358. type="text"
  359. icon="el-icon-edit"
  360. size="small"
  361. @click.stop="importStagList(scope.row,scope.index)"
  362. v-if="activeName=='searchList'"
  363. :disabled="goodsListSave.findIndex(item => item.id == scope.row.id) !== -1"
  364. >选择
  365. </el-button>
  366. <el-button
  367. type="text"
  368. icon="el-icon-delete"
  369. size="small"
  370. @click.stop="removeStagList(scope.row,scope.index)"
  371. v-else
  372. >移除
  373. </el-button>
  374. </template>
  375. </avue-crud>
  376. </el-col>
  377. </el-row>
  378. </span>
  379. <span slot="footer" class="dialog-footer">
  380. <el-button @click="dialogVisible = false">取 消</el-button>
  381. <el-button
  382. type="primary"
  383. @click="importGoods"
  384. :disabled="selectionList.length == 0 && goodsListSave.length == 0"
  385. >导入</el-button
  386. >
  387. </span>
  388. </el-dialog>
  389. <!-- 账单-->
  390. <el-dialog
  391. append-to-body
  392. title="账单"
  393. class="el-dialogDeep"
  394. :visible.sync="financialAccountDialog"
  395. width="70%"
  396. :close-on-click-modal="false"
  397. :destroy-on-close="true"
  398. :close-on-press-escape="false"
  399. v-dialog-drag
  400. >
  401. <financial-account
  402. :billType="billType"
  403. :billData="{}"
  404. :arrList="applyPaymentList"
  405. :belongCompany="form.belongToCorpId"
  406. :checkData="checkData"
  407. @choceFun="choceFun"
  408. @submit="feeSubmit"
  409. />
  410. </el-dialog>
  411. <!-- 历史记录-->
  412. <view-history
  413. v-if="historyVisible"
  414. ref="history"
  415. :params="historyParams"
  416. @closeDialog="closeDialog"
  417. />
  418. </div>
  419. </template>
  420. <script>
  421. import tableOption from "./config/customerContact.json";
  422. import goodsOption from "./config/commodity.json";
  423. import {getDeptLazyTree,
  424. getGoods,} from "@/api/basicData/customerInquiry";
  425. import {selectGoodsNum} from "@/api/basicData/inventoryAccount"; // 库存查询
  426. import {getUserInfo} from "@/api/system/user"; //登录用户信息
  427. import {dataDetail, removeGoods, typeSave, dealerSubmit, historyPrice, itemDetail} from "@/api/dealer/purchase";
  428. import {
  429. isDiscount,
  430. isPercentage,
  431. micrometerFormat,
  432. IntegerFormat
  433. } from "@/util/validate";
  434. import reportDialog from "@/components/report-dialog/main";
  435. import financialAccount from "../../../components/finance/financialAccount";
  436. import checkSchedule from "@/components/check/checkSchedule";
  437. import billApplication from "@/components/bill/billApplication";
  438. import { customerList as feeList } from "@/api/basicData/basicFeesDesc";
  439. import {getDetail} from "@/api/basicData/inventoryAccount";
  440. import { getToken } from "@/util/auth";
  441. import { getCurrentDate } from "@/util/date";
  442. import viewHistory from '../componet/history';
  443. import { contrastObj, contrastList } from "@/util/contrastData";
  444. export default {
  445. name: "detail",
  446. props: {
  447. detailData: {
  448. type: Object
  449. }
  450. },
  451. components: {
  452. reportDialog,
  453. billApplication,
  454. financialAccount,
  455. checkSchedule,
  456. viewHistory,
  457. },
  458. data() {
  459. return {
  460. pageLoading: false,
  461. btnLoading: false,
  462. disabled: false,
  463. confirmDisabled: false, // 确认禁用
  464. form: {},
  465. option: {
  466. menuBtn: false,
  467. labelWidth: 100,
  468. column: [
  469. {
  470. label: "供应商",
  471. prop: "corpId",
  472. rules: [
  473. {
  474. required: true,
  475. message: " ",
  476. trigger: "change"
  477. }
  478. ],
  479. span: 16,
  480. slot: true,
  481. },
  482. {
  483. label: "业务时间",
  484. prop: "businesDate",
  485. span: 8,
  486. type: "date",
  487. format: "yyyy-MM-dd",
  488. valueFormat: "yyyy-MM-dd 00:00:00",
  489. rules: [
  490. {
  491. required: true,
  492. message: "",
  493. trigger: "blur"
  494. }
  495. ]
  496. },
  497. {
  498. label: "批次号",
  499. prop: "lotNo",
  500. rules: [
  501. {
  502. required: true,
  503. message: " ",
  504. trigger: "blur"
  505. }
  506. ],
  507. span: 8,
  508. slot: true
  509. },
  510. {
  511. label: "收货仓库",
  512. prop: "storageId",
  513. span: 8,
  514. rules: [
  515. {
  516. required: true,
  517. message: " ",
  518. trigger: "change"
  519. }
  520. ],
  521. },
  522. {
  523. label: "电话",
  524. prop: "corpTel",
  525. span: 8
  526. },
  527. {
  528. label: "地址",
  529. prop: "arrivalAddress",
  530. span: 8
  531. },
  532. {
  533. label: "备注",
  534. prop: "orderRemark",
  535. type: "textarea",
  536. minRows: 2,
  537. span: 24
  538. },
  539. ],
  540. },
  541. detailOption: {
  542. menuBtn: false,
  543. labelWidth: 100,
  544. column: [
  545. {
  546. label: "系统号",
  547. prop: "sysNo",
  548. span: 8,
  549. disabled: true
  550. },
  551. {
  552. label: "打印时间",
  553. prop: "printTime",
  554. span: 8,
  555. disabled: true
  556. },
  557. {
  558. label: "打印次数",
  559. prop: "printNumber",
  560. span: 8,
  561. disabled: true
  562. },
  563. {
  564. label: "客户欠款",
  565. prop: "corpDebt",
  566. span: 8,
  567. disabled: true
  568. },
  569. {
  570. label: "总数量",
  571. prop: "orderQuantity",
  572. span: 8,
  573. disabled: true
  574. },
  575. {
  576. label: "应付金额",
  577. prop: "debitAmount",
  578. span: 8,
  579. disabled: true
  580. },
  581. {
  582. label: "总金额",
  583. prop: "amount",
  584. span: 8,
  585. disabled: true
  586. },
  587. {
  588. label: "制单人",
  589. prop: "createUserName",
  590. span: 8,
  591. disabled: true,
  592. },
  593. ]
  594. },
  595. // 仓库配置
  596. configurationWarehouse: {
  597. multipleChoices: false,
  598. multiple: false,
  599. collapseTags: false,
  600. placeholder: "请点击右边按钮选择",
  601. dicData: [],
  602. },
  603. dataList: [],
  604. tableOption: {},
  605. dialogVisible: false,
  606. selectionList: [],
  607. treeDeptId: null,
  608. reData: null,
  609. treeOption: {
  610. nodeKey: "id",
  611. lazy: true,
  612. treeLoad: function(node, resolve) {
  613. const parentId = node.level === 0 ? 0 : node.data.id;
  614. getDeptLazyTree(parentId).then(res => {
  615. resolve(
  616. res.data.data.map(item => {
  617. return {
  618. ...item,
  619. leaf: !item.hasChildren
  620. };
  621. })
  622. );
  623. });
  624. },
  625. addBtn: false,
  626. menu: false,
  627. size: "small",
  628. props: {
  629. label: "title",
  630. value: "value",
  631. children: "children"
  632. }
  633. },
  634. page: {
  635. pageSize: 10,
  636. currentPage: 1,
  637. total: 0
  638. },
  639. search: {},
  640. goodsList: [],
  641. loading: false,
  642. goodsOption: {},
  643. treeStyle: "height:" + (window.innerHeight - 315) + "px",
  644. goodsoptions: [],
  645. uploadData: [],
  646. goodData: [], // 存储所有商品信息
  647. activeName: 'searchList',
  648. // 商品列表数据合计
  649. goodsListShow: [],
  650. // 商品列表暂存
  651. goodsListSave: [],
  652. pageList: {
  653. pageSize: 10,
  654. currentPage: 1,
  655. total: 0
  656. },
  657. applyPaymentList: [],
  658. billType:"收费", //账单类型
  659. billData:{}, //账单需要数据
  660. checkData:{
  661. url:"/financialManagement/paymentRequest/index",
  662. pageStatus:"this.$store.getters.pqStatus",
  663. pageLabel:"付费申请",
  664. checkType: 'ffsq'
  665. },
  666. applySettlementDialog:false,//生成账单组件
  667. financialAccountDialog:false,
  668. feesOption: [],
  669. unitOption: [],
  670. baseURL: '/api/blade-purchase-sales/orderitems/importDealerOrder',
  671. headers: { "Blade-Auth": 'Bearer ' + getToken()},
  672. historyVisible: false,
  673. historyParams: {},
  674. goodPage: {
  675. pageSize: 10,
  676. currentPage: 1,
  677. total: 0
  678. },
  679. goodLoading: false,
  680. oldForm: {},
  681. oldDataList: [],
  682. oldUploadData: [],
  683. }
  684. },
  685. async created() {
  686. this.tableOption = await this.getColumnData(
  687. this.getColumnName(82),
  688. tableOption
  689. );
  690. this.goodsOption = await this.getColumnData(
  691. this.getColumnName(83),
  692. goodsOption
  693. );
  694. this.getWorkDicts('unit').then(res => {
  695. this.unitOption = res.data.data;
  696. })
  697. getGoods(1, 10).then(res => {
  698. if (res.data.data.total > 0) {
  699. this.goodsoptions = res.data.data.records;
  700. if (Math.ceil(res.data.data.total / 10) > 1) {
  701. for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
  702. getGoods(i, 10).then(e => {
  703. this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
  704. });
  705. }
  706. }
  707. }
  708. });
  709. getUserInfo().then(res => {
  710. this.$set(this.form, 'createUserName', res.data.data.realName)
  711. this.$set(this.form, 'createUser', res.data.data.id)
  712. })
  713. feeList().then(res => {
  714. this.feesOption = res.data.data.records
  715. });
  716. this.$set(this.form, 'businesDate', getCurrentDate());
  717. this.$set(this.form, 'status', 0);
  718. if (this.detailData.query) {
  719. this.disabled = true;
  720. this.option.column.map(e => {
  721. this.$set(e, 'disabled', true)
  722. })
  723. this.queryData(this.detailData.id);
  724. } else {
  725. this.dataList = [
  726. {
  727. code: null,
  728. cname: null,
  729. typeno: null,
  730. brandItem: null,
  731. specsOne: null,
  732. specsTwo: null,
  733. unit: null,
  734. storageQuantity: 0,
  735. orderQuantity: 0,
  736. size: null,
  737. price: 0,
  738. amount: 0,
  739. $cellEdit: true
  740. }
  741. ]
  742. }
  743. },
  744. filters: {
  745. IntegerFormat(num) {
  746. return IntegerFormat(num);
  747. },
  748. decimalFormat(num) {
  749. return num ? Number(num).toFixed(2) : "0.00";
  750. }
  751. },
  752. methods: {
  753. // 查询
  754. queryData(id) {
  755. this.pageLoading = true;
  756. dataDetail(id).then(res => {
  757. this.form = res.data.data;
  758. this.getItemDetail();
  759. this.form.amount = Number(this.form.amount).toFixed(2);
  760. this.confirmDisabled = this.form.status == 3? true: false;
  761. if (this.confirmDisabled) {
  762. // this.option.column.map(e => {
  763. // this.$set(e, 'disabled', true)
  764. // })
  765. }
  766. this.goodData = this.form.orderItemsList? this.form.orderItemsList: [];
  767. this.uploadData = this.form.orderFilesList? this.form.orderFilesList: [];
  768. delete this.form.orderItemsList;
  769. delete this.form.orderFilesList;
  770. this.oldForm = {...this.form};
  771. // this.oldDataList = [...this.dataList];
  772. this.oldUploadData = [...this.uploadData];
  773. }).finally(() => {
  774. this.pageLoading = false;
  775. })
  776. },
  777. cellStyle() {
  778. return "padding:0;height:40px;";
  779. },
  780. openEdit() {
  781. this.disabled = false;
  782. this.option.column.map(e => {
  783. if (this.confirmDisabled) {
  784. if (e.prop == 'businesDate' || e.prop == 'lotNo') {
  785. this.$set(e, 'disabled', true)
  786. } else {
  787. this.$set(e, 'disabled', false)
  788. }
  789. } else {
  790. this.$set(e, 'disabled', false)
  791. }
  792. })
  793. },
  794. copyDoc() {
  795. this.$emit("copyOrder", this.form.id);
  796. },
  797. getCorpData(row) {},
  798. //修改提交触发
  799. editCustomer(status) {
  800. this.$refs["form"].validate((valid, done) => {
  801. done();
  802. if (valid) {
  803. // 总金额计算
  804. let amount = 0;
  805. this.dataList.forEach(item => {
  806. amount = Number(amount) + Number(item.amount)
  807. })
  808. this.$set(this.form, 'debitAmount', amount.toFixed(2));
  809. this.$set(this.form, 'amount', amount.toFixed(2));
  810. this.form.billType = 'CG';
  811. this.$set(this.form, 'itemsVOList', this.dataList);
  812. this.$set(this.form, 'orderFilesList', this.uploadData);
  813. this.btnLoading = true;
  814. typeSave(this.form).then(res => {
  815. this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
  816. this.queryData(res.data.data);
  817. }).finally(() => {
  818. this.btnLoading = false;
  819. })
  820. }
  821. })
  822. },
  823. //返回列表
  824. backToList() {
  825. this.$emit("goBack");
  826. },
  827. async saveColumn() {
  828. const inSave = await this.saveColumnData(
  829. this.getColumnName(82),
  830. this.tableOption
  831. );
  832. if (inSave) {
  833. this.$message.success("保存成功");
  834. //关闭窗口
  835. this.$refs.crud.$refs.dialogColumn.columnBox = false;
  836. this.$nextTick(() => {
  837. this.$refs.crud.doLayout()
  838. })
  839. }
  840. },
  841. async resetColumn() {
  842. this.tableOption = tableOption;
  843. const inSave = await this.delColumnData(
  844. this.getColumnName(82),
  845. tableOption
  846. );
  847. if (inSave) {
  848. this.$nextTick(() => {
  849. this.$refs.crud.doLayout()
  850. })
  851. this.$message.success("重置成功");
  852. //关闭窗口
  853. setTimeout(() => {
  854. this.$refs.crud.$refs.dialogColumn.columnBox = false;
  855. }, 1000);
  856. }
  857. },
  858. //商品明细导入
  859. newDetails() {
  860. this.$refs["form"].validate((valid) => {
  861. if (valid) {
  862. this.dialogVisible = !this.dialogVisible;
  863. }
  864. })
  865. // if (!this.form.corpId) {
  866. // return this.$message.error("请选择客户名称");
  867. // }
  868. },
  869. importGoods() {
  870. let form = {};
  871. if (this.reData) {
  872. if (this.selectionList.length != 1) {
  873. return this.$message.error("重新选择的时候只能选择一条数据");
  874. } else {
  875. this.selectionList.forEach(e => {
  876. this.dataList.forEach(async (item, index) => {
  877. if (index == this.reData.index) {
  878. let historyData = await this.getHistoryData(e, 1); // 获得最新数据
  879. if (historyData.length > 0) {
  880. e.newJob = historyData[0].price;
  881. e.newDate = historyData[0].businesDate;
  882. } else {
  883. e.newJob = null;
  884. e.newDate = null;
  885. }
  886. form = await this.getStockInfo({
  887. tradeType: 'JXS',
  888. goodsId: e.id,
  889. storageId: this.form.storageId,
  890. lotNo: e.batch == 1? this.form.lotNo: null
  891. })
  892. item.storageQuantity = form.stock;
  893. item.purchaseAmount = form.purchaseAmount;
  894. item.itemId = e.id;
  895. item.code = e.code;
  896. item.cname = e.cname;
  897. item.corpId = e.corpId;
  898. item.corpName = e.corpName;
  899. item.brandItem = e.brandItem;
  900. item.specsOne = e.specsOne;
  901. item.specsTwo = e.specsTwo;
  902. item.typeno = e.typeno;
  903. item.unit = e.unit;
  904. item.size = e.size;
  905. item.lotNo = e.batch == 1? this.form.lotNo: null;
  906. item.priceCategory = e.goodsTypeName;
  907. item.newJob = e.newJob;
  908. item.newDate = e.newDate;
  909. item.$cellEdit = true;
  910. }
  911. });
  912. });
  913. }
  914. } else {
  915. if (this.goodsListSave.length > 0) { // 暂存的有数据
  916. this.goodsListSave.forEach(async e => {
  917. let historyData = await this.getHistoryData(e, 1); // 获得最新数据
  918. if (historyData.length > 0) {
  919. e.newJob = historyData[0].price;
  920. e.newDate = historyData[0].businesDate;
  921. } else {
  922. e.newJob = null;
  923. e.newDate = null;
  924. }
  925. form = await this.getStockInfo({
  926. tradeType: 'JXS',
  927. goodsId: e.id,
  928. storageId: this.form.storageId,
  929. lotNo: e.batch == 1? this.form.lotNo: null
  930. })
  931. e.storageQuantity = form.stock;
  932. e.purchaseAmount = form.purchaseAmount;
  933. this.dataList.push({
  934. itemId: e.id,
  935. code: e.code,
  936. cname: e.cname,
  937. brandItem: e.brandItem,
  938. specsOne: e.specsOne,
  939. specsTwo: e.specsTwo,
  940. typeno: e.typeno,
  941. corpId: e.corpId,
  942. corpName: e.corpName,
  943. unit: e.unit,
  944. size: e.size,
  945. price: 0,
  946. amount: 0,
  947. orderQuantity: 0,
  948. storageQuantity: e.storageQuantity,
  949. purchaseAmount: e.purchaseAmount,
  950. newJob: e.newJob,
  951. newDate: e.newDate,
  952. lotNo: e.batch == 1? this.form.lotNo: null,
  953. $cellEdit: true
  954. });
  955. });
  956. } else {
  957. this.selectionList.forEach(async e => {
  958. let historyData = await this.getHistoryData(e, 1); // 获得最新数据
  959. if (historyData.length > 0) {
  960. e.newJob = historyData[0].price;
  961. e.newDate = historyData[0].businesDate;
  962. } else {
  963. e.newJob = null;
  964. e.newDate = null;
  965. }
  966. form = await this.getStockInfo({
  967. tradeType: 'JXS',
  968. goodsId: e.id,
  969. storageId: this.form.storageId,
  970. lotNo: e.batch == 1? this.form.lotNo: null
  971. })
  972. e.storageQuantity = form.stock;
  973. e.purchaseAmount = form.purchaseAmount;
  974. this.dataList.push({
  975. itemId: e.id,
  976. code: e.code,
  977. cname: e.cname,
  978. brandItem: e.brandItem,
  979. specsOne: e.specsOne,
  980. specsTwo: e.specsTwo,
  981. typeno: e.typeno,
  982. corpId: e.corpId,
  983. corpName: e.corpName,
  984. unit: e.unit,
  985. size: e.size,
  986. price: 0,
  987. amount: 0,
  988. orderQuantity: 0,
  989. storageQuantity: e.storageQuantity,
  990. purchaseAmount: e.purchaseAmount,
  991. newJob: e.newJob,
  992. newDate: e.newDate,
  993. lotNo: e.batch == 1? this.form.lotNo: null,
  994. $cellEdit: true
  995. });
  996. });
  997. }
  998. }
  999. this.dialogVisible = false;
  1000. },
  1001. closeGoods() {
  1002. this.selectionList = [];
  1003. this.treeDeptId = "";
  1004. this.reData = null;
  1005. this.activeName = 'searchList';
  1006. this.goodsListSave = [];
  1007. },
  1008. nodeClick(data) {
  1009. this.treeDeptId = data.id;
  1010. this.page.currentPage = 1;
  1011. this.onLoad(this.page);
  1012. },
  1013. //费用查询
  1014. onLoad(page, params = {}) {
  1015. let obj = this.deepClone(Object.assign(params, this.search));
  1016. this.loading = true;
  1017. getGoods(page.currentPage, page.pageSize, this.treeDeptId, obj)
  1018. .then(res => {
  1019. const data = res.data.data;
  1020. this.page.total = data.total;
  1021. this.goodsList = data.records;
  1022. if (this.page.total) {
  1023. this.goodsOption.height = window.innerHeight - 350;
  1024. }
  1025. })
  1026. .finally(() => {
  1027. this.loading = false;
  1028. });
  1029. },
  1030. searchChange(params, done) {
  1031. this.search = this.deepClone(params);
  1032. this.onLoad(this.page, params);
  1033. done();
  1034. },
  1035. selectionChange(list) {
  1036. this.selectionList = list;
  1037. },
  1038. rowClick(row) {
  1039. this.$refs.goodsCrud.toggleSelection([this.goodsList[row.$index]]);
  1040. },
  1041. async saveGoodsColumn() {
  1042. const inSave = await this.saveColumnData(
  1043. this.getColumnName(83),
  1044. this.goodsOption
  1045. );
  1046. if (inSave) {
  1047. this.$message.success("保存成功");
  1048. //关闭窗口
  1049. this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
  1050. this.$nextTick(() => {
  1051. this.$refs.goodsCrud.doLayout()
  1052. })
  1053. }
  1054. },
  1055. async resetGoodsColumn() {
  1056. this.goodsOption = goodsOption;
  1057. const inSave = await this.delColumnData(
  1058. this.getColumnName(83),
  1059. goodsOption
  1060. );
  1061. if (inSave) {
  1062. this.$nextTick(() => {
  1063. this.$refs.goodsCrud.doLayout()
  1064. })
  1065. this.$message.success("重置成功");
  1066. //关闭窗口
  1067. setTimeout(() => {
  1068. this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
  1069. }, 1000);
  1070. }
  1071. },
  1072. openReport() {},
  1073. rowCell(row, index) {
  1074. if (row.$cellEdit == true) {
  1075. this.$set(row, "$cellEdit", false);
  1076. } else {
  1077. this.$set(row, "$cellEdit", true);
  1078. }
  1079. },
  1080. rowDel(row, index) {
  1081. this.$confirm("确定删除数据?", {
  1082. confirmButtonText: "确定",
  1083. cancelButtonText: "取消",
  1084. type: "warning"
  1085. }).then(() => {
  1086. if (row.id) {
  1087. removeGoods(row.id).then(res => {
  1088. this.$message({
  1089. type: 'success',
  1090. message: '删除成功!'
  1091. })
  1092. this.dataList.splice(row.$index, 1);
  1093. })
  1094. } else {
  1095. this.$message({
  1096. type: "success",
  1097. message: "删除成功!"
  1098. });
  1099. this.dataList.splice(row.$index, 1);
  1100. }
  1101. });
  1102. },
  1103. codeChange(row) {
  1104. let form = {};
  1105. this.goodsoptions.forEach(async e => {
  1106. if (e.code == row.code) {
  1107. let historyData = await this.getHistoryData(e, 1); // 获得最新数据
  1108. if (historyData.length > 0) {
  1109. e.newJob = historyData[0].price;
  1110. e.newDate = historyData[0].businesDate;
  1111. } else {
  1112. e.newJob = null;
  1113. e.newDate = null;
  1114. }
  1115. form = await this.getStockInfo({
  1116. tradeType: 'JXS',
  1117. goodsId: e.id,
  1118. storageId: this.form.storageId,
  1119. lotNo: e.batch == 1? this.form.lotNo: null
  1120. })
  1121. e.storageQuantity = form.stock;
  1122. e.purchaseAmount = form.purchaseAmount;
  1123. row.itemId = e.id;
  1124. row.cname = e.cname;
  1125. row.code = e.code;
  1126. row.corpId = e.corpId;
  1127. row.corpName = e.corpName;
  1128. row.brandItem = e.brandItem;
  1129. row.specsOne = e.specsOne;
  1130. row.specsTwo = e.specsTwo;
  1131. row.typeno = e.typeno;
  1132. row.unit = e.unit;
  1133. row.size = e.size;
  1134. row.priceCategory = e.goodsTypeName;
  1135. row.storageQuantity = e.storageQuantity;
  1136. row.purchaseAmount = e.purchaseAmount;
  1137. row.lotNo = e.batch == 1? this.form.lotNo: null;
  1138. row.newJob = e.newJob;
  1139. row.newDate = e.newDate;
  1140. // row.amount = 0;
  1141. }
  1142. });
  1143. },
  1144. cnameChange(row) {
  1145. let form = {};
  1146. this.goodsoptions.forEach(async e => {
  1147. if (e.id == row.itemId) {
  1148. let historyData = await this.getHistoryData(e, 1); // 获得最新数据
  1149. if (historyData.length > 0) {
  1150. e.newJob = historyData[0].price;
  1151. e.newDate = historyData[0].businesDate;
  1152. } else {
  1153. e.newJob = null;
  1154. e.newDate = null;
  1155. }
  1156. form = await this.getStockInfo({
  1157. tradeType: 'JXS',
  1158. goodsId: e.id,
  1159. storageId: this.form.storageId,
  1160. lotNo: e.batch == 1? this.form.lotNo: null
  1161. })
  1162. e.storageQuantity = form.stock;
  1163. e.purchaseAmount = form.purchaseAmount;
  1164. row.cname = e.cname;
  1165. row.code = e.code;
  1166. row.corpId = e.corpId;
  1167. row.corpName = e.corpName;
  1168. row.brandItem = e.brandItem;
  1169. row.specsOne = e.specsOne;
  1170. row.specsTwo = e.specsTwo;
  1171. row.typeno = e.typeno;
  1172. row.unit = e.unit;
  1173. row.size = e.size;
  1174. row.priceCategory = e.goodsTypeName;
  1175. row.storageQuantity = e.storageQuantity;
  1176. row.purchaseAmount = e.purchaseAmount;
  1177. row.lotNo = e.batch == 1? this.form.lotNo: null;
  1178. row.newJob = e.newJob;
  1179. row.newDate = e.newDate;
  1180. // row.amount = 0;
  1181. }
  1182. });
  1183. },
  1184. rePick(row, index) {
  1185. this.reData = {
  1186. ...row,
  1187. index: index
  1188. };
  1189. this.newDetails();
  1190. },
  1191. // 商品信息价格计算
  1192. amountChange(row) {
  1193. if (!row.orderQuantity) {
  1194. row.orderQuantity = 0;
  1195. }
  1196. if (!row.price) {
  1197. row.price = 0;
  1198. }
  1199. row.amount = Number(row.price) * Number(row.orderQuantity)
  1200. },
  1201. // 标签页切换
  1202. tabHandle(data) {
  1203. if (data.name == 'searchList') {
  1204. this.goodsListShow = this.goodsList;
  1205. this.page.total = this.pageList.total
  1206. } else if (data.name == 'importStaging') {
  1207. this.goodsListShow = this.goodsListSave;
  1208. this.page.total = 0
  1209. }
  1210. },
  1211. removeStagList(row, index) {
  1212. this.goodsListSave.splice(row.$index, 1)
  1213. },
  1214. importStagList(row, index) {
  1215. this.goodsListSave.push(row);
  1216. },
  1217. // 生成结算
  1218. applySettlement(type) {
  1219. this.beforeBillData(true,type)
  1220. this.financialAccountDialog = true;
  1221. },
  1222. //生成账单 拿到主表信息
  1223. beforeBillData(bool,type) {
  1224. this.billType = type;
  1225. this.applyPaymentList = [];
  1226. this.goodData.map(e => {
  1227. if (e.submitPay != 1) {
  1228. const form = {
  1229. srcOrderno:this.form.orderNo,
  1230. srcParentId: this.form.id,
  1231. itemType:"采购",
  1232. corpsName:this.form.corpsName,
  1233. corpId:this.form.corpId,
  1234. currency: 'CNY',
  1235. exchangeRate: '1',
  1236. taxRate: '0',
  1237. accDate: this.form.businesDate,
  1238. srcType: 1,
  1239. // chargeMember: this.form.chargeMember,
  1240. parentId: this.form.id,
  1241. tradeType: 'JXS',
  1242. optionType: 'JXS',
  1243. amount: e.amount,
  1244. costType: this.feesOption.find(item => item.cname == '货款')? this.feesOption.find(item => item.cname == '货款').id: null,
  1245. srcFeesId: e.id,
  1246. goodName: e.cname,
  1247. price: e.price,
  1248. quantity: e.orderQuantity,
  1249. unit:e.unit,
  1250. }
  1251. this.applyPaymentList.push(form);
  1252. }
  1253. })
  1254. },
  1255. //关闭账单
  1256. choceFun(){
  1257. this.financialAccountDialog = false
  1258. },
  1259. feeSubmit() {
  1260. this.queryData(this.form.id);
  1261. },
  1262. // 获得库存信息
  1263. async getStockInfo(data) {
  1264. //tradeType JXS
  1265. //goodsId
  1266. //storageId
  1267. //lotNo 批次号
  1268. let form = {};
  1269. await getDetail(data).then(res => {
  1270. const a = res.data.data? res.data.data: {
  1271. stock: 0,
  1272. balanceAmount: 0,
  1273. balanceQuantity: 0,
  1274. };
  1275. this.$set(form, 'purchaseAmount', a.balanceQuantity == 0? 0: (Number(a.balanceAmount) / Number(a.balanceQuantity)).toFixed(2));
  1276. this.$set(form, 'stock', a.balanceQuantity);
  1277. })
  1278. return form;
  1279. },
  1280. // 确认或者取消订单
  1281. dealerSubmit() {
  1282. if (this.verification()) {
  1283. let dealer;
  1284. if (this.form.status == 0) {
  1285. dealer = 1;
  1286. } else if (this.form.status == 3) {
  1287. dealer = 2;
  1288. }
  1289. this.btnLoading = true;
  1290. dealerSubmit({
  1291. id: this.form.id,
  1292. dealer
  1293. }).then(res => {
  1294. if (res.data.code == 200) {
  1295. this.$message.success('操作成功')
  1296. this.queryData(this.form.id)
  1297. } else {
  1298. this.$message.error(res.data.msg)
  1299. }
  1300. }).finally(() => {
  1301. this.btnLoading = false;
  1302. })
  1303. }
  1304. },
  1305. // 下载模板
  1306. downloadHandle() {
  1307. this.$confirm('是否下载模板文件?', '提示', {
  1308. confirmButtonText: '确定',
  1309. cancelButtonText: '取消',
  1310. type: 'warning'
  1311. }).then(() => {
  1312. window.open(
  1313. `/api/blade-purchase-sales/orderitems/exportDealerOrder?${
  1314. this.website.tokenHeader
  1315. }=${getToken()}`
  1316. );
  1317. }).catch(() => {
  1318. this.$message({
  1319. type: 'info',
  1320. message: '已取消'
  1321. });
  1322. })
  1323. },
  1324. //文件上传时
  1325. uploading(event, file, fileList) {
  1326. this.openFullScreen(false, '文件正在解析中');
  1327. },
  1328. importTemplate(res, file) {
  1329. this.openFullScreen(true)
  1330. res.data.forEach(item => {
  1331. })
  1332. this.dataList = this.dataList.concat(res.data)
  1333. this.$message.success('导入成功')
  1334. },
  1335. uploadError(err, file, fileList) {
  1336. this.openFullScreen(true)
  1337. this.$message.error(JSON.parse(err.message).msg)
  1338. },
  1339. //遮罩层
  1340. openFullScreen(res, text) {
  1341. const loading = this.$loading({
  1342. lock: true,
  1343. text: text,
  1344. spinner: 'el-icon-loading',
  1345. background: 'rgba(0, 0, 0, 0.7)'
  1346. });
  1347. if (res === true) loading.close();
  1348. },
  1349. // 获得历史数据
  1350. async getHistoryData(row, typeId = null) {
  1351. let data;
  1352. const params = {
  1353. typeId,
  1354. tradeType: 'JXS',
  1355. billType: 'CG',
  1356. itemId: row.id
  1357. }
  1358. await historyPrice(params).then(res => {
  1359. data = res.data.data? res.data.data: [];
  1360. })
  1361. return data;
  1362. },
  1363. openHistory(row) {
  1364. this.historyParams = {
  1365. tradeType: 'JXS',
  1366. billType: 'CG',
  1367. itemId: row.itemId
  1368. }
  1369. this.historyVisible = true;
  1370. this.$nextTick(() => {
  1371. this.$refs.history.init();
  1372. })
  1373. },
  1374. closeDialog() {
  1375. this.historyVisible = false;
  1376. },
  1377. // 商品明细分页处理
  1378. currentChange(val) {
  1379. this.goodPage.currentPage = val;
  1380. this.getItemDetail();
  1381. },
  1382. sizeChange(val) {
  1383. this.goodPage.currentPage = 1;
  1384. this.goodPage.pageSize = val;
  1385. this.getItemDetail();
  1386. },
  1387. getItemDetail() {
  1388. const data = {
  1389. pid: this.form.id,
  1390. };
  1391. this.goodLoading = true;
  1392. itemDetail(this.goodPage.currentPage, this.goodPage.pageSize, data).then(res => {
  1393. this.dataList = res.data.data.records;
  1394. this.goodPage.total = res.data.data.total;
  1395. this.oldDataList = [...this.dataList];
  1396. }).finally(() => {
  1397. this.goodLoading = false;
  1398. })
  1399. },
  1400. // 验证新旧值对比
  1401. verification() {
  1402. console.log(contrastList(this.dataList, this.oldDataList))
  1403. if (contrastObj(this.form, this.oldForm) ||
  1404. contrastList(this.dataList, this.oldDataList) ||
  1405. contrastList(this.uploadData, this.oldUploadData)) {
  1406. this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
  1407. confirmButtonText: "确定",
  1408. cancelButtonText: "取消",
  1409. type: "warning"
  1410. }).then(() => {
  1411. this.editCustomer();
  1412. }).catch(() => {
  1413. return false; //取消改动数据
  1414. })
  1415. } else {
  1416. return true;
  1417. }
  1418. },
  1419. },
  1420. }
  1421. </script>
  1422. <style lang="scss" scoped>
  1423. .trading-form ::v-deep .el-form-item {
  1424. margin-bottom: 8px !important;
  1425. }
  1426. ::v-deep .el-form-item__error {
  1427. display: none !important;
  1428. }
  1429. ::v-deep .select-component {
  1430. display: flex !important;
  1431. }
  1432. </style>