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.

883 lines
30 KiB

1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months 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
12 months ago
12 months ago
12 months ago
10 months ago
1 year ago
1 year ago
10 months ago
1 year ago
1 year ago
2 years ago
1 year ago
12 months ago
1 year ago
1 year ago
12 months ago
1 year 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
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years 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
2 years ago
1 year ago
3 months ago
1 year ago
1 year ago
2 years ago
1 year ago
12 months ago
1 year ago
2 years ago
1 year ago
2 years ago
  1. <script>
  2. import {
  3. queryProjectPartToolForApply, queryProjectPartToolForApplyAny,
  4. saveProjectToolApply,
  5. searchProjectToolApplyHeaderByAnyField
  6. } from "../../../api/tool/toolApply";
  7. import Chooselist from '@/views/modules/common/Chooselist'
  8. import DictDataSelect from "../sys/dict-data-select.vue"
  9. import ChooseUser from '@/views/modules/common/ChooseUser'
  10. import FilterSearch from "../../common/filterSearch.vue";
  11. export default {
  12. name: "toolingInfo",
  13. components:{
  14. FilterSearch,
  15. Chooselist,DictDataSelect,ChooseUser,
  16. },
  17. data(){
  18. return{
  19. queryParams:{
  20. site:"",
  21. projectId:'',
  22. projectName:'',
  23. customerName:'',
  24. plmPartNo:'',
  25. ifsPartNo:'',
  26. partDesc:'',
  27. toolNo:'',
  28. toolDesc:'',
  29. no:1,
  30. size:20,
  31. },
  32. total:0,
  33. queryLoading:false,
  34. dataList:[],
  35. selectionDataList:[],
  36. columns:[
  37. {
  38. userId: this.$store.state.user.name,
  39. functionId: 106001001,
  40. serialNumber: '106001001Table1ProjectId',
  41. tableId: "106001001Table1",
  42. tableName: "项目物料信息",
  43. columnProp: "projectId",
  44. headerAlign: "center",
  45. align: "left",
  46. columnLabel: "项目号",
  47. columnHidden: false,
  48. columnImage: false,
  49. columnSortable: false,
  50. sortLv: 0,
  51. status: true,
  52. fixed: '',
  53. columnWidth: 100
  54. },
  55. {
  56. userId: this.$store.state.user.name,
  57. functionId: 106001001,
  58. serialNumber: '106001001Table1ProjectName',
  59. tableId: "106001001Table1",
  60. tableName: "项目物料信息",
  61. columnProp: "projectName",
  62. headerAlign: "center",
  63. align: "left",
  64. columnLabel: "项目名称",
  65. columnHidden: false,
  66. columnImage: false,
  67. columnSortable: false,
  68. sortLv: 0,
  69. status: true,
  70. fixed: '',
  71. columnWidth: 160
  72. },
  73. {
  74. userId: this.$store.state.user.name,
  75. functionId: 106001001,
  76. serialNumber: '106001001Table1CustomerName',
  77. tableId: "106001001Table1",
  78. tableName: "项目物料信息",
  79. columnProp: "customerName",
  80. headerAlign: "center",
  81. align: "left",
  82. columnLabel: "客户名称",
  83. columnHidden: false,
  84. columnImage: false,
  85. columnSortable: false,
  86. sortLv: 0,
  87. status: true,
  88. fixed: '',
  89. columnWidth: 120
  90. },
  91. {
  92. userId: this.$store.state.user.name,
  93. functionId: 106001001,
  94. serialNumber: '106001001Table1PlmPartNo',
  95. tableId: "106001001Table1",
  96. tableName: "项目物料信息",
  97. columnProp: "testPartNo",
  98. headerAlign: "center",
  99. align: "left",
  100. columnLabel: "PLM物料编码",
  101. columnHidden: false,
  102. columnImage: false,
  103. columnSortable: false,
  104. sortLv: 0,
  105. status: true,
  106. fixed: '',
  107. columnWidth: 120
  108. },
  109. {
  110. userId: this.$store.state.user.name,
  111. functionId: 106001001,
  112. serialNumber: '106001001Table1IfsPartNo',
  113. tableId: "106001001Table1",
  114. tableName: "项目物料信息",
  115. columnProp: "finalPartNo",
  116. headerAlign: "center",
  117. align: "left",
  118. columnLabel: "IFS物料编码",
  119. columnHidden: false,
  120. columnImage: false,
  121. columnSortable: false,
  122. sortLv: 0,
  123. status: true,
  124. fixed: '',
  125. columnWidth: 120
  126. },
  127. {
  128. userId: this.$store.state.user.name,
  129. functionId: 106001001,
  130. serialNumber: '106001001Table1PartName',
  131. tableId: "106001001Table1",
  132. tableName: "项目物料信息",
  133. columnProp: "partName",
  134. headerAlign: "center",
  135. align: "left",
  136. columnLabel: "物料名称",
  137. columnHidden: false,
  138. columnImage: false,
  139. columnSortable: false,
  140. sortLv: 0,
  141. status: true,
  142. fixed: '',
  143. columnWidth: 160
  144. },
  145. {
  146. userId: this.$store.state.user.name,
  147. functionId: 106001001,
  148. serialNumber: '106001001Table1CustomerPartNo',
  149. tableId: "106001001Table1",
  150. tableName: "项目物料信息",
  151. columnProp: "customerPartNo",
  152. headerAlign: "center",
  153. align: "left",
  154. columnLabel: "客户料号",
  155. columnHidden: false,
  156. columnImage: false,
  157. columnSortable: false,
  158. sortLv: 0,
  159. status: true,
  160. fixed: '',
  161. columnWidth: 100
  162. },
  163. {
  164. userId: this.$store.state.user.name,
  165. functionId: 106001001,
  166. serialNumber: '106001001Table1ToolId',
  167. tableId: "106001001Table1",
  168. tableName: "项目物料信息",
  169. columnProp: "toolId",
  170. headerAlign: "center",
  171. align: "left",
  172. columnLabel: "工具编码",
  173. columnHidden: false,
  174. columnImage: false,
  175. columnSortable: false,
  176. sortLv: 0,
  177. status: true,
  178. fixed: '',
  179. columnWidth: 100
  180. },
  181. {
  182. userId: this.$store.state.user.name,
  183. functionId: 106001001,
  184. serialNumber: '106001001Table1ToolDescription',
  185. tableId: "106001001Table1",
  186. tableName: "项目物料信息",
  187. columnProp: "toolDescription",
  188. headerAlign: "center",
  189. align: "left",
  190. columnLabel: "工具描述",
  191. columnHidden: false,
  192. columnImage: false,
  193. columnSortable: false,
  194. sortLv: 0,
  195. status: true,
  196. fixed: '',
  197. columnWidth: 160
  198. },
  199. {
  200. userId: this.$store.state.user.name,
  201. functionId: 106001001,
  202. serialNumber: '106001001Table1RoutingType',
  203. tableId: "106001001Table1",
  204. tableName: "项目物料信息",
  205. columnProp: "routingType",
  206. headerAlign: "center",
  207. align: "left",
  208. columnLabel: "工艺类型",
  209. columnHidden: false,
  210. columnImage: false,
  211. columnSortable: false,
  212. sortLv: 0,
  213. status: true,
  214. fixed: '',
  215. columnWidth: 100
  216. },
  217. {
  218. userId: this.$store.state.user.name,
  219. functionId: 106001001,
  220. serialNumber: '106001001Table1RoutingRevision',
  221. tableId: "106001001Table1",
  222. tableName: "项目物料信息",
  223. columnProp: "routingRevision",
  224. headerAlign: "center",
  225. align: "left",
  226. columnLabel: "工艺版本",
  227. columnHidden: false,
  228. columnImage: false,
  229. columnSortable: false,
  230. sortLv: 0,
  231. status: true,
  232. fixed: '',
  233. columnWidth: 100
  234. },
  235. {
  236. userId: this.$store.state.user.name,
  237. functionId: 106001001,
  238. serialNumber: '106001001Table1AlternativeNo',
  239. tableId: "106001001Table1",
  240. tableName: "项目物料信息",
  241. columnProp: "alternativeNo",
  242. headerAlign: "center",
  243. align: "left",
  244. columnLabel: "替代编码",
  245. columnHidden: false,
  246. columnImage: false,
  247. columnSortable: false,
  248. sortLv: 0,
  249. status: true,
  250. fixed: '',
  251. columnWidth: 100
  252. },
  253. {
  254. userId: this.$store.state.user.name,
  255. functionId: 106001001,
  256. serialNumber: '106001001Table1AlternativeDescription',
  257. tableId: "106001001Table1",
  258. tableName: "项目物料信息",
  259. columnProp: "alternativeDescription",
  260. headerAlign: "center",
  261. align: "left",
  262. columnLabel: "替代名称",
  263. columnHidden: false,
  264. columnImage: false,
  265. columnSortable: false,
  266. sortLv: 0,
  267. status: true,
  268. fixed: '',
  269. columnWidth: 100
  270. },
  271. {
  272. userId: this.$store.state.user.name,
  273. functionId: 106001001,
  274. serialNumber: '106001001Table1OperationNo',
  275. tableId: "106001001Table1",
  276. tableName: "项目物料信息",
  277. columnProp: "operationNo",
  278. headerAlign: "center",
  279. align: "left",
  280. columnLabel: "工序号",
  281. columnHidden: false,
  282. columnImage: false,
  283. columnSortable: false,
  284. sortLv: 0,
  285. status: true,
  286. fixed: '',
  287. columnWidth: 100
  288. },
  289. {
  290. userId: this.$store.state.user.name,
  291. functionId: 106001001,
  292. serialNumber: '106001001Table1OperationName',
  293. tableId: "106001001Table1",
  294. tableName: "项目物料信息",
  295. columnProp: "operationName",
  296. headerAlign: "center",
  297. align: "left",
  298. columnLabel: "工序名称",
  299. columnHidden: false,
  300. columnImage: false,
  301. columnSortable: false,
  302. sortLv: 0,
  303. status: true,
  304. fixed: '',
  305. columnWidth: 100
  306. },
  307. ],
  308. visible:false,
  309. filterVisible: false,
  310. isFilterSearch: false,
  311. filterSearchData: {},
  312. jumpFlag:true,
  313. valueNull:'******',
  314. dataForm:{
  315. site: '',
  316. applyNo: '',
  317. applyBy:'',
  318. applyDate:'',
  319. applySumQty:'',
  320. applyReason:'',
  321. remark:'',
  322. createBy:'',
  323. department:'',
  324. quoter: '',
  325. quoterName: '',
  326. tp: '',
  327. tpName: '',
  328. purchaser: '',
  329. totalCost:'',
  330. purchaserName: '',
  331. cs: '',
  332. csName: '',
  333. offsetOfExpenses: '',
  334. detailList:[],
  335. },
  336. }
  337. },
  338. methods:{
  339. queryDataList(){
  340. this.queryLoading = true
  341. queryProjectPartToolForApply(this.queryParams).then(({data})=>{
  342. if (data && data.code === 0){
  343. this.dataList = data.rows
  344. this.total = data.total
  345. }else {
  346. this.$message.error(data.msg)
  347. }
  348. this.queryLoading = false
  349. }).catch((error)=>{
  350. this.$message.error(error)
  351. this.queryLoading = false
  352. })
  353. this.isFilterSearch = false
  354. },
  355. selectionChangeHandle(val){
  356. this.selectionDataList = val;
  357. },
  358. sizeChangeHandle(val){
  359. this.queryParams.size = val;
  360. this.queryParams.no = 1;
  361. if ( this.isFilterSearch === false){
  362. this.queryDataList()
  363. } else {
  364. this.queryByAnyField(this.filterSearchData)
  365. }
  366. },
  367. currentChangeHandle(val){
  368. this.queryParams.no = val;
  369. if ( this.isFilterSearch === false){
  370. this.queryDataList()
  371. } else {
  372. this.queryByAnyField(this.filterSearchData)
  373. }
  374. },
  375. /* 列表方法的回调 */
  376. getUserData (val) {
  377. if(this.tagNo1 === 1) {
  378. this.dataForm.quoter = val.username
  379. this.dataForm.quoterName = val.userDisplay
  380. this.$nextTick(() => {
  381. this.$triggerInputEvent(this.$refs.quoterName);
  382. });
  383. }
  384. if(this.tagNo1 === 2) {
  385. this.dataForm.tp = val.username
  386. this.dataForm.tpName = val.userDisplay
  387. this.$nextTick(() => {
  388. this.$triggerInputEvent(this.$refs.tpName);
  389. });
  390. }
  391. if(this.tagNo1 === 3) {
  392. this.dataForm.purchaser = val.username
  393. this.dataForm.purchaserName = val.userDisplay
  394. this.$nextTick(() => {
  395. this.$triggerInputEvent(this.$refs.purchaserName);
  396. });
  397. }
  398. },
  399. // 获取基础数据列表S
  400. getBaseList (val, type) {
  401. this.tagNo = val
  402. this.tagNo1 = type
  403. this.$nextTick(() => {
  404. let strVal = ''
  405. let conSql = " and b.site = '" + this.$store.state.user.site + "'";
  406. if(val === 2002) {
  407. strVal = this.dataForm.quoter
  408. }
  409. if(val === 2042) {
  410. strVal = this.dataForm.tp
  411. }
  412. if(val === 2000) {
  413. strVal = this.dataForm.purchaser
  414. }
  415. this.$refs.baseList.init(val, strVal,conSql)
  416. })
  417. },
  418. /* 列表方法的回调 */
  419. getBaseData (val) {
  420. if(this.tagNo === 2002) {
  421. this.dataForm.quoter = val.username
  422. this.dataForm.quoterName = val.user_display
  423. this.$nextTick(() => {
  424. this.$triggerInputEvent(this.$refs.quoterName);
  425. });
  426. }
  427. if(this.tagNo === 2042) {
  428. this.dataForm.tp = val.username
  429. this.dataForm.tpName = val.user_display
  430. this.$nextTick(() => {
  431. this.$triggerInputEvent(this.$refs.tpName);
  432. });
  433. }
  434. if(this.tagNo === 2000) {
  435. this.dataForm.purchaser = val.username
  436. this.dataForm.purchaserName = val.user_display
  437. this.$nextTick(() => {
  438. this.$triggerInputEvent(this.$refs.purchaserName);
  439. });
  440. }
  441. if(this.tagNo === 2051) {
  442. this.dataForm.cs = val.username
  443. this.dataForm.csName = val.user_display
  444. this.$nextTick(() => {
  445. this.$triggerInputEvent(this.$refs.csName);
  446. });
  447. }
  448. },
  449. clearCsSelection() {
  450. this.dataForm.cs = ''
  451. this.dataForm.csName = ''
  452. },
  453. changeSum(row){
  454. if (row.standardCost < 0 || row.standardCost == null || row.standardCost == '') {
  455. row.standardCost = 0
  456. // this.$alert('成本不能为负数或者不填', '错误', {
  457. // confirmButtonText: '确定'
  458. // })
  459. }
  460. this.dataForm.applySumQty = 0
  461. this.dataForm.totalCost = 0
  462. for (const item of this.selectionDataList) {
  463. // 累加之前先确保值存在,并将 null 或 undefined 转换为0
  464. this.dataForm.applySumQty += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty : 0)
  465. this.dataForm.totalCost += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty * item.standardCost : 0)
  466. }
  467. },
  468. saveData () {
  469. if (this.dataForm.applySumQty === 0) {
  470. this.$alert('未填写申请总数!', '错误', {
  471. confirmButtonText: '确定'
  472. })
  473. return false;
  474. }
  475. if (this.dataForm.applyBy === '' || this.dataForm.applyBy == null) {
  476. this.$alert('未选择申请人!', '错误', {
  477. confirmButtonText: '确定'
  478. })
  479. return false;
  480. }
  481. if (this.dataForm.applyDate === '' || this.dataForm.applyDate == null) {
  482. this.$alert('未选择申请日期!', '错误', {
  483. confirmButtonText: '确定'
  484. })
  485. return false;
  486. }
  487. if (this.dataForm.department === '' || this.dataForm.department == null) {
  488. this.$alert('未选择部门!', '错误', {
  489. confirmButtonText: '确定'
  490. })
  491. return false;
  492. }
  493. if (this.dataForm.quoter === '' || this.dataForm.quoter == null) {
  494. this.$alert('未选择报价员!', '错误', {
  495. confirmButtonText: '确定'
  496. })
  497. return false;
  498. }
  499. if (this.dataForm.tp === '' || this.dataForm.tp == null) {
  500. this.$alert('未选择TP!', '错误', {
  501. confirmButtonText: '确定'
  502. })
  503. return false;
  504. }
  505. if (this.dataForm.purchaser === '' || this.dataForm.purchaser == null) {
  506. this.$alert('未选择采购专员!', '错误', {
  507. confirmButtonText: '确定'
  508. })
  509. return false;
  510. }
  511. this.$confirm('确定要保存?', '提示', {
  512. confirmButtonText: '确定',
  513. cancelButtonText: '取消',
  514. type: 'warning'
  515. }).then(() => {
  516. for (let i = 0; i < this.selectionDataList.length; i++) {
  517. if (this.selectionDataList[i].applyQty === '' || this.selectionDataList[i].applyQty == null) {
  518. this.selectionDataList[i].applyQty = 0
  519. }
  520. }
  521. this.dataForm.detailList = this.selectionDataList.filter(item => item.applyQty > 0).filter(item => item.standardCost >= 0)
  522. saveProjectToolApply(this.dataForm).then(({data}) => {
  523. if (data && data.code === 0) {
  524. this.visible = false
  525. this.queryDataList()
  526. this.$message.success('操作成功')
  527. // 跳转
  528. if (this.jumpFlag) {
  529. let inData = {
  530. site: this.$store.state.user.site,
  531. applyNo: data.applyNo,
  532. username: this.$store.state.user.name
  533. }
  534. localStorage.setItem('ToolApplyData', JSON.stringify(inData))
  535. this.$router.push('tooling-searchToolApply')
  536. }
  537. } else {
  538. this.$message.warning(data.msg)
  539. }
  540. })
  541. })
  542. },
  543. // 工具申请
  544. applyModel () {
  545. if (this.selectionDataList.length === 0) {
  546. this.$alert('请选择项目!', '错误', {confirmButtonText: '确定'})
  547. return false;
  548. }
  549. this.selectionDataList.forEach(item => {
  550. item.applyQty = ''
  551. })
  552. this.dataForm = {
  553. site: this.$store.state.user.site,
  554. applyNo: '',
  555. applyBy: this.$store.state.user.name,
  556. applyDate: new Date(),
  557. applySumQty: 0,
  558. applyReason: '',
  559. remark: '',
  560. createBy: this.$store.state.user.name,
  561. department: '',
  562. quoter: '',
  563. quoterName: '',
  564. tp: '',
  565. tpName: '',
  566. purchaser: '',
  567. totalCost: '',
  568. purchaserName: '',
  569. cs: '',
  570. csName: '',
  571. offsetOfExpenses: '',
  572. detailList: [],
  573. }
  574. this.visible = true
  575. this.jumpFlag = true
  576. },
  577. queryByAnyField(params){
  578. params.no = this.queryParams.no
  579. params.size = this.queryParams.size
  580. params.site = this.$store.state.user.site
  581. params.userId = this.$store.state.user.id.toString()
  582. this.dataListLoading = true;
  583. queryProjectPartToolForApplyAny(params).then(({data})=>{
  584. if (data && data.code === 0){
  585. this.dataList = data.page.list
  586. this.total = data.page.total
  587. }else {
  588. this.$message.warning(data.msg)
  589. }
  590. this.dataListLoading = false;
  591. }).catch((error)=>{
  592. this.$message.error(error)
  593. this.dataListLoading = false;
  594. })
  595. this.filterSearchData = params
  596. this.isFilterSearch = true
  597. this.filterVisible = false
  598. },
  599. handleRouteQuery() {
  600. if (this.$route.params.toolId) {
  601. this.queryParams.toolNo = this.$route.params.toolId
  602. this.queryDataList()
  603. }
  604. }
  605. },
  606. created() {
  607. // 初始化Site
  608. this.queryParams.site = this.$store.state.user.site;
  609. this.handleRouteQuery()
  610. },
  611. watch:{
  612. queryLoading(newVal,oldVal){
  613. if (newVal){
  614. // 延时关闭,以防未关闭弹框
  615. setTimeout(()=>{
  616. this.queryLoading = false
  617. },3000)
  618. }
  619. }
  620. }
  621. }
  622. </script>
  623. <template>
  624. <div class="box-container">
  625. <el-form :model="queryParams" label-position="top" style="width: 1200px">
  626. <el-row :gutter="10">
  627. <el-col :span="3">
  628. <el-form-item label="项目号">
  629. <el-input v-model="queryParams.projectId" clearable></el-input>
  630. </el-form-item>
  631. </el-col>
  632. <el-col :span="3">
  633. <el-form-item label="项目名称">
  634. <el-input v-model="queryParams.projectName" clearable></el-input>
  635. </el-form-item>
  636. </el-col>
  637. <el-col :span="3">
  638. <el-form-item label="客户名称">
  639. <el-input v-model="queryParams.customerName" clearable></el-input>
  640. </el-form-item>
  641. </el-col>
  642. </el-row>
  643. <el-row :gutter="10">
  644. <el-col :span="3">
  645. <el-form-item label="PLM物料编码">
  646. <el-input v-model="queryParams.plmPartNo" clearable></el-input>
  647. </el-form-item>
  648. </el-col>
  649. <el-col :span="3">
  650. <el-form-item label="IFS物料编码">
  651. <el-input v-model="queryParams.ifsPartNo" clearable></el-input>
  652. </el-form-item>
  653. </el-col>
  654. <el-col :span="3">
  655. <el-form-item label="物料名称">
  656. <el-input v-model="queryParams.partDesc" clearable></el-input>
  657. </el-form-item>
  658. </el-col>
  659. <el-col :span="3">
  660. <el-form-item label="工具编码">
  661. <el-input v-model="queryParams.toolNo" clearable></el-input>
  662. </el-form-item>
  663. </el-col>
  664. <el-col :span="3">
  665. <el-form-item label="工具描述">
  666. <el-input v-model="queryParams.toolDesc" clearable></el-input>
  667. </el-form-item>
  668. </el-col>
  669. <el-col :span="5">
  670. <el-form-item label=" ">
  671. <el-button type="primary" @click="queryDataList">查询</el-button>
  672. <el-button type="primary" @click="applyModel">工具申请</el-button>
  673. <el-button @click="filterVisible = true">搜索</el-button>
  674. </el-form-item>
  675. </el-col>
  676. </el-row>
  677. </el-form>
  678. <div style="height: calc(100% - 120px);">
  679. <el-table
  680. :data="dataList"
  681. height="100%"
  682. border
  683. @selection-change="selectionChangeHandle"
  684. v-loading="queryLoading">
  685. <el-table-column
  686. type="selection"
  687. align="center"
  688. width="55">
  689. </el-table-column>
  690. <el-table-column
  691. v-for="(item,index) in columns" :key="index"
  692. :sortable="item.columnSortable"
  693. :prop="item.columnProp"
  694. :header-align="item.headerAlign"
  695. show-overflow-tooltip
  696. :align="item.align"
  697. :fixed="item.fixed===''?false:item.fixed"
  698. :min-width="item.columnWidth"
  699. :label="item.columnLabel">
  700. <template slot-scope="scope">
  701. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  702. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  703. </template>
  704. </el-table-column>
  705. </el-table>
  706. </div>
  707. <el-pagination
  708. @size-change="sizeChangeHandle"
  709. @current-change="currentChangeHandle"
  710. :current-page="queryParams.no"
  711. :page-sizes="[20, 50, 100, 1000]"
  712. :page-size="queryParams.size"
  713. :total="total"
  714. layout="total, sizes, prev, pager, next, jumper">
  715. </el-pagination>
  716. <el-dialog width="1000px" v-drag title="刀模申请" :close-on-click-modal="false" :visible.sync="visible">
  717. <el-form :model="dataForm" label-position="top" label-width="100px">
  718. <el-row :gutter="10">
  719. <el-col :span="4">
  720. <el-form-item label="申请编号">
  721. <el-input v-model="dataForm.applyNo" disabled></el-input>
  722. </el-form-item>
  723. </el-col>
  724. <el-col :span="4">
  725. <el-form-item label="申请总数">
  726. <el-input v-model="dataForm.applySumQty" disabled></el-input>
  727. </el-form-item>
  728. </el-col>
  729. <el-col :span="4">
  730. <el-form-item label="总成本">
  731. <el-input v-if="accessField('10601001')" v-model="dataForm.totalCost" disabled></el-input>
  732. <el-input v-if="!accessField('10601001')" v-model="valueNull" disabled></el-input>
  733. </el-form-item>
  734. </el-col>
  735. <el-col :span="4">
  736. <el-form-item label="申请人" required>
  737. <el-input v-model="dataForm.applyBy" ></el-input>
  738. </el-form-item>
  739. </el-col>
  740. <el-col :span="4">
  741. <el-form-item label="申请日期" required>
  742. <el-date-picker
  743. value-format="yyyy-MM-dd"
  744. style="width: 100%"
  745. v-model="dataForm.applyDate"
  746. type="date"
  747. placeholder="结束日期">
  748. </el-date-picker>
  749. </el-form-item>
  750. </el-col>
  751. <el-col :span="4">
  752. <el-form-item label="部门" required>
  753. <dict-data-select :site="$store.state.user.site" v-model="dataForm.department" dict-type="tool_application_department"></dict-data-select>
  754. </el-form-item>
  755. </el-col>
  756. </el-row>
  757. <el-row :gutter="10">
  758. <el-col :span="4">
  759. <el-form-item required>
  760. <span slot="label" style="" @click="getBaseList(2002,1)"><a herf="#">报价专员</a></span>
  761. <el-input v-model="dataForm.quoterName" ref="quoterName" placeholder="请选择人员" readonly></el-input>
  762. </el-form-item>
  763. </el-col>
  764. <el-col :span="4">
  765. <el-form-item required>
  766. <span slot="label" style="" @click="getBaseList(2042,2)"><a herf="#">TP</a></span>
  767. <el-input v-model="dataForm.tpName" ref="tpName" placeholder="请选择人员" readonly></el-input>
  768. </el-form-item>
  769. </el-col>
  770. <el-col :span="4">
  771. <el-form-item required>
  772. <span slot="label" style="" @click="getBaseList(2000,3)"><a herf="#">采购专员</a></span>
  773. <el-input v-model="dataForm.purchaserName" ref="purchaserName" placeholder="请选择人员" readonly></el-input>
  774. </el-form-item>
  775. </el-col>
  776. <el-col :span="4">
  777. <el-form-item>
  778. <span slot="label" style="" @click="getBaseList(2051)"><a herf="#">CS</a></span>
  779. <el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" readonly>
  780. <i
  781. v-if="dataForm.csName"
  782. slot="suffix"
  783. class="el-input__icon el-icon-circle-close"
  784. style="cursor: pointer"
  785. @click.stop="clearCsSelection">
  786. </i>
  787. </el-input>
  788. </el-form-item>
  789. </el-col>
  790. <el-col :span="4">
  791. <el-form-item label="费用抵消">
  792. <dict-data-select v-model="dataForm.offsetOfExpenses" clearable dict-type="tool_offset_of_expenses"></dict-data-select>
  793. </el-form-item>
  794. </el-col>
  795. <el-col :span="4">
  796. <el-form-item label=" ">
  797. <el-checkbox v-model="jumpFlag">跳转至申请记录</el-checkbox>
  798. </el-form-item>
  799. </el-col>
  800. </el-row>
  801. <el-row :gutter="10">
  802. <el-col :span="24">
  803. <el-form-item label="申请原因" class="auto">
  804. <el-input type="textarea" resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="dataForm.applyReason"/>
  805. </el-form-item>
  806. </el-col>
  807. <el-col :span="24">
  808. <el-form-item label="备注" class="auto">
  809. <el-input type="textarea" resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="dataForm.remark"/>
  810. </el-form-item>
  811. </el-col>
  812. </el-row>
  813. </el-form>
  814. <div class="rq" style="margin-top: 10px">
  815. <el-table
  816. height="250"
  817. :data="selectionDataList"
  818. border
  819. ref="toolTable"
  820. style="width: 100%;">
  821. <el-table-column label="项目号" header-align="center" width="90" prop="projectId" show-overflow-tooltip/>
  822. <el-table-column label="工具编码" header-align="center" width="100" prop="toolId" show-overflow-tooltip/>
  823. <el-table-column label="工具描述" header-align="center" width="120" prop="toolDescription" show-overflow-tooltip/>
  824. <el-table-column label="工具数量" align="right" header-align="center" width="80" prop="toolQty" show-overflow-tooltip/>
  825. <el-table-column label="实例编码" header-align="center" width="120" prop="instanceCode" show-overflow-tooltip>
  826. <template slot-scope="scope">
  827. <el-input v-model="scope.row.instanceCode" placeholder="请输入实例编码" style="width:98%"></el-input>
  828. </template>
  829. </el-table-column>
  830. <el-table-column label="申请数量" align="right" header-align="center" width="80" prop="applyQty" show-overflow-tooltip>
  831. <template slot-scope="scope">
  832. <el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" style="width:98%"></el-input>
  833. </template>
  834. </el-table-column>
  835. <el-table-column label="工具成本" align="right" header-align="center" width="80" prop="standardCost" show-overflow-tooltip>
  836. <template slot-scope="scope">
  837. <el-input v-if="accessField('10601001')" v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入成本" style="width:98%"></el-input>
  838. </template>
  839. </el-table-column>
  840. <el-table-column label="PLM物料编码" header-align="center" width="140" prop="partNo" show-overflow-tooltip/>
  841. <el-table-column label="IFS物料编码" header-align="center" width="140" prop="finalPartNo" show-overflow-tooltip/>
  842. <el-table-column label="物料名称" header-align="center" width="160" prop="partName" show-overflow-tooltip/>
  843. <el-table-column label="客户料号" header-align="center" width="100" prop="customerPartNo" show-overflow-tooltip/>
  844. <el-table-column label="工艺版本" header-align="center" width="80" prop="routingRevision" show-overflow-tooltip/>
  845. <el-table-column label="工艺类型" header-align="center" width="100" prop="routingType" show-overflow-tooltip/>
  846. <el-table-column label="替代编码" header-align="center" width="80" prop="alternativeNo" show-overflow-tooltip/>
  847. <el-table-column label="替代名称" header-align="center" width="80" prop="alternativeDescription" show-overflow-tooltip/>
  848. <el-table-column label="工序号" header-align="center" width="60" prop="operationNo" show-overflow-tooltip/>
  849. <el-table-column label="工序名称" header-align="center" width="80" prop="operationName" show-overflow-tooltip/>
  850. </el-table>
  851. </div>
  852. <span slot="footer" class="dialog-footer" style="height: 30px;line-height: 30px">
  853. <el-button type="primary" @click="saveData">保存</el-button>
  854. <el-button type="primary" @click="visible = false">取消</el-button>
  855. </span>
  856. </el-dialog>
  857. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  858. <ChooseUser ref="userList" @getBaseData="getUserData"></ChooseUser>
  859. <filter-search :visible.sync="filterVisible" @search="queryByAnyField"></filter-search>
  860. </div>
  861. </template>
  862. <style scoped>
  863. .auto /deep/ .el-form-item__content{
  864. height: auto;
  865. line-height: 1.5;
  866. }
  867. </style>