plm前端
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.

1262 lines
41 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
  4. <el-form-item :label="'申请编码'">
  5. <el-input v-model="searchData.applyId" style="width: 160px"></el-input>
  6. </el-form-item>
  7. <el-form-item label="申请日期">
  8. <el-date-picker
  9. value-format="yyyy-MM-dd"
  10. style="width: 100%"
  11. v-model="searchData.startDate"
  12. type="date"
  13. placeholder="开始日期">
  14. </el-date-picker>
  15. </el-form-item>
  16. <el-form-item label="到">
  17. <el-date-picker
  18. value-format="yyyy-MM-dd"
  19. style="width: 100%"
  20. v-model="searchData.endDate"
  21. type="date"
  22. placeholder="结束日期">
  23. </el-date-picker>
  24. </el-form-item>
  25. <el-form-item label=" ">
  26. <el-button @click="search()" type="primary" style="margin-left: 2px;margin-top:0px">查询</el-button>
  27. <!-- <el-button @click="addOrUpdateHandle('save')" type="primary" style="margin-left: 2px;margin-top: 0px">新增</el-button>-->
  28. <download-excel
  29. :fields="fields()"
  30. :data="exportData"
  31. type="xls"
  32. :name="exportName"
  33. :header="exportHeader"
  34. :footer="exportFooter"
  35. :fetch="createExportData"
  36. :before-generate="startDownload"
  37. :before-finish="finishDownload"
  38. worksheet="导出信息"
  39. class="el-button el-button--primary el-button--medium">
  40. {{ '导出' }}
  41. </download-excel>
  42. </el-form-item>
  43. </el-form>
  44. <el-table
  45. :height="height"
  46. :data="dataList1"
  47. border
  48. ref="mainTable"
  49. @row-click="changeData"
  50. highlight-current-row
  51. v-loading="dataListLoading"
  52. style="width: 100%;">
  53. <el-table-column
  54. header-align="center"
  55. align="center"
  56. width="150"
  57. fixed="right"
  58. label="操作">
  59. <template slot-scope="scope">
  60. <a type="text" size="small" v-if="scope.row.statusCode==='05'" @click="comfirmApply(scope.row)">下达</a>
  61. <a type="text" size="small" v-if="scope.row.statusCode==='05'" @click="cancelApply(scope.row)">取消申请</a>
  62. </template>
  63. </el-table-column>
  64. <el-table-column
  65. v-for="(item,index) in columnList1" :key="index"
  66. :sortable="item.columnSortable"
  67. :prop="item.columnProp"
  68. :header-align="item.headerAlign"
  69. :show-overflow-tooltip="item.showOverflowTooltip"
  70. :align="item.align"
  71. :fixed="item.fixed==''?false:item.fixed"
  72. :min-width="item.columnWidth"
  73. :label="item.columnLabel">
  74. <template slot-scope="scope">
  75. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  76. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  77. style="width: 100px; height: 80px"/></span>
  78. </template>
  79. </el-table-column>
  80. </el-table>
  81. <el-pagination
  82. @size-change="sizeChangeHandle"
  83. @current-change="currentChangeHandle"
  84. :current-page="pageIndex"
  85. :page-sizes="[20, 50, 100, 1000]"
  86. :page-size="pageSize"
  87. :total="totalPage"
  88. layout="total, sizes, prev, pager, next, jumper">
  89. </el-pagination>
  90. <el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
  91. <el-tab-pane label="工具明细" name="detail">
  92. <el-table
  93. :data="detailList"
  94. height="240"
  95. border
  96. v-loading="dataListLoading"
  97. style="width: 100%; ">
  98. <el-table-column
  99. v-for="(item,index) in columnList2" :key="index"
  100. :sortable="item.columnSortable"
  101. :prop="item.columnProp"
  102. :header-align="item.headerAlign"
  103. :show-overflow-tooltip="item.showOverflowTooltip"
  104. :align="item.align"
  105. :fixed="item.fixed==''?false:item.fixed"
  106. :min-width="item.columnWidth"
  107. :label="item.columnLabel">
  108. <template slot-scope="scope">
  109. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  110. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  111. style="width: 100px; height: 80px"/></span>
  112. </template>
  113. </el-table-column>
  114. <!-- <el-table-column-->
  115. <!-- fixed="right"-->
  116. <!-- header-align="center"-->
  117. <!-- align="center"-->
  118. <!-- width="100"-->
  119. <!-- label="操作">-->
  120. <!-- <template slot-scope="scope">-->
  121. <!-- &lt;!&ndash; <a :href="'http://192.168.1.130:80/file/'+scope.row.url" :download="scope.row.fileName">下载</a>&ndash;&gt;-->
  122. <!-- <a @click="downloadFile(scope.row)" >下载</a>-->
  123. <!-- <a type="text" size="small" @click="deleteFile(scope.row)">删除</a>-->
  124. <!-- </template>-->
  125. <!-- </el-table-column>-->
  126. </el-table>
  127. </el-tab-pane>
  128. <el-tab-pane label="附件信息" name="down">
  129. <oss-components height="25vh" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
  130. <!--文件上传-->
  131. <!-- <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">-->
  132. <!-- <el-form :inline="true" label-position="top" style="margin-top: 0px">-->
  133. <!-- <el-button type="primary" @click="addUploadFileModal()">上传文件</el-button>-->
  134. <!-- </el-form>-->
  135. <!-- </el-form>-->
  136. <!-- <el-table-->
  137. <!-- :data="fileContentList"-->
  138. <!-- height="240"-->
  139. <!-- border-->
  140. <!-- v-loading="dataListLoading"-->
  141. <!-- style="width: 100%; ">-->
  142. <!-- <el-table-column-->
  143. <!-- v-for="(item,index) in columnFileContentArray" :key="index"-->
  144. <!-- :sortable="item.columnSortable"-->
  145. <!-- :prop="item.columnProp"-->
  146. <!-- :header-align="item.headerAlign"-->
  147. <!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
  148. <!-- :align="item.align"-->
  149. <!-- :fixed="item.fixed==''?false:item.fixed"-->
  150. <!-- :min-width="item.columnWidth"-->
  151. <!-- :label="item.columnLabel">-->
  152. <!-- <template slot-scope="scope">-->
  153. <!-- <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>-->
  154. <!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"-->
  155. <!-- style="width: 100px; height: 80px"/></span>-->
  156. <!-- </template>-->
  157. <!-- </el-table-column>-->
  158. <!-- <el-table-column-->
  159. <!-- fixed="right"-->
  160. <!-- header-align="center"-->
  161. <!-- align="center"-->
  162. <!-- width="100"-->
  163. <!-- label="操作">-->
  164. <!-- <template slot-scope="scope">-->
  165. <!-- &lt;!&ndash; <a :href="'http://192.168.1.130:80/file/'+scope.row.url" :download="scope.row.fileName">下载</a>&ndash;&gt;-->
  166. <!-- <a @click="downloadFile(scope.row)" >下载</a>-->
  167. <!-- <a type="text" size="small" @click="deleteFile(scope.row)">删除</a>-->
  168. <!-- </template>-->
  169. <!-- </el-table-column>-->
  170. <!-- </el-table>-->
  171. </el-tab-pane>
  172. <!-- 审批信息 -->
  173. <el-tab-pane label="审批信息" name="approvalInformation">
  174. <approval-information ref="approvalTable" v-model:data-list="approvalList" :height="240"></approval-information>
  175. </el-tab-pane>
  176. <el-tab-pane label="处理信息" name="tab4">
  177. <el-form :inline="true" label-position="top" style="margin-top: 0px">
  178. <!-- <el-button type="primary" :disabled="!(currentRow.statusCode==='50'||currentRow.statusCode==='60')" @click="openMassageModel()">申请信息录入</el-button>-->
  179. <el-button type="primary" @click="openMassageModel()">申请信息录入</el-button>
  180. </el-form>
  181. <el-form label-position="top" :model="currentRow" >
  182. <el-row :gutter="15">
  183. <el-col :span="6">
  184. <el-form-item label="IFS PR编号" >
  185. <el-input v-model="currentRow.prNo" readonly></el-input>
  186. </el-form-item>
  187. </el-col>
  188. <el-col :span="18">
  189. <el-form-item label="备注" >
  190. <el-input v-model="currentRow.remark1" readonly></el-input>
  191. </el-form-item>
  192. </el-col>
  193. </el-row>
  194. <el-row :gutter="15" style="margin-top: 20px">
  195. <el-col :span="6">
  196. <el-form-item label="采购订单号" >
  197. <el-input v-model="currentRow.poNo" readonly ></el-input>
  198. </el-form-item>
  199. </el-col>
  200. <el-col :span="6">
  201. <el-form-item label="厂商名称" >
  202. <el-input v-model="currentRow.supplierName" readonly></el-input>
  203. </el-form-item>
  204. </el-col>
  205. <el-col :span="6">
  206. <el-form-item label="总成本(元)" >
  207. <el-input v-model="currentRow.allCost" readonly></el-input>
  208. </el-form-item>
  209. </el-col>
  210. </el-row>
  211. <el-row :gutter="15" style="margin-top: 0px">
  212. <el-col :span="24">
  213. <el-form-item label="备注" >
  214. <el-input v-model="currentRow.remark2" readonly></el-input>
  215. </el-form-item>
  216. </el-col>
  217. </el-row>
  218. </el-form>
  219. </el-tab-pane>
  220. </el-tabs>
  221. <el-dialog
  222. width="600px" v-drag
  223. :title="'处理信息'"
  224. :close-on-click-modal="false"
  225. :visible.sync="modelFlag">
  226. <el-form label-position="top" >
  227. <el-row :gutter="15" >
  228. <el-col :span="6">
  229. <el-form-item label="IFS PR编号" >
  230. <el-input v-model="modelData.prNo" ></el-input>
  231. </el-form-item>
  232. </el-col>
  233. <el-col :span="18">
  234. <el-form-item label="备注" >
  235. <el-input v-model="modelData.remark1" ></el-input>
  236. </el-form-item>
  237. </el-col>
  238. </el-row>
  239. <el-row :gutter="15" style="margin-top: 20px" >
  240. <el-col :span="6">
  241. <el-form-item label="采购订单号" >
  242. <el-input v-model="modelData.poNo" ></el-input>
  243. </el-form-item>
  244. </el-col>
  245. <el-col :span="6">
  246. <el-form-item label="厂商名称" >
  247. <el-input v-model="modelData.supplierName" ></el-input>
  248. </el-form-item>
  249. </el-col>
  250. <el-col :span="6">
  251. <el-form-item label="总成本(元)" >
  252. <el-input v-model="modelData.allCost" type="number" ></el-input>
  253. </el-form-item>
  254. </el-col>
  255. </el-row>
  256. <el-row :gutter="15" style="margin-top: 0px">
  257. <el-col :span="24">
  258. <el-form-item label="备注" >
  259. <el-input v-model="modelData.remark2" ></el-input>
  260. </el-form-item>
  261. </el-col>
  262. </el-row>
  263. </el-form>
  264. <span slot="footer" class="dialog-footer">
  265. <el-button type="primary" @click="saveHeaderMessage()">{{'保存'}}</el-button>
  266. <el-button type="primary" @click="modelFlag = false">{{'取消'}}</el-button>
  267. </span>
  268. </el-dialog>
  269. <!-- 上传文件的modal -->
  270. <projectUploadFile ref="projectUploadFile" @refreshPageTables="getFileContentData()" v-drag></projectUploadFile>
  271. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  272. </div>
  273. </template>
  274. <script>
  275. import {
  276. customerInformationSearch, // 客户信息列表查询`
  277. } from '@/api/customer/customerInformation.js'
  278. import projectUploadFile from "./com_tool_upload_file";/*上传文件的組件*/
  279. import Chooselist from '@/views/modules/common/Chooselist'
  280. import {searchProjectToolApplyHeader,
  281. searchProjectToolApplyDetail,
  282. comfirmProjectToolApply,
  283. cancelProjectToolApply,
  284. saveProjectHeaderMessage,
  285. } from "@/api/tool/toolApply.js"
  286. import {
  287. deleteProjectFile,
  288. getFileContentList,
  289. downLoadProjectFile,
  290. getProjectUserRole,
  291. } from "@/api/project/project.js"
  292. import {
  293. getNodeAuthority, // 获取节点权限
  294. getApprovalList, // 查询审批信息
  295. } from '@/api/changeManagement/changeManagement.js'
  296. import ApprovalInformation from "../changeManagement/approvalInformation.vue";
  297. import OssComponents from "../oss/ossComponents";
  298. /*組件*/
  299. export default {
  300. components: {
  301. ApprovalInformation,
  302. OssComponents,
  303. Chooselist,
  304. projectUploadFile,
  305. },
  306. name: "null",
  307. data() {
  308. return {
  309. fileContentList: [],
  310. activeName: 'detail',
  311. searchData:{
  312. page: 1,
  313. limit: 100,
  314. site:this.$store.state.user.site,
  315. applyId:'',
  316. startDate:'',
  317. endDate:'',
  318. },
  319. modelData:{
  320. site:'',
  321. applyNo:'',
  322. prNo:'',
  323. remark1:'',
  324. poNo:'',
  325. supplierName:'',
  326. allCost:'',
  327. remark2:'',
  328. },
  329. modelFlag:false,
  330. currentRow:{},
  331. currentRow2:{},
  332. height: 200,
  333. dataList1:[],
  334. detailList:[],
  335. dataListLoading: false,
  336. // 导出 start
  337. exportData: [],
  338. exportName: "项目清单" + this.dayjs().format('YYYYMMDDHHmmss'),
  339. exportHeader: ["项目清单"],
  340. exportFooter: [],
  341. exportList:[],
  342. // 导出 start
  343. exportData2: [],
  344. exportName2: "项目客户联系人" + this.dayjs().format('YYYYMMDDHHmmss'),
  345. exportHeader2: ["项目客户联系人"],
  346. exportFooter2: [],
  347. exportList2:[],
  348. tagNo:'',
  349. tagNo2:'',
  350. pageIndex: 1,
  351. pageSize: 100,
  352. totalPage: 0,
  353. ossColumns:[
  354. {
  355. userId: this.$store.state.user.name,
  356. functionId: 103001,
  357. serialNumber: '103001Table2FileName',
  358. tableId: '103001Table2',
  359. tableName: '文件信息表',
  360. columnProp: 'fileName',
  361. headerAlign: 'center',
  362. align: 'center',
  363. columnLabel: '文件名称',
  364. columnHidden: false,
  365. columnImage: false,
  366. columnSortable: false,
  367. sortLv: 0,
  368. status: true,
  369. fixed: '',
  370. columnWidth: 140
  371. },
  372. {
  373. userId: this.$store.state.user.name,
  374. functionId: 103001,
  375. serialNumber: '103001Table2FileRemark',
  376. tableId: '103001Table2',
  377. tableName: '文件信息表',
  378. columnProp: 'fileRemark',
  379. headerAlign: 'center',
  380. align: 'center',
  381. columnLabel: '备注',
  382. columnHidden: false,
  383. columnImage: false,
  384. columnSortable: false,
  385. sortLv: 0,
  386. status: true,
  387. fixed: '',
  388. columnWidth: 240
  389. },
  390. // {
  391. // userId: this.$store.state.user.name,
  392. // functionId: 103001,
  393. // serialNumber: '103001Table2OrderRef3',
  394. // tableId: '103001Table2',
  395. // tableName: '文件信息表',
  396. // columnProp: 'orderRef3',
  397. // headerAlign: 'center',
  398. // align: 'center',
  399. // columnLabel: '文件描述',
  400. // columnHidden: false,
  401. // columnImage: false,
  402. // columnSortable: false,
  403. // sortLv: 0,
  404. // status: true,
  405. // fixed: '',
  406. // columnWidth: 120
  407. // },
  408. {
  409. userId: this.$store.state.user.name,
  410. functionId: 103001,
  411. serialNumber: '103001Table2CreateDate',
  412. tableId: '103001Table2',
  413. tableName: '文件信息表',
  414. columnProp: 'createDate',
  415. headerAlign: 'center',
  416. align: 'center',
  417. columnLabel: '上传时间',
  418. columnHidden: false,
  419. columnImage: false,
  420. columnSortable: false,
  421. sortLv: 0,
  422. status: true,
  423. fixed: '',
  424. columnWidth: 140
  425. },
  426. {
  427. userId: this.$store.state.user.name,
  428. functionId: 103001,
  429. serialNumber: '103001Table2CreatedBy',
  430. tableId: '103001Table2',
  431. tableName: '文件信息表',
  432. columnProp: 'createBy',
  433. headerAlign: 'center',
  434. align: 'center',
  435. columnLabel: '上传人',
  436. columnHidden: false,
  437. columnImage: false,
  438. columnSortable: false,
  439. sortLv: 0,
  440. status: true,
  441. fixed: '',
  442. columnWidth: 140
  443. }
  444. ],
  445. // 导出 end
  446. columnList1: [
  447. {
  448. userId: this.$store.state.user.name,
  449. functionId: 106002,
  450. serialNumber: '106002Table1Site',
  451. tableId: "106002Table1",
  452. tableName: "刀具申请主表",
  453. columnProp: "site",
  454. headerAlign: "center",
  455. align: "left",
  456. columnLabel: "工厂编码",
  457. columnHidden: false,
  458. columnImage: false,
  459. columnSortable: false,
  460. sortLv: 0,
  461. status: true,
  462. fixed: '',
  463. columnWidth: 70
  464. },
  465. {
  466. userId: this.$store.state.user.name,
  467. functionId: 106002,
  468. serialNumber: '106002Table1ApplyNo',
  469. tableId: "106002Table1",
  470. tableName: "刀具申请主表",
  471. columnProp: "applyNo",
  472. headerAlign: "center",
  473. align: "left",
  474. columnLabel: "申请单号",
  475. columnHidden: false,
  476. columnImage: false,
  477. columnSortable: false,
  478. sortLv: 0,
  479. status: true,
  480. fixed: '',
  481. columnWidth: 80
  482. },
  483. {
  484. userId: this.$store.state.user.name,
  485. functionId: 106002,
  486. serialNumber: '106002Table1ApplyBy',
  487. tableId: "106002Table1",
  488. tableName: "刀具申请主表",
  489. columnProp: "applyBy",
  490. headerAlign: "center",
  491. align: "left",
  492. columnLabel: "申请人",
  493. columnHidden: false,
  494. columnImage: false,
  495. columnSortable: false,
  496. sortLv: 0,
  497. status: true,
  498. fixed: '',
  499. columnWidth: 60
  500. },
  501. {
  502. userId: this.$store.state.user.name,
  503. functionId: 106002,
  504. serialNumber: '106002Table1Status',
  505. tableId: "106002Table1",
  506. tableName: "刀具申请主表",
  507. columnProp: "status",
  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: 60
  518. },
  519. {
  520. userId: this.$store.state.user.name,
  521. functionId: 106002,
  522. serialNumber: '106002Table1ApplyDate',
  523. tableId: "106002Table1",
  524. tableName: "刀具申请主表",
  525. columnProp: "applyDate",
  526. headerAlign: "center",
  527. align: "left",
  528. columnLabel: "申请日期",
  529. columnHidden: false,
  530. columnImage: false,
  531. columnSortable: false,
  532. sortLv: 0,
  533. status: true,
  534. fixed: '',
  535. columnWidth: 80
  536. },
  537. {
  538. userId: this.$store.state.user.name,
  539. functionId: 106002,
  540. serialNumber: '106002Table1ApplyReason',
  541. tableId: "106002Table1",
  542. tableName: "刀具申请主表",
  543. columnProp: "applyReason",
  544. headerAlign: "center",
  545. align: "left",
  546. columnLabel: "申请原因",
  547. columnHidden: false,
  548. columnImage: false,
  549. columnSortable: false,
  550. sortLv: 0,
  551. status: true,
  552. fixed: '',
  553. columnWidth: 150
  554. },
  555. {
  556. userId: this.$store.state.user.name,
  557. functionId: 106002,
  558. serialNumber: '106002Table1Remark',
  559. tableId: "106002Table1",
  560. tableName: "刀具申请主表",
  561. columnProp: "remark",
  562. headerAlign: "center",
  563. align: "left",
  564. columnLabel: "申请备注",
  565. columnHidden: false,
  566. columnImage: false,
  567. columnSortable: false,
  568. sortLv: 0,
  569. status: true,
  570. fixed: '',
  571. columnWidth: 200
  572. },
  573. ],
  574. columnList2: [
  575. {
  576. userId: this.$store.state.user.name,
  577. functionId: 106002,
  578. serialNumber: '106002Table2SeqNo',
  579. tableId: '106002Table2',
  580. tableName: '工具申请明细',
  581. columnProp: 'seqNo',
  582. headerAlign: 'center',
  583. align: 'center',
  584. columnLabel: '序号',
  585. columnHidden: false,
  586. columnImage: false,
  587. columnSortable: false,
  588. sortLv: 0,
  589. status: true,
  590. fixed: '',
  591. columnWidth: 40
  592. },
  593. {
  594. userId: this.$store.state.user.name,
  595. functionId: 106002,
  596. serialNumber: '106002Table2QuotationNo',
  597. tableId: '106002Table2',
  598. tableName: '工具申请明细',
  599. columnProp: 'orderRef1',
  600. headerAlign: 'center',
  601. align: 'center',
  602. columnLabel: '项目编码',
  603. columnHidden: false,
  604. columnImage: false,
  605. columnSortable: false,
  606. sortLv: 0,
  607. status: true,
  608. fixed: '',
  609. columnWidth: 70
  610. },
  611. {
  612. userId: this.$store.state.user.name,
  613. functionId: 106002,
  614. serialNumber: '106002Table2ToolNo',
  615. tableId: '106002Table2',
  616. tableName: '工具申请明细',
  617. columnProp: 'toolId',
  618. headerAlign: 'center',
  619. align: 'center',
  620. columnLabel: '工具编码',
  621. columnHidden: false,
  622. columnImage: false,
  623. columnSortable: false,
  624. sortLv: 0,
  625. status: true,
  626. fixed: '',
  627. columnWidth: 70
  628. },
  629. {
  630. userId: this.$store.state.user.name,
  631. functionId: 106002,
  632. serialNumber: '106002Table2ToolDescription',
  633. tableId: '106002Table2',
  634. tableName: '工具申请明细',
  635. columnProp: 'toolDesc',
  636. headerAlign: 'center',
  637. align: 'center',
  638. columnLabel: '工具描述',
  639. columnHidden: false,
  640. columnImage: false,
  641. columnSortable: false,
  642. sortLv: 0,
  643. status: true,
  644. fixed: '',
  645. columnWidth: 120
  646. },
  647. {
  648. userId: this.$store.state.user.name,
  649. functionId: 106002,
  650. serialNumber: '106002Table2ApplyQty',
  651. tableId: '106002Table2',
  652. tableName: '工具申请明细',
  653. columnProp: 'applyQty',
  654. headerAlign: 'center',
  655. align: 'center',
  656. columnLabel: '申请数量',
  657. columnHidden: false,
  658. columnImage: false,
  659. columnSortable: false,
  660. sortLv: 0,
  661. status: true,
  662. fixed: '',
  663. columnWidth: 60
  664. },
  665. {
  666. userId: this.$store.state.user.name,
  667. functionId: 106002,
  668. serialNumber: '106002Table2UnitCost',
  669. tableId: '106002Table2',
  670. tableName: '工具申请明细',
  671. columnProp: 'standardCost',
  672. headerAlign: 'center',
  673. align: 'center',
  674. columnLabel: '工具成本',
  675. columnHidden: false,
  676. columnImage: false,
  677. columnSortable: false,
  678. sortLv: 0,
  679. status: true,
  680. fixed: '',
  681. columnWidth: 60
  682. },
  683. {
  684. userId: this.$store.state.user.name,
  685. functionId: 106002,
  686. serialNumber: '106002Table2Remark',
  687. tableId: '106002Table2',
  688. tableName: '工具申请明细',
  689. columnProp: 'remark',
  690. headerAlign: 'center',
  691. align: 'center',
  692. columnLabel: '备注',
  693. columnHidden: false,
  694. columnImage: false,
  695. columnSortable: false,
  696. sortLv: 0,
  697. status: true,
  698. fixed: '',
  699. columnWidth: 200
  700. },
  701. {
  702. userId: this.$store.state.user.name,
  703. functionId: 106002,
  704. serialNumber: '106002Table2QuotationNo',
  705. tableId: '106002Table2',
  706. tableName: '工具申请明细',
  707. columnProp: 'orderRef2',
  708. headerAlign: 'center',
  709. align: 'center',
  710. columnLabel: '物料编码',
  711. columnHidden: false,
  712. columnImage: false,
  713. columnSortable: false,
  714. sortLv: 0,
  715. status: true,
  716. fixed: '',
  717. columnWidth: 70
  718. }, {
  719. userId: this.$store.state.user.name,
  720. functionId: 106002,
  721. serialNumber: '106002Table2QuotationNo',
  722. tableId: '106002Table2',
  723. tableName: '工具申请明细',
  724. columnProp: 'orderRef3',
  725. headerAlign: 'center',
  726. align: 'center',
  727. columnLabel: '工艺路线版本',
  728. columnHidden: false,
  729. columnImage: false,
  730. columnSortable: false,
  731. sortLv: 0,
  732. status: true,
  733. fixed: '',
  734. columnWidth: 70
  735. },
  736. {
  737. userId: this.$store.state.user.name,
  738. functionId: 106002,
  739. serialNumber: '106002Table2QuotationNo',
  740. tableId: '106002Table2',
  741. tableName: '工具申请明细',
  742. columnProp: 'orderRef5',
  743. headerAlign: 'center',
  744. align: 'center',
  745. columnLabel: '替代编码',
  746. columnHidden: false,
  747. columnImage: false,
  748. columnSortable: false,
  749. sortLv: 0,
  750. status: true,
  751. fixed: '',
  752. columnWidth: 70
  753. },{
  754. userId: this.$store.state.user.name,
  755. functionId: 106002,
  756. serialNumber: '106002Table2QuotationNo',
  757. tableId: '106002Table2',
  758. tableName: '工具申请明细',
  759. columnProp: 'operationNo',
  760. headerAlign: 'center',
  761. align: 'center',
  762. columnLabel: '工序号',
  763. columnHidden: false,
  764. columnImage: false,
  765. columnSortable: false,
  766. sortLv: 0,
  767. status: true,
  768. fixed: '',
  769. columnWidth: 70
  770. },{
  771. userId: this.$store.state.user.name,
  772. functionId: 106002,
  773. serialNumber: '106002Table2QuotationNo',
  774. tableId: '106002Table2',
  775. tableName: '工具申请明细',
  776. columnProp: 'operationName',
  777. headerAlign: 'center',
  778. align: 'center',
  779. columnLabel: '工序',
  780. columnHidden: false,
  781. columnImage: false,
  782. columnSortable: false,
  783. sortLv: 0,
  784. status: true,
  785. fixed: '',
  786. columnWidth: 70
  787. },
  788. ],
  789. columnFileContentArray: [
  790. {
  791. columnProp: 'fileName',
  792. headeralign: 'left',
  793. align: 'left',
  794. columnLabel: '文件名称',
  795. columnHidden: false,
  796. columnImage: false,
  797. columnSortable: false,
  798. sortLv: 0,
  799. status: true,
  800. fixed: false
  801. // }, {
  802. // columnProp: 'createdBy',
  803. // headeralign: 'left',
  804. // align: 'left',
  805. // columnLabel: '上传人',
  806. // columnHidden: false,
  807. // columnImage: false,
  808. // columnSortable: true,
  809. // sortLv: 0,
  810. // status: true,
  811. // fixed: false
  812. }, {
  813. columnProp: 'createDate',
  814. headeralign: 'left',
  815. align: 'left',
  816. columnLabel: '上传时间',
  817. columnHidden: false,
  818. columnImage: false,
  819. columnSortable: true,
  820. sortLv: 0,
  821. status: true,
  822. fixed: false
  823. }, {
  824. columnProp: 'orderRef3',
  825. headeralign: 'left',
  826. align: 'left',
  827. columnLabel: '类型',
  828. columnHidden: false,
  829. columnImage: false,
  830. columnSortable: true,
  831. sortLv: 0,
  832. status: true,
  833. fixed: false
  834. },
  835. ],
  836. approvalList: [],
  837. }
  838. },
  839. watch: {
  840. // columnList1: {
  841. // deep: true,
  842. // handler: function (newV, oldV) {
  843. // debugger
  844. //
  845. // }
  846. // }
  847. },
  848. mounted() {
  849. this.$nextTick(() => {
  850. this.height = window.innerHeight - 520;
  851. })
  852. },
  853. methods: {
  854. // 查询审批信息
  855. getApprovalList () {
  856. if (Object.keys(this.currentRow).length !== 0) {
  857. let tempData = {
  858. site: this.$store.state.user.site,
  859. menuId: this.$route.meta.menuId,
  860. documentNo: this.currentRow.applyNo
  861. }
  862. getApprovalList(tempData).then(({data}) => {
  863. if (data && data.code === 0) {
  864. this.approvalList = data.rows
  865. } else {
  866. this.approvalList = []
  867. }
  868. })
  869. }
  870. },
  871. // 获取基础数据列表S
  872. getBaseList (val, type) {
  873. this.tagNo = val
  874. this.tagNo2 = type
  875. this.$nextTick(() => {
  876. let strVal = ''
  877. if (val === 1010) {
  878. if(type==1) {
  879. strVal = this.searchData.projectType
  880. }
  881. }
  882. this.$refs.baseList.init(val, strVal)
  883. })
  884. },
  885. /* 列表方法的回调 */
  886. getBaseData (val) {
  887. if (this.tagNo === 1010) {
  888. if(this.tagNo2==1) {
  889. this.searchData.projectType = val.Base_desc
  890. }
  891. }
  892. },
  893. //导出excel
  894. async createExportData() {
  895. this.searchData.limit = -1
  896. this.searchData.page = 1
  897. await searchToolApplyHeader(this.searchData).then(({data}) => {
  898. this.exportList= data.page.list;
  899. })
  900. return this.exportList;
  901. },
  902. startDownload() {
  903. // this.exportData = this.dataList
  904. },
  905. finishDownload() {
  906. },
  907. fields() {
  908. let json = "{"
  909. this.columnList1.forEach((item, index) => {
  910. if (index == this.columnList1.length - 1) {
  911. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  912. } else {
  913. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  914. }
  915. })
  916. json += "}"
  917. let s = eval("(" + json + ")")
  918. return s
  919. },
  920. //导出excel
  921. async createExportData2() {
  922. return this.contactList;
  923. },
  924. startDownload2() {
  925. // this.exportData = this.dataList
  926. },
  927. finishDownload2() {
  928. },
  929. fields2() {
  930. let json = "{"
  931. this.columnList2.forEach((item, index) => {
  932. if (index == this.columnList2.length - 1) {
  933. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  934. } else {
  935. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  936. }
  937. })
  938. json += "}"
  939. let s = eval("(" + json + ")")
  940. return s
  941. },
  942. // 导出 end
  943. // 获取数据列表
  944. search () {
  945. this.searchData.limit = this.pageSize
  946. this.searchData.page = this.pageIndex
  947. searchProjectToolApplyHeader(this.searchData).then(({data}) => {
  948. if (data.code == 0) {
  949. this.dataList1 = data.page.list
  950. this.pageIndex = data.page.currPage
  951. this.pageSize = data.page.pageSize
  952. this.totalPage = data.page.totalCount
  953. if(this.dataList1.length>0){
  954. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  955. this.currentRow = JSON.parse( JSON.stringify(this.dataList1[0]));
  956. }else {
  957. this.currentRow ={}
  958. }
  959. this.refreshCurrentTabTable ()
  960. }
  961. this.dataListLoading = false
  962. })
  963. },
  964. //单击切换订单
  965. changeData(row) {
  966. this.currentRow = JSON.parse(JSON.stringify(row));
  967. this.currentRow2 = row;
  968. this.refreshCurrentTabTable ();
  969. },
  970. addUploadFileModal(){
  971. let currentData = {
  972. site: this.currentRow.site,
  973. createBy: this.$store.state.user.name,
  974. projectId: this.currentRow.applyNo,
  975. projectName: '',
  976. remark: '',
  977. };
  978. //打开组件 去做新增业务
  979. this.$nextTick(() => {
  980. this.$refs.projectUploadFile.init(currentData);
  981. })
  982. },
  983. deleteFile(row){
  984. this.$confirm('确定要删除此文件?', '提示', {
  985. confirmButtonText: '确定',
  986. cancelButtonText: '取消',
  987. type: 'warning'
  988. }).then(() => {
  989. deleteProjectFile(row).then(({data}) => {
  990. if (data && data.code == 0) {
  991. this.getFileContentData();
  992. this.$message({
  993. message: '操作成功',
  994. type: 'success',
  995. duration: 1500,
  996. onClose: () => {
  997. }
  998. })
  999. } else {
  1000. this.$alert(data.msg, '错误', {
  1001. confirmButtonText: '确定'
  1002. })
  1003. }
  1004. })
  1005. }).catch(() => {
  1006. })
  1007. },
  1008. tabClick (tab, event) {
  1009. // 刷新列表数据
  1010. this.refreshCurrentTabTable()
  1011. },
  1012. // 刷新页签的table数据
  1013. refreshCurrentTabTable () {
  1014. if (this.activeName == 'detail') {
  1015. this.searchToolApplyDetail();
  1016. }
  1017. if (this.activeName == 'down') {
  1018. // this.getFileContentData();
  1019. }
  1020. if (this.activeName === 'approvalInformation') {
  1021. this.getApprovalList()
  1022. }
  1023. },
  1024. searchToolApplyDetail(){
  1025. searchProjectToolApplyDetail(this.currentRow).then(({data}) => {
  1026. if (data.code == 0) {
  1027. this.detailList = data.rows
  1028. }
  1029. })
  1030. },
  1031. comfirmApply (row) {
  1032. this.$confirm(`确定下达这个申请`, '提示', {
  1033. confirmButtonText: '确定',
  1034. cancelButtonText: '取消',
  1035. type: 'warning'
  1036. }).then(() => {
  1037. let tempData = {
  1038. site: row.site,
  1039. userName: this.$store.state.user.name,
  1040. applyNo: row.applyNo,
  1041. menuId: this.$route.meta.menuId
  1042. }
  1043. comfirmProjectToolApply(tempData).then(({data}) => {
  1044. if (data && data.code === 0) {
  1045. row.statusCode = '10'
  1046. row.status = '下达'
  1047. this.$message({
  1048. message: '操作成功',
  1049. type: 'success',
  1050. duration: 1500,
  1051. onClose: () => {}
  1052. })
  1053. } else {
  1054. this.$alert(data.msg, '错误', {
  1055. confirmButtonText: '确定'
  1056. })
  1057. }
  1058. })
  1059. })
  1060. },
  1061. cancelApply(row){
  1062. this.$confirm(`确定取消这个申请`, '提示', {
  1063. confirmButtonText: '确定',
  1064. cancelButtonText: '取消',
  1065. type: 'warning'
  1066. }).then(() => {
  1067. cancelProjectToolApply(row).then(({data}) => {
  1068. if (data && data.code === 0) {
  1069. this.search();
  1070. this.$message({
  1071. message: '操作成功',
  1072. type: 'success',
  1073. duration: 1500,
  1074. onClose: () => {
  1075. }
  1076. })
  1077. } else {
  1078. this.$alert(data.msg, '错误', {
  1079. confirmButtonText: '确定'
  1080. })
  1081. }
  1082. })
  1083. })
  1084. },
  1085. //刷新派设备文档的列表
  1086. getFileContentData() {
  1087. let currentData = {orderRef2: this.currentRow.applyNo};
  1088. getFileContentList(currentData).then(({data}) => {
  1089. //区分请求成功和失败的状况
  1090. if (data && data.code == 200) {
  1091. this.fileContentList = data.rows;
  1092. } else {
  1093. this.fileContentList = [];
  1094. }
  1095. });
  1096. },
  1097. // 下载
  1098. downloadFile(row){
  1099. // let inData={
  1100. // site:this.currentRow.site,
  1101. // username:this.$store.state.user.name,
  1102. // projectId:this.currentRow.projectId
  1103. // }
  1104. // getProjectUserRole(inData).then(({data}) => {
  1105. // if(this.$store.state.user.name=='admin'||data.row.downFlag=='Y') {
  1106. downLoadProjectFile(row)
  1107. .then(({data}) => {
  1108. // 不限制文件下载类型
  1109. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  1110. // 下载文件名称
  1111. const fileName = row.fileName
  1112. // a标签下载
  1113. const linkNode = document.createElement('a')
  1114. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  1115. linkNode.style.display = 'none'
  1116. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  1117. console.log(linkNode)
  1118. // if(val == 'Y'){
  1119. // this.pdfVisible = true
  1120. // this.pdfUrl = linkNode.href
  1121. // }else {
  1122. document.body.appendChild(linkNode)
  1123. linkNode.click() // 模拟在按钮上的一次鼠标单击
  1124. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  1125. document.body.removeChild(linkNode)
  1126. // }
  1127. })
  1128. // }else {
  1129. // this.$alert('没有权限下载这个项目的文件!', '错误', {
  1130. // confirmButtonText: '确定'
  1131. // })
  1132. // }
  1133. // })
  1134. },
  1135. // 每页数
  1136. sizeChangeHandle (val) {
  1137. this.pageSize = val
  1138. this.pageIndex = 1
  1139. this.search()
  1140. },
  1141. // 当前页
  1142. currentChangeHandle (val) {
  1143. this.pageIndex = val
  1144. this.search()
  1145. },
  1146. openMassageModel(){
  1147. if(Object.keys(this.currentRow).length === 0){
  1148. this.$alert('未选择记录!', '错误', {
  1149. confirmButtonText: '确定'
  1150. })
  1151. return false;
  1152. }
  1153. this.modelData={
  1154. site:this.currentRow.site,
  1155. applyNo:this.currentRow.applyNo,
  1156. prNo:this.currentRow.prNo,
  1157. remark1:this.currentRow.remark1,
  1158. poNo:this.currentRow.poNo,
  1159. supplierName:this.currentRow.supplierName,
  1160. allCost:this.currentRow.allCost,
  1161. remark2:this.currentRow.remark2,
  1162. }
  1163. this.modelFlag=true
  1164. },
  1165. saveHeaderMessage(){
  1166. this.$confirm('确定是否保存','提示',{
  1167. confirmButtonText:'确定',
  1168. cancelButtonText:'取消',
  1169. type:'warning'
  1170. }).then(()=>{
  1171. saveProjectHeaderMessage(this.modelData).then(({data}) => {
  1172. if (data && data.code == 0) {
  1173. this.modelFlag=false;
  1174. this.currentRow.prNo=this.modelData.prNo
  1175. this.currentRow.remark1=this.modelData.remark1
  1176. this.currentRow.poNo=this.modelData.poNo
  1177. this.currentRow.supplierName=this.modelData.supplierName
  1178. this.currentRow.allCost=this.modelData.allCost
  1179. this.currentRow.remark2=this.modelData.remark2
  1180. this.currentRow2.prNo=this.modelData.prNo
  1181. this.currentRow2.remark1=this.modelData.remark1
  1182. this.currentRow2.poNo=this.modelData.poNo
  1183. this.currentRow2.supplierName=this.modelData.supplierName
  1184. this.currentRow2.allCost=this.modelData.allCost
  1185. this.currentRow2.remark2=this.modelData.remark2
  1186. this.$message({
  1187. message: '操作成功',
  1188. type: 'success',
  1189. duration: 1500,
  1190. onClose: () => {
  1191. }
  1192. })
  1193. } else {
  1194. this.$alert(data.msg, '错误', {
  1195. confirmButtonText: '确定'
  1196. })
  1197. }
  1198. })
  1199. })
  1200. },
  1201. },
  1202. activated() {
  1203. },
  1204. }
  1205. </script>
  1206. <style >
  1207. .el-transfer-panel {
  1208. border: 2px solid #17b3a3;
  1209. border-radius: 4px;
  1210. overflow: hidden;
  1211. background: #fff;
  1212. display: inline-block;
  1213. vertical-align: middle;
  1214. width: 200px;
  1215. max-height: 100%;
  1216. -webkit-box-sizing: border-box;
  1217. box-sizing: border-box;
  1218. position: relative;
  1219. }
  1220. .el-transfer-panel .el-transfer-panel__header {
  1221. height: 40px;
  1222. line-height: 40px;
  1223. background: #17b3a3;
  1224. margin: 0;
  1225. padding-left: 15px;
  1226. border-bottom: 1px solid #17b3a3;
  1227. -webkit-box-sizing: border-box;
  1228. box-sizing: border-box;
  1229. color: #000;
  1230. }
  1231. .el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label {
  1232. font-size: 14px;
  1233. color: #303133;
  1234. font-weight: 400;
  1235. }
  1236. </style>