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.

838 lines
28 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
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
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
2 years 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. detailList:[],
  332. },
  333. }
  334. },
  335. methods:{
  336. queryDataList(){
  337. this.queryLoading = true
  338. queryProjectPartToolForApply(this.queryParams).then(({data})=>{
  339. if (data && data.code === 0){
  340. this.dataList = data.rows
  341. this.total = data.total
  342. }else {
  343. this.$message.error(data.msg)
  344. }
  345. this.queryLoading = false
  346. }).catch((error)=>{
  347. this.$message.error(error)
  348. this.queryLoading = false
  349. })
  350. this.isFilterSearch = false
  351. },
  352. selectionChangeHandle(val){
  353. this.selectionDataList = val;
  354. },
  355. sizeChangeHandle(val){
  356. this.queryParams.size = val;
  357. this.queryParams.no = 1;
  358. if ( this.isFilterSearch === false){
  359. this.queryDataList()
  360. } else {
  361. this.queryByAnyField(this.filterSearchData)
  362. }
  363. },
  364. currentChangeHandle(val){
  365. this.queryParams.no = val;
  366. if ( this.isFilterSearch === false){
  367. this.queryDataList()
  368. } else {
  369. this.queryByAnyField(this.filterSearchData)
  370. }
  371. },
  372. /* 列表方法的回调 */
  373. getUserData (val) {
  374. if(this.tagNo1 === 1) {
  375. this.dataForm.quoter = val.username
  376. this.dataForm.quoterName = val.userDisplay
  377. this.$nextTick(() => {
  378. this.$triggerInputEvent(this.$refs.quoterName);
  379. });
  380. }
  381. if(this.tagNo1 === 2) {
  382. this.dataForm.tp = val.username
  383. this.dataForm.tpName = val.userDisplay
  384. this.$nextTick(() => {
  385. this.$triggerInputEvent(this.$refs.tpName);
  386. });
  387. }
  388. if(this.tagNo1 === 3) {
  389. this.dataForm.purchaser = val.username
  390. this.dataForm.purchaserName = val.userDisplay
  391. this.$nextTick(() => {
  392. this.$triggerInputEvent(this.$refs.purchaserName);
  393. });
  394. }
  395. },
  396. // 获取基础数据列表S
  397. getBaseList (val, type) {
  398. this.tagNo = val
  399. this.tagNo1 = type
  400. this.$nextTick(() => {
  401. let strVal = ''
  402. let conSql = " and b.site = '" + this.$store.state.user.site + "'";
  403. if(val === 2002) {
  404. strVal = this.dataForm.quoter
  405. }
  406. if(val === 2042) {
  407. strVal = this.dataForm.tp
  408. }
  409. if(val === 2000) {
  410. strVal = this.dataForm.purchaser
  411. }
  412. this.$refs.baseList.init(val, strVal,conSql)
  413. })
  414. },
  415. /* 列表方法的回调 */
  416. getBaseData (val) {
  417. if(this.tagNo === 2002) {
  418. this.dataForm.quoter = val.username
  419. this.dataForm.quoterName = val.user_display
  420. this.$nextTick(() => {
  421. this.$triggerInputEvent(this.$refs.quoterName);
  422. });
  423. }
  424. if(this.tagNo === 2042) {
  425. this.dataForm.tp = val.username
  426. this.dataForm.tpName = val.user_display
  427. this.$nextTick(() => {
  428. this.$triggerInputEvent(this.$refs.tpName);
  429. });
  430. }
  431. if(this.tagNo === 2000) {
  432. this.dataForm.purchaser = val.username
  433. this.dataForm.purchaserName = val.user_display
  434. this.$nextTick(() => {
  435. this.$triggerInputEvent(this.$refs.purchaserName);
  436. });
  437. }
  438. },
  439. changeSum(row){
  440. if (row.standardCost < 0 || row.standardCost == null || row.standardCost == '') {
  441. row.standardCost = 0
  442. // this.$alert('成本不能为负数或者不填', '错误', {
  443. // confirmButtonText: '确定'
  444. // })
  445. }
  446. this.dataForm.applySumQty = 0
  447. this.dataForm.totalCost = 0
  448. for (const item of this.selectionDataList) {
  449. // 累加之前先确保值存在,并将 null 或 undefined 转换为0
  450. this.dataForm.applySumQty += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty : 0)
  451. this.dataForm.totalCost += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty * item.standardCost : 0)
  452. }
  453. },
  454. saveData () {
  455. if (this.dataForm.applySumQty === 0) {
  456. this.$alert('未填写申请总数!', '错误', {
  457. confirmButtonText: '确定'
  458. })
  459. return false;
  460. }
  461. if (this.dataForm.applyBy === '' || this.dataForm.applyBy == null) {
  462. this.$alert('未选择申请人!', '错误', {
  463. confirmButtonText: '确定'
  464. })
  465. return false;
  466. }
  467. if (this.dataForm.applyDate === '' || this.dataForm.applyDate == null) {
  468. this.$alert('未选择申请日期!', '错误', {
  469. confirmButtonText: '确定'
  470. })
  471. return false;
  472. }
  473. if (this.dataForm.department === '' || this.dataForm.department == null) {
  474. this.$alert('未选择部门!', '错误', {
  475. confirmButtonText: '确定'
  476. })
  477. return false;
  478. }
  479. if (this.dataForm.quoter === '' || this.dataForm.quoter == null) {
  480. this.$alert('未选择报价员!', '错误', {
  481. confirmButtonText: '确定'
  482. })
  483. return false;
  484. }
  485. if (this.dataForm.tp === '' || this.dataForm.tp == null) {
  486. this.$alert('未选择TP!', '错误', {
  487. confirmButtonText: '确定'
  488. })
  489. return false;
  490. }
  491. if (this.dataForm.purchaser === '' || this.dataForm.purchaser == null) {
  492. this.$alert('未选择采购专员!', '错误', {
  493. confirmButtonText: '确定'
  494. })
  495. return false;
  496. }
  497. this.$confirm('确定要保存?', '提示', {
  498. confirmButtonText: '确定',
  499. cancelButtonText: '取消',
  500. type: 'warning'
  501. }).then(() => {
  502. for (let i = 0; i < this.selectionDataList.length; i++) {
  503. if (this.selectionDataList[i].applyQty === '' || this.selectionDataList[i].applyQty == null) {
  504. this.selectionDataList[i].applyQty = 0
  505. }
  506. }
  507. this.dataForm.detailList = this.selectionDataList.filter(item => item.applyQty > 0).filter(item => item.standardCost >= 0)
  508. saveProjectToolApply(this.dataForm).then(({data}) => {
  509. if (data && data.code === 0) {
  510. this.visible = false
  511. this.queryDataList()
  512. this.$message.success('操作成功')
  513. // 跳转
  514. if (this.jumpFlag) {
  515. let inData = {
  516. site: this.$store.state.user.site,
  517. applyNo: data.applyNo,
  518. username: this.$store.state.user.name
  519. }
  520. localStorage.setItem('ToolApplyData', JSON.stringify(inData))
  521. this.$router.push('tooling-searchToolApply')
  522. }
  523. } else {
  524. this.$message.warning(data.msg)
  525. }
  526. })
  527. })
  528. },
  529. // 工具申请
  530. applyModel () {
  531. if (this.selectionDataList.length === 0) {
  532. this.$alert('请选择项目!', '错误', {confirmButtonText: '确定'})
  533. return false;
  534. }
  535. this.selectionDataList.forEach(item => {
  536. item.applyQty = ''
  537. })
  538. this.dataForm = {
  539. site: this.$store.state.user.site,
  540. applyNo: '',
  541. applyBy: this.$store.state.user.name,
  542. applyDate: new Date(),
  543. applySumQty: 0,
  544. applyReason: '',
  545. remark: '',
  546. createBy: this.$store.state.user.name,
  547. department: '',
  548. quoter: '',
  549. quoterName: '',
  550. tp: '',
  551. tpName: '',
  552. purchaser: '',
  553. totalCost: '',
  554. purchaserName: '',
  555. detailList: [],
  556. }
  557. this.visible = true
  558. this.jumpFlag = true
  559. },
  560. queryByAnyField(params){
  561. params.no = this.queryParams.no
  562. params.size = this.queryParams.size
  563. params.site = this.$store.state.user.site
  564. params.userId = this.$store.state.user.id.toString()
  565. this.dataListLoading = true;
  566. queryProjectPartToolForApplyAny(params).then(({data})=>{
  567. if (data && data.code === 0){
  568. this.dataList = data.page.list
  569. this.total = data.page.total
  570. }else {
  571. this.$message.warning(data.msg)
  572. }
  573. this.dataListLoading = false;
  574. }).catch((error)=>{
  575. this.$message.error(error)
  576. this.dataListLoading = false;
  577. })
  578. this.filterSearchData = params
  579. this.isFilterSearch = true
  580. this.filterVisible = false
  581. },
  582. handleRouteQuery() {
  583. if (this.$route.params.toolId) {
  584. this.queryParams.toolNo = this.$route.params.toolId
  585. this.queryDataList()
  586. }
  587. }
  588. },
  589. created() {
  590. // 初始化Site
  591. this.queryParams.site = this.$store.state.user.site;
  592. this.handleRouteQuery()
  593. },
  594. watch:{
  595. queryLoading(newVal,oldVal){
  596. if (newVal){
  597. // 延时关闭,以防未关闭弹框
  598. setTimeout(()=>{
  599. this.queryLoading = false
  600. },3000)
  601. }
  602. }
  603. }
  604. }
  605. </script>
  606. <template>
  607. <div class="box-container">
  608. <el-form :model="queryParams" label-position="top" style="width: 1200px">
  609. <el-row :gutter="10">
  610. <el-col :span="3">
  611. <el-form-item label="项目号">
  612. <el-input v-model="queryParams.projectId" clearable></el-input>
  613. </el-form-item>
  614. </el-col>
  615. <el-col :span="3">
  616. <el-form-item label="项目名称">
  617. <el-input v-model="queryParams.projectName" clearable></el-input>
  618. </el-form-item>
  619. </el-col>
  620. <el-col :span="3">
  621. <el-form-item label="客户名称">
  622. <el-input v-model="queryParams.customerName" clearable></el-input>
  623. </el-form-item>
  624. </el-col>
  625. </el-row>
  626. <el-row :gutter="10">
  627. <el-col :span="3">
  628. <el-form-item label="PLM物料编码">
  629. <el-input v-model="queryParams.plmPartNo" clearable></el-input>
  630. </el-form-item>
  631. </el-col>
  632. <el-col :span="3">
  633. <el-form-item label="IFS物料编码">
  634. <el-input v-model="queryParams.ifsPartNo" 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.partDesc" clearable></el-input>
  640. </el-form-item>
  641. </el-col>
  642. <el-col :span="3">
  643. <el-form-item label="工具编码">
  644. <el-input v-model="queryParams.toolNo" clearable></el-input>
  645. </el-form-item>
  646. </el-col>
  647. <el-col :span="3">
  648. <el-form-item label="工具描述">
  649. <el-input v-model="queryParams.toolDesc" clearable></el-input>
  650. </el-form-item>
  651. </el-col>
  652. <el-col :span="5">
  653. <el-form-item label=" ">
  654. <el-button type="primary" @click="queryDataList">查询</el-button>
  655. <el-button type="primary" @click="applyModel">工具申请</el-button>
  656. <el-button @click="filterVisible = true">搜索</el-button>
  657. </el-form-item>
  658. </el-col>
  659. </el-row>
  660. </el-form>
  661. <div style="height: calc(100% - 120px);">
  662. <el-table
  663. :data="dataList"
  664. height="100%"
  665. border
  666. @selection-change="selectionChangeHandle"
  667. v-loading="queryLoading">
  668. <el-table-column
  669. type="selection"
  670. align="center"
  671. width="55">
  672. </el-table-column>
  673. <el-table-column
  674. v-for="(item,index) in columns" :key="index"
  675. :sortable="item.columnSortable"
  676. :prop="item.columnProp"
  677. :header-align="item.headerAlign"
  678. show-overflow-tooltip
  679. :align="item.align"
  680. :fixed="item.fixed===''?false:item.fixed"
  681. :min-width="item.columnWidth"
  682. :label="item.columnLabel">
  683. <template slot-scope="scope">
  684. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  685. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  686. </template>
  687. </el-table-column>
  688. </el-table>
  689. </div>
  690. <el-pagination
  691. @size-change="sizeChangeHandle"
  692. @current-change="currentChangeHandle"
  693. :current-page="queryParams.no"
  694. :page-sizes="[20, 50, 100, 1000]"
  695. :page-size="queryParams.size"
  696. :total="total"
  697. layout="total, sizes, prev, pager, next, jumper">
  698. </el-pagination>
  699. <el-dialog width="1000px" v-drag title="刀模申请" :close-on-click-modal="false" :visible.sync="visible">
  700. <el-form :model="dataForm" label-position="top" label-width="100px">
  701. <el-row :gutter="10">
  702. <el-col :span="4.8">
  703. <el-form-item label="申请编号">
  704. <el-input v-model="dataForm.applyNo" disabled></el-input>
  705. </el-form-item>
  706. </el-col>
  707. <el-col :span="4.8">
  708. <el-form-item label="申请总数">
  709. <el-input v-model="dataForm.applySumQty" disabled></el-input>
  710. </el-form-item>
  711. </el-col>
  712. <el-col :span="4.8">
  713. <el-form-item label="总成本">
  714. <el-input v-if="accessField('10601001')" v-model="dataForm.totalCost" disabled></el-input>
  715. <el-input v-if="!accessField('10601001')" v-model="valueNull" disabled></el-input>
  716. </el-form-item>
  717. </el-col>
  718. <el-col :span="4.8">
  719. <el-form-item label="申请人" required>
  720. <el-input v-model="dataForm.applyBy" ></el-input>
  721. </el-form-item>
  722. </el-col>
  723. <el-col :span="4.8">
  724. <el-form-item label="申请日期" required>
  725. <el-date-picker
  726. value-format="yyyy-MM-dd"
  727. style="width: 100%"
  728. v-model="dataForm.applyDate"
  729. type="date"
  730. placeholder="结束日期">
  731. </el-date-picker>
  732. </el-form-item>
  733. </el-col>
  734. <el-col :span="4.8">
  735. <el-form-item label="部门" required>
  736. <dict-data-select :site="$store.state.user.site" v-model="dataForm.department" dict-type="tool_application_department"></dict-data-select>
  737. </el-form-item>
  738. </el-col>
  739. <el-col :span="4.8">
  740. <el-form-item required>
  741. <span slot="label" style="" @click="getBaseList(2002,1)"><a herf="#">报价专员</a></span>
  742. <el-input v-model="dataForm.quoterName" ref="quoterName" placeholder="请选择人员" readonly ></el-input>
  743. </el-form-item>
  744. </el-col>
  745. <el-col :span="4.8">
  746. <el-form-item required>
  747. <span slot="label" style="" @click="getBaseList(2042,2)"><a herf="#">TP</a></span>
  748. <el-input v-model="dataForm.tpName" ref="tpName" placeholder="请选择人员" readonly ></el-input>
  749. </el-form-item>
  750. </el-col>
  751. <el-col :span="4.8">
  752. <el-form-item required>
  753. <span slot="label" style="" @click="getBaseList(2000,3)"><a herf="#">采购专员</a></span>
  754. <el-input v-model="dataForm.purchaserName" ref="purchaserName" placeholder="请选择人员" readonly ></el-input>
  755. </el-form-item>
  756. </el-col>
  757. <el-col :span="4.8">
  758. <el-form-item label=" ">
  759. <el-checkbox v-model="jumpFlag">跳转至申请记录</el-checkbox>
  760. </el-form-item>
  761. </el-col>
  762. <el-col :span="24">
  763. <el-form-item label="申请原因" class="auto">
  764. <el-input type="textarea" resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="dataForm.applyReason"/>
  765. </el-form-item>
  766. </el-col>
  767. <el-col :span="24">
  768. <el-form-item label="备注" class="auto">
  769. <el-input type="textarea" resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="dataForm.remark"/>
  770. </el-form-item>
  771. </el-col>
  772. </el-row>
  773. </el-form>
  774. <div class="rq" style="margin-top: 10px">
  775. <el-table
  776. height="250"
  777. :data="selectionDataList"
  778. border
  779. ref="toolTable"
  780. style="width: 100%;">
  781. <el-table-column label="项目号" header-align="center" width="90" prop="projectId" show-overflow-tooltip/>
  782. <el-table-column label="工具编码" header-align="center" width="100" prop="toolId" show-overflow-tooltip/>
  783. <el-table-column label="工具描述" header-align="center" width="120" prop="toolDescription" show-overflow-tooltip/>
  784. <el-table-column label="工具数量" align="right" header-align="center" width="80" prop="toolQty" show-overflow-tooltip/>
  785. <el-table-column label="申请数量" align="right" header-align="center" width="80" prop="applyQty" show-overflow-tooltip>
  786. <template slot-scope="scope">
  787. <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>
  788. </template>
  789. </el-table-column>
  790. <el-table-column label="工具成本" align="right" header-align="center" width="80" prop="standardCost" show-overflow-tooltip>
  791. <template slot-scope="scope">
  792. <el-input v-if="accessField('10601001')" v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入成本" style="width:98%"></el-input>
  793. </template>
  794. </el-table-column>
  795. <el-table-column label="PLM物料编码" header-align="center" width="140" prop="partNo" show-overflow-tooltip/>
  796. <el-table-column label="IFS物料编码" header-align="center" width="140" prop="finalPartNo" show-overflow-tooltip/>
  797. <el-table-column label="物料名称" header-align="center" width="160" prop="partName" show-overflow-tooltip/>
  798. <el-table-column label="客户料号" header-align="center" width="100" prop="customerPartNo" show-overflow-tooltip/>
  799. <el-table-column label="工艺版本" header-align="center" width="80" prop="routingRevision" show-overflow-tooltip/>
  800. <el-table-column label="工艺类型" header-align="center" width="100" prop="routingType" show-overflow-tooltip/>
  801. <el-table-column label="替代编码" header-align="center" width="80" prop="alternativeNo" show-overflow-tooltip/>
  802. <el-table-column label="替代名称" header-align="center" width="80" prop="alternativeDescription" show-overflow-tooltip/>
  803. <el-table-column label="工序号" header-align="center" width="60" prop="operationNo" show-overflow-tooltip/>
  804. <el-table-column label="工序名称" header-align="center" width="80" prop="operationName" show-overflow-tooltip/>
  805. </el-table>
  806. </div>
  807. <span slot="footer" class="dialog-footer" style="height: 30px;line-height: 30px">
  808. <el-button type="primary" @click="saveData">保存</el-button>
  809. <el-button type="primary" @click="visible = false">取消</el-button>
  810. </span>
  811. </el-dialog>
  812. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  813. <ChooseUser ref="userList" @getBaseData="getUserData"></ChooseUser>
  814. <filter-search :visible.sync="filterVisible" @search="queryByAnyField"></filter-search>
  815. </div>
  816. </template>
  817. <style scoped>
  818. .auto /deep/ .el-form-item__content{
  819. height: auto;
  820. line-height: 1.5;
  821. }
  822. </style>