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.

1239 lines
40 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <div class="mod-config yzz">
  3. <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
  4. <el-form :inline="true" label-position="top" style="margin-top: 0px">
  5. <el-form-item :label="'申请单号'">
  6. <el-input v-model="searchData.notifyNo" style="width: 120px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="'申请账号'">
  9. <el-input v-model="searchData.userName" style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="'申请单日期'">
  12. <el-date-picker
  13. style="width: 120px"
  14. v-model="searchData.startDate"
  15. type="date"
  16. value-format="yyyy-MM-dd"
  17. placeholder="选择日期">
  18. </el-date-picker>
  19. </el-form-item>
  20. <el-form-item style="margin-top: 23px;">
  21. <label style="margin-left: 0px;font-size: 19px">&#10142</label>
  22. </el-form-item>
  23. <el-form-item :label="' '">
  24. <el-date-picker
  25. style="width: 120px"
  26. v-model="searchData.endDate"
  27. type="date"
  28. value-format="yyyy-MM-dd"
  29. placeholder="选择日期">
  30. </el-date-picker>
  31. </el-form-item>
  32. <el-form-item :label="'车间'">
  33. <el-select v-model="searchData.workShopList" multiple style="width: 360px">
  34. <el-option
  35. v-for = "i in workShopList"
  36. :key = "i.workShopId"
  37. :label = "i.workShopName"
  38. :value = "i.workShopId">
  39. </el-option>
  40. </el-select>
  41. </el-form-item>
  42. <el-form-item :label="' '">
  43. <el-button type="primary" @click="searchTable()">查询</el-button>
  44. <download-excel
  45. :fields="fields()"
  46. :data="exportData"
  47. type="xls"
  48. :name="exportName"
  49. :header="exportHeader"
  50. :footer="exportFooter"
  51. :fetch="createExportData"
  52. :before-generate="startDownload"
  53. :before-finish="finishDownload"
  54. worksheet="导出信息"
  55. class="el-button el-button--primary el-button--medium">
  56. {{ '导出' }}
  57. </download-excel>
  58. </el-form-item>
  59. </el-form>
  60. </el-form>
  61. <el-table
  62. :data="dataList"
  63. @row-click="changeData"
  64. :height="height"
  65. border
  66. highlight-current-row
  67. ref="mainTable"
  68. v-loading="dataListLoading"
  69. style="width: 100%; ">
  70. <el-table-column
  71. v-for="(item,index) in columnList1" :key="index"
  72. :sortable="item.columnSortable"
  73. :prop="item.columnProp"
  74. :header-align="item.headerAlign"
  75. :show-overflow-tooltip="item.showOverflowTooltip"
  76. :align="item.align"
  77. :fixed="item.fixed==''?false:item.fixed"
  78. :min-width="item.columnWidth"
  79. :label="item.columnLabel">
  80. <template slot-scope="scope">
  81. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  82. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  83. style="width: 100px; height: 80px"/></span>
  84. </template>
  85. </el-table-column>
  86. <!-- <el-table-column-->
  87. <!-- header-align="center"-->
  88. <!-- align="center"-->
  89. <!-- width="80"-->
  90. <!-- fixed="left"-->
  91. <!-- label="操作">-->
  92. <!-- <template slot-scope="scope">-->
  93. <!-- <a type="text" size="small" v-if="scope.row.status==='已下达'" @click="closeNotify(scope.row)">结束</a>-->
  94. <!-- <a type="text" size="small" v-if="scope.row.status==='已关闭'" @click="openNotify(scope.row)">打开</a>-->
  95. <!-- </template>-->
  96. <!-- </el-table-column>-->
  97. </el-table>
  98. <el-pagination
  99. @size-change="sizeChangeHandle"
  100. @current-change="currentChangeHandle"
  101. :current-page="pageIndex"
  102. :page-sizes="[20, 50, 100, 1000]"
  103. :page-size="pageSize"
  104. :total="totalPage"
  105. layout="total, sizes, prev, pager, next, jumper">
  106. </el-pagination>
  107. <el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
  108. <el-tab-pane label="派工单明细" name="detail">
  109. <el-table
  110. :data="dataList2"
  111. :height="height"
  112. border
  113. v-loading="dataListLoading"
  114. style="width: 100%; ">
  115. <el-table-column
  116. v-for="(item,index) in columnList2" :key="index"
  117. :sortable="item.columnSortable"
  118. :prop="item.columnProp"
  119. :header-align="item.headerAlign"
  120. :show-overflow-tooltip="item.showOverflowTooltip"
  121. :align="item.align"
  122. :fixed="item.fixed==''?false:item.fixed"
  123. :min-width="item.columnWidth"
  124. :label="item.columnLabel">
  125. <template slot-scope="scope">
  126. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  127. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  128. style="width: 100px; height: 80px"/></span>
  129. </template>
  130. </el-table-column>
  131. <!-- <el-table-column-->
  132. <!-- header-align="center"-->
  133. <!-- align="center"-->
  134. <!-- width="80"-->
  135. <!-- fixed="left"-->
  136. <!-- label="操作">-->
  137. <!-- <template slot-scope="scope">-->
  138. <!-- <a type="text" size="small" v-if="currentRow.status==='已下达'" @click="deleteNotifySOSPlus(scope.row)">删除</a>-->
  139. <!-- </template>-->
  140. <!-- </el-table-column>-->
  141. </el-table>
  142. </el-tab-pane>
  143. <el-tab-pane label="材料明细" name="sub">
  144. <el-table
  145. :data="dataList3"
  146. :height="height"
  147. border
  148. :row-class-name="tableRowClassName"
  149. v-loading="dataListLoading"
  150. style="width: 100%; ">
  151. <!-- <el-table-column-->
  152. <!-- header-align="center"-->
  153. <!-- align="center"-->
  154. <!-- width="80"-->
  155. <!-- fixed="left"-->
  156. <!-- label="操作">-->
  157. <!-- <template slot-scope="scope">-->
  158. <!-- <a type="text" size="small" @click="printLabel(scope.row)">打印标签</a>-->
  159. <!-- </template>-->
  160. <!-- </el-table-column>-->
  161. <el-table-column
  162. v-for="(item,index) in columnList3" :key="index"
  163. :sortable="item.columnSortable"
  164. :prop="item.columnProp"
  165. :header-align="item.headerAlign"
  166. :show-overflow-tooltip="item.showOverflowTooltip"
  167. :align="item.align"
  168. :fixed="item.fixed==''?false:item.fixed"
  169. :min-width="item.columnWidth"
  170. :label="item.columnLabel">
  171. <template slot-scope="scope">
  172. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  173. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  174. style="width: 100px; height: 80px"/></span>
  175. </template>
  176. </el-table-column>
  177. <!-- <el-table-column-->
  178. <!-- header-align="center"-->
  179. <!-- align="center"-->
  180. <!-- width="80"-->
  181. <!-- fixed="left"-->
  182. <!-- label="操作">-->
  183. <!-- <template slot-scope="scope">-->
  184. <!-- <a type="text" size="small" v-if="currentRow.status==='已下达'" @click="deleteNotifyMaterial(scope.row)">删除</a>-->
  185. <!-- </template>-->
  186. <!-- </el-table-column>-->
  187. </el-table>
  188. </el-tab-pane>
  189. <el-tab-pane label="材料汇总" name="sum">
  190. <el-table
  191. :data="dataList4"
  192. :height="height"
  193. border
  194. v-loading="dataListLoading"
  195. style="width: 100%; ">
  196. <!-- <el-table-column-->
  197. <!-- header-align="center"-->
  198. <!-- align="center"-->
  199. <!-- width="80"-->
  200. <!-- fixed="left"-->
  201. <!-- label="操作">-->
  202. <!-- <template slot-scope="scope">-->
  203. <!-- <a type="text" size="small" @click="printLabel(scope.row)">打印标签</a>-->
  204. <!-- </template>-->
  205. <!-- </el-table-column>-->
  206. <el-table-column
  207. v-for="(item,index) in columnList4" :key="index"
  208. :sortable="item.columnSortable"
  209. :prop="item.columnProp"
  210. :header-align="item.headerAlign"
  211. :show-overflow-tooltip="item.showOverflowTooltip"
  212. :align="item.align"
  213. :fixed="item.fixed==''?false:item.fixed"
  214. :min-width="item.columnWidth"
  215. :label="item.columnLabel">
  216. <template slot-scope="scope">
  217. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  218. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  219. style="width: 100px; height: 80px"/></span>
  220. </template>
  221. </el-table-column>
  222. </el-table>
  223. </el-tab-pane>
  224. </el-tabs>
  225. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  226. </div>
  227. </template>
  228. <script>
  229. import {
  230. searchNotifyHeader
  231. ,searchNotifyOrderList
  232. ,searchNotifyMaterialList
  233. ,searchSumNotifyMaterialList
  234. ,deleteNotifySOSPlus
  235. ,updateNotifyStatus
  236. ,deleteNotifyMaterial
  237. }from "@/api/orderIssure/soIssueNotify.js"
  238. import Chooselist from '@/views/modules/common/Chooselist'
  239. import {getEamWorkShop} from "@/api/factory/site.js";
  240. export default {
  241. components: {
  242. Chooselist
  243. },
  244. data() {
  245. return {
  246. height:200,
  247. modelFlag:false,
  248. activeName: 'detail',
  249. dataList: [],
  250. dataList2: [],
  251. dataList3: [],
  252. dataList4: [],
  253. addOrUpdateVisible:false,
  254. searchData: {
  255. page: 1,
  256. limit: 100,
  257. site:this.$store.state.user.site,
  258. userName: '',
  259. notifyNo: '',
  260. issueFlag: '',
  261. issueResult: '',
  262. workShopList: [],
  263. startDate: this.dayjs().format("YYYY-MM-DD"),
  264. endDate: this.dayjs().format("YYYY-MM-DD"),
  265. sql: " and a.status='已下达' and (issueFlag='N' or issueResult='部分发料' ) ",
  266. },
  267. workShopList: [],
  268. exportList:[],
  269. pageIndex: 1,
  270. pageSize: 100,
  271. totalPage: 0,
  272. dataListLoading: false,
  273. currentRow:'',
  274. headerData:'',
  275. columnList1:[
  276. {
  277. userId: this.$store.state.user.name,
  278. functionId: 701003,
  279. serialNumber: '701003Table1NotifyNo',
  280. tableId: "701003Table1",
  281. tableName: "领料申请主表",
  282. columnProp: "notifyNo",
  283. headerAlign: "center",
  284. align: "center",
  285. columnLabel: "申请单单号",
  286. columnHidden: false,
  287. columnImage: false,
  288. columnSortable: false,
  289. sortLv: 0,
  290. status: true,
  291. fixed: '',
  292. columnWidth: 100
  293. },{
  294. userId: this.$store.state.user.name,
  295. functionId: 701002,
  296. serialNumber: '701002Table1WorkShopName',
  297. tableId: "701002Table1",
  298. tableName: "领料申请主表",
  299. columnProp: "workShopName",
  300. headerAlign: "center",
  301. align: "center",
  302. columnLabel: "车间",
  303. columnHidden: false,
  304. columnImage: false,
  305. columnSortable: false,
  306. sortLv: 0,
  307. status: true,
  308. fixed: '',
  309. columnWidth: 100
  310. },{
  311. userId: this.$store.state.user.name,
  312. functionId: 701003,
  313. serialNumber: '701003Table1NotifyDate',
  314. tableId: "701003Table1",
  315. tableName: "领料申请主表",
  316. columnProp: "notifyDate",
  317. headerAlign: "center",
  318. align: "center",
  319. columnLabel: "申请日期",
  320. columnHidden: false,
  321. columnImage: false,
  322. columnSortable: false,
  323. sortLv: 0,
  324. status: true,
  325. fixed: '',
  326. columnWidth: 100
  327. },{
  328. userId: this.$store.state.user.name,
  329. functionId: 701003,
  330. serialNumber: '701003Table1UserName',
  331. tableId: "701003Table1",
  332. tableName: "领料申请主表",
  333. columnProp: "userName",
  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: '',
  343. columnWidth: 100
  344. },{
  345. userId: this.$store.state.user.name,
  346. functionId: 701003,
  347. serialNumber: '701003Table1UserName',
  348. tableId: "701003Table1",
  349. tableName: "领料申请主表",
  350. columnProp: "userDisplay",
  351. headerAlign: "center",
  352. align: "left",
  353. columnLabel: "申请人姓名",
  354. columnHidden: false,
  355. columnImage: false,
  356. columnSortable: false,
  357. sortLv: 0,
  358. status: true,
  359. fixed: '',
  360. columnWidth: 100
  361. },{
  362. userId: this.$store.state.user.name,
  363. functionId: 701003,
  364. serialNumber: '701003Table1IssueFlag',
  365. tableId: "701003Table1",
  366. tableName: "领料申请主表",
  367. columnProp: "issueFlag",
  368. headerAlign: "center",
  369. align: "center",
  370. columnLabel: "是否领料",
  371. columnHidden: false,
  372. columnImage: false,
  373. columnSortable: false,
  374. sortLv: 0,
  375. status: true,
  376. fixed: '',
  377. columnWidth: 60
  378. },{
  379. userId: this.$store.state.user.name,
  380. functionId: 701003,
  381. serialNumber: '701003Table1IssueResult',
  382. tableId: "701003Table1",
  383. tableName: "领料申请主表",
  384. columnProp: "issueResult",
  385. headerAlign: "center",
  386. align: "left",
  387. columnLabel: "领料结果",
  388. columnHidden: false,
  389. columnImage: false,
  390. columnSortable: false,
  391. sortLv: 0,
  392. status: true,
  393. fixed: '',
  394. columnWidth: 120
  395. // },{
  396. // userId: this.$store.state.user.name,
  397. // functionId: 701003,
  398. // serialNumber: '701003Table1PlanIssueDate',
  399. // tableId: "701003Table1",
  400. // tableName: "领料申请主表",
  401. // columnProp: "planIssueDate",
  402. // headerAlign: "center",
  403. // align: "left",
  404. // columnLabel: "计划领料日期",
  405. // columnHidden: false,
  406. // columnImage: false,
  407. // columnSortable: false,
  408. // sortLv: 0,
  409. // status: true,
  410. // fixed: '',
  411. // columnWidth: 100
  412. // },{
  413. // userId: this.$store.state.user.name,
  414. // functionId: 701003,
  415. // serialNumber: '701003Table1RealIssueDate',
  416. // tableId: "701003Table1",
  417. // tableName: "领料申请主表",
  418. // columnProp: "realIssueDate",
  419. // headerAlign: "center",
  420. // align: "left",
  421. // columnLabel: "实际领料日期",
  422. // columnHidden: false,
  423. // columnImage: false,
  424. // columnSortable: false,
  425. // sortLv: 0,
  426. // status: true,
  427. // fixed: '',
  428. // columnWidth: 100
  429. },{
  430. userId: this.$store.state.user.name,
  431. functionId: 701003,
  432. serialNumber: '701003Table1Status',
  433. tableId: "701003Table1",
  434. tableName: "领料申请主表",
  435. columnProp: "status",
  436. headerAlign: "center",
  437. align: "left",
  438. columnLabel: "状态",
  439. columnHidden: false,
  440. columnImage: false,
  441. columnSortable: false,
  442. sortLv: 0,
  443. status: true,
  444. fixed: '',
  445. columnWidth: 80
  446. },{
  447. userId: this.$store.state.user.name,
  448. functionId: 701003,
  449. serialNumber: '701003Table1Remark',
  450. tableId: "701003Table1",
  451. tableName: "领料申请主表",
  452. columnProp: "remark",
  453. headerAlign: "center",
  454. align: "left",
  455. columnLabel: "备注",
  456. columnHidden: false,
  457. columnImage: false,
  458. columnSortable: false,
  459. sortLv: 0,
  460. status: true,
  461. fixed: '',
  462. columnWidth: 200
  463. },
  464. ],
  465. columnList2:[
  466. {
  467. userId: this.$store.state.user.name,
  468. functionId: 701003,
  469. serialNumber: '701003Table2ItemNo',
  470. tableId: "701003Table2",
  471. tableName: "申请单派工单明细表",
  472. columnProp: "itemNo",
  473. headerAlign: "center",
  474. align: "right",
  475. columnLabel: "序号",
  476. columnHidden: false,
  477. columnImage: false,
  478. columnSortable: false,
  479. sortLv: 0,
  480. status: true,
  481. fixed: '',
  482. columnWidth: 40
  483. },
  484. {
  485. userId: this.$store.state.user.name,
  486. functionId: 701003,
  487. serialNumber: '701003Table2NeedDate',
  488. tableId: "701003Table2",
  489. tableName: "领料申请派工单子表",
  490. columnProp: 'needDate',
  491. headerAlign: "center",
  492. align: "left",
  493. columnLabel: '要求发料时间',
  494. columnHidden: false,
  495. columnImage: false,
  496. columnSortable: false,
  497. sortLv: 0,
  498. status: true,
  499. fixed: '',
  500. columnWidth: 80,
  501. },{
  502. userId: this.$store.state.user.name,
  503. functionId: 701003,
  504. serialNumber: '701003Table2SOOrderNo',
  505. tableId: "701003Table2",
  506. tableName: "申请单派工单明细表",
  507. columnProp: "sOOrderNo",
  508. headerAlign: "center",
  509. align: "left",
  510. columnLabel: "生产订单",
  511. columnHidden: false,
  512. columnImage: false,
  513. columnSortable: false,
  514. sortLv: 0,
  515. status: true,
  516. fixed: '',
  517. columnWidth: 120
  518. },{
  519. userId: this.$store.state.user.name,
  520. functionId: 701003,
  521. serialNumber: '701003Table2OpsItemNo',
  522. tableId: "701003Table2",
  523. tableName: "申请单派工单明细表",
  524. columnProp: "opsItemNo",
  525. headerAlign: "center",
  526. align: "right",
  527. columnLabel: "工序",
  528. columnHidden: false,
  529. columnImage: false,
  530. columnSortable: false,
  531. sortLv: 0,
  532. status: true,
  533. fixed: '',
  534. columnWidth: 50
  535. },{
  536. userId: this.$store.state.user.name,
  537. functionId: 701003,
  538. serialNumber: '701003Table2ItemDesc',
  539. tableId: "701003Table2",
  540. tableName: "申请单派工单明细表",
  541. columnProp: "itemDesc",
  542. headerAlign: "center",
  543. align: "left",
  544. columnLabel: "工序名称",
  545. columnHidden: false,
  546. columnImage: false,
  547. columnSortable: false,
  548. sortLv: 0,
  549. status: true,
  550. fixed: '',
  551. columnWidth: 120
  552. },{
  553. userId: this.$store.state.user.name,
  554. functionId: 701003,
  555. serialNumber: '701003Table2SeqNo',
  556. tableId: "701003Table2",
  557. tableName: "申请单派工单明细表",
  558. columnProp: "seqNo",
  559. headerAlign: "center",
  560. align: "left",
  561. columnLabel: "派工单号",
  562. columnHidden: false,
  563. columnImage: false,
  564. columnSortable: false,
  565. sortLv: 0,
  566. status: true,
  567. fixed: '',
  568. columnWidth: 150
  569. }, {
  570. userId: this.$store.state.user.name,
  571. functionId: 701003,
  572. serialNumber: '701003Table2FGPartNo',
  573. tableId: "701003Table2",
  574. tableName: "申请单派工单明细表",
  575. columnProp: "fGPartNo",
  576. headerAlign: "center",
  577. align: "left",
  578. columnLabel: "派工单物料",
  579. columnHidden: false,
  580. columnImage: false,
  581. columnSortable: false,
  582. sortLv: 0,
  583. status: true,
  584. fixed: '',
  585. columnWidth: 80
  586. }, {
  587. userId: this.$store.state.user.name,
  588. functionId: 701003,
  589. serialNumber: '701003Table2PartDesc',
  590. tableId: "701003Table2",
  591. tableName: "申请单派工单明细表",
  592. columnProp: "partDesc",
  593. headerAlign: "center",
  594. align: "left",
  595. columnLabel: "物料名称",
  596. columnHidden: false,
  597. columnImage: false,
  598. columnSortable: false,
  599. sortLv: 0,
  600. status: true,
  601. fixed: '',
  602. columnWidth: 200
  603. },
  604. {
  605. userId: this.$store.state.user.name,
  606. functionId: 701003,
  607. serialNumber: '701003Table2LocationNo',
  608. tableId: "701003Table2",
  609. tableName: "领料申请派工单子表",
  610. columnProp: 'locationNo',
  611. headerAlign: "center",
  612. align: "left",
  613. columnLabel: '库位编码',
  614. columnHidden: false,
  615. columnImage: false,
  616. columnSortable: false,
  617. sortLv: 0,
  618. status: true,
  619. fixed: '',
  620. columnWidth: 80,
  621. },
  622. {
  623. userId: this.$store.state.user.name,
  624. functionId: 701003,
  625. serialNumber: '701003Table2IssureQty',
  626. tableId: "701003Table2",
  627. tableName: "申请单派工单明细表",
  628. columnProp: "issureQty",
  629. headerAlign: "center",
  630. align: "right",
  631. columnLabel: "发料数量",
  632. columnHidden: false,
  633. columnImage: false,
  634. columnSortable: false,
  635. sortLv: 0,
  636. status: true,
  637. fixed: '',
  638. columnWidth: 80
  639. },
  640. ],
  641. columnList3:[
  642. {
  643. userId: this.$store.state.user.name,
  644. functionId: 701003,
  645. serialNumber: '701003Table3ItemNo',
  646. tableId: "701003Table3",
  647. tableName: "申请单材料明细表",
  648. columnProp: "itemNo",
  649. headerAlign: "center",
  650. align: "right",
  651. columnLabel: "申请单序号",
  652. columnHidden: false,
  653. columnImage: false,
  654. columnSortable: false,
  655. sortLv: 0,
  656. status: true,
  657. fixed: '',
  658. columnWidth: 80
  659. },{
  660. userId: this.$store.state.user.name,
  661. functionId: 701003,
  662. serialNumber: '701003Table3NeedDate',
  663. tableId: "701003Table3",
  664. tableName: "申请单材料明细表",
  665. columnProp: "needDate",
  666. headerAlign: "center",
  667. align: "center",
  668. columnLabel: "需求时间",
  669. columnHidden: false,
  670. columnImage: false,
  671. columnSortable: false,
  672. sortLv: 0,
  673. status: true,
  674. fixed: '',
  675. columnWidth: 110
  676. },{
  677. userId: this.$store.state.user.name,
  678. functionId: 701003,
  679. serialNumber: '701003Table3ComponentPartNo',
  680. tableId: "701003Table3",
  681. tableName: "申请单材料明细表",
  682. columnProp: "componentPartNo",
  683. headerAlign: "center",
  684. align: "center",
  685. columnLabel: "材料编码",
  686. columnHidden: false,
  687. columnImage: false,
  688. columnSortable: false,
  689. sortLv: 0,
  690. status: true,
  691. fixed: '',
  692. columnWidth: 100
  693. },{
  694. userId: this.$store.state.user.name,
  695. functionId: 701003,
  696. serialNumber: '701003Table3PartDesc',
  697. tableId: "701003Table3",
  698. tableName: "申请单材料明细表",
  699. columnProp: "partDesc",
  700. headerAlign: "center",
  701. align: "left",
  702. columnLabel: "材料名称",
  703. columnHidden: false,
  704. columnImage: false,
  705. columnSortable: false,
  706. sortLv: 0,
  707. status: true,
  708. fixed: '',
  709. columnWidth: 130
  710. },{
  711. userId: this.$store.state.user.name,
  712. functionId: 701003,
  713. serialNumber: '701003Table3QtyToIssue',
  714. tableId: "701003Table3",
  715. tableName: "申请单材料明细表",
  716. columnProp: "qtyToIssue",
  717. headerAlign: "center",
  718. align: "right",
  719. columnLabel: "申请数量",
  720. columnHidden: false,
  721. columnImage: false,
  722. columnSortable: false,
  723. sortLv: 0,
  724. status: true,
  725. fixed: '',
  726. columnWidth: 80
  727. },{
  728. userId: this.$store.state.user.name,
  729. functionId: 701003,
  730. serialNumber: '701003Table3QtyToIssueOriginal',
  731. tableId: "701003Table3",
  732. tableName: "申请单材料明细表",
  733. columnProp: "qtyToIssueOriginal",
  734. headerAlign: "center",
  735. align: "right",
  736. columnLabel: "已发数量",
  737. columnHidden: false,
  738. columnImage: false,
  739. columnSortable: false,
  740. sortLv: 0,
  741. status: true,
  742. fixed: '',
  743. columnWidth: 80
  744. },{
  745. userId: this.$store.state.user.name,
  746. functionId: 701003,
  747. serialNumber: '701003Table3IssueType',
  748. tableId: "701003Table3",
  749. tableName: "申请单材料明细表",
  750. columnProp: "issueType",
  751. headerAlign: "center",
  752. align: "right",
  753. columnLabel: "类型",
  754. columnHidden: false,
  755. columnImage: false,
  756. columnSortable: false,
  757. sortLv: 0,
  758. status: true,
  759. fixed: '',
  760. columnWidth: 80
  761. },{
  762. userId: this.$store.state.user.name,
  763. functionId: 701003,
  764. serialNumber: '701003Table3SOOrderNo',
  765. tableId: "701003Table3",
  766. tableName: "申请单材料明细表",
  767. columnProp: "orderNo",
  768. headerAlign: "center",
  769. align: "left",
  770. columnLabel: "生产订单",
  771. columnHidden: false,
  772. columnImage: false,
  773. columnSortable: false,
  774. sortLv: 0,
  775. status: true,
  776. fixed: '',
  777. columnWidth: 120
  778. },{
  779. userId: this.$store.state.user.name,
  780. functionId: 701003,
  781. serialNumber: '701003Table3OpsItemNo',
  782. tableId: "701003Table3",
  783. tableName: "申请单材料明细表",
  784. columnProp: "opsItemNo",
  785. headerAlign: "center",
  786. align: "right",
  787. columnLabel: "工序",
  788. columnHidden: false,
  789. columnImage: false,
  790. columnSortable: false,
  791. sortLv: 0,
  792. status: true,
  793. fixed: '',
  794. columnWidth: 50
  795. },{
  796. userId: this.$store.state.user.name,
  797. functionId: 701003,
  798. serialNumber: '701003Table3SeqNo',
  799. tableId: "701003Table3",
  800. tableName: "申请单材料明细表",
  801. columnProp: "seqNo",
  802. headerAlign: "center",
  803. align: "left",
  804. columnLabel: "派工单号",
  805. columnHidden: false,
  806. columnImage: false,
  807. columnSortable: false,
  808. sortLv: 0,
  809. status: true,
  810. fixed: '',
  811. columnWidth: 150
  812. },{
  813. userId: this.$store.state.user.name,
  814. functionId: 701003,
  815. serialNumber: '701003Table3LocationNo',
  816. tableId: "701003Table3",
  817. tableName: "申请单材料明细表",
  818. columnProp: "locationNo",
  819. headerAlign: "center",
  820. align: "left",
  821. columnLabel: "机台",
  822. columnHidden: false,
  823. columnImage: false,
  824. columnSortable: false,
  825. sortLv: 0,
  826. status: true,
  827. fixed: '',
  828. columnWidth: 80
  829. },{
  830. userId: this.$store.state.user.name,
  831. functionId: 701003,
  832. serialNumber: '701003Table3BOMItemNo',
  833. tableId: "701003Table3",
  834. tableName: "申请单材料明细表",
  835. columnProp: "bOMItemNo",
  836. headerAlign: "center",
  837. align: "right",
  838. columnLabel: "BOM序号",
  839. columnHidden: false,
  840. columnImage: false,
  841. columnSortable: false,
  842. sortLv: 0,
  843. status: true,
  844. fixed: '',
  845. columnWidth: 80
  846. },
  847. ],
  848. columnList4:[
  849. {
  850. userId: this.$store.state.user.name,
  851. functionId: 701003,
  852. serialNumber: '701003Table3IssueType',
  853. tableId: "701003Table4",
  854. tableName: "申请单材料明细表",
  855. columnProp: "issueType",
  856. headerAlign: "center",
  857. align: "center",
  858. columnLabel: "类型",
  859. columnHidden: false,
  860. columnImage: false,
  861. columnSortable: false,
  862. sortLv: 0,
  863. status: true,
  864. fixed: '',
  865. columnWidth: 100
  866. },
  867. {
  868. userId: this.$store.state.user.name,
  869. functionId: 701003,
  870. serialNumber: '701003Table3ComponentPartNo',
  871. tableId: "701003Table4",
  872. tableName: "申请单材料明细表",
  873. columnProp: "componentPartNo",
  874. headerAlign: "center",
  875. align: "center",
  876. columnLabel: "材料编码",
  877. columnHidden: false,
  878. columnImage: false,
  879. columnSortable: false,
  880. sortLv: 0,
  881. status: true,
  882. fixed: '',
  883. columnWidth: 100
  884. },{
  885. userId: this.$store.state.user.name,
  886. functionId: 701003,
  887. serialNumber: '701003Table3PartDesc',
  888. tableId: "701003Table4",
  889. tableName: "申请单材料明细表",
  890. columnProp: "partDesc",
  891. headerAlign: "center",
  892. align: "left",
  893. columnLabel: "材料名称",
  894. columnHidden: false,
  895. columnImage: false,
  896. columnSortable: false,
  897. sortLv: 0,
  898. status: true,
  899. fixed: '',
  900. columnWidth: 130
  901. },{
  902. userId: this.$store.state.user.name,
  903. functionId: 701003,
  904. serialNumber: '701003Table3QtyToIssue',
  905. tableId: "701003Table4",
  906. tableName: "申请单材料明细表",
  907. columnProp: "qtyToIssue",
  908. headerAlign: "center",
  909. align: "right",
  910. columnLabel: "合计申请数量",
  911. columnHidden: false,
  912. columnImage: false,
  913. columnSortable: false,
  914. sortLv: 0,
  915. status: true,
  916. fixed: '',
  917. columnWidth: 80
  918. },{
  919. userId: this.$store.state.user.name,
  920. functionId: 701003,
  921. serialNumber: '701003Table3QtyToIssueOriginal',
  922. tableId: "701003Table4",
  923. tableName: "申请单材料明细表",
  924. columnProp: "qtyToIssueOriginal",
  925. headerAlign: "center",
  926. align: "right",
  927. columnLabel: "合计已发数量",
  928. columnHidden: false,
  929. columnImage: false,
  930. columnSortable: false,
  931. sortLv: 0,
  932. status: true,
  933. fixed: '',
  934. columnWidth: 80
  935. },
  936. ],
  937. dataRole: {
  938. partTypeDesc: [
  939. {
  940. required: true,
  941. message: ' ',
  942. trigger: 'change'
  943. }
  944. ],
  945. partName: [
  946. {
  947. required: true,
  948. message: ' ',
  949. trigger: 'change'
  950. }
  951. ],
  952. },
  953. // 导出 start
  954. exportData: [],
  955. exportName: '发料申请单'+this.dayjs().format('YYYYMMDDHHmmss'),
  956. exportHeader: ["发料申请单"],
  957. exportFooter: [],
  958. // 导出 end
  959. }
  960. },
  961. mounted () {
  962. this.$nextTick(() => {
  963. this.height = (window.innerHeight- 260) / 2
  964. this.searchTable()
  965. getEamWorkShop({}).then(({data}) => {
  966. if (data && data.code === 0) {
  967. this.workShopList=data.rows
  968. }
  969. })
  970. })
  971. },
  972. // watch: {
  973. // searchData: {
  974. // deep: true,
  975. // handler: function (newV, oldV) {
  976. // this.searchData.partNo = this.searchData.partNo.toUpperCase()
  977. // }
  978. // },
  979. // },
  980. methods: {
  981. // 获取基础数据列表S
  982. getBaseList (val, type) {
  983. this.tagNo = val
  984. this.tagNo1 = type
  985. this.$nextTick(() => {
  986. let strVal = ''
  987. if (val === 1013) {
  988. if(type==23) {
  989. strVal = this.modelData.supplierId
  990. }
  991. }
  992. this.$refs.baseList.init(val, strVal)
  993. })
  994. },
  995. /* 列表方法的回调 */
  996. getBaseData (val) {
  997. if (this.tagNo === 23) {
  998. if(this.tagNo1==1) {
  999. this.modelData.supplierId = val.SupplierID
  1000. this.modelData.supplierName = val.SupplierName
  1001. }
  1002. }
  1003. },
  1004. // 每页数
  1005. sizeChangeHandle (val) {
  1006. this.pageSize = val
  1007. this.pageIndex = 1
  1008. this.searchTable()
  1009. },
  1010. // 当前页
  1011. currentChangeHandle (val) {
  1012. this.pageIndex = val
  1013. this.searchTable()
  1014. },
  1015. tabClick (tab, event) {
  1016. // 刷新列表数据
  1017. this.refreshCurrentTabTable()
  1018. },
  1019. changeData(row){
  1020. this.currentRow = JSON.parse(JSON.stringify(row));
  1021. this.headerData=row;
  1022. this.refreshCurrentTabTable ();
  1023. },
  1024. refreshCurrentTabTable(){
  1025. if(this.currentRow===''||this.currentRow===null){
  1026. this.currentRow={site:'',notifyNo:''}
  1027. }
  1028. if(this.activeName==='detail'){
  1029. searchNotifyOrderList(this.currentRow).then(({data}) => {
  1030. //区分请求成功和失败的状况
  1031. if (data && data.code == 0) {
  1032. this.dataList2 = data.rows
  1033. } else {
  1034. this.dataList2 = [];
  1035. }
  1036. });
  1037. }else if(this.activeName==='sub'){
  1038. searchNotifyMaterialList(this.currentRow).then(({data}) => {
  1039. //区分请求成功和失败的状况
  1040. if (data && data.code == 0) {
  1041. this.dataList3 = data.rows
  1042. } else {
  1043. this.dataList3 = [];
  1044. }
  1045. });
  1046. }else {
  1047. searchSumNotifyMaterialList(this.currentRow).then(({data}) => {
  1048. //区分请求成功和失败的状况
  1049. if (data && data.code == 0) {
  1050. this.dataList4 = data.rows
  1051. } else {
  1052. this.dataList4 = [];
  1053. }
  1054. });
  1055. }
  1056. },
  1057. searchTable(){
  1058. this.searchData.limit = this.pageSize
  1059. this.searchData.page = this.pageIndex
  1060. searchNotifyHeader(this.searchData).then(({data}) => {
  1061. //区分请求成功和失败的状况
  1062. if (data && data.code == 0) {
  1063. this.dataList = data.page.list
  1064. this.pageIndex = data.page.currPage
  1065. this.pageSize = data.page.pageSize
  1066. this.totalPage = data.page.totalCount
  1067. if(this.dataList.length>0){
  1068. this.$refs.mainTable.setCurrentRow(this.dataList[0]);
  1069. this.changeData(this.dataList[0])
  1070. }else {
  1071. this.changeData(null)
  1072. }
  1073. } else {
  1074. this.dataList = [];
  1075. }
  1076. });
  1077. },
  1078. closeNotify(row){
  1079. this.$confirm('确认关闭?', '提示', {
  1080. confirmButtonText: '确定',
  1081. cancelButtonText: '取消',
  1082. type: 'warning'
  1083. }).then(() => {
  1084. let inData={
  1085. site:row.site,
  1086. notifyNo:row.notifyNo,
  1087. status:'已关闭',
  1088. }
  1089. updateNotifyStatus(inData).then(({data}) => {
  1090. if (data && data.code === 0) {
  1091. this.searchTable()
  1092. this.$message({
  1093. message: '操作成功',
  1094. type: 'success',
  1095. duration: 1500,
  1096. onClose: () => {}
  1097. })
  1098. } else {
  1099. this.$alert(data.msg, '错误', {
  1100. confirmButtonText: '确定'
  1101. })
  1102. }
  1103. })
  1104. })
  1105. },
  1106. openNotify(row){
  1107. this.$confirm('确认打开?', '提示', {
  1108. confirmButtonText: '确定',
  1109. cancelButtonText: '取消',
  1110. type: 'warning'
  1111. }).then(() => {
  1112. let inData={
  1113. site:row.site,
  1114. notifyNo:row.notifyNo,
  1115. status:'已下达',
  1116. }
  1117. updateNotifyStatus(inData).then(({data}) => {
  1118. if (data && data.code === 0) {
  1119. this.searchTable()
  1120. this.$message({
  1121. message: '操作成功',
  1122. type: 'success',
  1123. duration: 1500,
  1124. onClose: () => {}
  1125. })
  1126. } else {
  1127. this.$alert(data.msg, '错误', {
  1128. confirmButtonText: '确定'
  1129. })
  1130. }
  1131. })
  1132. })
  1133. },
  1134. deleteNotifyMaterial(row){
  1135. this.$confirm('确认删除?', '提示', {
  1136. confirmButtonText: '确定',
  1137. cancelButtonText: '取消',
  1138. type: 'warning'
  1139. }).then(() => {
  1140. deleteNotifyMaterial(row).then(({data}) => {
  1141. if (data && data.code === 0) {
  1142. this.refreshCurrentTabTable()
  1143. this.$message({
  1144. message: '操作成功',
  1145. type: 'success',
  1146. duration: 1500,
  1147. onClose: () => {}
  1148. })
  1149. } else {
  1150. this.$alert(data.msg, '错误', {
  1151. confirmButtonText: '确定'
  1152. })
  1153. }
  1154. })
  1155. })
  1156. },
  1157. deleteNotifySOSPlus(row){
  1158. this.$confirm('确认删除?', '提示', {
  1159. confirmButtonText: '确定',
  1160. cancelButtonText: '取消',
  1161. type: 'warning'
  1162. }).then(() => {
  1163. deleteNotifySOSPlus(row).then(({data}) => {
  1164. if (data && data.code === 0) {
  1165. this.refreshCurrentTabTable()
  1166. this.$message({
  1167. message: '操作成功',
  1168. type: 'success',
  1169. duration: 1500,
  1170. onClose: () => {}
  1171. })
  1172. } else {
  1173. this.$alert(data.msg, '错误', {
  1174. confirmButtonText: '确定'
  1175. })
  1176. }
  1177. })
  1178. })
  1179. },
  1180. //导出excel
  1181. //导出excel
  1182. async createExportData() {
  1183. this.searchData.limit = -1
  1184. this.searchData.page = 1
  1185. await searchNotifyHeader(this.searchData).then(({data}) => {
  1186. this.exportList= data.page.list;
  1187. })
  1188. return this.exportList;
  1189. },
  1190. startDownload() {
  1191. // this.exportData = this.dataList
  1192. },
  1193. finishDownload() {
  1194. },
  1195. fields() {
  1196. let json = "{"
  1197. this.columnList1.forEach((item, index) => {
  1198. if (index == this.columnList1.length - 1) {
  1199. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1200. } else {
  1201. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1202. }
  1203. })
  1204. json += "}"
  1205. let s = eval("(" + json + ")")
  1206. return s
  1207. },
  1208. tableRowClassName ({row, rowIndex}) {
  1209. if (row.qtyToIssueOriginal<row.qtyToIssue&&new Date(row.needDate)<new Date(this.dayjs().format("YYYY-MM-DD HH:mm"))) {
  1210. return 'error-row'
  1211. }
  1212. return ''
  1213. },
  1214. },
  1215. }
  1216. </script>
  1217. <style scoped>
  1218. </style>