You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

881 lines
28 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -5px;">
  4. <el-form-item :label="'工厂编号:'">
  5. <el-input v-model="searchData.site" style="width: 130px"></el-input>
  6. </el-form-item>
  7. <el-form-item :label="'订单号:'">
  8. <el-input v-model="searchData.orderNo" style="width: 130px"></el-input>
  9. </el-form-item>
  10. <el-form-item :label="'类型:'">
  11. <el-select filterable v-model="searchData.type" style="width: 130px">
  12. <el-option label="全部" value=""></el-option>
  13. <el-option label="采购订单" value="采购入库"></el-option>
  14. <el-option label="分卷订单" value="分切入库"></el-option>
  15. <el-option label="期初入库" value="期初入库"></el-option>
  16. </el-select>
  17. <el-button @click="getData()" type="primary">查询</el-button>
  18. <el-button @click="getSaveModel()" type="primary" style="margin-left: 0px;">供应商批号录入</el-button>
  19. <download-excel
  20. :fields="fields()"
  21. :data="exportData"
  22. type="xls"
  23. :name="exportName"
  24. :header="exportHeader"
  25. :footer="exportFooter"
  26. :fetch="createExportData"
  27. :before-generate="startDownload"
  28. :before-finish="finishDownload"
  29. worksheet="导出信息"
  30. class="el-button el-button--primary el-button--medium">
  31. {{ buttons.download }}
  32. </download-excel>
  33. <download-excel
  34. :fields="fields2()"
  35. :data="exportData2"
  36. type="xls"
  37. :name="exportName2"
  38. :header="exportHeader2"
  39. :footer="exportFooter2"
  40. :fetch="createExportData2"
  41. :before-generate="startDownload2"
  42. :before-finish="finishDownload2"
  43. worksheet="导出信息"
  44. class="el-button el-button--primary el-button--medium">
  45. {{ buttons.download2 }}
  46. </download-excel>
  47. </el-form-item>
  48. </el-form>
  49. <el-table
  50. :height="300"
  51. :data="dataList"
  52. border
  53. @row-click="changeData"
  54. highlight-current-row
  55. v-loading="dataListLoading"
  56. style="width: 100%;">
  57. <el-table-column
  58. v-for="(item,index) in columnList" :key="index"
  59. :sortable="item.columnSortable"
  60. :prop="item.columnProp"
  61. :header-align="item.headerAlign"
  62. :show-overflow-tooltip="item.showOverflowTooltip"
  63. :align="item.align"
  64. :fixed="item.fixed"
  65. :width="item.columnWidth"
  66. :label="item.columnLabel">
  67. <template slot-scope="scope">
  68. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  69. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  70. style="width: 100px; height: 80px"/></span>
  71. </template>
  72. </el-table-column>
  73. </el-table>
  74. <el-table
  75. :height="height"
  76. :data="dataList2"
  77. border
  78. v-loading="dataListLoading"
  79. style="width: 100%;">
  80. <el-table-column
  81. header-align="center"
  82. align="center"
  83. width="120"
  84. label="操作">
  85. <template slot-scope="scope">
  86. <a type="text" size="small" @click="deleteRoll(scope.row)">删除卷</a>
  87. <a type="text" size="small" @click="printRollLabel(scope.row)">打印卷标签</a>
  88. </template>
  89. </el-table-column>
  90. <el-table-column
  91. v-for="(item,index) in columnList2" :key="index"
  92. :sortable="item.columnSortable"
  93. :prop="item.columnProp"
  94. :header-align="item.headerAlign"
  95. :show-overflow-tooltip="item.showOverflowTooltip"
  96. :align="item.align"
  97. :fixed="item.fixed"
  98. :mid-width="item.columnWidth"
  99. :label="item.columnLabel">
  100. <template slot-scope="scope">
  101. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  102. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  103. style="width: 100px; height: 80px"/></span>
  104. </template>
  105. </el-table-column>
  106. </el-table>
  107. <el-dialog width="430px" :title="'供应商批号录入'" :close-on-click-modal="false" v-drag :visible.sync="modelFlag2">
  108. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
  109. <el-form-item :label="'工厂编码:'">
  110. <el-input v-model="saveData.site" style="width: 80px"></el-input>
  111. </el-form-item>
  112. <el-form-item :label="'卷号:'">
  113. <el-input v-model="saveData.rollNo" style="width: 150px"></el-input>
  114. <el-button @click="goSaveSuppRollNo()" type="primary" style="margin-left: 10px;">保存</el-button>
  115. <el-button @click="modelFlag2=false" type="primary" style="margin-left: 10px;">关闭</el-button>
  116. </el-form-item>
  117. </el-form>
  118. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
  119. <el-form-item :label="'供应商批号:'">
  120. <el-input v-model="saveData.suppRollNo" style="width: 369px"></el-input>
  121. </el-form-item>
  122. </el-form>
  123. <el-footer style="height:10px;margin-top: 20px;text-align:center">
  124. </el-footer>
  125. </el-dialog>
  126. </div>
  127. </template>
  128. <script>
  129. import {
  130. searchOrderRoll,
  131. searchCRollInfoDetail,
  132. saveSuppRollNo,
  133. doSaveSuppRollNo,
  134. deleteRoll,
  135. getPrintCRollInfo,/*2022-04-26 LR 打印卷标签请求*/
  136. } from "@/api/purchasingManagement/materialSplit.js"
  137. /*打印标签专用的js*/
  138. import {
  139. printMaterialLabel,
  140. } from "@/views/modules/yieldReport/print_roll_label.js"
  141. export default {
  142. //查询-订单卷信息
  143. name: "searchOrderRoll",
  144. data() {
  145. return {
  146. // 导出 start
  147. exportData: [],
  148. exportName: "订单卷信息主表"+this.dayjs().format('YYYYMMDDHHmmss'),
  149. exportHeader: ["订单卷信息主表"],
  150. exportFooter: [],
  151. // 导出 end
  152. // 导出 start
  153. exportData2: [],
  154. exportName2: "订单卷信息明细表"+this.dayjs().format('YYYYMMDDHHmmss'),
  155. exportHeader2: ["订单卷信息明细表"],
  156. exportFooter2: [],
  157. // 导出 end
  158. currentRow: {},
  159. height: 200,
  160. modelFlag:false,
  161. modelFlag2: false,
  162. modelInputFlag:true,
  163. selectList:[],
  164. searchData: {
  165. site:'',
  166. orderNo:'',
  167. type:'',
  168. user:this.$store.state.user.name
  169. },
  170. dataList:[],
  171. dataList2:[],
  172. dataListLoading: false,
  173. buttons:{
  174. download:'导出上表',
  175. download2:'导出下表',
  176. },
  177. saveData: {
  178. site:'',
  179. rollNo:'',
  180. suppRollNo:'',
  181. },
  182. columnList: [
  183. {
  184. userId: this.$store.state.user.name,
  185. functionId: 6035,
  186. serialNumber: '6035TableOrderNo',
  187. tableId: "6035Table",
  188. tableName: "查询订单卷信息主表",
  189. columnProp: "orderNo",
  190. headerAlign: "center",
  191. align: "left",
  192. columnLabel: "订单号",
  193. columnHidden: false,
  194. columnImage: false,
  195. columnSortable: false,
  196. sortLv: 0,
  197. status: true,
  198. fixed: false,
  199. columnWidth: 80
  200. },
  201. {
  202. userId: this.$store.state.user.name,
  203. functionId: 6035,
  204. serialNumber: '6035TableOrderDate',
  205. tableId: "6035Table",
  206. tableName: "查询订单卷信息主表",
  207. columnProp: "orderDate",
  208. headerAlign: "center",
  209. align: "left",
  210. columnLabel: "订单日期",
  211. columnHidden: false,
  212. columnImage: false,
  213. columnSortable: false,
  214. sortLv: 0,
  215. status: true,
  216. fixed: false,
  217. columnWidth: 100
  218. },
  219. {
  220. userId: this.$store.state.user.name,
  221. functionId: 6035,
  222. serialNumber: '6035TablePlanReceiptDate',
  223. tableId: "6035Table",
  224. tableName: "查询订单卷信息主表",
  225. columnProp: "planReceiptDate",
  226. headerAlign: "center",
  227. align: "left",
  228. columnLabel: "要求交货日期",
  229. columnHidden: false,
  230. columnImage: false,
  231. columnSortable: false,
  232. sortLv: 0,
  233. status: true,
  234. fixed: false,
  235. columnWidth: 100
  236. },
  237. {
  238. userId: this.$store.state.user.name,
  239. functionId: 6035,
  240. serialNumber: '6035TableSupplierID',
  241. tableId: "6035Table",
  242. tableName: "查询订单卷信息主表",
  243. columnProp: "supplierID",
  244. headerAlign: "center",
  245. align: "left",
  246. columnLabel: "供应商编码",
  247. columnHidden: false,
  248. columnImage: false,
  249. columnSortable: false,
  250. sortLv: 0,
  251. status: true,
  252. fixed: false,
  253. columnWidth: 100
  254. },
  255. {
  256. userId: this.$store.state.user.name,
  257. functionId: 6035,
  258. serialNumber: '6035TableStatus',
  259. tableId: "6035Table",
  260. tableName: "查询订单卷信息主表",
  261. columnProp: "status",
  262. headerAlign: "center",
  263. align: "left",
  264. columnLabel: "订单状态",
  265. columnHidden: false,
  266. columnImage: false,
  267. columnSortable: false,
  268. sortLv: 0,
  269. status: true,
  270. fixed: false,
  271. columnWidth: 80
  272. },
  273. {
  274. userId: this.$store.state.user.name,
  275. functionId: 6035,
  276. serialNumber: '6035TableSupplierName',
  277. tableId: "6035Table",
  278. tableName: "查询订单卷信息主表",
  279. columnProp: "supplierName",
  280. headerAlign: "center",
  281. align: "left",
  282. columnLabel: "供应商名称",
  283. columnHidden: false,
  284. columnImage: false,
  285. columnSortable: false,
  286. sortLv: 0,
  287. status: true,
  288. fixed: false,
  289. columnWidth: 180
  290. },
  291. {
  292. userId: this.$store.state.user.name,
  293. functionId: 6035,
  294. serialNumber: '6035TableOrderItemNo',
  295. tableId: "6035Table",
  296. tableName: "查询订单卷信息主表",
  297. columnProp: "orderItemNo",
  298. headerAlign: "center",
  299. align: "left",
  300. columnLabel: "订单序号",
  301. columnHidden: false,
  302. columnImage: false,
  303. columnSortable: false,
  304. sortLv: 0,
  305. status: true,
  306. fixed: false,
  307. columnWidth: 80
  308. },
  309. {
  310. userId: this.$store.state.user.name,
  311. functionId: 6035,
  312. serialNumber: '6035TablePartNo',
  313. tableId: "6035Table",
  314. tableName: "查询订单卷信息主表",
  315. columnProp: "partNo",
  316. headerAlign: "center",
  317. align: "left",
  318. columnLabel: "物料编码",
  319. columnHidden: false,
  320. columnImage: false,
  321. columnSortable: false,
  322. sortLv: 0,
  323. status: true,
  324. fixed: false,
  325. columnWidth: 120
  326. },
  327. {
  328. userId: this.$store.state.user.name,
  329. functionId: 6035,
  330. serialNumber: '6035TablePartDescription',
  331. tableId: "6035Table",
  332. tableName: "查询订单卷信息主表",
  333. columnProp: "partDescription",
  334. headerAlign: "center",
  335. align: "left",
  336. columnLabel: "物料名称",
  337. columnHidden: false,
  338. columnImage: false,
  339. columnSortable: false,
  340. sortLv: 0,
  341. status: true,
  342. fixed: false,
  343. columnWidth: 200
  344. },
  345. {
  346. userId: this.$store.state.user.name,
  347. functionId: 6035,
  348. serialNumber: '6035TableQuantity',
  349. tableId: "6035Table",
  350. tableName: "查询订单卷信息主表",
  351. columnProp: "quantity",
  352. headerAlign: "center",
  353. align: "left",
  354. columnLabel: "订单数量",
  355. columnHidden: false,
  356. columnImage: false,
  357. columnSortable: false,
  358. sortLv: 0,
  359. status: true,
  360. fixed: false,
  361. columnWidth: 80
  362. },
  363. {
  364. userId: this.$store.state.user.name,
  365. functionId: 6035,
  366. serialNumber: '6035TableCancelledFlag',
  367. tableId: "6035Table",
  368. tableName: "查询订单卷信息主表",
  369. columnProp: "cancelledFlag",
  370. headerAlign: "center",
  371. align: "left",
  372. columnLabel: "是否取消",
  373. columnHidden: false,
  374. columnImage: false,
  375. columnSortable: false,
  376. sortLv: 0,
  377. status: true,
  378. fixed: false,
  379. columnWidth: 80
  380. },
  381. {
  382. userId: this.$store.state.user.name,
  383. functionId: 6035,
  384. serialNumber: '6035TableSAPOrderNo',
  385. tableId: "6035Table",
  386. tableName: "查询订单卷信息主表",
  387. columnProp: "sAPOrderNo",
  388. headerAlign: "center",
  389. align: "left",
  390. columnLabel: "SAP订单识别号",
  391. columnHidden: false,
  392. columnImage: false,
  393. columnSortable: false,
  394. sortLv: 0,
  395. status: true,
  396. fixed: false,
  397. columnWidth: 120
  398. },
  399. {
  400. userId: this.$store.state.user.name,
  401. functionId: 6035,
  402. serialNumber: '6035TableSite',
  403. tableId: "6035Table",
  404. tableName: "查询订单卷信息主表",
  405. columnProp: "site",
  406. headerAlign: "center",
  407. align: "left",
  408. columnLabel: "工厂编号",
  409. columnHidden: false,
  410. columnImage: false,
  411. columnSortable: false,
  412. sortLv: 0,
  413. status: true,
  414. fixed: false,
  415. columnWidth: 80
  416. },
  417. {
  418. userId: this.$store.state.user.name,
  419. functionId: 6035,
  420. serialNumber: '6035TableCreatedDate',
  421. tableId: "6035Table",
  422. tableName: "查询订单卷信息主表",
  423. columnProp: "createdDate",
  424. headerAlign: "center",
  425. align: "left",
  426. columnLabel: "分卷日期",
  427. columnHidden: false,
  428. columnImage: false,
  429. columnSortable: false,
  430. sortLv: 0,
  431. status: true,
  432. fixed: false,
  433. columnWidth: 180
  434. },
  435. {
  436. userId: this.$store.state.user.name,
  437. functionId: 6035,
  438. serialNumber: '6035TableCreatedBy',
  439. tableId: "6035Table",
  440. tableName: "查询订单卷信息主表",
  441. columnProp: "createdBy",
  442. headerAlign: "center",
  443. align: "left",
  444. columnLabel: "分卷人",
  445. columnHidden: false,
  446. columnImage: false,
  447. columnSortable: false,
  448. sortLv: 0,
  449. status: true,
  450. fixed: false,
  451. columnWidth: 100
  452. },
  453. {
  454. userId: this.$store.state.user.name,
  455. functionId: 6035,
  456. serialNumber: '6035TableType',
  457. tableId: "6035Table",
  458. tableName: "查询订单卷信息主表",
  459. columnProp: "type",
  460. headerAlign: "center",
  461. align: "left",
  462. columnLabel: "类型",
  463. columnHidden: false,
  464. columnImage: false,
  465. columnSortable: false,
  466. sortLv: 0,
  467. status: true,
  468. fixed: false,
  469. columnWidth: 100
  470. }
  471. ],
  472. columnList2: [
  473. {
  474. userId: this.$store.state.user.name,
  475. functionId: 6035,
  476. serialNumber: '6035Table2RollNo',
  477. tableId: "6035Table",
  478. tableName: "查询订单卷信息明细表",
  479. columnProp: "rollNo",
  480. headerAlign: "center",
  481. align: "left",
  482. columnLabel: "卷号",
  483. columnHidden: false,
  484. columnImage: false,
  485. columnSortable: false,
  486. sortLv: 0,
  487. status: true,
  488. fixed: false,
  489. columnWidth: 150
  490. },
  491. {
  492. userId: this.$store.state.user.name,
  493. functionId: 6035,
  494. serialNumber: '6035Table2RollQty',
  495. tableId: "6035Table",
  496. tableName: "查询订单卷信息明细表",
  497. columnProp: "rollQty",
  498. headerAlign: "center",
  499. align: "right",
  500. columnLabel: "卷数量",
  501. columnHidden: false,
  502. columnImage: false,
  503. columnSortable: false,
  504. sortLv: 0,
  505. status: true,
  506. fixed: false,
  507. columnWidth: 60
  508. },
  509. {
  510. userId: this.$store.state.user.name,
  511. functionId: 6035,
  512. serialNumber: '6035Table2SuppDeliveryNote',
  513. tableId: "6035Table",
  514. tableName: "查询订单卷信息明细表",
  515. columnProp: "suppDeliveryNote",
  516. headerAlign: "center",
  517. align: "left",
  518. columnLabel: "供应商送货单号",
  519. columnHidden: false,
  520. columnImage: false,
  521. columnSortable: false,
  522. sortLv: 0,
  523. status: true,
  524. fixed: false,
  525. columnWidth: 100
  526. },
  527. {
  528. userId: this.$store.state.user.name,
  529. functionId: 6035,
  530. serialNumber: '6035Table2RollDate',
  531. tableId: "6035Table",
  532. tableName: "查询订单卷信息明细表",
  533. columnProp: "rollDate",
  534. headerAlign: "center",
  535. align: "left",
  536. columnLabel: "入库日期",
  537. columnHidden: false,
  538. columnImage: false,
  539. columnSortable: false,
  540. sortLv: 0,
  541. status: true,
  542. fixed: false,
  543. columnWidth: 120
  544. },
  545. {
  546. userId: this.$store.state.user.name,
  547. functionId: 6035,
  548. serialNumber: '6035Table2ExpiredDate',
  549. tableId: "6035Table",
  550. tableName: "查询订单卷信息明细表",
  551. columnProp: "expiredDate",
  552. headerAlign: "center",
  553. align: "left",
  554. columnLabel: "失效日期",
  555. columnHidden: false,
  556. columnImage: false,
  557. columnSortable: false,
  558. sortLv: 0,
  559. status: true,
  560. fixed: false,
  561. columnWidth: 120
  562. },
  563. {
  564. userId: this.$store.state.user.name,
  565. functionId: 6035,
  566. serialNumber: '6035Table2CreatedDate',
  567. tableId: "6035Table",
  568. tableName: "查询订单卷信息明细表",
  569. columnProp: "createdDate",
  570. headerAlign: "center",
  571. align: "left",
  572. columnLabel: "分卷日期",
  573. columnHidden: false,
  574. columnImage: false,
  575. columnSortable: false,
  576. sortLv: 0,
  577. status: true,
  578. fixed: false,
  579. columnWidth: 120
  580. },
  581. {
  582. userId: this.$store.state.user.name,
  583. functionId: 6035,
  584. serialNumber: '6035Table2CreatedBy',
  585. tableId: "6035Table",
  586. tableName: "查询订单卷信息明细表",
  587. columnProp: "createdBy",
  588. headerAlign: "center",
  589. align: "left",
  590. columnLabel: "分卷人",
  591. columnHidden: false,
  592. columnImage: false,
  593. columnSortable: false,
  594. sortLv: 0,
  595. status: true,
  596. fixed: false,
  597. columnWidth: 60
  598. },
  599. {
  600. userId: this.$store.state.user.name,
  601. functionId: 6035,
  602. serialNumber: '6035Table2Status',
  603. tableId: "6035Table",
  604. tableName: "查询订单卷信息明细表",
  605. columnProp: "status",
  606. headerAlign: "center",
  607. align: "left",
  608. columnLabel: "卷状态",
  609. columnHidden: false,
  610. columnImage: false,
  611. columnSortable: false,
  612. sortLv: 0,
  613. status: true,
  614. fixed: false,
  615. columnWidth: 60
  616. },
  617. {
  618. userId: this.$store.state.user.name,
  619. functionId: 6035,
  620. serialNumber: '6035Table2SuppRollNoFlag',
  621. tableId: "6035Table",
  622. tableName: "查询订单卷信息明细表",
  623. columnProp: "suppRollNoFlag",
  624. headerAlign: "center",
  625. align: "left",
  626. columnLabel: "已录入供应商批号",
  627. columnHidden: false,
  628. columnImage: false,
  629. columnSortable: false,
  630. sortLv: 0,
  631. status: true,
  632. fixed: false,
  633. columnWidth: 120
  634. },
  635. {
  636. userId: this.$store.state.user.name,
  637. functionId: 6035,
  638. serialNumber: '6035Table2SuppRollNo',
  639. tableId: "6035Table",
  640. tableName: "查询订单卷信息明细表",
  641. columnProp: "suppRollNo",
  642. headerAlign: "center",
  643. align: "left",
  644. columnLabel: "供应商批号",
  645. columnHidden: false,
  646. columnImage: false,
  647. columnSortable: false,
  648. sortLv: 0,
  649. status: true,
  650. fixed: false,
  651. columnWidth: 300
  652. }
  653. ],
  654. }
  655. },
  656. mounted() {
  657. this.$nextTick(() => {
  658. this.height = window.innerHeight - 500;
  659. })
  660. },
  661. methods: {
  662. getData(){
  663. searchOrderRoll(this.searchData).then(({data}) => {
  664. this.dataList = data.rows
  665. let inData={
  666. site: data.rows[0].site,
  667. orderRef1: data.rows[0].orderNo,
  668. orderRef3: data.rows[0].orderItemNo,
  669. }
  670. searchCRollInfoDetail(inData).then(({data}) => {
  671. this.dataList2 = data.rows
  672. })
  673. })
  674. },
  675. //单击切换订单
  676. changeData(row) {
  677. this.currentRow = JSON.parse(JSON.stringify(row));
  678. let inData={
  679. site:row.site,
  680. orderRef1:row.orderNo,
  681. orderRef3:row.orderItemNo,
  682. }
  683. searchCRollInfoDetail(inData).then(({data}) => {
  684. this.dataList2 = data.rows
  685. })
  686. },
  687. //供应商批号录入
  688. getSaveModel() {
  689. this.saveData = {
  690. site:this.$store.state.user.site,
  691. rollNo:'',
  692. suppRollNo:''
  693. };
  694. this.modelFlag2 = true;
  695. },
  696. /*设置选中行的参数*/
  697. setCurrentRow(row, column, event) {
  698. this.currentRow = JSON.parse(JSON.stringify(row));
  699. },
  700. goSaveSuppRollNo() {
  701. if (this.saveData.site == '' || this.saveData.site == null) {
  702. this.$alert("请输入工厂编码!", '错误', {
  703. confirmButtonText: '确定'
  704. })
  705. return false;
  706. }
  707. if (this.saveData.rollNo == '' || this.saveData.rollNo == null) {
  708. this.$alert("请输入卷号!", '错误', {
  709. confirmButtonText: '确定'
  710. })
  711. return false;
  712. }
  713. if (this.saveData.suppRollNo == '' || this.saveData.suppRollNo == null) {
  714. this.$alert("请输入供应商批号!", '错误', {
  715. confirmButtonText: '确定'
  716. })
  717. return false;
  718. }
  719. saveSuppRollNo(this.saveData).then(({data}) => {
  720. if (data.rows == null) {
  721. this.$alert("该卷号不存在,请输入!", '错误', {
  722. confirmButtonText: '确定'
  723. })
  724. return false;
  725. } else {
  726. if (data.rows.suppRollNoFlag == 'Y') {
  727. this.$confirm(`该卷已经录入供应商批号,确认要重新录入吗?`, '提示', {
  728. confirmButtonText: '确定',
  729. cancelButtonText: '取消',
  730. type: 'warning'
  731. }).then(() => {
  732. doSaveSuppRollNo(this.saveData).then(({data}) => {
  733. if (data && data.code == 200) {
  734. this.modelFlag2 = false
  735. this.$message({
  736. message: '操作成功',
  737. type: 'success',
  738. duration: 1500,
  739. onClose: () => {
  740. }
  741. })
  742. } else {
  743. this.$alert(data.msg, '错误', {
  744. confirmButtonText: '确定'
  745. })
  746. }
  747. })
  748. })
  749. }else{
  750. doSaveSuppRollNo(this.saveData).then(({data}) => {
  751. if (data && data.code == 200) {
  752. this.modelFlag2 = false
  753. this.$message({
  754. message: '操作成功',
  755. type: 'success',
  756. duration: 1500,
  757. onClose: () => {
  758. }
  759. })
  760. } else {
  761. this.$alert(data.msg, '错误', {
  762. confirmButtonText: '确定'
  763. })
  764. }
  765. })
  766. }
  767. }
  768. }
  769. )
  770. },
  771. deleteRoll(row) {
  772. this.$confirm(`确认要删除该卷?`, '提示', {
  773. confirmButtonText: '确定',
  774. cancelButtonText: '取消',
  775. type: 'warning'
  776. }).then(() => {
  777. deleteRoll(row).then(({data}) => {
  778. if (data && data.code == 200) {
  779. let inData={
  780. site:this.currentRow.site,
  781. orderRef1:this.currentRow.orderNo,
  782. orderRef3:this.currentRow.orderItemNo,
  783. }
  784. searchCRollInfoDetail(inData).then(({data}) => {
  785. this.dataList2 = data.rows
  786. })
  787. this.$message.success('操作成功')
  788. } else {
  789. this.$alert(data.msg, '错误', {
  790. confirmButtonText: '确定'
  791. })
  792. }
  793. })
  794. })
  795. },
  796. //导出excel
  797. createExportData() {
  798. return this.dataList;
  799. },
  800. startDownload() {
  801. // this.exportData = this.dataList
  802. },
  803. finishDownload() {
  804. },
  805. fields() {
  806. let json = "{"
  807. this.columnList.forEach((item, index) => {
  808. if (index == this.columnList.length - 1) {
  809. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  810. } else {
  811. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  812. }
  813. })
  814. json += "}"
  815. let s = eval("(" + json + ")")
  816. return s
  817. },
  818. // 导出 end
  819. //导出excel
  820. createExportData2() {
  821. return this.dataList2;
  822. },
  823. startDownload2() {
  824. // this.exportData = this.dataList
  825. },
  826. finishDownload2() {
  827. },
  828. fields2() {
  829. let json = "{"
  830. this.columnList2.forEach((item, index) => {
  831. if (index == this.columnList2.length - 1) {
  832. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  833. } else {
  834. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  835. }
  836. })
  837. json += "}"
  838. let s = eval("(" + json + ")")
  839. return s
  840. },
  841. // 导出 end
  842. /*打印卷标签*/
  843. printRollLabel(currentRow){
  844. /*组装打印需要的数据*/
  845. let requestData = {site: currentRow.site, rollNo: currentRow.rollNo};
  846. getPrintCRollInfo(requestData).then(({data}) => {
  847. //打印材料卷标签
  848. let printList = data.rows;
  849. printMaterialLabel(printList);
  850. });
  851. },
  852. },
  853. created() {
  854. }
  855. }
  856. </script>
  857. <style >
  858. .el-textarea__inner {
  859. padding: 5px 5px;
  860. }
  861. </style>