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.

1056 lines
37 KiB

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
2 years ago
2 years ago
1 year ago
1 year ago
1 year 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
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year 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
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year 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
1 year 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
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
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
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
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
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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year 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="BU">
  5. <bu-select v-model="searchData.buNo" style="width: 120px"></bu-select>
  6. </el-form-item>
  7. <el-form-item :label="'参数卡编码'">
  8. <el-input v-model="searchData.oriCodeNo" style="width: 130px"></el-input>
  9. </el-form-item>
  10. <el-form-item >
  11. <span slot="label" style="" @click="getBaseList(105,1)"><a herf="#">正式料号</a></span>
  12. <el-input v-model="searchData.testPartNo" style="width: 120px"></el-input>
  13. </el-form-item>
  14. <el-form-item :label="'状态'">
  15. <el-input v-model="searchData.statusDesc" style="width: 130px"></el-input>
  16. </el-form-item>
  17. <el-form-item label=" ">
  18. <el-button @click="search()" type="primary" style="margin-left: 2px;margin-top:0px">查询</el-button>
  19. <el-button @click="addOrUpdateHandle()" type="primary" style="margin-left: 2px;margin-top: 0px">新增</el-button>
  20. <download-excel
  21. :fields="fields()"
  22. :data="exportData"
  23. type="xls"
  24. :name="exportName"
  25. :header="exportHeader"
  26. :footer="exportFooter"
  27. :fetch="createExportData"
  28. :before-generate="startDownload"
  29. :before-finish="finishDownload"
  30. worksheet="导出信息"
  31. class="el-button el-button--primary el-button--medium">
  32. {{ '导出' }}
  33. </download-excel>
  34. </el-form-item>
  35. </el-form>
  36. <el-table
  37. :data="dataList1"
  38. :height="height"
  39. border
  40. ref="mainTable"
  41. @row-click="changeData"
  42. highlight-current-row
  43. v-loading="dataListLoading"
  44. style="width: 100%; ">
  45. <el-table-column
  46. v-for="(item,index) in columnList1" :key="index"
  47. :sortable="item.columnSortable"
  48. :prop="item.columnProp"
  49. :header-align="item.headerAlign"
  50. :show-overflow-tooltip="item.showOverflowTooltip"
  51. :align="item.align"
  52. :fixed="item.fixed==''?false:item.fixed"
  53. :min-width="item.columnWidth"
  54. :label="item.columnLabel">
  55. <template slot-scope="scope">
  56. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  57. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  58. </template>
  59. </el-table-column>
  60. <el-table-column
  61. header-align="center"
  62. align="center"
  63. width="150"
  64. fixed="right"
  65. label="操作">
  66. <template slot-scope="scope">
  67. <!-- <a type="text" size="small" @click="addRevModel(scope.row)" v-if="scope.row.statusDesc!=='已完成'">升版</a>-->
  68. <a type="text" size="small" v-if="scope.row.statusDesc==='已完成'||scope.row.statusDesc==='已升版'" @click="jumpDetail(scope.row)">详情</a>
  69. <a type="text" size="small" v-if="scope.row.statusDesc!=='已完成'&&scope.row.statusDesc!=='已升版'" @click="jumpDetail(scope.row)">修改</a>
  70. <!-- <a type="text" size="small" @click="addOrUpdateHandle(scope.row.id)" v-if="scope.row.statusDesc!=='已完成'">修改</a>-->
  71. <a type="text" size="small" @click="deleteData(scope.row)" v-if="scope.row.statusDesc!=='已完成'&&scope.row.statusDesc!=='已升版'">删除</a>
  72. <a type="text" size="small" v-if="scope.row.status === 'cg'" @click="issueModal(scope.row)">下达</a>
  73. </template>
  74. </el-table-column>
  75. </el-table>
  76. <el-pagination
  77. @size-change="sizeChangeHandle"
  78. @current-change="currentChangeHandle"
  79. :current-page="pageIndex"
  80. :page-sizes="[20, 50, 100, 1000]"
  81. :page-size="pageSize"
  82. :total="totalPage"
  83. layout="total, sizes, prev, pager, next, jumper">
  84. </el-pagination>
  85. <el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="refreshCurrentTabTable">
  86. <el-tab-pane label="基本信息" name="info">
  87. <el-form label-position="top" label-width="100px" >
  88. <el-row :gutter="20">
  89. <el-col :span="6"><div class="grid-content bg-purple">
  90. <el-form-item :label="'物料编码'">
  91. <el-input v-model="infoData.testPartNo" readonly ></el-input>
  92. </el-form-item>
  93. </div></el-col>
  94. <el-col :span="6"><div class="grid-content bg-purple">
  95. <el-form-item :label="'物料类型'">
  96. <el-input v-model="infoData.partTypeDesc" readonly ></el-input>
  97. </el-form-item>
  98. </div></el-col>
  99. <el-col :span="6"><div class="grid-content bg-purple">
  100. <el-form-item :label="'版本号'">
  101. <el-input v-model="infoData.revNo" readonly ></el-input>
  102. </el-form-item>
  103. </div></el-col>
  104. <el-col :span="6"><div class="grid-content bg-purple">
  105. <el-form-item :label="'项目号'">
  106. <el-input v-model="infoData.projectId" readonly ></el-input>
  107. </el-form-item>
  108. </div></el-col>
  109. </el-row>
  110. <el-row :gutter="20">
  111. <el-col :span="6"><div class="grid-content bg-purple">
  112. <el-form-item :label="'ECN变更'">
  113. <el-input v-model="infoData.ecnFlag" readonly ></el-input>
  114. </el-form-item>
  115. </div></el-col>
  116. <el-col :span="6"><div class="grid-content bg-purple">
  117. <el-form-item :label="'ECN单据号'">
  118. <el-input v-model="infoData.ecnNo" readonly ></el-input>
  119. </el-form-item>
  120. </div></el-col>
  121. <el-col :span="12"><div class="grid-content bg-purple">
  122. <el-form-item :label="'ECN文档链接'">
  123. <el-input v-model="infoData.ecnAddress" readonly ></el-input>
  124. </el-form-item>
  125. </div></el-col>
  126. </el-row>
  127. <el-row :gutter="20">
  128. <el-col :span="6"><div class="grid-content bg-purple">
  129. <el-form-item :label="'Select Engineer'">
  130. <el-input v-model="infoData.engineer" ref="peOperaterName" placeholder="请选择人员" readonly ></el-input>
  131. </el-form-item>
  132. </div></el-col>
  133. <el-col :span="6"><div class="grid-content bg-purple">
  134. <el-form-item :label="'Select Artwork'">
  135. <el-input v-model="infoData.technician" ref="csOperaterName" placeholder="请选择人员" readonly ></el-input>
  136. </el-form-item>
  137. </div></el-col>
  138. <el-col :span="6"><div class="grid-content bg-purple">
  139. <el-form-item :label="'CQC人员'">
  140. <el-input v-model="infoData.cqcOperatorName" ref="dccOperaterName" placeholder="请选择人员" readonly ></el-input>
  141. </el-form-item>
  142. </div></el-col>
  143. <el-col :span="6"><div class="grid-content bg-purple">
  144. <el-form-item :label="'FAI人员'">
  145. <el-input v-model="infoData.faiOperatorName" ref="mpOperatorName" placeholder="请选择人员" readonly ></el-input>
  146. </el-form-item>
  147. </div></el-col>
  148. </el-row>
  149. <el-row :gutter="20">
  150. <el-col :span="6"><div class="grid-content bg-purple">
  151. <el-form-item :label="'PE人员'">
  152. <el-input v-model="infoData.peOperaterName" ref="peOperaterName" placeholder="请选择人员" readonly ></el-input>
  153. </el-form-item>
  154. </div></el-col>
  155. <el-col :span="6"><div class="grid-content bg-purple">
  156. <el-form-item :label="'CS人员'">
  157. <el-input v-model="infoData.csOperaterName" ref="csOperaterName" placeholder="请选择人员" readonly ></el-input>
  158. </el-form-item>
  159. </div></el-col>
  160. <el-col :span="6"><div class="grid-content bg-purple">
  161. <el-form-item :label="'DCC人员'">
  162. <el-input v-model="infoData.dccOperaterName" ref="dccOperaterName" placeholder="请选择人员" readonly ></el-input>
  163. </el-form-item>
  164. </div></el-col>
  165. <el-col :span="6"><div class="grid-content bg-purple">
  166. <el-form-item :label="'Select Technical'">
  167. <el-input v-model="infoData.mpOperatorName" ref="mpOperatorName" placeholder="请选择人员" readonly ></el-input>
  168. </el-form-item>
  169. </div></el-col>
  170. </el-row>
  171. <el-row :gutter="20">
  172. <el-col :span="24"><div class="grid-content bg-purple">
  173. <el-form-item :label="'备注信息'" style="height: 70px">
  174. <el-input
  175. type="textarea"
  176. v-model="infoData.remark "
  177. :rows="3"
  178. resize='none'
  179. maxlength="120"
  180. show-word-limit
  181. readonly
  182. style="height: 60px">
  183. </el-input>
  184. </el-form-item>
  185. </div></el-col>
  186. </el-row>
  187. </el-form>
  188. </el-tab-pane>
  189. <el-tab-pane label="客户信息" name="customerInfo">
  190. <customer-info :project="currentRow"></customer-info>
  191. <!-- <el-form label-position="top" label-width="100px" >-->
  192. <!-- <el-row :gutter="20">-->
  193. <!-- <el-col :span="6"><div class="grid-content bg-purple">-->
  194. <!-- <el-form-item :label="'客户代码'">-->
  195. <!-- <el-input v-model="customerData.customerId" readonly ></el-input>-->
  196. <!-- </el-form-item>-->
  197. <!-- </div></el-col>-->
  198. <!-- <el-col :span="6"><div class="grid-content bg-purple">-->
  199. <!-- <el-form-item :label="'客户名称'">-->
  200. <!-- <el-input v-model="customerData.customerName" readonly ></el-input>-->
  201. <!-- </el-form-item>-->
  202. <!-- </div></el-col>-->
  203. <!-- <el-col :span="12"><div class="grid-content bg-purple">-->
  204. <!-- <el-form-item :label="'客户描述'">-->
  205. <!-- <el-input v-model="customerData.customerDesc" readonly ></el-input>-->
  206. <!-- </el-form-item>-->
  207. <!-- </div></el-col>-->
  208. <!-- </el-row>-->
  209. <!-- <el-row :gutter="20">-->
  210. <!-- <el-col :span="24"><div class="grid-content bg-purple">-->
  211. <!-- <el-form-item :label="'客户要求'" style="height: 70px">-->
  212. <!-- <el-input-->
  213. <!-- type="textarea"-->
  214. <!-- v-model="customerData.customerRemark "-->
  215. <!-- :rows="3"-->
  216. <!-- resize='none'-->
  217. <!-- maxlength="120"-->
  218. <!-- show-word-limit-->
  219. <!-- readonly-->
  220. <!-- style=";height: 60px">-->
  221. <!-- </el-input>-->
  222. <!-- </el-form-item>-->
  223. <!-- </div></el-col>-->
  224. <!-- </el-row>-->
  225. <!-- <el-row :gutter="20">-->
  226. <!-- <el-col :span="24"><div class="grid-content bg-purple">-->
  227. <!-- <el-form-item :label="'客户图纸'" style="margin-top: 15px">-->
  228. <!-- <el-input v-model="customerData.pictureAddess" readonly ></el-input>-->
  229. <!-- </el-form-item>-->
  230. <!-- </div></el-col>-->
  231. <!-- </el-row>-->
  232. <!-- <el-row :gutter="20">-->
  233. <!-- <el-col :span="24"><div class="grid-content bg-purple">-->
  234. <!-- <el-form-item :label="'客户图纸变更说明'">-->
  235. <!-- <el-input v-model="customerData.customerPictureChangeRemark" readonly ></el-input>-->
  236. <!-- </el-form-item>-->
  237. <!-- </div></el-col>-->
  238. <!-- </el-row>-->
  239. <!-- <el-row :gutter="20">-->
  240. <!-- <el-col :span="24"><div class="grid-content bg-purple" >-->
  241. <!-- <el-form-item :label="'转量产附档说明'" style="height: 70px">-->
  242. <!-- <el-input-->
  243. <!-- type="textarea"-->
  244. <!-- v-model="customerData.productionFileComments "-->
  245. <!-- :rows="3"-->
  246. <!-- resize='none'-->
  247. <!-- maxlength="120"-->
  248. <!-- show-word-limit-->
  249. <!-- readonly-->
  250. <!-- style="height: 60px">-->
  251. <!-- </el-input>-->
  252. <!-- </el-form-item>-->
  253. <!-- </div></el-col>-->
  254. <!-- </el-row>-->
  255. <!-- <el-row :gutter="20">-->
  256. <!-- <el-col :span="24"><div class="grid-content bg-purple" >-->
  257. <!-- <el-form-item :label="'其他特殊要求'" style="height: 70px;margin-top: 15px">-->
  258. <!-- <el-input-->
  259. <!-- type="textarea"-->
  260. <!-- v-model="customerData.remark "-->
  261. <!-- :rows="3"-->
  262. <!-- resize='none'-->
  263. <!-- maxlength="120"-->
  264. <!-- show-word-limit-->
  265. <!-- readonly-->
  266. <!-- style="height: 60px">-->
  267. <!-- </el-input>-->
  268. <!-- </el-form-item>-->
  269. <!-- </div></el-col>-->
  270. <!-- </el-row>-->
  271. <!-- </el-form>-->
  272. <!-- <el-form :inline="true" label-position="top" label-width="100px" style="height: 70px;margin-top: 15px">-->
  273. <!-- <el-form-item :label="'客户应用/要求'">-->
  274. <!-- <el-input-->
  275. <!-- type="textarea"-->
  276. <!-- v-model="customerData.remark "-->
  277. <!-- :rows="3"-->
  278. <!-- resize='none'-->
  279. <!-- maxlength="120"-->
  280. <!-- show-word-limit-->
  281. <!-- readonly-->
  282. <!-- style="width: 926px;height: 60px">-->
  283. <!-- </el-input>-->
  284. <!-- </el-form-item>-->
  285. <!-- </el-form>-->
  286. </el-tab-pane>
  287. <!-- 审批信息 -->
  288. <el-tab-pane label="审批信息" name="approvalInformation">
  289. <approval-information ref="approvalTable" v-model:data-list="approvalList" :height="240"></approval-information>
  290. </el-tab-pane>
  291. </el-tabs>
  292. <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="search" v-drag></add-or-update>
  293. <el-dialog width="500px"
  294. :title="'升版'"
  295. :close-on-click-modal="false"
  296. :visible.sync="revNoFlag">
  297. <el-form :inline="true" label-position="top" label-width="100px" >
  298. <el-form-item :label="'参数卡编码'">
  299. <el-input v-model="revNoData.oriCodeNo" style="width: 130px" disabled></el-input>
  300. </el-form-item>
  301. <el-form-item :label="'版本号'">
  302. <el-input v-model="revNoData.oldRevNo" style="width: 130px" disabled></el-input>
  303. </el-form-item>
  304. <el-form-item :label="'项目物料'">
  305. <el-input v-model="revNoData.testPartNo" style="width: 130px" disabled></el-input>
  306. </el-form-item>
  307. </el-form>
  308. <el-form :inline="true" label-position="top" label-width="100px" >
  309. <el-form-item :label="'版本号'">
  310. <el-input v-model="revNoData.revNo" style="width: 130px" ></el-input>
  311. </el-form-item>
  312. </el-form>
  313. <el-form label-position="top" style="margin-top: 60px; margin-left: 0px;text-align:center">
  314. <el-button type="primary" @click="upBMRevNo()">{{'确定'}}</el-button>
  315. <el-button type="primary" @click="revNoFlag = false">{{'关闭'}}</el-button>
  316. </el-form>
  317. </el-dialog>
  318. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  319. </div>
  320. </template>
  321. <script>
  322. import {
  323. getTechnicalCustomerInfoData,
  324. technicalSpecificationListSearch,
  325. deleteTechnicalSpecificationList,
  326. upBMRevNo,
  327. issueChange, // 下达
  328. } from "@/api/sampleManagement/technicalSpecificationList.js"
  329. import Chooselist from '@/views/modules/common/Chooselist'
  330. import AddOrUpdate from './com_technical-add-or-update'
  331. import BuSelect from "../base/BuSelect.vue";
  332. import {
  333. getNodeAuthority, // 获取节点权限
  334. getApprovalList, // 查询审批信息
  335. } from '@/api/changeManagement/changeManagement.js'
  336. import ApprovalInformation from "../changeManagement/approvalInformation.vue";
  337. import CustomerInfo from "../quotation/sellForQuotation/customerInfo.vue";
  338. export default {
  339. components: {
  340. CustomerInfo,
  341. ApprovalInformation,
  342. Chooselist,
  343. AddOrUpdate,
  344. BuSelect,
  345. },
  346. data() {
  347. return {
  348. approvalList:[],
  349. activeName:'info',
  350. addOrUpdateVisible:false,
  351. height:200,
  352. dataList1: [],
  353. searchData: {
  354. page: 1,
  355. limit: 100,
  356. site: this.$store.state.user.site,
  357. userName: this.$store.state.user.name,
  358. testPartNo: '',
  359. oriCodeNo: '',
  360. statusDesc: '',
  361. codeNo:'',
  362. buNo:'',
  363. },
  364. pageIndex: 1,
  365. pageSize: 100,
  366. totalPage: 0,
  367. dataListLoading: false,
  368. currentRow:'',
  369. exportList:[],
  370. columnList1:[
  371. {
  372. userId: this.$store.state.user.name,
  373. functionId: 103002,
  374. serialNumber: '103002Table1BuNo',
  375. tableId: "103002Table1",
  376. tableName: "技术参数卡列表",
  377. columnProp: "buNo",
  378. headerAlign: "center",
  379. align: "center",
  380. columnLabel: "BU",
  381. columnHidden: false,
  382. columnImage: false,
  383. columnSortable: false,
  384. sortLv: 0,
  385. status: true,
  386. fixed: '',
  387. columnWidth: 80
  388. },{
  389. userId: this.$store.state.user.name,
  390. functionId: 103002,
  391. serialNumber: '103002Table1OriCodeNo',
  392. tableId: "103002Table1",
  393. tableName: "技术参数卡列表",
  394. columnProp: "oriCodeNo",
  395. headerAlign: "center",
  396. align: "left",
  397. columnLabel: "参数卡编码",
  398. columnHidden: false,
  399. columnImage: false,
  400. columnSortable: false,
  401. sortLv: 0,
  402. status: true,
  403. fixed: '',
  404. columnWidth: 100
  405. },{
  406. userId: this.$store.state.user.name,
  407. functionId: 103002,
  408. serialNumber: '103002Table1RevNo',
  409. tableId: "103002Table1",
  410. tableName: "技术参数卡列表",
  411. columnProp: "revNo",
  412. headerAlign: "center",
  413. align: "left",
  414. columnLabel: "版本号",
  415. columnHidden: false,
  416. columnImage: false,
  417. columnSortable: false,
  418. sortLv: 0,
  419. status: true,
  420. fixed: '',
  421. columnWidth: 80
  422. },{
  423. userId: this.$store.state.user.name,
  424. functionId: 103002,
  425. serialNumber: '103002Table1ProofingNo',
  426. tableId: "103002Table1",
  427. tableName: "技术参数卡列表",
  428. columnProp: "proofingNo",
  429. headerAlign: "center",
  430. align: "center",
  431. columnLabel: "打样单号",
  432. columnHidden: false,
  433. columnImage: false,
  434. columnSortable: false,
  435. sortLv: 0,
  436. status: true,
  437. fixed: '',
  438. columnWidth: 100
  439. },{
  440. userId: this.$store.state.user.name,
  441. functionId: 103002,
  442. serialNumber: '103002Table1Status',
  443. tableId: "103002Table1",
  444. tableName: "技术参数卡列表",
  445. columnProp: "statusDesc",
  446. headerAlign: "center",
  447. align: "left",
  448. columnLabel: "状态",
  449. columnHidden: false,
  450. columnImage: false,
  451. columnSortable: false,
  452. sortLv: 0,
  453. status: true,
  454. fixed: '',
  455. columnWidth: 80
  456. },
  457. {
  458. userId: this.$store.state.user.name,
  459. functionId: 106002,
  460. serialNumber: '106002Table1NodeId',
  461. tableId: "106002Table1",
  462. tableName: "刀具申请主表",
  463. columnProp: "nodeId",
  464. headerAlign: "center",
  465. align: "left",
  466. columnLabel: "当前节点",
  467. columnHidden: false,
  468. columnImage: false,
  469. columnSortable: false,
  470. sortLv: 0,
  471. status: true,
  472. fixed: '',
  473. columnWidth: 70
  474. },
  475. {
  476. userId: this.$store.state.user.name,
  477. functionId: 106002,
  478. serialNumber: '106002Table1NodeName',
  479. tableId: "106002Table1",
  480. tableName: "刀具申请主表",
  481. columnProp: "nodeName",
  482. headerAlign: "center",
  483. align: "left",
  484. columnLabel: "节点名称",
  485. columnHidden: false,
  486. columnImage: false,
  487. columnSortable: false,
  488. sortLv: 0,
  489. status: true,
  490. fixed: '',
  491. columnWidth: 150
  492. },{
  493. userId: this.$store.state.user.name,
  494. functionId: 103002,
  495. serialNumber: '103002Table1FinalPartNo',
  496. tableId: "103002Table1",
  497. tableName: "技术参数卡列表",
  498. columnProp: "finalPartNo",
  499. headerAlign: "center",
  500. align: "center",
  501. columnLabel: "最终产品编码",
  502. columnHidden: false,
  503. columnImage: false,
  504. columnSortable: false,
  505. sortLv: 0,
  506. status: true,
  507. fixed: '',
  508. columnWidth: 100
  509. },{
  510. userId: this.$store.state.user.name,
  511. functionId: 103002,
  512. serialNumber: '103002Table1TestPartNo',
  513. tableId: "103002Table1",
  514. tableName: "技术参数卡列表",
  515. columnProp: "testPartNo",
  516. headerAlign: "center",
  517. align: "center",
  518. columnLabel: "物料编码",
  519. columnHidden: false,
  520. columnImage: false,
  521. columnSortable: false,
  522. sortLv: 0,
  523. status: true,
  524. fixed: '',
  525. columnWidth: 140
  526. },{
  527. userId: this.$store.state.user.name,
  528. functionId: 103002,
  529. serialNumber: '103002Table1TestPartNo',
  530. tableId: "103002Table1",
  531. tableName: "技术参数卡列表",
  532. columnProp: "projectId",
  533. headerAlign: "center",
  534. align: "center",
  535. columnLabel: "项目号",
  536. columnHidden: false,
  537. columnImage: false,
  538. columnSortable: false,
  539. sortLv: 0,
  540. status: true,
  541. fixed: '',
  542. columnWidth: 100
  543. // },{
  544. // userId: this.$store.state.user.name,
  545. // functionId: 103002,
  546. // serialNumber: '103002Table1TestPartNo',
  547. // tableId: "103002Table1",
  548. // tableName: "技术参数卡列表",
  549. // columnProp: "buNo",
  550. // headerAlign: "center",
  551. // align: "center",
  552. // columnLabel: "BU",
  553. // columnHidden: false,
  554. // columnImage: false,
  555. // columnSortable: false,
  556. // sortLv: 0,
  557. // status: true,
  558. // fixed: '',
  559. // columnWidth: 80
  560. // },{
  561. // userId: this.$store.state.user.name,
  562. // functionId: 103002,
  563. // serialNumber: '103002Table1TestPartNo',
  564. // tableId: "103002Table1",
  565. // tableName: "技术参数卡列表",
  566. // columnProp: "buDesc",
  567. // headerAlign: "center",
  568. // align: "left",
  569. // columnLabel: "BU名称",
  570. // columnHidden: false,
  571. // columnImage: false,
  572. // columnSortable: false,
  573. // sortLv: 0,
  574. // status: true,
  575. // fixed: '',
  576. // columnWidth: 80
  577. },{
  578. userId: this.$store.state.user.name,
  579. functionId: 103002,
  580. serialNumber: '103002Table1PartName',
  581. tableId: "103002Table1",
  582. tableName: "技术参数卡列表",
  583. columnProp: "partDesc",
  584. headerAlign: "center",
  585. align: "left",
  586. columnLabel: "物料描述",
  587. columnHidden: false,
  588. columnImage: false,
  589. columnSortable: false,
  590. sortLv: 0,
  591. status: true,
  592. fixed: '',
  593. columnWidth: 150
  594. },{
  595. userId: this.$store.state.user.name,
  596. functionId: 103002,
  597. serialNumber: '103002Table1ECNFlag',
  598. tableId: "103002Table1",
  599. tableName: "技术参数卡列表",
  600. columnProp: "ecnFlag",
  601. headerAlign: "center",
  602. align: "center",
  603. columnLabel: "ECN变更",
  604. columnHidden: false,
  605. columnImage: false,
  606. columnSortable: false,
  607. sortLv: 0,
  608. status: true,
  609. fixed: '',
  610. columnWidth: 50
  611. },{
  612. userId: this.$store.state.user.name,
  613. functionId: 103002,
  614. serialNumber: '103002Table1EcnNo',
  615. tableId: "103002Table1",
  616. tableName: "技术参数卡列表",
  617. columnProp: "ecnNo",
  618. headerAlign: "center",
  619. align: "center",
  620. columnLabel: "ECN单据号",
  621. columnHidden: false,
  622. columnImage: false,
  623. columnSortable: false,
  624. sortLv: 0,
  625. status: true,
  626. fixed: '',
  627. columnWidth: 100
  628. },{
  629. userId: this.$store.state.user.name,
  630. functionId: 103002,
  631. serialNumber: '103002Table1CreateDate',
  632. tableId: "103002Table1",
  633. tableName: "技术参数卡列表",
  634. columnProp: "createDate",
  635. headerAlign: "center",
  636. align: "center",
  637. columnLabel: "创建时间",
  638. columnHidden: false,
  639. columnImage: false,
  640. columnSortable: false,
  641. sortLv: 0,
  642. status: true,
  643. fixed: '',
  644. columnWidth: 120
  645. },{
  646. userId: this.$store.state.user.name,
  647. functionId: 103002,
  648. serialNumber: '103002Table1CreateBy',
  649. tableId: "103002Table1",
  650. tableName: "技术参数卡列表",
  651. columnProp: "createBy",
  652. headerAlign: "center",
  653. align: "left",
  654. columnLabel: "创建人",
  655. columnHidden: false,
  656. columnImage: false,
  657. columnSortable: false,
  658. sortLv: 0,
  659. status: true,
  660. fixed: '',
  661. columnWidth: 80
  662. },{
  663. userId: this.$store.state.user.name,
  664. functionId: 103002,
  665. serialNumber: '103002Table1UpdateDate',
  666. tableId: "103002Table1",
  667. tableName: "技术参数卡列表",
  668. columnProp: "updateDate",
  669. headerAlign: "center",
  670. align: "center",
  671. columnLabel: "上次修改日期",
  672. columnHidden: false,
  673. columnImage: false,
  674. columnSortable: false,
  675. sortLv: 0,
  676. status: true,
  677. fixed: '',
  678. columnWidth: 120
  679. },{
  680. userId: this.$store.state.user.name,
  681. functionId: 103002,
  682. serialNumber: '103002Table1UpdateBy',
  683. tableId: "103002Table1",
  684. tableName: "技术参数卡列表",
  685. columnProp: "updateBy",
  686. headerAlign: "center",
  687. align: "left",
  688. columnLabel: "修改人",
  689. columnHidden: false,
  690. columnImage: false,
  691. columnSortable: false,
  692. sortLv: 0,
  693. status: true,
  694. fixed: '',
  695. columnWidth: 80
  696. },{
  697. userId: this.$store.state.user.name,
  698. functionId: 103002,
  699. serialNumber: '103002Table1ecnAddress',
  700. tableId: "103002Table1",
  701. tableName: "技术参数卡列表",
  702. columnProp: "ecnAddress",
  703. headerAlign: "center",
  704. align: "left",
  705. columnLabel: "ECN文档链接",
  706. columnHidden: false,
  707. columnImage: false,
  708. columnSortable: false,
  709. sortLv: 0,
  710. status: true,
  711. fixed: '',
  712. columnWidth: 200
  713. },
  714. ],
  715. infoData:{
  716. testPartNo:'',
  717. partTypeDesc:'',
  718. revNo:'',
  719. projectId:'',
  720. ecnFlag:'',
  721. ecnNo:'',
  722. ecnAddress:'',
  723. quotationOfficer:'',
  724. engineer:'',
  725. technician:'',
  726. remark:'',
  727. },
  728. customerData:{
  729. customerId:'',
  730. customerName:'',
  731. customerDesc:'',
  732. finalCustomer:'',
  733. customerRemark:'',
  734. remark:'',
  735. },
  736. dataRole: {
  737. partTypeDesc: [
  738. {
  739. required: true,
  740. message: ' ',
  741. trigger: 'change'
  742. }
  743. ],
  744. partName: [
  745. {
  746. required: true,
  747. message: ' ',
  748. trigger: 'change'
  749. }
  750. ],
  751. },
  752. revNoFlag:false,
  753. revNoData: {
  754. site:'',
  755. oriCodeNo:'',
  756. oldCodeNo:'',
  757. oldRevNo:'',
  758. revNo:'',
  759. testPartNo:'',
  760. },
  761. // 导出 start
  762. exportData: [],
  763. exportName: '技术参数卡清单'+this.dayjs().format('YYYYMMDDHHmmss'),
  764. exportHeader: ["技术参数卡清单"],
  765. exportFooter: [],
  766. // 导出 end
  767. }
  768. },
  769. mounted() {
  770. this.$nextTick(() => {
  771. this.height = window.innerHeight - 520;
  772. })
  773. },
  774. activated() {
  775. if (this.$route.params.type === 'tokenLogin') {
  776. console.log("进来啦")
  777. if (this.$route.params.docNo) {
  778. // this.searchData.applyNo = this.$route.params.docNo
  779. let inData={
  780. page: 1,
  781. limit: 100,
  782. site: this.$store.state.user.site,
  783. userName: this.$store.state.user.name,
  784. codeNo:this.$route.params.docNo,
  785. }
  786. technicalSpecificationListSearch(inData).then(({data}) => {
  787. if (data.code == 0) {
  788. this.dataList1 = data.page.list
  789. this.pageIndex = data.page.currPage
  790. this.pageSize = data.page.pageSize
  791. this.totalPage = data.page.totalCount
  792. if(this.dataList1.length>0){
  793. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  794. this.changeData(this.dataList1[0])
  795. }
  796. }
  797. this.dataListLoading = false
  798. })
  799. }
  800. }
  801. if (this.$route.params.codeNo){
  802. this.searchData.oriCodeNo = this.$route.params.codeNo;
  803. this.search();
  804. setTimeout(() => {
  805. this.searchData.oriCodeNo = '';
  806. }, 200)
  807. }
  808. if (this.$route.params.nowCodeNo){
  809. this.searchData.codeNo = this.$route.params.nowCodeNo;
  810. this.search();
  811. setTimeout(() => {
  812. this.searchData.codeNo = '';
  813. }, 200)
  814. }
  815. },
  816. methods: {
  817. // 下达
  818. issueModal (row) {
  819. this.$confirm(`是否确认下达?`, '提示', {
  820. confirmButtonText: '确定',
  821. cancelButtonText: '取消',
  822. type: 'warning'
  823. }).then(() => {
  824. let tempData = {
  825. site: row.site,
  826. userName: this.$store.state.user.name,
  827. codeNo: row.codeNo,
  828. menuId: this.$route.meta.menuId
  829. }
  830. issueChange(tempData).then(({data}) => {
  831. if (data && data.code === 0) {
  832. this.search()
  833. this.$message({message: '操作成功', type: 'success'})
  834. } else {
  835. this.$alert(data.msg, '错误', {
  836. confirmButtonText: '确定'
  837. })
  838. }
  839. })
  840. })
  841. },
  842. // 每页数
  843. sizeChangeHandle (val) {
  844. this.pageSize = val
  845. this.pageIndex = 1
  846. this.search()
  847. },
  848. // 当前页
  849. currentChangeHandle (val) {
  850. this.pageIndex = val
  851. this.search()
  852. },
  853. search(){
  854. this.searchData.limit = this.pageSize
  855. this.searchData.page = this.pageIndex
  856. technicalSpecificationListSearch(this.searchData).then(({data}) => {
  857. if (data.code == 0) {
  858. this.dataList1 = data.page.list
  859. this.pageIndex = data.page.currPage
  860. this.pageSize = data.page.pageSize
  861. this.totalPage = data.page.totalCount
  862. if(this.dataList1.length>0){
  863. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  864. this.changeData(this.dataList1[0])
  865. }
  866. }
  867. this.dataListLoading = false
  868. })
  869. },
  870. changeData(row) {
  871. this.currentRow = JSON.parse(JSON.stringify(row));
  872. this.infoData=row;
  873. this.refreshCurrentTabTable ();
  874. },
  875. // 获取基础数据列表S
  876. getBaseList (val, type) {
  877. this.tagNo = val
  878. this.tagNo1 = type
  879. this.$nextTick(() => {
  880. let strVal = ''
  881. if (val === 1013) {
  882. if(type==1) {
  883. strVal = this.dataForm.partType
  884. }
  885. }
  886. if (val === 105) {
  887. if(type==1) {
  888. strVal = this.searchData.testPartNo
  889. }
  890. }
  891. this.$refs.baseList.init(val, strVal)
  892. })
  893. },
  894. refreshCurrentTabTable () {
  895. if (this.activeName == 'customerInfo') {
  896. this.getTechnicalCustomerInfoData();
  897. }
  898. if (this.activeName === 'approvalInformation') {
  899. this.getApprovalList()
  900. }
  901. },
  902. getTechnicalCustomerInfoData(){
  903. let inData={
  904. id:this.currentRow.id
  905. }
  906. getTechnicalCustomerInfoData(inData).then(({data}) => {
  907. //区分请求成功和失败的状况
  908. if (data && data.code == 0) {
  909. this.customerData = data.row;
  910. } else {
  911. this.customerData = [];
  912. }
  913. });
  914. },
  915. /* 列表方法的回调 */
  916. getBaseData (val) {
  917. if (this.tagNo === 1013) {
  918. if(this.tagNo1==1) {
  919. this.dataForm.partType = val.Base_id
  920. this.dataForm.partTypeDesc = val.Base_desc
  921. }
  922. }
  923. if (this.tagNo === 105) {
  924. if(this.tagNo1==1) {
  925. this.searchData.testPartNo = val.Test_part_no
  926. }
  927. }
  928. },
  929. // 新增 / 修改
  930. addOrUpdateHandle (id) {
  931. this.addOrUpdateVisible = true
  932. this.$nextTick(() => {
  933. this.$refs.addOrUpdate.init(id)
  934. })
  935. },
  936. jumpDetail(row){
  937. let inData={
  938. site:this.$store.state.user.site,
  939. codeNo:row.codeNo,
  940. buNo:row.buNo,
  941. username:this.$store.state.user.name};
  942. localStorage.setItem('tsfData', JSON.stringify(inData))
  943. window.open('#/BMPage');
  944. // this.$router.replace('sampleManagement-technicalSpecificationDetail/technicalSpecificationDetail')
  945. },
  946. deleteData(row){
  947. this.$confirm('确定要删除这条数据?', '提示', {
  948. confirmButtonText: '确定',
  949. cancelButtonText: '取消',
  950. type: 'warning'
  951. }).then(() => {
  952. deleteTechnicalSpecificationList(row).then(({data}) => {
  953. if (data && data.code === 0) {
  954. this.$message.success( '操作成功')
  955. this.search();
  956. } else {
  957. this.$message.error(data.msg)
  958. }
  959. })
  960. }).catch(() => {
  961. })
  962. },
  963. addRevModel(row){
  964. this.revNoData={
  965. site:row.site,
  966. oriCodeNo:row.oriCodeNo,
  967. oldCodeNo:row.codeNo,
  968. oldRevNo:row.revNo,
  969. revNo:'',
  970. testPartNo:row.testPartNo,
  971. }
  972. this.revNoFlag=true;
  973. },
  974. upBMRevNo(){
  975. this.$confirm('确定要升版?', '提示', {
  976. confirmButtonText: '确定',
  977. cancelButtonText: '取消',
  978. type: 'warning'
  979. }).then(() => {
  980. upBMRevNo(this.revNoData).then(({data}) => {
  981. if (data && data.code === 0) {
  982. this.$message.success( '操作成功')
  983. this.revNoFlag=false;
  984. this.search();
  985. } else {
  986. this.$message.error(data.msg)
  987. }
  988. })
  989. }).catch(() => {
  990. })
  991. },
  992. //导出excel
  993. async createExportData() {
  994. this.searchData.limit = -1
  995. this.searchData.page = 1
  996. await technicalSpecificationListSearch(this.searchData).then(({data}) => {
  997. this.exportList= data.page.list;
  998. })
  999. return this.exportList;
  1000. },
  1001. startDownload() {
  1002. // this.exportData = this.dataList
  1003. },
  1004. finishDownload() {
  1005. },
  1006. fields() {
  1007. let json = "{"
  1008. this.columnList1.forEach((item, index) => {
  1009. if (index == this.columnList1.length - 1) {
  1010. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1011. } else {
  1012. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1013. }
  1014. })
  1015. json += "}"
  1016. let s = eval("(" + json + ")")
  1017. return s
  1018. },
  1019. getApprovalList () {
  1020. if (Object.keys(this.currentRow).length !== 0) {
  1021. let tempData = {
  1022. site: this.$store.state.user.site,
  1023. menuId: this.$route.meta.menuId,
  1024. documentNo:this.currentRow.codeNo
  1025. }
  1026. getApprovalList(tempData).then(({data}) => {
  1027. if (data && data.code === 0) {
  1028. this.approvalList = data.rows
  1029. } else {
  1030. this.approvalList = []
  1031. }
  1032. })
  1033. }
  1034. },
  1035. },
  1036. }
  1037. </script>
  1038. <style scoped>
  1039. </style>