index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687
  1. <template>
  2. <div class="table-box">
  3. <LjVxeTable
  4. ref="vxeTableRef"
  5. row-key="mattressid"
  6. :columns="columns"
  7. :init-param="initParams"
  8. :request-api="getData"
  9. :data-callback="dataCallback"
  10. :dwname="DwnameEnum.mattressQuote"
  11. :table-props="tableProps"
  12. :table-events="tableEvents"
  13. :auto-load-layout="false"
  14. :search-btn-size-extent="[]"
  15. pagination
  16. >
  17. <!-- 表格 header 按钮 -->
  18. <template #tableHeader>
  19. <LjHeaderMenu :update="dialogVisible" :action="action" />
  20. </template>
  21. </LjVxeTable>
  22. </div>
  23. <el-dialog v-model="dialogFormVisible" title="部门选择" width="500" draggable append-to-body>
  24. <el-form :model="formParam" label-width="80px">
  25. <el-form-item label="部门">
  26. <el-select v-model="formParam.deptid" placeholder="请选择部门">
  27. <el-option v-for="(col, index) in deptEnum" :key="index" :label="col.label" :value="col.value"></el-option>
  28. </el-select>
  29. </el-form-item>
  30. <el-form-item label="地区">
  31. <el-select v-model="formParam.area">
  32. <el-option label="维持原状" value="维持原状" />
  33. <el-option label="普通地区" value="普通地区" />
  34. <el-option label="特定地区" value="特定地区" />
  35. </el-select>
  36. </el-form-item>
  37. <el-form-item label="柜型">
  38. <el-select v-model="formParam.cabinet_type">
  39. <el-option label="维持原状" value="维持原状" />
  40. <el-option label="大柜" value="大柜" />
  41. <el-option label="小柜" value="小柜" />
  42. </el-select>
  43. </el-form-item>
  44. <el-form-item label="压包数量" v-if="formParam.packtype == 0">
  45. <el-input-number v-model="formParam.packqty" :min="0" :max="1000" />
  46. </el-form-item>
  47. </el-form>
  48. <template #footer>
  49. <div class="dialog-footer">
  50. <el-button @click="dialogFormVisible = false">取消</el-button>
  51. <el-button type="primary" @click="BatchCopyMattressAudited">确认</el-button>
  52. </div>
  53. </template>
  54. </el-dialog>
  55. <LjDrawerQuoteList ref="QuoteListDrawerRef" :iforigin="isShowOriginFormulaMattress" />
  56. </template>
  57. <script setup lang="ts" name="mattressQuote">
  58. import { ref, onMounted, inject, reactive } from "vue";
  59. import { useRouter } from "vue-router";
  60. import {
  61. SaveMattressAuditing,
  62. DelMattress,
  63. CopyMattressAudited,
  64. ReCalculateNoAudit,
  65. ReCalculateERPCost,
  66. GetComputeMattressById
  67. } from "@/api/modules/quote";
  68. import { CommonDynamicSelect } from "@/api/modules/common";
  69. import { ColumnProps } from "@/components/LjVxeTable/interface";
  70. import LjDrawer from "@/components/LjDrawer/index.vue";
  71. // import PriceListDetail from "./detail.vue";
  72. import { useHooks } from "./hooks/index";
  73. import { useHooksCpQuote } from "./hooks/cpQuote";
  74. import LjDialog from "@/components/LjDialog/index.vue";
  75. import LjHeaderMenu from "@/components/LjHeaderMenu/index.vue";
  76. import { useI18n } from "vue-i18n";
  77. import { useAuthButtons } from "@/hooks/useAuthButtons";
  78. import { DwnameEnum } from "@/enums/dwnameEnum";
  79. import { formatToDateTime, formatToDate } from "@/utils/dateUtil";
  80. import { cloneDeep } from "lodash-es";
  81. import { useGlobalStore } from "@/stores/modules/global";
  82. import { ElMessage, ElMessageBox } from "element-plus";
  83. import { detailAction } from "@/components/LjDetail/interface";
  84. import mittBus from "@/utils/mittBus";
  85. import { MittEnum } from "@/enums/mittEnum";
  86. import { getCurrentRecords } from "@/utils/index";
  87. import { useUserStore } from "@/stores/modules/user";
  88. import LjDrawerQuoteList from "./components/QuoteListNew.vue";
  89. import { storeToRefs } from "pinia";
  90. const { t } = useI18n();
  91. const router = useRouter();
  92. const globalStore = useGlobalStore();
  93. const {
  94. vxeTableRef,
  95. columns,
  96. initParams,
  97. dataCallback,
  98. gotoErpapi,
  99. getFormulakindEnum,
  100. formulaKindEnum,
  101. fabricMxTabList,
  102. funcChaifenTabPro,
  103. getQuoteListMxData
  104. } = useHooks();
  105. const { toExcelQuote } = useHooksCpQuote();
  106. const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
  107. // const initParams = ref({});
  108. const dialogVisible = ref(false);
  109. // const vxeTableRef = ref();
  110. const dialogFormVisible = ref(false);
  111. const deptEnum = ref([]);
  112. const QuoteListDrawerRef = ref(null);
  113. const { isShowOriginFormulaMattress } = storeToRefs(globalStore);
  114. const loadingStatus = reactive({
  115. showQd: false,
  116. download: false
  117. });
  118. const formParam = ref({
  119. deptid: 0,
  120. area: "维持原状",
  121. cabinet_type: "维持原状",
  122. packtype: 0,
  123. packqty: 0
  124. });
  125. const getData = (params: any) => {
  126. console.log("getData mattress params :>> ", params);
  127. let newParams: any = {};
  128. params.pageNum && (newParams.pageindex = params.pageNum);
  129. params.pageSize && (newParams.pagesize = params.pageSize);
  130. params.orderstr && (newParams.orderstr = params.orderstr);
  131. delete params.arg_mattressid;
  132. delete params.pageNum;
  133. delete params.pageSize;
  134. delete params.orderstr;
  135. let _params = cloneDeep(params);
  136. switch (_params.status_flag) {
  137. case "1": // 待下单
  138. _params.arg_xd_flag = 0;
  139. break;
  140. case "2": // 已下单
  141. _params.arg_xd_flag = 1;
  142. break;
  143. case "3": // 待财务审核
  144. _params.arg_cp_flag = 1;
  145. _params.arg_flag = 0;
  146. break;
  147. case "4": // 已财务审核
  148. _params.arg_flag = 1;
  149. break;
  150. default:
  151. break;
  152. }
  153. newParams.queryParams = _params;
  154. newParams.dsname = "web_mattress";
  155. return CommonDynamicSelect(newParams, DwnameEnum.mattressQuote);
  156. // return [];
  157. };
  158. const handleDBlClickTable = ({ row, rowIndex, $rowIndex, column, columnIndex, $columnIndex, $event }: any) => {
  159. if (globalStore.detailBlank) {
  160. // 打开新的窗口
  161. const routeUrl = router.resolve({
  162. path: `/mattressQuote/detail`,
  163. query: {
  164. id: row.mattressid,
  165. code: row.mattresscode
  166. }
  167. });
  168. window.open(routeUrl.href, "_blank");
  169. } else {
  170. // if (currentLayout.value.right.hidden && globalStore.mxFloat?.includes("custCrmDetail")) {
  171. // // 弹窗
  172. // mainData.value = row;
  173. // LjDrawerRef.value.show();
  174. // } else {
  175. // 打开新的标签页
  176. router.push(`/mattressQuote/detail?id=${row.mattressid}&code=${row.mattresscode}`);
  177. // }
  178. }
  179. };
  180. const rowClsNameFunc = (data: any) => {
  181. const { row, rowIndex, $rowIndex } = data;
  182. if (Number(row.flag) == 0) {
  183. if (Number(row.xd_flag) == 0) {
  184. return "vxecol-danger";
  185. }
  186. if (Number(row.xd_flag) == 1) {
  187. return "vxecol-blue";
  188. }
  189. }
  190. return "";
  191. };
  192. const tableProps = {
  193. height: "auto",
  194. editConfig: { trigger: "click", mode: "cell" },
  195. rowClassName: rowClsNameFunc,
  196. exportConfig: {
  197. filename: t("menu.rpMsttake") + formatToDate(new Date(), "YYYY-MM-DD HH:mm:ss")
  198. },
  199. treeConfig: {
  200. expandAll: true,
  201. transform: true,
  202. rowField: "mattressid",
  203. parentField: "parentid"
  204. },
  205. checkboxConfig: {
  206. checkStrictly: true
  207. }
  208. };
  209. // 返回绑定的事件
  210. const tableEvents = {
  211. // "checkbox-change": handleCheckboxChange,
  212. // "checkbox-all": handleCheckboxChange,
  213. // "checkbox-range-change": handleCheckboxChange,
  214. // "current-change": handleCurrentChanged
  215. "cell-dblclick": handleDBlClickTable
  216. // "cell-click": handleClickTable
  217. };
  218. onMounted(() => {
  219. dialogVisible.value = true;
  220. getFormulakindEnum();
  221. });
  222. /**
  223. * @description 业务下单或财务审核操作
  224. * @param params 对象,入参
  225. */
  226. const toAuditing = (params: any, message: string) => {
  227. const { curRecords } = getCurrentRecords(vxeTableRef.value);
  228. console.log("curRecords :>> ", curRecords);
  229. if (!curRecords.length) {
  230. ElMessage.warning(t("business.tips.mattress.records"));
  231. return;
  232. }
  233. curRecords.map(o => {
  234. if (params.hasOwnProperty("xd_flag")) {
  235. if (o.yw_flag == 1) {
  236. ElMessage.warning("已业务补充审核,无法修改");
  237. return;
  238. }
  239. }
  240. });
  241. let _mattressids = curRecords.map((item: any) => Number(item.mattressid));
  242. ElMessageBox.confirm(`是否确定要对${curRecords.length}张床垫报价单进行操作`, "询问", {
  243. confirmButtonText: message,
  244. cancelButtonText: "否",
  245. type: "warning"
  246. })
  247. .then(() => {
  248. let _params = {
  249. ...params,
  250. mattressids: _mattressids
  251. };
  252. SaveMattressAuditing(_params).then(() => {
  253. ElMessage.success(t("sys.api.operationSuccess"));
  254. vxeTableRef.value.refresh();
  255. });
  256. })
  257. .catch((e: TypeError) => {
  258. ElMessage({
  259. type: "info",
  260. message: "操作取消"
  261. });
  262. });
  263. };
  264. /**
  265. * @description 按钮展示
  266. */
  267. const action: detailAction[] = [
  268. buttonDefault({
  269. label: t("common.redo"),
  270. clickFunc: item => {
  271. vxeTableRef.value.refresh();
  272. }
  273. }),
  274. buttonDefault({
  275. label: t("common.add"),
  276. power: 72,
  277. clickFunc: item => {
  278. console.log("inewss nitParams.value :>> ", vxeTableRef.value.searchParam);
  279. let _deptid = 0;
  280. if (Object.keys(vxeTableRef.value.searchParam).includes("arg_deptid")) {
  281. _deptid = vxeTableRef.value.searchParam.arg_deptid ?? 0;
  282. }
  283. if (_deptid == 0) {
  284. let enumMap = vxeTableRef.value.enumMap;
  285. let enumdata = enumMap.get("deptid");
  286. if (enumdata && enumdata.length > 0) {
  287. _deptid = enumdata[0].value;
  288. }
  289. }
  290. router.push(`/mattressQuote/new?id=0&deptid=${_deptid}`);
  291. }
  292. }),
  293. buttonDefault({
  294. label: t("common.editText"),
  295. power: 72,
  296. clickFunc: item => {
  297. const { $table, curRecords } = getCurrentRecords(vxeTableRef.value);
  298. if (!curRecords.length) {
  299. ElMessage.warning(t("business.tips.mattress.records"));
  300. return;
  301. }
  302. const _cur = curRecords[curRecords.length - 1];
  303. console.log("修改 _cur :>> ", _cur);
  304. if (_cur.parentid > 0) {
  305. ElMessage.warning("副规格无法编辑");
  306. return;
  307. }
  308. if (_cur.xd_flag == 1) {
  309. ElMessage.warning("已业务下单,不能修改");
  310. return;
  311. }
  312. if (_cur.flag == 1) {
  313. ElMessage.warning("单据已财核,不能修改");
  314. return;
  315. }
  316. router.push(`/mattressQuote/edit?id=${_cur.mattressid}&code=${_cur.mattresscode}`);
  317. }
  318. }),
  319. buttonDefault({
  320. label: t("common.delText"),
  321. power: 77,
  322. disabledTextCallBack: (data: any) => {
  323. if (!CheckPower(77)) {
  324. return "你没有【报价单-删除】的使用权限";
  325. }
  326. return "";
  327. },
  328. clickFunc: item => {
  329. const { curRecords } = getCurrentRecords(vxeTableRef.value);
  330. console.log("curRecords :>> ", curRecords);
  331. if (!curRecords.length) {
  332. ElMessage.warning(t("business.tips.mattress.records"));
  333. return;
  334. }
  335. const { userInfo } = useUserStore();
  336. try {
  337. curRecords.map(item => {
  338. if (item.createby !== userInfo.username && userInfo.empid != 0) {
  339. throw new Error("只能删除自己创建的报价单");
  340. }
  341. if (item.xd_flag == 1) {
  342. throw new Error("已业务下单,不能删除");
  343. }
  344. if (item.flag == 1) {
  345. throw new Error("单据已财核,不能删除");
  346. }
  347. });
  348. } catch (error) {
  349. ElMessage.error(error.message);
  350. return false;
  351. }
  352. let _mattressids = curRecords.map((item: any) => Number(item.mattressid));
  353. ElMessageBox.confirm(`是否确定要删除${curRecords.length}张床垫报价单(及其副规格报价单)吗?`, "询问", {
  354. confirmButtonText: t("common.delText"),
  355. cancelButtonText: "否",
  356. type: "warning"
  357. })
  358. .then(() => {
  359. DelMattress({ mattressids: _mattressids }).then(() => {
  360. ElMessage.success("删除成功!");
  361. vxeTableRef.value.refresh();
  362. });
  363. })
  364. .catch((e: TypeError) => {
  365. console.log("e :>> ", e);
  366. ElMessage({
  367. type: "info",
  368. message: "操作取消"
  369. });
  370. });
  371. }
  372. }),
  373. buttonDefault({
  374. label: t("common.copyQuote"),
  375. power: 75,
  376. clickFunc: item => {
  377. const { $table, curRecords } = getCurrentRecords(vxeTableRef.value);
  378. if (!curRecords.length) {
  379. ElMessage.warning(t("business.tips.mattress.records"));
  380. return;
  381. }
  382. let _cur = $table.getCurrentRecord() ?? null;
  383. if (!_cur) {
  384. _cur = curRecords[curRecords.length - 1];
  385. }
  386. router.push(`/mattressQuote/copy?id=${_cur.mattressid}&code=${_cur.mattresscode}`);
  387. }
  388. }),
  389. // [
  390. buttonDefault({
  391. label: t("common.businessOrder"),
  392. power: 94,
  393. clickFunc: item => {
  394. toAuditing({ xd_flag: 1 }, t("common.businessOrder"));
  395. }
  396. }),
  397. buttonDefault({
  398. label: t("common.businessOrderCancel"),
  399. power: 95,
  400. clickFunc: item => {
  401. toAuditing({ xd_flag: 0 }, t("common.businessOrderCancel"));
  402. }
  403. }),
  404. // ],
  405. // [
  406. buttonDefault({
  407. label: t("common.auditFinance"),
  408. power: 73,
  409. clickFunc: item => {
  410. toAuditing({ flag: 1 }, t("common.auditFinance"));
  411. }
  412. }),
  413. buttonDefault({
  414. label: t("common.withdrawAuditFinance"),
  415. power: 74,
  416. clickFunc: item => {
  417. toAuditing({ flag: 0 }, t("common.withdrawAuditFinance"));
  418. }
  419. }),
  420. // ],
  421. buttonDefault({
  422. label: t("common.copyFromMulitFlag"),
  423. power: 75,
  424. clickFunc: async item => {
  425. const { curRecords } = getCurrentRecords(vxeTableRef.value);
  426. console.log("curRecords :>> ", curRecords);
  427. if (!curRecords.length) {
  428. ElMessage.warning(t("business.tips.mattress.records"));
  429. return;
  430. }
  431. await openDeptChoosen(curRecords);
  432. }
  433. }),
  434. buttonDefault({
  435. label: t("common.recalculateFromNotFlag"),
  436. power: 72,
  437. clickFunc: item => {
  438. const { curRecords } = getCurrentRecords(vxeTableRef.value);
  439. console.log("curRecords :>> ", curRecords);
  440. if (!curRecords.length) {
  441. ElMessage.warning(t("business.tips.mattress.records"));
  442. return;
  443. }
  444. let list = curRecords.map((item: any) => {
  445. return { mattressid: Number(item.mattressid) };
  446. });
  447. ElMessageBox.confirm(`是否确定要批重算${curRecords.length}张床垫报价单吗?`, "询问", {
  448. confirmButtonText: t("common.okText"),
  449. cancelButtonText: "否",
  450. type: "warning"
  451. })
  452. .then(() => {
  453. ReCalculateNoAudit({ list }).then(() => {
  454. ElMessage.success("批重算成功!");
  455. vxeTableRef.value.refresh();
  456. });
  457. })
  458. .catch((e: TypeError) => {
  459. console.log("e :>> ", e);
  460. ElMessage({
  461. type: "info",
  462. message: "操作取消"
  463. });
  464. });
  465. }
  466. }),
  467. buttonDefault({
  468. label: t("common.viewHistoricalQuotes"),
  469. power: 72,
  470. clickFunc: item => {
  471. alert("功能维护中!");
  472. }
  473. }),
  474. buttonDefault({
  475. label: t("common.showQuoteList"),
  476. loading: () => loadingStatus.showQd,
  477. power: 72,
  478. clickFunc: async item => {
  479. loadingStatus.showQd = !loadingStatus.showQd;
  480. const { curRecords } = getCurrentRecords(vxeTableRef.value);
  481. console.log("curRecords :>> ", curRecords);
  482. if (!curRecords.length) {
  483. ElMessage.warning(t("business.tips.mattress.records"));
  484. return;
  485. } else if (curRecords.length > 1) {
  486. ElMessage.warning(`无法进行多单${t("common.showQuoteList")}`);
  487. return;
  488. }
  489. const res = await GetComputeMattressById({
  490. mattressid: curRecords[0].mattressid,
  491. check_original: Number(isShowOriginFormulaMattress.value)
  492. });
  493. const isQuoteListMxData = getQuoteListMxData(funcChaifenTabPro(res.mattress, res.mattressMx));
  494. let _data = {
  495. data: res.mattress,
  496. mxdata: isQuoteListMxData,
  497. enumMap: vxeTableRef.value.enumMap,
  498. fabricMx: fabricMxTabList.value,
  499. formulakindenum: formulaKindEnum.value,
  500. dannum_type: res.mattress.dannum_type,
  501. formula: res.formulas, //
  502. replace: res.replace, //
  503. formula_ori: res.formulas_origin, //
  504. formula_bednet: res.formulas_bednet, //
  505. differ: res.differ //
  506. };
  507. QuoteListDrawerRef.value.show(_data);
  508. loadingStatus.showQd = !loadingStatus.showQd;
  509. }
  510. }),
  511. buttonDefault({
  512. label: t("common.dataTransmission"),
  513. power: 72,
  514. clickFunc: item => {
  515. alert("功能维护中!");
  516. }
  517. }),
  518. buttonDefault({
  519. label: t("common.businessSupplement"),
  520. power: 72,
  521. clickFunc: item => {
  522. const { $table, curRecords } = getCurrentRecords(vxeTableRef.value);
  523. if (!curRecords.length) {
  524. ElMessage.warning(t("business.tips.mattress.records"));
  525. return;
  526. }
  527. let _cur = $table.getCurrentRecord() ?? curRecords[curRecords.length - 1];
  528. let type = 1;
  529. // router.push(`/erpapi/mattressInterface/${type}/edit?id=${_cur.mattressid}&code=${_cur.mattresscode}&type=${type}`);
  530. gotoErpapi(_cur, type);
  531. }
  532. }),
  533. buttonDefault({
  534. label: t("common.recalculateERPCost"),
  535. power: 72,
  536. clickFunc: async item => {
  537. const { curRecords } = getCurrentRecords(vxeTableRef.value);
  538. console.log("curRecords :>> ", curRecords);
  539. if (!curRecords.length) {
  540. ElMessage.warning(t("business.tips.mattress.records"));
  541. return;
  542. }
  543. let list = curRecords.map((item: any) => {
  544. return { mattressid: Number(item.mattressid) };
  545. });
  546. ElMessageBox.confirm(`是否确定要批重算${curRecords.length}张床垫报价单吗?`, "询问", {
  547. confirmButtonText: t("common.okText"),
  548. cancelButtonText: "否",
  549. type: "warning"
  550. })
  551. .then(() => {
  552. ReCalculateERPCost({ list }).then((res: any) => {
  553. ElMessage.success(res.logMsg);
  554. vxeTableRef.value.refresh();
  555. });
  556. })
  557. .catch((e: TypeError) => {
  558. ElMessage({
  559. type: "info",
  560. message: "操作取消"
  561. });
  562. });
  563. }
  564. })
  565. ];
  566. const openDeptChoosen = async curRecords => {
  567. try {
  568. // let newParams = {
  569. // dsname: "_Mapper_deptid",
  570. // queryparams: {}
  571. // };
  572. // let res = await CommonDynamicSelect(newParams);
  573. // if (res.datatable) {
  574. // deptEnum.value = res.datatable?.map((item: any) => {
  575. // return { label: item.deptname, value: item.deptid };
  576. // });
  577. // }
  578. let enumMap = vxeTableRef.value.enumMap;
  579. deptEnum.value = enumMap.get("deptid");
  580. console.log("openDeptChoosen deptEnum.value :>> ", deptEnum.value);
  581. if (deptEnum.value.length > 0) {
  582. formParam.value.deptid = curRecords[0].deptid;
  583. formParam.value.packtype = curRecords[0].packtype;
  584. formParam.value.packqty = curRecords[0].packqty;
  585. dialogFormVisible.value = true;
  586. } else {
  587. console.error("获取部门列表为空");
  588. }
  589. } catch (error) {
  590. console.error("获取部门列表失败", error);
  591. }
  592. };
  593. const BatchCopyMattressAudited = () => {
  594. const { curRecords } = getCurrentRecords(vxeTableRef.value);
  595. console.log("curRecords :>> ", curRecords);
  596. if (!curRecords.length) {
  597. ElMessage.warning(t("business.tips.mattress.records"));
  598. return;
  599. }
  600. let list = curRecords.map((item: any) => {
  601. return {
  602. mattressid: Number(item.mattressid),
  603. deptid: formParam.value.deptid,
  604. area: formParam.value.area,
  605. cabinet_type: formParam.value.cabinet_type,
  606. packtype: formParam.value.packtype,
  607. packqty: formParam.value.packqty
  608. };
  609. });
  610. ElMessageBox.confirm(`是否确定要批复制${curRecords.length}张床垫报价单吗?`, "询问", {
  611. confirmButtonText: t("common.okText"),
  612. cancelButtonText: "否",
  613. type: "warning"
  614. })
  615. .then(() => {
  616. CopyMattressAudited({ list }).then(() => {
  617. ElMessage.success("批复制成功!");
  618. dialogFormVisible.value = false;
  619. vxeTableRef.value.refresh();
  620. });
  621. })
  622. .catch((e: TypeError) => {
  623. console.log("e :>> ", e);
  624. ElMessage({
  625. type: "info",
  626. message: "操作取消"
  627. });
  628. });
  629. };
  630. /**
  631. * @description 监听框架属性变化
  632. */
  633. mittBus.on(MittEnum.MattressList, () => {
  634. vxeTableRef.value.refresh();
  635. });
  636. </script>