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.

781 lines
26 KiB

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