relation_list.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832
  1. <template>
  2. <div class="app-container">
  3. <!-- 筛选条件 -->
  4. <div>
  5. <el-form
  6. ref="screenForm"
  7. :model="screenForm"
  8. label-width="70px"
  9. size="mini"
  10. label-position="left"
  11. >
  12. <el-row :gutter="20">
  13. <el-col :xs="24" :sm="12" :lg="6">
  14. <el-form-item label="产品名称" prop="name">
  15. <el-input
  16. placeholder="请输入产品名称"
  17. v-model="screenForm.name"
  18. ></el-input>
  19. <!--
  20. <el-select placeholder="请选择产品类别" v-model="screenForm.name">
  21. <el-option label="默认" value=""></el-option>
  22. <el-option
  23. v-for="item in materialLis"
  24. :label="item.name"
  25. :value="item.name"
  26. :key="item.id"
  27. ></el-option>
  28. </el-select> -->
  29. </el-form-item>
  30. </el-col>
  31. <el-col :xs="24" :sm="12" :lg="6">
  32. <el-form-item label="产品型号" prop="type">
  33. <el-input
  34. placeholder="请输入产品型号"
  35. v-model="screenForm.type"
  36. ></el-input>
  37. </el-form-item>
  38. </el-col>
  39. <el-col :xs="24" :sm="12" :lg="6">
  40. <el-form-item label="套机编码" prop="number">
  41. <el-input
  42. placeholder="请输入套机编码"
  43. v-model="screenForm.number"
  44. ></el-input>
  45. </el-form-item>
  46. </el-col>
  47. <el-col :xs="24" :sm="12" :lg="6">
  48. <el-form-item label="产品体积" prop="volume">
  49. <el-input
  50. placeholder="请输入产品体积"
  51. v-model="screenForm.volume"
  52. ></el-input>
  53. </el-form-item>
  54. </el-col>
  55. <el-col :xs="24" :sm="12" :lg="6">
  56. <el-form-item label="外机名称" prop="outsideName">
  57. <el-input
  58. placeholder="请输入外机名称"
  59. v-model="screenForm.outsideName"
  60. ></el-input>
  61. </el-form-item>
  62. </el-col>
  63. <el-col :xs="24" :sm="12" :lg="6">
  64. <el-form-item label="外机型号" prop="nickname">
  65. <el-input
  66. placeholder="请输入外机型号"
  67. v-model="screenForm.outsideType"
  68. ></el-input>
  69. </el-form-item>
  70. </el-col>
  71. <el-col :xs="24" :sm="12" :lg="6">
  72. <el-form-item label="外机编码" prop="outsideNumber">
  73. <el-input
  74. placeholder="请输入内机编码"
  75. v-model="screenForm.outsideNumber"
  76. ></el-input>
  77. </el-form-item>
  78. </el-col>
  79. <el-col :xs="24" :sm="12" :lg="6">
  80. <el-form-item label="内机名称" prop="innerName">
  81. <el-input
  82. placeholder="请输入内机名称"
  83. v-model="screenForm.innerName"
  84. ></el-input>
  85. </el-form-item>
  86. </el-col>
  87. <el-col :xs="24" :sm="12" :lg="6">
  88. <el-form-item label="内机型号" prop="innerType">
  89. <el-input
  90. placeholder="请输入内机型号"
  91. v-model="screenForm.innerType"
  92. ></el-input>
  93. </el-form-item>
  94. </el-col>
  95. <el-col :xs="24" :sm="12" :lg="6">
  96. <el-form-item label="内机编码" prop="innerNumber">
  97. <el-input
  98. placeholder="请输入内机编码"
  99. v-model="screenForm.innerNumber"
  100. ></el-input>
  101. </el-form-item>
  102. </el-col>
  103. <el-col :xs="24" :sm="24" :lg="12" class="tr">
  104. <el-form-item label="">
  105. <el-button size="mini" @click="resetScreenForm">清空</el-button>
  106. <el-button size="mini" type="primary" @click="submitScreenForm"
  107. >搜索</el-button
  108. >
  109. </el-form-item>
  110. </el-col>
  111. </el-row>
  112. </el-form>
  113. </div>
  114. <!-- 按钮 -->
  115. <div class="btn-group clearfix">
  116. <div class="fl">
  117. <el-button
  118. v-if="$checkBtnRole('add', $route.meta.roles)"
  119. type="primary"
  120. icon="el-icon-plus"
  121. size="mini"
  122. @click="(showDialogForm = true), (type = 1), hanleMachine()"
  123. >新增</el-button
  124. >
  125. <el-popconfirm
  126. v-if="$checkBtnRole('del', $route.meta.roles)"
  127. confirm-button-text="好的"
  128. cancel-button-text="不用了"
  129. icon="el-icon-info"
  130. icon-color="red"
  131. title="内容确定删除吗?"
  132. @onConfirm="hanleDelete"
  133. >
  134. <el-button
  135. type="primary"
  136. size="mini"
  137. icon="el-icon-delete"
  138. slot="reference"
  139. class="el-popover-left"
  140. >删除</el-button
  141. >
  142. </el-popconfirm>
  143. </div>
  144. <div class="fr">
  145. <el-button type="primary" size="mini">导入</el-button>
  146. <el-button type="primary" size="mini" @click="handleExport"
  147. >导出</el-button
  148. >
  149. <!-- <el-button type="primary" @click="hanlePrint" size="mini"
  150. >打印</el-button
  151. > -->
  152. </div>
  153. </div>
  154. <div class="mymain-container">
  155. <!-- 列表 -->
  156. <div class="table">
  157. <el-table
  158. v-loading="listLoading"
  159. :data="dataList"
  160. element-loading-text="Loading"
  161. border
  162. fit
  163. highlight-current-row
  164. @select-all="hanleSelectAll"
  165. @select="hanleSelectAll"
  166. stripe
  167. >
  168. <el-table-column type="selection" align="left"></el-table-column>
  169. <el-table-column
  170. align="left"
  171. label="产品名称"
  172. prop="materialName"
  173. min-width="160"
  174. show-overflow-tooltip
  175. >
  176. <template slot-scope="scope">
  177. <CopyButton :copyText="scope.row.materialName" />
  178. <span>{{scope.row.materialName}}</span>
  179. </template>
  180. </el-table-column>
  181. <el-table-column
  182. align="left"
  183. label="产品型号"
  184. prop="productModel"
  185. min-width="160"
  186. show-overflow-tooltip
  187. >
  188. <!-- <template slot-scope="scope">-->
  189. <!-- <CopyButton :copyText="scope.row.productModel" />-->
  190. <!-- <span>{{scope.row.productModel}}</span>-->
  191. <!-- </template>-->
  192. </el-table-column>
  193. <el-table-column
  194. align="left"
  195. label="套机编码"
  196. prop="composeNumber"
  197. min-width="160"
  198. show-overflow-tooltip
  199. ></el-table-column>
  200. <el-table-column
  201. align="right"
  202. label="体积"
  203. prop="productVolume"
  204. min-width="160"
  205. show-overflow-tooltip
  206. ></el-table-column>
  207. <el-table-column
  208. align="left"
  209. label="内机编码"
  210. prop="innerMachineNumber"
  211. min-width="160"
  212. show-overflow-tooltip
  213. ></el-table-column>
  214. <el-table-column
  215. align="left"
  216. label="外机编码"
  217. prop="outsideMachineNumber"
  218. min-width="160"
  219. show-overflow-tooltip
  220. ></el-table-column>
  221. <el-table-column
  222. align="left"
  223. label="配件1"
  224. prop="parts1"
  225. min-width="160"
  226. show-overflow-tooltip
  227. ></el-table-column>
  228. <el-table-column
  229. align="left"
  230. label="配件2"
  231. prop="parts2"
  232. min-width="160"
  233. show-overflow-tooltip
  234. ></el-table-column>
  235. <el-table-column
  236. align="left"
  237. label="创建人"
  238. prop="createBy"
  239. min-width="160"
  240. show-overflow-tooltip
  241. ></el-table-column>
  242. <el-table-column
  243. align="left"
  244. label="创建时间"
  245. prop="createTime"
  246. min-width="160"
  247. show-overflow-tooltip
  248. ></el-table-column>
  249. <el-table-column
  250. align="left"
  251. label="更新人"
  252. prop="updateBy"
  253. min-width="160"
  254. show-overflow-tooltip
  255. ></el-table-column>
  256. <el-table-column
  257. align="left"
  258. label="更新时间"
  259. prop="updateTime"
  260. min-width="160"
  261. show-overflow-tooltip
  262. ></el-table-column>
  263. <el-table-column
  264. align="center"
  265. label="操作"
  266. min-width="160"
  267. show-overflow-tooltip
  268. >
  269. <template slot-scope="scope">
  270. <el-button
  271. v-if="$checkBtnRole('edit', $route.meta.roles)"
  272. type="text"
  273. class="textColor"
  274. @click="editFn(scope.row.id, scope.row, scope.$index)"
  275. >编辑</el-button
  276. >
  277. <el-popconfirm
  278. v-if="$checkBtnRole('del', $route.meta.roles)"
  279. confirm-button-text="好的"
  280. cancel-button-text="不用了"
  281. icon="el-icon-info"
  282. icon-color="red"
  283. title="内容确定删除吗?"
  284. @onConfirm="hanleDelete(scope.row.id)"
  285. >
  286. <el-button
  287. slot="reference"
  288. type="text"
  289. class="textColor el-popover-left"
  290. >删除</el-button
  291. >
  292. </el-popconfirm>
  293. </template>
  294. </el-table-column>
  295. </el-table>
  296. </div>
  297. <!-- 分页 -->
  298. <div class="fr">
  299. <el-pagination
  300. @size-change="handleSizeChange"
  301. @current-change="handleCurrentChange"
  302. :current-page="currentPage"
  303. :page-sizes="[10, 20, 30, 50]"
  304. :page-size="10"
  305. layout="total, sizes, prev, pager, next, jumper"
  306. :total="listTotal"
  307. >
  308. </el-pagination>
  309. </div>
  310. </div>
  311. <!-- 弹窗 -->
  312. <el-dialog
  313. title="产品信息"
  314. :visible.sync="showDialogForm"
  315. width="70%"
  316. :show-close="false"
  317. :close-on-click-modal="false"
  318. >
  319. <el-form ref="form" :model="diaLogForm" label-width="80px">
  320. <el-row :gutter="20">
  321. <el-col :span="24" :offset="0">
  322. <el-form-item label="产品名称">
  323. <el-select
  324. placeholder="选择名称"
  325. filterable
  326. @change="hanleName"
  327. v-model="diaLogForm.materialId"
  328. >
  329. <el-option
  330. v-for="item in materialLis"
  331. :label="item.name"
  332. :value="item.id"
  333. :key="item.id"
  334. ></el-option>
  335. </el-select>
  336. </el-form-item>
  337. <el-form-item label="产品型号">
  338. <el-input v-model="diaLogForm.productModel"></el-input>
  339. </el-form-item>
  340. <el-form-item label="套机编码">
  341. <el-input v-model="diaLogForm.productNumber"></el-input>
  342. </el-form-item>
  343. <el-form-item label="产品体积">
  344. <el-input v-model="diaLogForm.productVolume"></el-input>
  345. </el-form-item>
  346. </el-col>
  347. </el-row>
  348. <el-row :gutter="20">
  349. <el-col :span="24" :offset="0">
  350. <el-row type="flex" justify="space-between">
  351. <el-col :span="20" type="flex">
  352. <el-form-item label="类型">
  353. <el-select
  354. v-model="diaLogForm.type"
  355. @change="hanleType"
  356. filterable
  357. placeholder="请选择类型"
  358. >
  359. <el-option
  360. v-for="item in DistType"
  361. :key="item.dictCode"
  362. :label="item.dictValue"
  363. :value="item.dictCode"
  364. >
  365. </el-option>
  366. </el-select> </el-form-item
  367. ></el-col>
  368. <el-col :span="3" style="text-align: right">
  369. <el-button type="primary" @click="hanleAddData"
  370. >+</el-button
  371. ></el-col
  372. >
  373. </el-row>
  374. </el-col>
  375. </el-row>
  376. <el-row :gutter="20">
  377. <el-col
  378. :span="12"
  379. :offset="0"
  380. v-for="(item, index) in diaLogForm.items"
  381. :key="index"
  382. >
  383. <div>
  384. <el-form-item label="编码">
  385. <el-select
  386. v-model="item.number"
  387. placeholder="请选择编码"
  388. filterable
  389. @change="hanleCode($event, index)"
  390. >
  391. <el-option
  392. v-for="item in machineList"
  393. :key="item.id"
  394. :label="item.number"
  395. :value="item.id"
  396. >
  397. </el-option>
  398. </el-select>
  399. </el-form-item>
  400. <el-form-item label="名称" prop="">
  401. <el-input v-model="item.name" placeholder=""></el-input>
  402. </el-form-item>
  403. <el-form-item label="型号">
  404. <el-input v-model="item.model" placeholder=""></el-input>
  405. </el-form-item>
  406. <el-form-item label="体积">
  407. <el-input v-model="item.volume" placeholder=""></el-input>
  408. </el-form-item></div
  409. ></el-col>
  410. </el-row>
  411. </el-form>
  412. <div slot="footer" class="dialog-footer">
  413. <el-button @click="(showDialogForm = false), resetInfo()"
  414. >取 消</el-button
  415. >
  416. <el-button type="primary" @click="hanleInfo">确 定</el-button>
  417. </div>
  418. </el-dialog>
  419. </div>
  420. </template>
  421. <script>
  422. import Mixin from '@/mixin/index'
  423. import { downloadFiles } from '@/utils/util'
  424. import {
  425. getDistList,
  426. getMachineLlist,
  427. getMaterialList,
  428. getProductAdd,
  429. getProductDel,
  430. getProductDetail,
  431. getProductEdit,
  432. getProductList
  433. } from '@/api/basic_data/material'
  434. export default {
  435. mixins: [Mixin],
  436. data() {
  437. return {
  438. currentPage: 1, // 当前页码
  439. pageSize: 10, // 每页数量
  440. listTotal: 0, // 列表总数
  441. options: [
  442. {
  443. value: "选项1",
  444. label: "1",
  445. },
  446. {
  447. value: "选项2",
  448. label: "2",
  449. },
  450. {
  451. value: "选项3",
  452. label: "3",
  453. },
  454. {
  455. value: "选项4",
  456. label: "4",
  457. },
  458. {
  459. value: "选项5",
  460. label: "5",
  461. },
  462. ],
  463. diaLogForm: {
  464. adminCompanyId: null,
  465. productNumber: "",
  466. id: null,
  467. items: [
  468. {
  469. id: "",
  470. innerOutsideMachineId: "",
  471. machineConfigureId: "",
  472. parentId: "",
  473. model: "",
  474. name: "",
  475. number: "",
  476. type: "",
  477. volume: "",
  478. },
  479. ],
  480. materialId: null,
  481. productModel: "",
  482. productVolume: 0,
  483. type: "",
  484. },
  485. showDialogForm: false,
  486. dataList: [
  487. {
  488. name: "新风机",
  489. number: "DSAFSAF232312321",
  490. code: "DSAFSAF232312321",
  491. volume: "23M^3",
  492. inCode: "DSAFSAF232312321",
  493. outCode: "DSAFSAF232312321",
  494. partsOne: "",
  495. partsTwo: "",
  496. create: "admin",
  497. createDate: "2022-09-12",
  498. update: "admin",
  499. updateDate: "2022-09-12",
  500. },
  501. {
  502. name: "新风机",
  503. number: "DSAFSAF232312321",
  504. code: "DSAFSAF232312321",
  505. volume: "23M^3",
  506. inCode: "DSAFSAF232312321",
  507. outCode: "DSAFSAF232312321",
  508. partsOne: "",
  509. partsTwo: "",
  510. create: "admin",
  511. createDate: "2022-09-12",
  512. update: "admin",
  513. updateDate: "2022-09-12",
  514. },
  515. {
  516. name: "新风机",
  517. number: "DSAFSAF232312321",
  518. code: "DSAFSAF232312321",
  519. volume: "23M^3",
  520. inCode: "DSAFSAF232312321",
  521. outCode: "DSAFSAF232312321",
  522. partsOne: "",
  523. partsTwo: "",
  524. create: "admin",
  525. createDate: "2022-09-12",
  526. update: "admin",
  527. updateDate: "2022-09-12",
  528. },
  529. {
  530. name: "新风机",
  531. number: "DSAFSAF232312321",
  532. code: "DSAFSAF232312321",
  533. volume: "23M^3",
  534. inCode: "DSAFSAF232312321",
  535. outCode: "DSAFSAF232312321",
  536. partsOne: "",
  537. partsTwo: "",
  538. create: "admin",
  539. createDate: "2022-09-12",
  540. update: "admin",
  541. updateDate: "2022-09-12",
  542. },
  543. ],
  544. screenForm: {
  545. innerName: "",
  546. innerNumber: "",
  547. innerType: "",
  548. name: "",
  549. number: "",
  550. outsideName: "",
  551. outsideNumber: "",
  552. outsideType: "",
  553. type: "",
  554. volume: "",
  555. },
  556. type: null,
  557. machineList: [],
  558. machinePei: {
  559. currentPage: 1,
  560. pageSize: 10,
  561. name: "",
  562. number: "",
  563. type: "",
  564. volume: "",
  565. },
  566. materialLis: {},
  567. typeList: [],
  568. DistType: [],
  569. machineConfigureId: "",
  570. };
  571. },
  572. mounted() {
  573. this.getMaterMacList();
  574. },
  575. methods: {
  576. hanleAddData() {
  577. this.diaLogForm.items.push({
  578. id: "",
  579. innerOutsideMachineId: "",
  580. machineConfigureId: "",
  581. parentId: "",
  582. model: "",
  583. name: "",
  584. number: "",
  585. type: "",
  586. volume: "",
  587. });
  588. },
  589. getMaterMacList() {
  590. const params = {
  591. pageNum: 1,
  592. pageSize: -1,
  593. keyword: "",
  594. };
  595. getMaterialList(params).then((res) => {
  596. this.materialLis = res.data.records;
  597. });
  598. const params2 = {
  599. pageNum: this.currentPage,
  600. pageSize: this.pageSize,
  601. keyword: "",
  602. };
  603. getMachineLlist(params2).then((res) => {
  604. this.typeList = res.data.records;
  605. });
  606. },
  607. hanleType(e) {
  608. console.log(e, this.DistType);
  609. this.getMachineLlist(e);
  610. },
  611. getMachineLlist(e) {
  612. let params2 = {
  613. pageNum:1,
  614. pageSize: -1,
  615. model: this.machinePei.model,
  616. name: this.machinePei.name,
  617. number: this.machinePei.number,
  618. type: e,
  619. volume: this.machinePei.volume,
  620. };
  621. getMachineLlist(params2).then((res) => {
  622. this.machineList = res.data.records;
  623. });
  624. },
  625. hanleCode(e, i) {
  626. console.log(e, "code");
  627. this.machineList.find((l) => {
  628. if (l.id == e) {
  629. this.$set(this.diaLogForm.items, i, {
  630. id: "",
  631. machineConfigureId: l.id,
  632. parentId: "",
  633. innerOutsideMachineId: l.id,
  634. model: l.model,
  635. name: l.name,
  636. number: l.number || "",
  637. type: l.type,
  638. volume: l.volume,
  639. });
  640. }
  641. });
  642. },
  643. hanleName(e) {
  644. this.materialLis.find((k) => {
  645. if (k.id == e) {
  646. this.diaLogForm.productModel = k.specification;
  647. this.diaLogForm.productNumber = k.number;
  648. this.diaLogForm.volume = k.volume;
  649. }
  650. });
  651. },
  652. getList() {
  653. this.listLoading = true;
  654. let params = {
  655. pageNum: this.currentPage,
  656. pageSize: this.pageSize,
  657. innerName: this.screenForm.innerName,
  658. innerNumber: this.screenForm.innerNumber,
  659. innerType: this.screenForm.innerType,
  660. name: this.screenForm.name,
  661. number: this.screenForm.number,
  662. outsideName: this.screenForm.outsideName,
  663. outsideNumber: this.screenForm.outsideNumber,
  664. outsideType: this.screenForm.outsideType,
  665. type: this.screenForm.type,
  666. volume: this.screenForm.volume,
  667. };
  668. getProductList(params).then((res) => {
  669. this.dataList = res.data.records;
  670. this.listTotal = res.data.total;
  671. this.listLoading = false;
  672. });
  673. },
  674. editFn(id, row, index) {
  675. console.log(row, "45465");
  676. let dateils = null;
  677. this.diaLogForm = {
  678. ...row,
  679. items: [
  680. {
  681. id: "",
  682. machineConfigureId: row.id,
  683. parentId: "",
  684. innerOutsideMachineId: row.id,
  685. model: row.model,
  686. name: row.name,
  687. number: row.number || "",
  688. type: row.type,
  689. volume: row.volume,
  690. },
  691. ],
  692. };
  693. getProductDetail({ id: id }).then((res) => {
  694. dateils = res.data;
  695. console.log(dateils);
  696. this.diaLogForm.materialId = dateils.materialId;
  697. this.materialLis.find((k) => {
  698. if (k.id == dateils.materialId) {
  699. console.log(k, "5555");
  700. this.diaLogForm.productModel = k.specification;
  701. this.diaLogForm.productNumber = k.number;
  702. this.diaLogForm.productVolume = k.volume;
  703. }
  704. });
  705. getDistList({ sysDictEnum: "MACHINE_CONFIGURE" }).then((disType) => {
  706. // disType.data.find((q) => {
  707. // if (q.dictCode == dateils.items[0].type) {
  708. // this.diaLogForm.type = q.dictCode;
  709. // this.getMachineLlist(q.dictCode);
  710. // this.machineList.map((l) => {
  711. // console.log(l.id == dateils.items[0].machineConfigureId);
  712. // if (l.id == dateils.items[0].machineConfigureId) {
  713. // this.$set(this.diaLogForm.items, 0, {
  714. // id: "",
  715. // machineConfigureId: l.id,
  716. // parentId: "",
  717. // innerOutsideMachineId: l.id,
  718. // model: l.model,
  719. // name: l.name,
  720. // number: l.number || "",
  721. // type: l.type,
  722. // volume: l.volume,
  723. // });
  724. // return;
  725. // }
  726. // });
  727. // }
  728. // });
  729. this.DistType = disType.data;
  730. });
  731. // const machineObj = this.getMachineLlist(dateils.items[0].type)
  732. console.log(this.diaLogForm, "lll");
  733. this.showDialogForm = true;
  734. });
  735. },
  736. hanleInfo() {
  737. if (this.type === 1) {
  738. this.diaLogForm.id = null;
  739. this.diaLogForm.adminCompanyId = null;
  740. getProductAdd({ ...this.diaLogForm }).then((res) => {
  741. this.$successMsg("保存成功");
  742. this.resetInfo();
  743. this.getList();
  744. });
  745. } else if (this.type === 2) {
  746. const params = { ...this.diaLogForm };
  747. getProductEdit(params).then((res) => {
  748. this.$successMsg("编辑成功");
  749. this.resetInfo();
  750. this.getList();
  751. });
  752. }
  753. this.showDialogForm = false;
  754. },
  755. hanleDelete(id) {
  756. this.hanleDeleteAllPromise(id).then((ids) => {
  757. getProductDel({ ids: ids.join(",") }).then((res) => {
  758. this.$successMsg("删除成功");
  759. this.getList();
  760. });
  761. });
  762. },
  763. handleExport() {
  764. let screenData = {
  765. customerName: this.screenForm.customerName,
  766. freeDay: this.screenForm.freeDay,
  767. toll: this.screenForm.toll,
  768. };
  769. downloadFiles("/product-compose/export", screenData);
  770. },
  771. resetInfo() {
  772. this.diaLogForm = {
  773. id: null,
  774. composeNumber: "",
  775. id: "",
  776. items: [
  777. {
  778. id: "",
  779. innerOutsideMachineId: "",
  780. machineConfigureId: "",
  781. parentId: "",
  782. model: "",
  783. name: "",
  784. number: "",
  785. type: "",
  786. volume: "",
  787. },
  788. ],
  789. materialId: "",
  790. orgNumber: 0,
  791. productModel: "",
  792. productVolume: "",
  793. };
  794. },
  795. hanleMachine() {
  796. let params = {
  797. pageNum: 1,
  798. pageSize: -1,
  799. keyword: "",
  800. };
  801. getMaterialList(params).then((res) => {
  802. this.materialLis = res.data.records;
  803. });
  804. getDistList({ sysDictEnum: "MACHINE_CONFIGURE" }).then((res) => {
  805. console.log(res, "type");
  806. this.DistType = res.data;
  807. });
  808. },
  809. },
  810. };
  811. </script>
  812. <style lang="scss" scoped>
  813. ::v-deep .el-select {
  814. width: 100%;
  815. }
  816. </style>