detail.vue 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374
  1. <template>
  2. <LjDetail
  3. name="mattressInterfaceDetail"
  4. ref="LjDetailRef"
  5. v-bind="detailProps"
  6. :data="mainData"
  7. v-model:order-status="orderStatus"
  8. :action="orderDefaultAction"
  9. @after-mounted="funcAfterMound"
  10. :if-layout-editable="false"
  11. :search-col="{ xs: 3, sm: 3, md: 3, lg: 3, xl: 3 }"
  12. :basic-group-col="{ xs: 3, sm: 3, md: 3, lg: 3, xl: 3 }"
  13. >
  14. <template #mattressYW>
  15. <LjVxeTable
  16. ref="VxeTableMxRef"
  17. row-key="key"
  18. table-cls=""
  19. :data="mattressYWList"
  20. :columns="columns_yw"
  21. :dwname="DwnameEnum.mattressInterfaceYw"
  22. :request-auto="false"
  23. :table-props="tableProps_mx"
  24. :tool-button="[]"
  25. :auto-load-layout="false"
  26. collapseButtons
  27. :cellClassName="cellClassNameFn"
  28. >
  29. </LjVxeTable>
  30. </template>
  31. <template #tabNavRight="scope" v-if="orderStatus">
  32. <div class="flx-center flx-end flx-1 ml-24" v-if="scope.active == 'mattressYW'">
  33. <LjHeaderMenu group-cls="flx-start" :action="qdActionYW"></LjHeaderMenu>
  34. </div>
  35. <div class="flx-center flx-end flx-1 ml-24" v-else-if="scope.active == 'mattressQD'">
  36. <LjHeaderMenu group-cls="flx-start" :action="qdAction"></LjHeaderMenu>
  37. </div>
  38. </template>
  39. <template #mattressQD>
  40. <LjFoldLayout ref="LjFoldLayoutRef" v-bind="layoutSetting">
  41. <template #left>
  42. <LjVxeTable
  43. ref="YwTableRef"
  44. row-key="key"
  45. table-cls="h-full"
  46. :data="mattressYWList"
  47. :columns="columns_yw_qd"
  48. :dwname="DwnameEnum.mattressInterfaceYw"
  49. :request-auto="false"
  50. :table-props="tableProps_mx"
  51. :tool-button="[]"
  52. :auto-load-layout="false"
  53. collapseButtons
  54. >
  55. </LjVxeTable>
  56. </template>
  57. <div class="main-box flx-col">
  58. <LjVxeTable
  59. ref="QdTableRef"
  60. row-key="key"
  61. table-cls="h-full"
  62. :data="mattressQDList"
  63. :columns="columns_qd"
  64. :dwname="DwnameEnum.mattressInterfaceQd"
  65. :request-auto="false"
  66. :table-props="tableProps_qd"
  67. :tool-button="['setting']"
  68. collapseButtons
  69. @setMergeCells="resetMergeCellsQd"
  70. @row-dragend="autoRowDragend"
  71. >
  72. </LjVxeTable>
  73. </div>
  74. </LjFoldLayout>
  75. </template>
  76. </LjDetail>
  77. <MattressDialog ref="MattressDialogRef" v-bind="MattressDialogProps" />
  78. <MtrldefErpDialog ref="MtrldefErpDialogRef" v-bind="MtrldefErpDialogProps" />
  79. <CodeMxDialog ref="CodeMxDialogRef" v-bind="CodeMxDialogProps" />
  80. <!-- <SetSubspecsDialog ref=SetSubspecsDialogRef" /> -->
  81. </template>
  82. <script setup lang="tsx" name="mattressInterfaceDetail">
  83. import { ref, watch, reactive, inject, onMounted, computed, nextTick, onBeforeMount } from "vue";
  84. import { DwnameEnum } from "@/enums/dwnameEnum";
  85. import LjDetail from "@/components/LjDetail/index.vue";
  86. import { DetailProp } from "@/components/LjDetail/interface";
  87. import { useI18n } from "vue-i18n";
  88. import { useRoute, useRouter } from "vue-router";
  89. import { useHooks } from "./hooks/index";
  90. import { useAuthButtons } from "@/hooks/useAuthButtons";
  91. import { CommonDynamicSelect, GetERPWrkGrpList, GetERPWrkGrpList2, GetERPConfigureList } from "@/api/modules/common";
  92. import { SaveMattressInterface, GetResetWiptype, UpdateL1Basicinfo } from "@/api/modules/quote";
  93. import { ElMessage, ElMessageBox, ElNotification } from "element-plus";
  94. import mittBus from "@/utils/mittBus";
  95. import { MittEnum } from "@/enums/mittEnum";
  96. import MattressDialog from "@/views/system/selector/mattress/index.vue";
  97. import MtrldefErpDialog from "@/views/system/selector/mtrldefErp/index.vue";
  98. import CodeMxDialog from "@/views/system/selector/codemx/index.vue";
  99. import { formatToDate } from "@/utils/dateUtil";
  100. import LjFoldLayout from "@/components/LjFoldLayout/index.vue";
  101. import { detailAction } from "@/components/LjDetail/interface";
  102. import { transformTreeData, autoMergeCells, isFilterPrice } from "@/utils/index";
  103. import LjDialog from "@/components/LjDialog/index.vue";
  104. import dialog from "@/utils/dialog";
  105. // import SetSubspecsDialog from "./components/setSubspecs.vue";
  106. import InsterMxDialog from "./components/insterMx.vue";
  107. import InsterPzDialog from "./components/insterPz.vue";
  108. interface detailProp {
  109. /**
  110. * @argument any 页面数据
  111. */
  112. data?: any;
  113. /**
  114. * @argument string 请求数据的api ==> 非必传
  115. */
  116. requestApi?: (params: any) => Promise<any>;
  117. /**
  118. * @argument any 基础信息,表格展示数据
  119. */
  120. // columns?: any;
  121. /**
  122. * @description 是否可编辑
  123. */
  124. status: "edit" | "new" | string;
  125. enum?: any;
  126. }
  127. const props = withDefaults(defineProps<detailProp>(), {});
  128. const { t } = useI18n();
  129. const route = useRoute();
  130. const router = useRouter();
  131. const {
  132. VxeTableMxRef,
  133. YwTableRef,
  134. QdTableRef,
  135. orderStatus,
  136. LjDetailRef,
  137. columns_detail,
  138. columns_yw,
  139. columns_yw_qd,
  140. columns_qd,
  141. mainData,
  142. editType,
  143. mattressYWList,
  144. mattressQDList,
  145. MattressDialogRef,
  146. MattressDialogProps,
  147. MtrldefErpDialogRef,
  148. MtrldefErpDialogProps,
  149. tableProps_mx,
  150. tableProps_qd,
  151. workgrpEnum,
  152. workgrpEnum2,
  153. configureTypeEnum,
  154. loadingStatus,
  155. RetriveMattressInterface,
  156. RefreshMattressInterfaceList,
  157. RefreshMattressInterfaceQdList,
  158. CoverMattressInterfaceList,
  159. fModelChoseMattress,
  160. toExcel,
  161. toCreateMtrl,
  162. toCreateORDelMtrlPf,
  163. // toUpdateL1Planprice,
  164. YWAudit,
  165. JSAudit,
  166. JS2Audit,
  167. resetMergeCellsQd,
  168. resetMergeCells,
  169. funcAddRowQd,
  170. funcCmpCC,
  171. dynamicRef,
  172. CodeMxDialogProps,
  173. CodeMxDialogRef
  174. } = useHooks(t);
  175. const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
  176. const initParams = ref({ mattressid: 0 as Number });
  177. const layoutSetting = reactive({});
  178. const SetSubspecsDialogRef = ref();
  179. const detailProps = reactive<DetailProp>({
  180. dwname: DwnameEnum.mattressInterfaceDetail,
  181. columns: columns_detail,
  182. basicDefault: {},
  183. header: {
  184. foldright: {
  185. width: 80
  186. },
  187. fieldNames: {
  188. code: "sptcode",
  189. codeLabel: t("table.u_spt.sptcode") + ":",
  190. name: "name"
  191. }
  192. },
  193. mould: [
  194. {
  195. id: "mattressYW",
  196. type: "table",
  197. label: "产品配置"
  198. },
  199. {
  200. id: "mattressQD",
  201. type: "table",
  202. label: "产品清单"
  203. }
  204. ]
  205. });
  206. const tabRemove: Function = inject("tabRemove") as Function;
  207. const cellClassNameFn = (data: any, editable) => {
  208. let { column, row } = data;
  209. if (editable) {
  210. if (column.field == "bj_pzname") {
  211. if (
  212. (["垫层", "辅料"].includes(row.itemname) && row.bj_pzname.indexOf("说明") == -1) ||
  213. [
  214. "边带",
  215. "面层裥棉图案",
  216. "底层裥棉图案",
  217. "大侧裥棉图案",
  218. "小侧1裥棉图案",
  219. "小侧2裥棉图案",
  220. "小侧3裥棉图案",
  221. "拉手刺绣及其他工艺项目所有"
  222. ].includes(row.bj_pzname)
  223. ) {
  224. return "vxecol-danger";
  225. }
  226. }
  227. }
  228. return null;
  229. };
  230. const moveData = async (refName: string, index: number, nextIndex: number) => {
  231. const $table = dynamicRef(refName).element;
  232. // const $table = QdTableRef.value.element;
  233. let { visibleData } = $table.getTableData();
  234. const curRecords = $table?.getCurrentRecord();
  235. let prevRow = visibleData[nextIndex];
  236. visibleData[nextIndex] = visibleData[index];
  237. visibleData[index] = prevRow;
  238. visibleData.map((o, idx) => {
  239. o.printid = idx + 1;
  240. return o;
  241. });
  242. $table.reloadData(visibleData);
  243. await $table.setCurrentRow(curRecords);
  244. if (refName == "VxeTableMxRef") {
  245. resetMergeCells(() => {
  246. setTimeout(() => {
  247. $table.scrollToRow(curRecords);
  248. }, 0);
  249. });
  250. } else if (refName == "QdTableRef") {
  251. resetMergeCellsQd(() => {
  252. setTimeout(() => {
  253. $table.scrollToRow(curRecords);
  254. }, 0);
  255. });
  256. }
  257. };
  258. const toMove = async (refName: string, action: number) => {
  259. // const $table = QdTableRef.value.element;
  260. const $table = dynamicRef(refName).element;
  261. let curRecords = $table?.getCurrentRecord();
  262. let visibleData = $table.getTableData().visibleData;
  263. if (!curRecords) {
  264. ElMessage.warning("请先选择要移动的行");
  265. return;
  266. }
  267. let curIdx = visibleData.findIndex(t => t === curRecords);
  268. console.log("curIdx :>> ", curIdx);
  269. if (action == 1) {
  270. // 上移
  271. if (curIdx == 0) {
  272. ElMessage.warning("已经是第一条了");
  273. return;
  274. }
  275. moveData(refName, curIdx, curIdx - 1);
  276. } else if (action == -1) {
  277. // 下移
  278. if (curIdx == visibleData.length - 1) {
  279. ElMessage.warning("已经是最后一条了");
  280. return;
  281. }
  282. moveData(refName, curIdx, curIdx + 1);
  283. }
  284. };
  285. const pzFormData = ref({
  286. itemname: "辅料",
  287. bj_pzname: ""
  288. });
  289. /**
  290. * @description 配置插入明细行
  291. * @param refName 表格ref名称
  292. * @param type 0:最后插入,1:插入列
  293. */
  294. const FuncInsertRowPz = (refName: string, type: number) => {
  295. const _ref = dynamicRef(refName);
  296. const $table = _ref.element;
  297. let insertParam = null;
  298. if ($table) {
  299. let { visibleData } = $table.getTableData();
  300. // 判断插入位置
  301. if (type == 1) {
  302. let currentRecod = $table.getCurrentRecord();
  303. insertParam = currentRecod;
  304. } else {
  305. insertParam = -1;
  306. }
  307. // 收集下拉数据
  308. let itEnum = [{ value: "辅料" }];
  309. let pzEnum = [
  310. { value: "价外物料1" },
  311. { value: "价外物料1做法" },
  312. { value: "价外物料2" },
  313. { value: "价外物料2做法" },
  314. { value: "价外物料3" },
  315. { value: "价外物料3做法" },
  316. { value: "价外物料4" },
  317. { value: "价外物料4做法" },
  318. { value: "价外物料5" }
  319. ];
  320. console.log("itEnum :>> ", itEnum);
  321. dialog(InsterPzDialog, {
  322. formData: pzFormData.value,
  323. itemnameEnum: itEnum,
  324. bjPznameEnum: pzEnum
  325. }).then((data: any) => {
  326. GetERPConfigureList({
  327. isPz: 0,
  328. configcodetype: LjDetailRef.value?._mainData.erp_configcodetype,
  329. interfaceList: [data]
  330. }).then(res => {
  331. if (res.interfaceList && res.interfaceList.length > 0) {
  332. $table.insertAt(res.interfaceList, insertParam).then(async ({ row }) => {
  333. const $table1 = dynamicRef(refName).element;
  334. if ($table1) {
  335. let visibleData1 = $table1.getTableData().visibleData;
  336. visibleData1.map((o, idx) => {
  337. o.printid = idx + 1;
  338. return o;
  339. });
  340. await $table1.reloadData(visibleData1);
  341. resetMergeCells(() => {
  342. dynamicRef(refName).scrollTo(row, "bj_namemx");
  343. });
  344. }
  345. });
  346. }
  347. });
  348. });
  349. }
  350. };
  351. const qdActionYW: detailAction[] = [
  352. buttonDefault({
  353. label: "增行",
  354. clickFunc: () => FuncInsertRowPz("VxeTableMxRef", 0)
  355. }),
  356. buttonDefault({
  357. label: "插行",
  358. divider: true,
  359. clickFunc: () => FuncInsertRowPz("VxeTableMxRef", 1)
  360. }),
  361. buttonDefault({
  362. label: "删行",
  363. limited: () => editType.value != 1,
  364. // disabledTextCallBack: (data: any) => {
  365. // if (editType.value != 3) {
  366. // return "不是清单补充,无法操作";
  367. // }
  368. // return "";
  369. // },
  370. divider: true,
  371. clickFunc: () => {
  372. const $table = VxeTableMxRef.value.element;
  373. if ($table) {
  374. let curRow = $table.getCurrentRecord();
  375. console.log("curRow :>> ", curRow);
  376. if (!curRow) {
  377. ElMessage.warning("请先选择要删除的行");
  378. return;
  379. }
  380. ElMessageBox.confirm(`是否确定删除当前行?`, "提示", {
  381. confirmButtonText: "确定",
  382. cancelButtonText: "取消",
  383. closeOnClickModal: false
  384. })
  385. .then(() => {
  386. // $table.remove(curRow);
  387. const $table = VxeTableMxRef.value.element;
  388. if ($table) {
  389. $table.removeCurrentRow();
  390. }
  391. })
  392. .catch(() => {
  393. // ElMessage.warning("已经取消审批流程操作!");
  394. });
  395. }
  396. }
  397. }),
  398. buttonDefault({
  399. label: "上移",
  400. clickFunc: () => toMove("VxeTableMxRef", 1)
  401. }),
  402. buttonDefault({
  403. label: "下移",
  404. clickFunc: () => toMove("VxeTableMxRef", -1),
  405. divider: true
  406. })
  407. ];
  408. const qdFormData = ref({
  409. itemname: "",
  410. bj_pzname: "",
  411. bj_pzname_mx: "",
  412. bj_pzname_mx_mx: ""
  413. });
  414. /**
  415. * @description 插入明细行
  416. * @param refName 表格ref名称
  417. * @param type 0:最后插入,1:插入列
  418. */
  419. const FuncInsertRow = (refName: string, type: number) => {
  420. const _ref = dynamicRef(refName);
  421. const $table = _ref.element;
  422. let insertParam = null;
  423. if ($table) {
  424. let { visibleData } = $table.getTableData();
  425. // 判断插入位置
  426. if (type == 1) {
  427. let currentRecod = $table.getCurrentRecord();
  428. insertParam = currentRecod;
  429. } else {
  430. insertParam = -1;
  431. }
  432. // 收集下拉数据
  433. let itEnum = visibleData
  434. .map(t => {
  435. return {
  436. value: t.itemname
  437. };
  438. })
  439. .filter(t => t);
  440. itEnum = [...new Set(itEnum.map(item => JSON.stringify(item)))].map((item: any) => JSON.parse(item));
  441. let pzEnum = visibleData
  442. .map(t => {
  443. return {
  444. value: t.bj_pzname
  445. };
  446. })
  447. .filter(t => t);
  448. pzEnum = [...new Set(pzEnum.map(item => JSON.stringify(item)))].map((item: any) => JSON.parse(item));
  449. console.log("itEnum :>> ", itEnum);
  450. dialog(InsterMxDialog, {
  451. formData: qdFormData.value,
  452. itemnameEnum: itEnum,
  453. bjPznameEnum: pzEnum
  454. }).then((data: any) => {
  455. // wf_fine_erp_pz()
  456. GetERPConfigureList({
  457. isPz: 1,
  458. configcodetype: LjDetailRef.value?._mainData.erp_configcodetype,
  459. qdList: [data]
  460. }).then(res => {
  461. if (res.qdList && res.qdList.length > 0) {
  462. const interfaceMap = {};
  463. mattressYWList.value.forEach((mb: any) => {
  464. interfaceMap[mb.bj_pzname] = mb;
  465. });
  466. // 遍历 qdList 并使用哈希表来查找和赋值
  467. res.qdList.forEach(mx => {
  468. const mb = interfaceMap[mx.bj_pzname];
  469. if (mb) {
  470. mx.bj_pzname_mx_mx = mb.bj_namemx;
  471. if (mx.ss_rate === 0) {
  472. mx.ss_rate = mb.ss_rate;
  473. }
  474. if (mx.ls_rate === 0) {
  475. mx.ls_rate = mb.ls_rate;
  476. }
  477. }
  478. });
  479. $table.insertAt(res.qdList, insertParam).then(async ({ row }) => {
  480. // $table.reloadData(visibleData);
  481. _ref.scrollTo(row, "bj_namemx");
  482. if (type == 1) {
  483. const $table1 = dynamicRef(refName).element;
  484. if ($table1) {
  485. let visibleData1 = $table1.getTableData().visibleData;
  486. await $table1.reloadData(visibleData1);
  487. // resetMergeCellsQd(() => {
  488. // dynamicRef(refName).scrollTo(row, "bj_namemx");
  489. // });
  490. }
  491. }
  492. });
  493. resetMergeCellsQd();
  494. }
  495. });
  496. });
  497. }
  498. };
  499. const qdAction: detailAction[] = [
  500. buttonDefault({
  501. label: "增行",
  502. limited: () => editType.value != 3,
  503. // disabledTextCallBack: (data: any) => {
  504. // if (editType.value != 3) {
  505. // return "不是清单补充,无法操作";
  506. // }
  507. // return "";
  508. // },
  509. clickFunc: () => FuncInsertRow("QdTableRef", 0)
  510. }),
  511. buttonDefault({
  512. label: "插行",
  513. limited: () => editType.value != 3,
  514. // disabledTextCallBack: (data: any) => {
  515. // console.log("editType.value != 3 :>> ", editType.value != 3);
  516. // if (editType.value != 3) {
  517. // return "不是清单补充,无法操作";
  518. // }
  519. // return "";
  520. // },
  521. clickFunc: () => FuncInsertRow("QdTableRef", 1)
  522. }),
  523. buttonDefault({
  524. label: "删行",
  525. limited: () => editType.value != 3,
  526. // disabledTextCallBack: (data: any) => {
  527. // if (editType.value != 3) {
  528. // return "不是清单补充,无法操作";
  529. // }
  530. // return "";
  531. // },
  532. divider: true,
  533. clickFunc: () => {
  534. const $table = QdTableRef.value.element;
  535. if ($table) {
  536. let curRow = $table.getCurrentRecord();
  537. console.log("curRow :>> ", curRow);
  538. if (!curRow) {
  539. ElMessage.warning("请先选择要删除的行");
  540. return;
  541. }
  542. ElMessageBox.confirm(`是否确定删除当前行?`, "提示", {
  543. confirmButtonText: "确定",
  544. cancelButtonText: "取消",
  545. closeOnClickModal: false
  546. })
  547. .then(() => {
  548. // $table.remove(curRow);
  549. const $table = QdTableRef.value.element;
  550. if ($table) {
  551. $table.removeCurrentRow();
  552. }
  553. })
  554. .catch(() => {
  555. // ElMessage.warning("已经取消审批流程操作!");
  556. });
  557. }
  558. }
  559. }),
  560. buttonDefault({
  561. label: "上移",
  562. clickFunc: () => toMove("QdTableRef", 1)
  563. }),
  564. buttonDefault({
  565. label: "下移",
  566. clickFunc: () => toMove("QdTableRef", -1),
  567. divider: true
  568. }),
  569. buttonDefault({
  570. label: "清单增加默认项目",
  571. limited: () => {
  572. return !orderStatus.value;
  573. },
  574. clickFunc: () => funcAddRowQd()
  575. }),
  576. buttonDefault({
  577. label: "辅助计算生产尺寸",
  578. divider: true,
  579. limited: () => {
  580. return !orderStatus.value;
  581. },
  582. clickFunc: () => funcCmpCC()
  583. }),
  584. buttonDefault({
  585. label: "批量设置",
  586. clickFunc: async () => {
  587. let _cur = QdTableRef.value.currentEditCell;
  588. if (!["wrkgrpid", "wrkgrpid2", "actual_useqty"].includes(_cur.field)) {
  589. return ElMessage.warning("此列暂不支持批量设置(仅支持实际用量、工组)");
  590. }
  591. // return mattressQDList.value.length == 0;
  592. // nextTick(() => {
  593. const $table = QdTableRef.value.element;
  594. const { visibleData } = $table.getTableData();
  595. let _data = [];
  596. if (visibleData) {
  597. let _val = visibleData[_cur.rowIndex];
  598. _data = visibleData.map((o, idx) => {
  599. if (o.actual_useqty > 0 && idx > _cur.rowIndex) {
  600. o[_cur.field] = _val[_cur.field];
  601. if (_cur.field == "wrkgrpid1") {
  602. o.wrkgrpcode1 = _val.wrkgrpcode1;
  603. } else if (_cur.field == "wrkgrpid2") {
  604. o.wrkgrpcode2 = _val.wrkgrpcode2;
  605. }
  606. }
  607. if (_cur.field == "actual_useqty") {
  608. if (o.useqty > 0 && idx > _cur.rowIndex) {
  609. o[_cur.field] = _val[_cur.field];
  610. }
  611. }
  612. return o;
  613. });
  614. await $table.reloadData(_data);
  615. resetMergeCellsQd();
  616. ElMessage.success("批设成功(有实际用量的数据行)");
  617. }
  618. }
  619. })
  620. ];
  621. const orderDefaultAction = [
  622. buttonDefault({
  623. label: t("common.cancelText"),
  624. icon: "iconchevron-left",
  625. limited: () => {
  626. return !orderStatus.value;
  627. },
  628. clickFunc: item => {
  629. // router.replace(
  630. // `/erpapi/mattressInterface/detail?id=${LjDetailRef.value?._mainData.mattressid}&code=${LjDetailRef.value?._mainData.mattresscode}`
  631. // );
  632. const _cur = mainData.value[0];
  633. router.push({
  634. name: "mattressInterfaceDetail",
  635. params: {
  636. id: _cur.mattressid
  637. },
  638. query: {
  639. code: _cur.mattresscode
  640. },
  641. replace: true
  642. });
  643. }
  644. }),
  645. buttonDefault({
  646. label: t("common.saveText"),
  647. loading: () => loadingStatus.value.save,
  648. limited: () => !orderStatus.value,
  649. disabledTextCallBack: (data: any) => {
  650. if (data.js2_flag == 1) {
  651. return "已清单补充审核,无法修改";
  652. }
  653. if (data.js1_flag == 1) {
  654. return "已产品补充审核,无法操作";
  655. }
  656. if (data.yw_flag == 1) {
  657. return "已完成业务补充审核,无法操作";
  658. }
  659. return "";
  660. },
  661. clickFunc: async item => {
  662. try {
  663. await LjDetailRef.value.toValidateForm();
  664. let $tableYW = VxeTableMxRef.value.element;
  665. let { visibleData } = $tableYW.getTableData();
  666. visibleData.map(o => {
  667. console.log("tableYW visibleData o :>> ", o);
  668. if (
  669. (["垫层", "辅料"].includes(o.itemname) && o.bj_pzname.indexOf("说明") == -1) ||
  670. [
  671. "边带",
  672. "面层裥棉图案",
  673. "底层裥棉图案",
  674. "大侧裥棉图案",
  675. "小侧1裥棉图案",
  676. "小侧2裥棉图案",
  677. "小侧3裥棉图案",
  678. "拉手刺绣及其他工艺项目所有"
  679. ].includes(o.bj_pzname)
  680. ) {
  681. if (o.bj_namemx == "") {
  682. VxeTableMxRef.value.scrollTo(o, "bj_namemx");
  683. throw new Error("产品配置:【" + o.bj_pzname + "】的明细是必填项,请输入/选择");
  684. }
  685. }
  686. return o;
  687. });
  688. ElMessageBox.confirm("是否确定要保存吗?", "询问", {
  689. confirmButtonText: "是",
  690. cancelButtonText: "否",
  691. type: "warning",
  692. closeOnClickModal: false
  693. }).then(async () => {
  694. loadingStatus.value.save = true;
  695. try {
  696. let _qdList = mattressQDList.value;
  697. let _ywList = mattressYWList.value;
  698. const $tableQd = QdTableRef.value.element;
  699. const $tableYw = VxeTableMxRef.value.element;
  700. if ($tableQd) {
  701. const { visibleData } = $tableQd.getTableData();
  702. _qdList = visibleData.map((o, i) => {
  703. o.printid = i + 1;
  704. o.sh_rate = Number(o.sh_rate);
  705. o.actual_useqty = Number(o.actual_useqty);
  706. o.qd_pfgroupqty = Number(o.qd_pfgroupqty);
  707. return o;
  708. });
  709. }
  710. if ($tableYw) {
  711. const { visibleData } = $tableYw.getTableData();
  712. _ywList = visibleData.map((o, i) => {
  713. o.printid = i + 1;
  714. o.actual_useqty = Number(o.actual_useqty);
  715. o.sh_rate = Number(o.sh_rate);
  716. o.ls_rate = Number(o.ls_rate);
  717. o.qd_pfgroupqty = Number(o.qd_pfgroupqty);
  718. o.ss_rate = Number(o.ss_rate);
  719. return o;
  720. });
  721. }
  722. const res = await SaveMattressInterface({
  723. mattress: LjDetailRef.value?._mainData,
  724. interfaceList: _ywList,
  725. qdList: _qdList
  726. })
  727. .then(res => {
  728. ElNotification({
  729. title: "温馨提示",
  730. message: t("sys.api.sueccessToSave"),
  731. type: "success"
  732. });
  733. // tabRemove(route.fullPath);
  734. // router.replace(
  735. // `/erpapi/mattressInterface/detail?id=${LjDetailRef.value?._mainData.mattressid}&code=${LjDetailRef.value?._mainData.mattresscode}`
  736. // );
  737. const _cur = LjDetailRef.value?._mainData;
  738. router.push({
  739. name: "mattressInterfaceDetail",
  740. params: {
  741. id: _cur.mattressid
  742. },
  743. query: {
  744. code: _cur.mattresscode
  745. },
  746. replace: true
  747. });
  748. // LjDetailRef.value.refresh();
  749. loadingStatus.value.save = false;
  750. })
  751. .catch(error => {
  752. console.log("error !! :>> ", error);
  753. loadingStatus.value.save = false;
  754. });
  755. } catch (error) {
  756. loadingStatus.value.save = false;
  757. ElMessage.error(t("sys.api.operationFailed"));
  758. }
  759. });
  760. } catch (error) {
  761. console.log("errorerrorerrorerror :>> ", typeof error, error);
  762. if (error.hasOwnProperty("message")) {
  763. ElMessage.error(error.message);
  764. } else {
  765. for (const key in error) {
  766. if (Object.prototype.hasOwnProperty.call(error, key)) {
  767. const element = error[key];
  768. ElMessage.error(element[0].message);
  769. }
  770. }
  771. }
  772. return false;
  773. }
  774. }
  775. }),
  776. // [
  777. buttonDefault({
  778. label: "刷新带出配置",
  779. limited: () => {
  780. return !orderStatus.value || editType.value == 3;
  781. },
  782. clickFunc: item => {
  783. RefreshMattressInterfaceList(LjDetailRef.value?._mainData.mattressid, 0, LjDetailRef.value?._mainData.erp_configcodetype);
  784. }
  785. }),
  786. buttonDefault({
  787. label: "复制配置",
  788. limited: () => {
  789. return !orderStatus.value || editType.value == 3;
  790. },
  791. clickFunc: item => {
  792. fModelChoseMattress("", { arg_parentid: 0 }).then((res: any) => {
  793. RefreshMattressInterfaceList(
  794. res.mattressid,
  795. 1,
  796. LjDetailRef.value?._mainData.erp_configcodetype,
  797. LjDetailRef.value?._mainData.mattressid
  798. );
  799. });
  800. }
  801. }),
  802. buttonDefault({
  803. label: "重新生成配置项目",
  804. limited: () => {
  805. return !orderStatus.value || editType.value != 1;
  806. },
  807. disabledTextCallBack: (data: any) => {
  808. if (data.yw_flag == 1) {
  809. return "已业务补充审核,无法操作";
  810. }
  811. return "";
  812. },
  813. clickFunc: item => {
  814. RefreshMattressInterfaceList(LjDetailRef.value?._mainData.mattressid, 2, LjDetailRef.value?._mainData.erp_configcodetype);
  815. }
  816. }),
  817. // ],
  818. // [
  819. buttonDefault({
  820. label: "刷新清单",
  821. limited: () => {
  822. return !orderStatus.value;
  823. },
  824. clickFunc: item => {
  825. RefreshMattressInterfaceQdList(LjDetailRef.value?._mainData.mattressid, 0);
  826. }
  827. }),
  828. buttonDefault({
  829. label: "复制清单",
  830. limited: () => {
  831. return !orderStatus.value;
  832. },
  833. clickFunc: item => {
  834. fModelChoseMattress("", { arg_parentid: 0 }).then((res: any) => {
  835. RefreshMattressInterfaceQdList(res.mattressid, 1, 0);
  836. });
  837. }
  838. }),
  839. buttonDefault({
  840. label: "重新生成清单",
  841. limited: () => {
  842. return !orderStatus.value;
  843. },
  844. clickFunc: item => {
  845. RefreshMattressInterfaceQdList(LjDetailRef.value?._mainData.mattressid, 2);
  846. }
  847. }),
  848. // ],
  849. // [
  850. // buttonDefault({
  851. // label: "清单增加默认项目",
  852. // limited: () => {
  853. // return !orderStatus.value;
  854. // },
  855. // clickFunc: () => funcAddRowQd()
  856. // }),
  857. // buttonDefault({
  858. // label: "辅助计算生产尺寸",
  859. // limited: () => {
  860. // return !orderStatus.value;
  861. // },
  862. // clickFunc: () => funcCmpCC()
  863. // }),
  864. // ],
  865. buttonDefault({
  866. label: "重置半成品及新工组归属列数据",
  867. limited: () => {
  868. return !orderStatus.value;
  869. },
  870. clickFunc: async () => {
  871. const $table = QdTableRef.value.element;
  872. if ($table) {
  873. const { visibleData } = $table.getTableData();
  874. let res = await GetResetWiptype({ qdList: visibleData });
  875. let arr = visibleData.map(o => {
  876. let _itm = res.qdList.find(itm => itm.printid == o.printid);
  877. if (_itm) {
  878. o.wip_type = _itm.wip_type;
  879. !o.wrkgrpcode2 && (o.wrkgrpcode2 = _itm.wrkgrpcode2);
  880. }
  881. return o;
  882. });
  883. $table.reloadData(arr);
  884. resetMergeCellsQd();
  885. }
  886. }
  887. }),
  888. // [
  889. buttonDefault({
  890. label: "业务补充",
  891. power: 79,
  892. limited: () => {
  893. return !!orderStatus.value || LjDetailRef.value?._mainData.xd_flag == 1;
  894. },
  895. disabledTextCallBack: (data: any) => {
  896. if (data.yw_flag == 1) {
  897. return "已业务补充审核,无法修改";
  898. }
  899. return "";
  900. },
  901. clickFunc: item => {
  902. routeToEdit(1);
  903. }
  904. }),
  905. buttonDefault({
  906. label: "业务审核",
  907. power: 80,
  908. limited: () => {
  909. return !!orderStatus.value;
  910. },
  911. clickFunc: item => {
  912. const curRecords = [LjDetailRef.value?._mainData];
  913. YWAudit(1, curRecords, () => {
  914. LjDetailRef.value.refresh();
  915. });
  916. }
  917. }),
  918. buttonDefault({
  919. label: "业务撤审",
  920. power: 81,
  921. limited: () => {
  922. return !!orderStatus.value;
  923. },
  924. clickFunc: item => {
  925. const curRecords = [LjDetailRef.value?._mainData];
  926. YWAudit(0, curRecords, () => {
  927. LjDetailRef.value.refresh();
  928. });
  929. }
  930. }),
  931. // ],
  932. // [
  933. buttonDefault({
  934. label: "产品补充",
  935. power: 82,
  936. limited: () => {
  937. return !!orderStatus.value || LjDetailRef.value?._mainData.yw_flag == 0;
  938. },
  939. disabledTextCallBack: (data: any) => {
  940. if (data.js1_flag == 1) {
  941. return "已产品补充审核,无法修改";
  942. }
  943. return "";
  944. },
  945. clickFunc: item => {
  946. routeToEdit(2);
  947. }
  948. }),
  949. buttonDefault({
  950. label: "产品补充审核",
  951. power: 83,
  952. limited: () => {
  953. return !!orderStatus.value || LjDetailRef.value?._mainData.yw_flag == 0;
  954. },
  955. clickFunc: item => {
  956. const curRecords = [LjDetailRef.value?._mainData];
  957. JSAudit(1, curRecords, () => {
  958. LjDetailRef.value.refresh();
  959. });
  960. }
  961. }),
  962. buttonDefault({
  963. label: "产品补充撤审",
  964. power: 84,
  965. limited: () => {
  966. return !!orderStatus.value || LjDetailRef.value?._mainData.yw_flag == 0;
  967. },
  968. clickFunc: item => {
  969. const curRecords = [LjDetailRef.value?._mainData];
  970. JSAudit(0, curRecords, () => {
  971. LjDetailRef.value.refresh();
  972. });
  973. }
  974. }),
  975. // ],
  976. // [
  977. buttonDefault({
  978. label: "清单补充",
  979. power: 85,
  980. limited: () => {
  981. return !!orderStatus.value || LjDetailRef.value?._mainData.yw_flag == 0;
  982. },
  983. disabledTextCallBack: (data: any) => {
  984. if (data.js2_flag == 1) {
  985. return "已清单补充审核,无法修改";
  986. }
  987. return "";
  988. },
  989. clickFunc: item => {
  990. routeToEdit(3);
  991. }
  992. }),
  993. buttonDefault({
  994. label: "清单补充审核",
  995. power: 86,
  996. limited: () => {
  997. return !!orderStatus.value || LjDetailRef.value?._mainData.yw_flag == 0;
  998. },
  999. clickFunc: item => {
  1000. const curRecords = [LjDetailRef.value?._mainData];
  1001. JS2Audit(1, curRecords, () => {
  1002. LjDetailRef.value.refresh();
  1003. });
  1004. }
  1005. }),
  1006. buttonDefault({
  1007. label: "清单补充撤审",
  1008. power: 87,
  1009. limited: () => {
  1010. return !!orderStatus.value || LjDetailRef.value?._mainData.yw_flag == 0;
  1011. },
  1012. clickFunc: item => {
  1013. const curRecords = [LjDetailRef.value?._mainData];
  1014. JS2Audit(0, curRecords, () => {
  1015. LjDetailRef.value.refresh();
  1016. });
  1017. }
  1018. }),
  1019. // ],
  1020. buttonDefault({
  1021. label: "覆盖配置到副规格产品",
  1022. loading: () => loadingStatus.value.main2sec,
  1023. limited: () => {
  1024. return !!orderStatus.value || LjDetailRef.value?._mainData.child_count == 0;
  1025. },
  1026. disabledTextCallBack: (data: any) => {
  1027. if (data.child_count == 0) {
  1028. return "没有副规格产品,无法操作";
  1029. }
  1030. return "";
  1031. },
  1032. clickFunc: item => {
  1033. fModelChoseMattress("副规格", { arg_parentid: LjDetailRef.value?._mainData.mattressid }, 0, t("common.okText"), false).then(
  1034. (res: any) => {
  1035. console.log("res :>> ", res);
  1036. CoverMattressInterfaceList(
  1037. res.map(t => {
  1038. return { mattressid: t.mattressid };
  1039. })
  1040. )
  1041. .then(() => {
  1042. loadingStatus.value.main2sec = false;
  1043. })
  1044. .catch(() => {
  1045. loadingStatus.value.main2sec = false;
  1046. });
  1047. }
  1048. );
  1049. }
  1050. }),
  1051. buttonDefault({
  1052. label: "获取主规格配置",
  1053. limited: () => {
  1054. return !orderStatus.value || +LjDetailRef.value?._mainData.parentid === 0;
  1055. },
  1056. disabledTextCallBack: (data: any) => {
  1057. if (data.parentid == 0) {
  1058. return "主规格产品,无法操作";
  1059. }
  1060. return "";
  1061. },
  1062. clickFunc: item => {
  1063. RefreshMattressInterfaceList(
  1064. LjDetailRef.value?._mainData.parentid,
  1065. 1,
  1066. LjDetailRef.value?._mainData.erp_configcodetype,
  1067. LjDetailRef.value?._mainData.mattressid
  1068. );
  1069. }
  1070. }),
  1071. buttonDefault({
  1072. label: "生成/更新物料",
  1073. power: 88,
  1074. loading: () => loadingStatus.value.mtrldef,
  1075. limited: () => {
  1076. return !!orderStatus.value || LjDetailRef.value?._mainData.yw_flag == 0;
  1077. },
  1078. clickFunc: item => {
  1079. toCreateMtrl(1, [LjDetailRef.value?._mainData.mattressid]);
  1080. }
  1081. }),
  1082. // [
  1083. buttonDefault({
  1084. label: "生成金蝶清单",
  1085. power: 90,
  1086. loading: () => loadingStatus.value.prdpf,
  1087. limited: () => {
  1088. return !!orderStatus.value || LjDetailRef.value?._mainData.yw_flag == 0;
  1089. },
  1090. disabledTextCallBack: (data: any) => {
  1091. console.log("生成金蝶清单 disabledTextCallBack data", data);
  1092. if (data.js2_flag == 0) {
  1093. return "床垫清单未审核,无法生成金蝶清单";
  1094. }
  1095. return "";
  1096. },
  1097. clickFunc: item => {
  1098. toCreateORDelMtrlPf(1, [LjDetailRef.value?._mainData.mattressid]);
  1099. }
  1100. }),
  1101. // buttonDefault({
  1102. // label: "删除金蝶清单",
  1103. // power: 91,
  1104. // clickFunc: item => {
  1105. // toCreateORDelMtrlPf(0, LjDetailRef.value?._mainData.mattressid);
  1106. // }
  1107. // })
  1108. // buttonDefault({
  1109. // label: "更新计划价",
  1110. // power: 91,
  1111. // limited: () => {
  1112. // return !!orderStatus.value;
  1113. // },
  1114. // clickFunc: item => {
  1115. // toUpdateL1Planprice(LjDetailRef.value?._mainData.mattressid);
  1116. // }
  1117. // })
  1118. // ],
  1119. buttonDefault({
  1120. label: "同步L1资料",
  1121. // limited: () => {
  1122. // return !orderStatus.value;
  1123. // },
  1124. loading: () => loadingStatus.value.synchsL1,
  1125. clickFunc: async () => {
  1126. try {
  1127. loadingStatus.value.synchsL1 = true;
  1128. let res = await UpdateL1Basicinfo();
  1129. if (res) {
  1130. ElNotification({
  1131. title: "同步成功",
  1132. message: `物料:${res.mtrlnum}个 <br/>工组:${res.wkgnum}个 <br/>物料类别:${res.mtrltypenum}个`,
  1133. dangerouslyUseHTMLString: true,
  1134. type: "warning"
  1135. });
  1136. }
  1137. loadingStatus.value.synchsL1 = false;
  1138. } catch (error) {
  1139. loadingStatus.value.synchsL1 = false;
  1140. console.error(error);
  1141. }
  1142. }
  1143. }),
  1144. buttonDefault({
  1145. label: t("common.back"),
  1146. clickFunc: item => {
  1147. router.push(`/erpapi/mattressInterface`);
  1148. }
  1149. })
  1150. ];
  1151. const routeToEdit = (type: any) => {
  1152. console.log("routeToEdit mainData :>> ", mainData, route.fullPath);
  1153. const _cur = mainData.value[0];
  1154. // router.replace(`/erpapi/mattressInterface/${type}/edit?id=${_cur.mattressid}&code=${_cur.mattresscode}&type=${type}`);
  1155. router.push({
  1156. name: "mattressInterfaceEditYw",
  1157. params: {
  1158. id: _cur.mattressid
  1159. },
  1160. query: {
  1161. code: _cur.mattresscode,
  1162. type: type
  1163. },
  1164. replace: true
  1165. });
  1166. };
  1167. /**
  1168. * @description 页面数据加载完成
  1169. */
  1170. const funcAfterMound = async () => {
  1171. console.log("onMounted detail sale start!!!! :>> ", orderStatus.value);
  1172. if (!orderStatus.value) {
  1173. // 详情页
  1174. // gotoSummy(8000);
  1175. } else {
  1176. // 新增/编辑
  1177. tableProps_mx.value.editConfig.enabled = true;
  1178. tableProps_qd.value.editConfig.enabled = true;
  1179. // tableProps_mx_yw.value.editConfig.enabled = true;
  1180. // tableProps_mx_qd.value.editConfig.enabled = true;
  1181. }
  1182. console.log("onMounted detail sale start!!!! :>> ", tableProps_mx.value.editConfig);
  1183. console.log("onMounted detail sale start LjDetailRef.value.mainData :>> ", LjDetailRef.value);
  1184. if (orderStatus.value != "new") {
  1185. }
  1186. };
  1187. onBeforeMount(() => {
  1188. if (route.params?.id) {
  1189. // 刷新数据
  1190. initParams.value.mattressid = Number(route.params?.id);
  1191. editType.value = Number(route.query?.type);
  1192. }
  1193. });
  1194. onMounted(async () => {
  1195. console.log("route onMounted:>> ", route);
  1196. console.log("route onMounted:>> ", route.params);
  1197. console.log("route onMounted:>> ", route.params.id);
  1198. const result = await GetERPWrkGrpList();
  1199. if (result.workgroupList) {
  1200. workgrpEnum.value = result.workgroupList.map(item => {
  1201. return {
  1202. label: item.wrkGrpName,
  1203. value: item.wrkGrpid,
  1204. code: item.wrkgrpcode
  1205. };
  1206. });
  1207. // columns_qd.value = columns_qd.value.map(item => {
  1208. // if (item.field == "wrkgrpid") {
  1209. // item.editRender.options = workgrpEnum.value;
  1210. // }
  1211. // return item;
  1212. // });
  1213. }
  1214. const result2 = await GetERPWrkGrpList2();
  1215. workgrpEnum2.value = result2.datatable ?? [];
  1216. if (route.params?.id) {
  1217. // 刷新数据
  1218. // initParams.value.mattressid = Number(route.params?.id);
  1219. // editType.value = Number(route.query?.type);
  1220. console.log("detail onMounted initParams.value :>> ", initParams.value);
  1221. console.log("领用工组领用工组领用工组领用工组 columns_qd.value :>> ", columns_qd.value);
  1222. await RetriveMattressInterface(initParams.value.mattressid.valueOf());
  1223. }
  1224. });
  1225. /** 发现4.11~4.13版本reloadData加载超慢放弃使用 */
  1226. const autoRowDragend = async data => {
  1227. const $table = QdTableRef.value.element;
  1228. $table.clearMergeCells();
  1229. // setTimeout(() => {
  1230. nextTick(() => {
  1231. console.time("autoRowDragend");
  1232. console.log("autoRowDragend data :>> ", data);
  1233. console.log(`拖拽完成,被拖拽行:${data.oldRow.itemname} 目标行:${data.newRow.itemname} 目标位置:${data.dragPos}`);
  1234. // resetMergeCellsQd();
  1235. // console.time("autoRowDragend getTableData");
  1236. // const { visibleData } = $table.getTableData();
  1237. // console.timeEnd("autoRowDragend getTableData");
  1238. // console.time("autoRowDragend arr");
  1239. // let arr = visibleData.map((o, idx) => {
  1240. // o.printid = idx + 1;
  1241. // return o;
  1242. // });
  1243. // console.timeEnd("autoRowDragend arr");
  1244. // console.time("autoRowDragend reloadData");
  1245. // await $table.reloadData(arr);
  1246. // console.timeEnd("autoRowDragend reloadData");
  1247. console.time("autoRowDragend autoMergeCells");
  1248. let mergeCells = autoMergeCells($table, ["itemname", "bj_pzname", "bj_pzname_mx_mx"]);
  1249. console.timeEnd("autoRowDragend autoMergeCells");
  1250. console.time("autoRowDragend setMergeCells");
  1251. $table.setMergeCells(mergeCells);
  1252. console.timeEnd("autoRowDragend setMergeCells");
  1253. console.timeEnd("autoRowDragend");
  1254. });
  1255. // }, 1000);
  1256. };
  1257. // const LjDialogQdRowAdd = ref();
  1258. // const interIndex = ref(0);
  1259. // const qdFormParam = ref({
  1260. // itemname: "",
  1261. // bj_pzname: "",
  1262. // bj_pzname_mx: "",
  1263. // u_mtrl_price_mtrlname: ""
  1264. // });
  1265. // const qdDefaultAction = [
  1266. // buttonDefault({
  1267. // label: t("common.cancelText"),
  1268. // icon: "iconchevron-left",
  1269. // clickFunc: item => {
  1270. // LjDialogQdRowAdd.value.hide();
  1271. // }
  1272. // }),
  1273. // buttonDefault({
  1274. // label: t("common.okText"),
  1275. // clickFunc: async item => {
  1276. // LjDialogQdRowAdd.value.hide();
  1277. // }
  1278. // })
  1279. // ];
  1280. </script>