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.

429 lines
14 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
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year 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 year 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 label-position="top" style="margin-top: 1px; margin-left: 0px;">
  4. <el-form :inline="true" label-position="top" style="margin-top: 0px">
  5. <!-- <el-button type="primary" @click="addModal()">新增</el-button>-->
  6. <download-excel
  7. :fields="fields()"
  8. :data="exportData"
  9. type="xls"
  10. :name="exportName"
  11. :header="exportHeader"
  12. :footer="exportFooter"
  13. :fetch="createExportData"
  14. :before-generate="startDownload"
  15. :before-finish="finishDownload"
  16. worksheet="导出信息"
  17. class="el-button el-button--primary el-button--medium">
  18. {{ '导出' }}
  19. </download-excel>
  20. </el-form>
  21. </el-form>
  22. <el-table
  23. :data="dataList"
  24. height="240"
  25. border
  26. v-loading="dataListLoading"
  27. style="width: 100%; ">
  28. <el-table-column
  29. v-for="(item,index) in columnList" :key="index"
  30. :sortable="item.columnSortable"
  31. :prop="item.columnProp"
  32. :header-align="item.headerAlign"
  33. :show-overflow-tooltip="item.showOverflowTooltip"
  34. :align="item.align"
  35. :fixed="item.fixed==''?false:item.fixed"
  36. :min-width="item.columnWidth"
  37. :label="item.columnLabel">
  38. <template slot-scope="scope">
  39. <div v-if="item.columnProp === 'proofingNo'">
  40. <el-link v-if="!item.columnHidden" @click="handleClick(scope.row)">{{ scope.row[item.columnProp] }}</el-link>
  41. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  42. </div>
  43. <div v-else>
  44. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  45. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  46. </div>
  47. </template>
  48. </el-table-column>
  49. <!-- <el-table-column-->
  50. <!-- header-align="center"-->
  51. <!-- align="center"-->
  52. <!-- width="150"-->
  53. <!-- fixed="right"-->
  54. <!-- label="操作">-->
  55. <!-- <template slot-scope="scope">-->
  56. <!-- <a type="text" size="small" @click="updateModel(scope.row)">修改</a>-->
  57. <!-- <a type="text" size="small" @click="deleteData(scope.row)">删除</a>-->
  58. <!-- </template>-->
  59. <!-- </el-table-column>-->
  60. </el-table>
  61. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  62. </div>
  63. </template>
  64. <script>
  65. import {
  66. quotationInformationSearch, // 打样信息列表查询
  67. } from '@/api/quotation/quotationInformation.js'
  68. import Chooselist from '@/views/modules/common/Chooselist'
  69. import {proofingInformationSearch} from "../../../../api/proofing/proofingInformation";
  70. export default {
  71. components: {
  72. Chooselist
  73. },
  74. data() {
  75. return {
  76. dataList: [],
  77. searchData: {
  78. site: '',
  79. username: this.$store.state.user.name,
  80. projectId: '',
  81. page: 1,
  82. limit: 1000
  83. },
  84. visible:false,
  85. dataListLoading: false,
  86. currentRow:'',
  87. columnList: [
  88. {
  89. userId: this.$store.state.user.name,
  90. functionId: 103001,
  91. serialNumber: '103001Table1ProofingNo',
  92. tableId: '103001Table1',
  93. tableName: '打样信息表',
  94. columnProp: 'proofingNo',
  95. headerAlign: 'center',
  96. align: 'center',
  97. columnLabel: '打样单号',
  98. columnHidden: false,
  99. columnImage: false,
  100. columnSortable: false,
  101. sortLv: 0,
  102. status: true,
  103. fixed: '',
  104. columnWidth: 120
  105. },
  106. {
  107. userId: this.$store.state.user.name,
  108. functionId: 103001,
  109. serialNumber: '103001Table1TrackerName',
  110. tableId: '103001Table1',
  111. tableName: '打样信息表',
  112. columnProp: 'trackerName',
  113. headerAlign: 'center',
  114. align: 'center',
  115. columnLabel: 'CS',
  116. columnHidden: false,
  117. columnImage: false,
  118. columnSortable: false,
  119. sortLv: 0,
  120. status: true,
  121. fixed: '',
  122. columnWidth: 80
  123. },
  124. {
  125. userId: this.$store.state.user.name,
  126. functionId: 103001,
  127. serialNumber: '103001Table1EngineerName',
  128. tableId: '103001Table1',
  129. tableName: '打样信息表',
  130. columnProp: 'engineerName',
  131. headerAlign: 'center',
  132. align: 'center',
  133. columnLabel: 'NPI工程师',
  134. columnHidden: false,
  135. columnImage: false,
  136. columnSortable: false,
  137. sortLv: 0,
  138. status: true,
  139. fixed: '',
  140. columnWidth: 80
  141. },
  142. {
  143. userId: this.$store.state.user.name,
  144. functionId: 103001,
  145. serialNumber: '103001Table1ApproverName',
  146. tableId: '103001Table1',
  147. tableName: '打样信息表',
  148. columnProp: 'approverName',
  149. headerAlign: 'center',
  150. align: 'center',
  151. columnLabel: 'Approver',
  152. columnHidden: false,
  153. columnImage: false,
  154. columnSortable: false,
  155. sortLv: 0,
  156. status: true,
  157. fixed: '',
  158. columnWidth: 80
  159. },
  160. {
  161. userId: this.$store.state.user.name,
  162. functionId: 103001,
  163. serialNumber: '103001Table1TestPartNo',
  164. tableId: '103001Table1',
  165. tableName: '打样信息表',
  166. columnProp: 'testPartNo',
  167. headerAlign: 'center',
  168. align: 'center',
  169. columnLabel: '物料编码',
  170. columnHidden: false,
  171. columnImage: false,
  172. columnSortable: false,
  173. sortLv: 0,
  174. status: true,
  175. fixed: '',
  176. columnWidth: 150
  177. },
  178. {
  179. userId: this.$store.state.user.name,
  180. functionId: 103001,
  181. serialNumber: '103001Table1PartName',
  182. tableId: '103001Table1',
  183. tableName: '打样信息表',
  184. columnProp: 'partName',
  185. headerAlign: 'center',
  186. align: 'center',
  187. columnLabel: '物料名称',
  188. columnHidden: false,
  189. columnImage: false,
  190. columnSortable: false,
  191. sortLv: 0,
  192. status: true,
  193. fixed: '',
  194. columnWidth: 100
  195. },
  196. {
  197. userId: this.$store.state.user.name,
  198. functionId: 102001,
  199. serialNumber: '102001Table1FinalPartNo',
  200. tableId: '102001Table1',
  201. tableName: '询价信息表',
  202. columnProp: 'finalPartNo',
  203. headerAlign: 'center',
  204. align: 'left',
  205. columnLabel: 'IFS料号',
  206. columnHidden: false,
  207. columnImage: false,
  208. columnSortable: false,
  209. sortLv: 0,
  210. status: true,
  211. fixed: '',
  212. columnWidth: 80
  213. },
  214. {
  215. userId: this.$store.state.user.name,
  216. functionId: 102001,
  217. serialNumber: '102001Table1CustomerPartNo',
  218. tableId: '102001Table1',
  219. tableName: '询价信息表',
  220. columnProp: 'customerPartNo',
  221. headerAlign: 'center',
  222. align: 'left',
  223. columnLabel: '客户料号',
  224. columnHidden: false,
  225. columnImage: false,
  226. columnSortable: false,
  227. sortLv: 0,
  228. status: true,
  229. fixed: '',
  230. columnWidth: 80
  231. },
  232. {
  233. userId: this.$store.state.user.name,
  234. functionId: 103001,
  235. serialNumber: '103001Table1PriorityLevel',
  236. tableId: '103001Table1',
  237. tableName: '打样信息表',
  238. columnProp: 'priorityLevel',
  239. headerAlign: 'center',
  240. align: 'center',
  241. columnLabel: '优先等级',
  242. columnHidden: false,
  243. columnImage: false,
  244. columnSortable: false,
  245. sortLv: 0,
  246. status: true,
  247. fixed: '',
  248. columnWidth: 80
  249. },
  250. {
  251. userId: this.$store.state.user.name,
  252. functionId: 103001,
  253. serialNumber: '103001Table1ProofingNumber',
  254. tableId: '103001Table1',
  255. tableName: '打样信息表',
  256. columnProp: 'proofingNumber',
  257. headerAlign: 'center',
  258. align: 'center',
  259. columnLabel: '打样数量',
  260. columnHidden: false,
  261. columnImage: false,
  262. columnSortable: false,
  263. sortLv: 0,
  264. status: true,
  265. fixed: '',
  266. columnWidth: 80
  267. },
  268. {
  269. userId: this.$store.state.user.name,
  270. functionId: 103001,
  271. serialNumber: '103001Table1RequiredDeliveryDate',
  272. tableId: '103001Table1',
  273. tableName: '打样信息表',
  274. columnProp: 'requiredDeliveryDate',
  275. headerAlign: 'center',
  276. align: 'center',
  277. columnLabel: '要求交付日期',
  278. columnHidden: false,
  279. columnImage: false,
  280. columnSortable: false,
  281. sortLv: 0,
  282. status: true,
  283. fixed: '',
  284. columnWidth: 160
  285. },
  286. {
  287. userId: this.$store.state.user.name,
  288. functionId: 103001,
  289. serialNumber: '103001Table1ProofingStatus',
  290. tableId: '103001Table1',
  291. tableName: '打样信息表',
  292. columnProp: 'proofingStatus',
  293. headerAlign: 'center',
  294. align: 'center',
  295. columnLabel: '状态',
  296. columnHidden: false,
  297. columnImage: false,
  298. columnSortable: false,
  299. sortLv: 0,
  300. status: true,
  301. fixed: '',
  302. columnWidth: 80
  303. },{
  304. userId: this.$store.state.user.name,
  305. functionId: 103001,
  306. serialNumber: '103001Table1NodeName',
  307. tableId: '103001Table1',
  308. tableName: '打样信息表',
  309. columnProp: 'nodeName',
  310. headerAlign: 'center',
  311. align: 'center',
  312. columnLabel: '节点名称',
  313. columnHidden: false,
  314. columnImage: false,
  315. columnSortable: false,
  316. sortLv: 0,
  317. status: true,
  318. fixed: '',
  319. columnWidth: 80
  320. },{
  321. userId: this.$store.state.user.name,
  322. functionId: 103001,
  323. serialNumber: '103001Table1NodeCreateBy',
  324. tableId: '103001Table1',
  325. tableName: '打样信息表',
  326. columnProp: 'nodeCreateBy',
  327. headerAlign: 'center',
  328. align: 'center',
  329. columnLabel: '节点审批人',
  330. columnHidden: false,
  331. columnImage: false,
  332. columnSortable: false,
  333. sortLv: 0,
  334. status: true,
  335. fixed: '',
  336. columnWidth: 80
  337. },
  338. ],
  339. // 导出 start
  340. exportData: [],
  341. exportName: '项目打样'+this.dayjs().format('YYYYMMDDHHmmss'),
  342. exportHeader: ["项目打样"],
  343. exportFooter: [],
  344. // 导出 end
  345. }
  346. },
  347. methods: {
  348. // 获取基础数据列表S
  349. getBaseList (val, type) {
  350. this.tagNo = val
  351. this.tagNo1 = type
  352. this.$nextTick(() => {
  353. let strVal = ''
  354. // if (val === 1013) {
  355. // if(type==1) {
  356. // strVal = this.dataForm.partType
  357. // }
  358. // }
  359. this.$refs.baseList.init(val, strVal)
  360. })
  361. },
  362. /* 列表方法的回调 */
  363. getBaseData (val) {
  364. // if (this.tagNo === 1013) {
  365. // if(this.tagNo1==1) {
  366. // this.dataForm.partType = val.Base_id
  367. // this.dataForm.partTypeDesc = val.Base_desc
  368. // }
  369. // }
  370. },
  371. //初始化组件的参数
  372. init(inData) {
  373. //初始化参数
  374. this.searchData = JSON.parse(JSON.stringify(inData));
  375. //刷新表格
  376. this.searchTable();
  377. },
  378. searchTable(){
  379. proofingInformationSearch(this.searchData).then(({data}) => {
  380. //区分请求成功和失败的状况
  381. if (data && data.code == 0) {
  382. this.dataList = data.page.list
  383. } else {
  384. this.dataList = [];
  385. }
  386. });
  387. },
  388. createExportData() {
  389. return this.dataList;
  390. },
  391. startDownload() {
  392. // this.exportData = this.dataList
  393. },
  394. finishDownload() {
  395. },
  396. fields() {
  397. let json = "{"
  398. this.columnList.forEach((item, index) => {
  399. if (index == this.columnList.length - 1) {
  400. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  401. } else {
  402. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  403. }
  404. })
  405. json += "}"
  406. let s = eval("(" + json + ")")
  407. return s
  408. },
  409. handleClick(row){
  410. if (this.$router.resolve(`/proofing-requestForProofing`).resolved.name === '404'){
  411. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
  412. }else {
  413. this.$router.push({name:`proofing-requestForProofing`,params:{proofingNo:row.proofingNo},})
  414. }
  415. }
  416. },
  417. }
  418. </script>
  419. <style scoped>
  420. </style>