index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857
  1. <template>
  2. <div class="tenant">
  3. <div class="content">
  4. <byTable
  5. :source="sourceList.data"
  6. :pagination="sourceList.pagination"
  7. :config="config"
  8. :loading="loading"
  9. :selectConfig="selectConfig"
  10. highlight-current-row
  11. :action-list="[
  12. {
  13. text: '新建报价单',
  14. action: () => newPriceSheet(),
  15. },
  16. ]"
  17. @get-list="getList"
  18. >
  19. <template #code="{ item }">
  20. <div style="width: 100%">
  21. <a
  22. style="color: #409eff; cursor: pointer; word-break: break-all"
  23. @click="pushProcessApproval(item)"
  24. >{{ item.code }}</a
  25. >
  26. </div>
  27. </template>
  28. <template #amount="{ item }">
  29. <div>
  30. <span style="padding-right: 4px">{{ item.currency }}</span>
  31. <span>{{ moneyFormat(item.amount, 2) }}</span>
  32. </div>
  33. </template>
  34. <template #advanceRatio="{ item }">
  35. <div>
  36. <span>{{ item.advanceRatio }}%</span>
  37. </div>
  38. </template>
  39. <template #status="{ item }">
  40. <div>
  41. <span :style="getStyle(item.status)">{{
  42. dictValueLabel(item.status, status)
  43. }}</span>
  44. </div>
  45. </template>
  46. </byTable>
  47. </div>
  48. <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="860">
  49. <div id="printMe">
  50. <div
  51. id="pdfDom"
  52. style="width: 800px; padding: 16px; font-size: 12px !important"
  53. >
  54. <div style="font-size: 18px; text-align: center">
  55. {{
  56. getLabel(
  57. printDetails.sellCorporationId,
  58. corporationList,
  59. "nameEn"
  60. )
  61. }}
  62. </div>
  63. <div style="text-align: center">
  64. {{ printDetails.sellCountryName }},{{
  65. printDetails.sellProvinceName
  66. }},{{ printDetails.sellCityName }},{{ printDetails.sellAddress }}
  67. </div>
  68. <div
  69. style="
  70. font-size: 14px;
  71. color: #409eff;
  72. text-align: center;
  73. padding-top: 16px;
  74. "
  75. >
  76. QUOTATION
  77. </div>
  78. <div style="padding-top: 8px">
  79. <div>Reference NO. : {{ printDetails.code }}</div>
  80. <div style="display: flex">
  81. <div style="width: 50%">
  82. DATE:
  83. {{ moment(printDetails.createTime).format("DD/MMM/yyyy") }}
  84. </div>
  85. <div style="width: 50%">Valid Date:</div>
  86. </div>
  87. </div>
  88. <div style="border: 1px solid black; display: flex">
  89. <div style="width: 50%; border-right: 1px solid black">
  90. <div style="color: #409eff">VENDOR:</div>
  91. <div>
  92. {{
  93. getLabel(
  94. printDetails.sellCorporationId,
  95. corporationList,
  96. "nameEn"
  97. )
  98. }}
  99. </div>
  100. <div style="padding: 16px 0">
  101. {{ printDetails.sellCountryName }},{{
  102. printDetails.sellProvinceName
  103. }},{{ printDetails.sellCityName }},{{
  104. printDetails.sellAddress
  105. }}
  106. </div>
  107. <div>
  108. {{ printDetails.sellContactName }},{{
  109. printDetails.sellContactNumber
  110. }}
  111. </div>
  112. </div>
  113. <div style="width: 50%">
  114. <div style="color: #409eff">BUYER:</div>
  115. <div>
  116. {{
  117. getLabel(printDetails.buyCorporationId, customerList, "name")
  118. }}
  119. </div>
  120. <div style="padding: 16px 0">
  121. {{ printDetails.buyCountryName }},{{
  122. printDetails.buyProvinceName
  123. }},{{ printDetails.buyCityName }},{{ printDetails.buyAddress }}
  124. </div>
  125. <div>
  126. {{ printDetails.buyContactName }},{{
  127. printDetails.buyContactNumber
  128. }}
  129. </div>
  130. </div>
  131. </div>
  132. <div style="height: 16px"></div>
  133. <div style="border: 1px solid black">
  134. <div style="display: flex; width: 100%">
  135. <div
  136. style="
  137. width: 33%;
  138. border-bottom: 1px solid black;
  139. border-right: 1px solid black;
  140. "
  141. >
  142. <div style="color: #409eff">COUNTRY OF ORIGIN:</div>
  143. <div>{{ printDetails.sellCountryName }}</div>
  144. </div>
  145. <div
  146. style="
  147. width: 34%;
  148. border-bottom: 1px solid black;
  149. border-right: 1px solid black;
  150. "
  151. >
  152. <div style="color: #409eff">COUNTRY OF DESTINATION:</div>
  153. <div>{{ printDetails.buyCountryName }}</div>
  154. </div>
  155. <div style="width: 33%; border-bottom: 1px solid black">
  156. <div style="color: #409eff">PLACE OF DISCHARGE:</div>
  157. <div>{{ printDetails.transportRemark }}</div>
  158. </div>
  159. </div>
  160. <div style="display: flex; width: 100%">
  161. <div
  162. style="
  163. width: 33%;
  164. border-bottom: 1px solid black;
  165. border-right: 1px solid black;
  166. "
  167. >
  168. <div style="color: #409eff">TERMS OF DELIVERY:</div>
  169. <div>
  170. {{ dictValueLabel(printDetails.tradeMethods, tradeMethods) }}
  171. </div>
  172. </div>
  173. <div
  174. style="
  175. width: 34%;
  176. border-bottom: 1px solid black;
  177. border-right: 1px solid black;
  178. "
  179. >
  180. <div style="color: #409eff">CURRENCY:</div>
  181. <div>
  182. {{ dictValueLabel(printDetails.currency, accountCurrency) }}
  183. </div>
  184. </div>
  185. <div style="width: 33%; border-bottom: 1px solid black">
  186. <div style="color: #409eff">EXPORT BY/VIA:</div>
  187. <div>
  188. {{
  189. dictValueLabel(printDetails.transportMethod, shippingMethod)
  190. }}
  191. </div>
  192. </div>
  193. </div>
  194. <div style="display: flex; width: 100%">
  195. <div style="width: 33%; border-right: 1px solid black">
  196. <div style="color: #409eff">DELIVERY TIME:</div>
  197. </div>
  198. <div style="width: 67%">
  199. <div style="color: #409eff">TERMS OF PAYMENT:</div>
  200. <div>{{ printDetails.remark }}</div>
  201. </div>
  202. </div>
  203. </div>
  204. <div style="height: 16px"></div>
  205. <div class="baseRow" style="display: flex; color: #409eff">
  206. <div class="contentRow" style="width: 50px; text-align: center">
  207. NO.
  208. </div>
  209. <div
  210. class="contentRow"
  211. style="width: calc(100% - 450px); text-align: center"
  212. >
  213. COMMODITY, SPECIFICATION
  214. </div>
  215. <div class="contentRow" style="width: 100px; text-align: center">
  216. UNIT
  217. </div>
  218. <div class="contentRow" style="width: 100px; text-align: center">
  219. QUANTITY
  220. </div>
  221. <div class="contentRow" style="width: 100px; text-align: center">
  222. UNIT PRICE
  223. </div>
  224. <div class="contentRow" style="width: 100px; text-align: center">
  225. TOTAL PRICE
  226. </div>
  227. </div>
  228. <div
  229. v-if="
  230. printDetails.quotationProductList &&
  231. printDetails.quotationProductList.length > 0
  232. "
  233. >
  234. <div
  235. class="baseRow"
  236. style="display: flex"
  237. v-for="(item, index) in printDetails.quotationProductList"
  238. :key="item.productId"
  239. >
  240. <div class="contentRow" style="width: 50px; text-align: center">
  241. {{ index + 1 }}
  242. </div>
  243. <div
  244. class="contentRow"
  245. style="width: calc(100% - 450px); text-align: center"
  246. >
  247. {{ item.productName }}
  248. </div>
  249. <div class="contentRow" style="width: 100px; text-align: center">
  250. {{ dictValueLabel(item.productUnit, productUnit) }}
  251. </div>
  252. <div class="contentRow" style="width: 100px; text-align: center">
  253. {{ item.quantity }}
  254. </div>
  255. <div class="contentRow" style="width: 100px; text-align: center">
  256. {{ item.price }}
  257. </div>
  258. <div class="contentRow" style="width: 100px; text-align: center">
  259. {{ item.amount }}
  260. </div>
  261. </div>
  262. </div>
  263. <div class="baseRow" style="display: flex; color: #409eff">
  264. <div
  265. class="contentRow"
  266. style="width: calc(100% - 400px); text-align: center"
  267. >
  268. SUBTOTAL:
  269. </div>
  270. <div
  271. class="contentRow"
  272. style="width: 100px; text-align: center"
  273. ></div>
  274. <div class="contentRow" style="width: 100px; text-align: center">
  275. {{ statistics("quantity", 2) }}
  276. </div>
  277. <div
  278. class="contentRow"
  279. style="width: 100px; text-align: center"
  280. ></div>
  281. <div class="contentRow" style="width: 100px; text-align: center">
  282. {{ statistics("amount", 2) }}
  283. </div>
  284. </div>
  285. <div
  286. v-if="
  287. printDetails.quotationPayList &&
  288. printDetails.quotationPayList.length > 0
  289. "
  290. >
  291. <div
  292. class="baseRow"
  293. style="display: flex"
  294. v-for="(item, index) in printDetails.quotationPayList"
  295. :key="index"
  296. >
  297. <div
  298. class="contentRow"
  299. style="
  300. width: calc(100% - 100px);
  301. text-align: right;
  302. color: #409eff;
  303. "
  304. >
  305. {{ item.payName }}:
  306. </div>
  307. <div class="contentRow" style="width: 100px; text-align: center">
  308. {{ item.amount }}
  309. </div>
  310. </div>
  311. </div>
  312. <div class="baseRow" style="display: flex">
  313. <div
  314. class="contentRow"
  315. style="
  316. width: calc(100% - 100px);
  317. text-align: right;
  318. color: #409eff;
  319. "
  320. >
  321. TOTAL PRICE:
  322. </div>
  323. <div class="contentRow" style="width: 100px; text-align: center">
  324. {{ getAllMoney(statistics("amount", 2)) }}
  325. </div>
  326. </div>
  327. <div
  328. class="baseRow"
  329. style="display: flex; border-bottom: 1px solid black"
  330. >
  331. <div class="contentRow" style="width: 100%">
  332. {{
  333. translateIntoEnglish(printDetails.amount, printDetails.currency)
  334. }}
  335. </div>
  336. </div>
  337. <!-- <div style="height: 16px"></div>
  338. <div class="baseRow" style="color: #409eff">
  339. <div class="contentRow" style="width: 100%">ACCOUNT INFORMATION:</div>
  340. </div>
  341. <div class="baseRow" style="border-bottom: 1px solid black">
  342. <div class="contentRow" style="width: 100%">
  343. <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
  344. Beneficiary Name: {{ printDetails.beneficiaryName }}
  345. </div>
  346. <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
  347. Beneficiary Bank: {{ printDetails.beneficiaryBank }}
  348. </div>
  349. <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
  350. Beneficiary Bank Address: {{ printDetails.beneficiaryBankAddress }}
  351. </div>
  352. <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
  353. Beneficiary Account Number: {{ printDetails.beneficiaryAccountNumber }}
  354. </div>
  355. <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Swift Code: {{ printDetails.swiftCode }}</div>
  356. <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
  357. Beneficiary Address: {{ printDetails.beneficiaryAddress }}
  358. </div>
  359. </div>
  360. </div> -->
  361. <div style="height: 32px"></div>
  362. <div style="display: flex">
  363. <div style="width: 50%">
  364. <div style="color: #409eff">CONFIRMED BY VENDOR:</div>
  365. <div>
  366. {{
  367. getLabel(
  368. printDetails.sellCorporationId,
  369. corporationList,
  370. "nameEn"
  371. )
  372. }}
  373. </div>
  374. </div>
  375. <div style="width: 50%">
  376. <div style="color: #409eff">CONFIRMED BY BUYER:</div>
  377. <div>
  378. {{
  379. getLabel(printDetails.buyCorporationId, customerList, "name")
  380. }}
  381. </div>
  382. </div>
  383. </div>
  384. </div>
  385. </div>
  386. <template #footer>
  387. <el-button @click="openPrint = false" size="large">取消</el-button>
  388. <el-button v-print="printObj" size="large">打印</el-button>
  389. <el-button type="primary" @click="clickDownload()" size="large"
  390. >下载PDF</el-button
  391. >
  392. </template>
  393. </el-dialog>
  394. </div>
  395. </template>
  396. <script setup>
  397. import { computed, ref } from "vue";
  398. import byTable from "@/components/byTable/index";
  399. import moment from "moment";
  400. import useUserStore from "@/store/modules/user";
  401. const route = useRoute();
  402. const { proxy } = getCurrentInstance();
  403. const accountList = ref([]);
  404. const corporationList = ref([]);
  405. const customerList = ref([]);
  406. const tradeMethods = ref([]);
  407. const accountCurrency = ref([]);
  408. const shippingMethod = ref([]);
  409. const productUnit = ref([]);
  410. const status = ref([
  411. {
  412. label: "草稿",
  413. value: 0,
  414. },
  415. {
  416. label: "审批中",
  417. value: 10,
  418. },
  419. {
  420. label: "驳回",
  421. value: 20,
  422. },
  423. {
  424. label: "审批通过",
  425. value: 30,
  426. },
  427. {
  428. label: "终止",
  429. value: 99,
  430. },
  431. ]);
  432. const sourceList = ref({
  433. data: [],
  434. pagination: {
  435. total: 0,
  436. pageNum: 1,
  437. pageSize: 10,
  438. keyword: "",
  439. status: "",
  440. sellCorporationId: "",
  441. },
  442. });
  443. const loading = ref(false);
  444. const selectConfig = computed(() => {
  445. return [
  446. {
  447. label: "审批状态",
  448. prop: "status",
  449. data: status.value,
  450. },
  451. {
  452. label: "归属公司",
  453. prop: "sellCorporationId",
  454. data: corporationList.value,
  455. },
  456. ];
  457. });
  458. const config = computed(() => {
  459. return [
  460. {
  461. attrs: {
  462. label: "报价单号",
  463. slot: "code",
  464. width: 200,
  465. },
  466. },
  467. {
  468. attrs: {
  469. label: "归属公司",
  470. prop: "sellCorporationId",
  471. "min-width": 220,
  472. },
  473. render(type) {
  474. let text = "";
  475. if (corporationList.value && corporationList.value.length > 0) {
  476. let data = corporationList.value.filter((item) => item.value == type);
  477. if (data && data.length > 0) {
  478. text = data[0].label;
  479. }
  480. }
  481. return text;
  482. },
  483. },
  484. {
  485. attrs: {
  486. label: "报价人",
  487. prop: "userName",
  488. width: 160,
  489. },
  490. },
  491. {
  492. attrs: {
  493. label: "报价时间",
  494. prop: "createTime",
  495. width: 160,
  496. },
  497. },
  498. {
  499. attrs: {
  500. label: "客户名称",
  501. prop: "buyCorporationId",
  502. "min-width": 220,
  503. },
  504. render(type) {
  505. let text = "";
  506. if (customerList.value && customerList.value.length > 0) {
  507. let data = customerList.value.filter((item) => item.value == type);
  508. if (data && data.length > 0) {
  509. text = data[0].label;
  510. }
  511. }
  512. return text;
  513. },
  514. },
  515. {
  516. attrs: {
  517. label: "报价金额",
  518. slot: "amount",
  519. width: 140,
  520. },
  521. },
  522. {
  523. attrs: {
  524. label: "预付比例",
  525. slot: "advanceRatio",
  526. width: 120,
  527. },
  528. },
  529. {
  530. attrs: {
  531. label: "审批状态",
  532. prop: "status",
  533. width: 140,
  534. slot: "status",
  535. },
  536. },
  537. {
  538. attrs: {
  539. label: "操作",
  540. width: "180",
  541. align: "center",
  542. fixed: "right",
  543. },
  544. renderHTML(row) {
  545. return [
  546. row.status == 0
  547. ? {
  548. attrs: {
  549. label: "修改",
  550. type: "primary",
  551. text: true,
  552. },
  553. el: "button",
  554. click() {
  555. clickUpdate(row);
  556. },
  557. }
  558. : {},
  559. {
  560. attrs: {
  561. label: "复制",
  562. type: "primary",
  563. text: true,
  564. },
  565. el: "button",
  566. click() {
  567. clickCopy(row);
  568. },
  569. },
  570. {
  571. attrs: {
  572. label: "打印",
  573. type: "primary",
  574. text: true,
  575. },
  576. el: "button",
  577. click() {
  578. clickPrint(row);
  579. },
  580. },
  581. row.status == 30
  582. ? {
  583. attrs: {
  584. label: "生成合同",
  585. type: "primary",
  586. text: true,
  587. },
  588. el: "button",
  589. click() {
  590. generateContract(row);
  591. },
  592. }
  593. : {},
  594. ];
  595. },
  596. },
  597. ];
  598. });
  599. const getDict = () => {
  600. proxy
  601. .post("/saleQuotation/page", { pageNum: 1, pageSize: 999 })
  602. .then((res) => {
  603. accountList.value = res.rows.map((item) => {
  604. return {
  605. label: item.alias,
  606. value: item.id,
  607. };
  608. });
  609. });
  610. proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
  611. corporationList.value = res.rows.map((item) => {
  612. return {
  613. ...item,
  614. label: item.name,
  615. value: item.id,
  616. };
  617. });
  618. });
  619. proxy.post("/customer/page", { pageNum: 1, pageSize: 999 }).then((res) => {
  620. customerList.value = res.rows.map((item) => {
  621. return {
  622. ...item,
  623. label: item.name,
  624. value: item.id,
  625. };
  626. });
  627. });
  628. proxy
  629. .post("/dictTenantData/page", {
  630. pageNum: 1,
  631. pageSize: 999,
  632. dictCode: "trade_mode",
  633. tenantId: useUserStore().user.tenantId,
  634. })
  635. .then((res) => {
  636. if (res.rows && res.rows.length > 0) {
  637. tradeMethods.value = res.rows.map((item) => {
  638. return {
  639. label: item.dictValue,
  640. value: item.dictKey,
  641. };
  642. });
  643. }
  644. });
  645. proxy
  646. .post("/dictTenantData/page", {
  647. pageNum: 1,
  648. pageSize: 999,
  649. dictCode: "account_currency",
  650. tenantId: useUserStore().user.tenantId,
  651. })
  652. .then((res) => {
  653. if (res.rows && res.rows.length > 0) {
  654. accountCurrency.value = res.rows.map((item) => {
  655. return {
  656. label: item.dictValue,
  657. value: item.dictKey,
  658. };
  659. });
  660. }
  661. });
  662. proxy
  663. .post("/dictTenantData/page", {
  664. pageNum: 1,
  665. pageSize: 999,
  666. dictCode: "shipping_method",
  667. tenantId: useUserStore().user.tenantId,
  668. })
  669. .then((res) => {
  670. if (res.rows && res.rows.length > 0) {
  671. shippingMethod.value = res.rows.map((item) => {
  672. return {
  673. label: item.dictValue,
  674. value: item.dictKey,
  675. };
  676. });
  677. }
  678. });
  679. proxy.getDictOne(["unit"]).then((res) => {
  680. productUnit.value = res["unit"].map((x) => ({
  681. label: x.dictValue,
  682. value: x.dictKey,
  683. }));
  684. });
  685. };
  686. const getList = async (req) => {
  687. sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
  688. loading.value = true;
  689. proxy.post("/saleQuotation/page", sourceList.value.pagination).then((res) => {
  690. sourceList.value.data = res.rows;
  691. sourceList.value.pagination.total = res.total;
  692. setTimeout(() => {
  693. loading.value = false;
  694. }, 200);
  695. });
  696. };
  697. getDict();
  698. if (route.query.code) {
  699. sourceList.value.pagination.keyword = route.query.code;
  700. }
  701. getList();
  702. const newPriceSheet = () => {
  703. proxy.$router.replace({
  704. path: "/platform_manage/process/processApproval",
  705. query: {
  706. flowKey: "sale_quotation_flow",
  707. flowName: "报价审批流程",
  708. random: proxy.random(),
  709. },
  710. });
  711. };
  712. const clickCopy = (item) => {
  713. proxy.$router.replace({
  714. path: "/platform_manage/process/processApproval",
  715. query: {
  716. flowKey: "sale_quotation_flow",
  717. flowName: "报价审批流程",
  718. priceSheetId: item.id,
  719. random: proxy.random(),
  720. },
  721. });
  722. };
  723. const openPrint = ref(false);
  724. const printDetails = ref({});
  725. const clickPrint = (row) => {
  726. printDetails.value = {};
  727. openPrint.value = true;
  728. proxy.post("/saleQuotation/detail", { id: row.id }).then((res) => {
  729. printDetails.value = res;
  730. });
  731. };
  732. const clickDownload = () => {
  733. proxy.getPdf("报价单PDF文件");
  734. };
  735. const statistics = (label, index) => {
  736. let num = 0;
  737. if (
  738. printDetails.value.quotationProductList &&
  739. printDetails.value.quotationProductList.length > 0
  740. ) {
  741. printDetails.value.quotationProductList.map((item) => {
  742. if (item[label]) {
  743. num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
  744. }
  745. });
  746. }
  747. return num;
  748. };
  749. const getLabel = (key, list, label) => {
  750. let text = "";
  751. if (list && list.length > 0) {
  752. let data = list.filter((item) => item.id === key);
  753. if (data && data.length > 0) {
  754. text = data[0][label];
  755. }
  756. }
  757. return text;
  758. };
  759. const getAllMoney = (num) => {
  760. let money = num;
  761. if (
  762. printDetails.value.quotationPayList &&
  763. printDetails.value.quotationPayList.length > 0
  764. ) {
  765. printDetails.value.quotationPayList.map((item) => {
  766. if (item.amount) {
  767. money = parseFloat(Number(money) + Number(item.amount)).toFixed(2);
  768. }
  769. });
  770. }
  771. return money;
  772. };
  773. const generateContract = (row) => {
  774. proxy.$router.replace({
  775. path: "/platform_manage/process/processApproval",
  776. query: {
  777. flowKey: "contract_flow",
  778. flowName: "销售合同审批流程",
  779. random: proxy.random(),
  780. priceSheetId: row.id,
  781. },
  782. });
  783. };
  784. const pushProcessApproval = (row) => {
  785. proxy.$router.push({
  786. path: "/platform_manage/process/processApproval",
  787. query: {
  788. flowKey: "sale_quotation_flow",
  789. id: row.flowId,
  790. processType: 20,
  791. random: proxy.random(),
  792. flowName: "报价单详情",
  793. },
  794. });
  795. return;
  796. };
  797. const printObj = ref({
  798. id: "printMe",
  799. popTitle: "",
  800. extraCss:
  801. "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
  802. extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
  803. });
  804. const getStyle = (status) => {
  805. if (status == 10) {
  806. return {
  807. color: "#FF9315",
  808. };
  809. } else if (status == 30) {
  810. return {
  811. color: "#39C55A",
  812. };
  813. } else if (status == 20 || status == 99) {
  814. return {
  815. color: "#FF655B",
  816. };
  817. } else {
  818. return {};
  819. }
  820. };
  821. const clickUpdate = (row) => {
  822. proxy.$router.replace({
  823. path: "/platform_manage/process/processApproval",
  824. query: {
  825. flowKey: "sale_quotation_flow",
  826. flowName: "报价审批流程",
  827. priceSheetIdOne: row.id,
  828. random: proxy.random(),
  829. },
  830. });
  831. };
  832. </script>
  833. <style lang="scss" scoped>
  834. .tenant {
  835. padding: 20px;
  836. }
  837. ::v-deep(.el-input-number .el-input__inner) {
  838. text-align: left;
  839. }
  840. .baseRow {
  841. min-height: 24px;
  842. border-top: 1px solid black;
  843. border-left: 1px solid black;
  844. }
  845. .contentRow {
  846. border-right: 1px solid black;
  847. line-height: 24px;
  848. padding-left: 4px;
  849. }
  850. </style>