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.

739 lines
23 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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. <script>
  2. import {
  3. selectTestSoBom,
  4. saveTestSoBom,
  5. removeTestSoBom,
  6. updateTestSoBom,
  7. removeBatchTestSoBom
  8. } from "../../../../api/test/testSoBom";
  9. import {searchPart, searchPartList} from '@/api/part/partInformation.js';
  10. import numberInput from "../../common/numberInput.vue";
  11. import {searchAllUmInformationList} from "../../../../api/part/umInformation";
  12. import {Decimal} from "decimal.js";
  13. import {queryPart} from "../../../../api/part/partInformation";
  14. export default {
  15. name: "testTable",
  16. components:{
  17. numberInput,
  18. },
  19. props:{
  20. dataList:{
  21. type: Array,
  22. default: ()=>[],
  23. },
  24. testNo:{
  25. type:String,
  26. },
  27. testNumber:{
  28. type:[String,Number],
  29. },
  30. columnList:{
  31. type: Array,
  32. default: ()=>[],
  33. },
  34. height:{
  35. type:[Number,String],
  36. default:300
  37. },
  38. disabled:{
  39. type:Boolean,
  40. default:false
  41. },
  42. },
  43. model:{
  44. prop:"dataList",
  45. event:"change"
  46. },
  47. data(){
  48. return{
  49. partList:[],
  50. partData:{
  51. partNo:undefined,
  52. partDesc:undefined,
  53. site:this.$store.state.user.site
  54. },
  55. partDialogFlag:false,
  56. testSoBomLabel:{
  57. componentPartNo: "物料编码",
  58. partDesc:"物料描述",
  59. requiredQty:"需求数量",
  60. assemblyQty:"单位用量",
  61. fixedScrapQty:"固定损耗",
  62. scrapFactor:"报废率"
  63. },
  64. testSoBomRule:{
  65. componentPartNo: [{required: true,message: ' ',trigger: ['change','blur']}],
  66. partDesc: [{required: true,message: ' ',trigger: ['change','blur']}],
  67. requiredQty: [{required: true,message: ' ',trigger: ['change','blur']}],
  68. assemblyQty: [{required: true,message: ' ',trigger: ['change','blur']}],
  69. fixedScrapQty: [{required: true,message: ' ',trigger: ['change','blur']}],
  70. scrapFactor: [{required: true,message: ' ',trigger: ['change','blur']}],
  71. unitCost: [{required: true,message: ' ',trigger: ['change','blur']}],
  72. totalCost: [{required: true,message: ' ',trigger: ['change','blur']}],
  73. },
  74. testSoBom:{
  75. site:this.$store.state.user.site,
  76. testNo:undefined,
  77. itemNo:undefined,
  78. componentPartNo:undefined,
  79. partDesc:undefined,
  80. umId:undefined,
  81. assemblyQty:0,
  82. fixedScrapQty:0,
  83. scrapFactor:0,
  84. requiredQty:0,
  85. issuedQty:undefined,
  86. issuedDate:undefined,
  87. reserveQty:0,
  88. mateGroup:undefined,
  89. notifiedQty:undefined,
  90. rmTypeDb:0,
  91. issuedType:undefined,
  92. remark:undefined,
  93. unitCost:0,
  94. totalCost:0,
  95. status:"N",
  96. },
  97. selectionTestSoBomList:[],
  98. testSoBomColumnList:[{
  99. userId: this.$store.state.user.name,
  100. functionId: 102001,
  101. serialNumber: '102001Table3ItemNo',
  102. tableId: '102001Table3',
  103. tableName: '测试产品结构',
  104. columnProp: 'itemNo',
  105. headerAlign: 'center',
  106. align: 'center',
  107. columnLabel: '序号',
  108. columnHidden: false,
  109. columnImage: false,
  110. columnSortable: false,
  111. sortLv: 0,
  112. status: true,
  113. fixed: '',
  114. columnWidth: 50
  115. },{
  116. userId: this.$store.state.user.name,
  117. functionId: 102001,
  118. serialNumber: '102001Table3ComponentPartNo',
  119. tableId: '102001Table3',
  120. tableName: '测试产品结构',
  121. columnProp: 'componentPartNo',
  122. headerAlign: 'center',
  123. align: 'left',
  124. columnLabel: '物料编码',
  125. columnHidden: false,
  126. columnImage: false,
  127. columnSortable: false,
  128. sortLv: 0,
  129. status: true,
  130. fixed: '',
  131. columnWidth: 100
  132. },{
  133. userId: this.$store.state.user.name,
  134. functionId: 102001,
  135. serialNumber: '102001Table3PartDesc',
  136. tableId: '102001Table3',
  137. tableName: '测试产品结构',
  138. columnProp: 'partDesc',
  139. headerAlign: 'center',
  140. align: 'left',
  141. columnLabel: '物料名称',
  142. columnHidden: false,
  143. columnImage: false,
  144. columnSortable: false,
  145. sortLv: 0,
  146. status: true,
  147. fixed: '',
  148. columnWidth: 200
  149. },{
  150. userId: this.$store.state.user.name,
  151. functionId: 102001,
  152. serialNumber: '102001Table3Spec',
  153. tableId: '102001Table3',
  154. tableName: '测试产品结构',
  155. columnProp: 'spec',
  156. headerAlign: 'center',
  157. align: 'left',
  158. columnLabel: '规格型号',
  159. columnHidden: false,
  160. columnImage: false,
  161. columnSortable: false,
  162. sortLv: 0,
  163. status: true,
  164. fixed: '',
  165. columnWidth: 100
  166. },
  167. // {
  168. // userId: this.$store.state.user.name,
  169. // functionId: 102001,
  170. // serialNumber: '102001Table3AssemblyQty',
  171. // tableId: '102001Table3',
  172. // tableName: '测试产品结构',
  173. // columnProp: 'assemblyQty',
  174. // headerAlign: 'center',
  175. // align: 'left',
  176. // columnLabel: '单位用量',
  177. // columnHidden: false,
  178. // columnImage: false,
  179. // columnSortable: false,
  180. // sortLv: 0,
  181. // status: true,
  182. // fixed: '',
  183. // columnWidth: 100
  184. // },
  185. // {
  186. // userId: this.$store.state.user.name,
  187. // functionId: 102001,
  188. // serialNumber: '102001Table3FixedScrapQty',
  189. // tableId: '102001Table3',
  190. // tableName: '测试产品结构',
  191. // columnProp: 'fixedScrapQty',
  192. // headerAlign: 'center',
  193. // align: 'left',
  194. // columnLabel: '固定损耗',
  195. // columnHidden: false,
  196. // columnImage: false,
  197. // columnSortable: false,
  198. // sortLv: 0,
  199. // status: true,
  200. // fixed: '',
  201. // columnWidth: 100
  202. // },
  203. {
  204. userId: this.$store.state.user.name,
  205. functionId: 102001,
  206. serialNumber: '102001Table3UmName',
  207. tableId: '102001Table3',
  208. tableName: '测试产品结构',
  209. columnProp: 'umId',
  210. headerAlign: 'center',
  211. align: 'left',
  212. columnLabel: '计量单位',
  213. columnHidden: false,
  214. columnImage: false,
  215. columnSortable: false,
  216. sortLv: 0,
  217. status: true,
  218. fixed: '',
  219. columnWidth: 100
  220. },
  221. // {
  222. // userId: this.$store.state.user.name,
  223. // functionId: 102001,
  224. // serialNumber: '102001Table3ScrapFactor',
  225. // tableId: '102001Table3',
  226. // tableName: '测试产品结构',
  227. // columnProp: 'scrapFactor',
  228. // headerAlign: 'center',
  229. // align: 'left',
  230. // columnLabel: '报废率%',
  231. // columnHidden: false,
  232. // columnImage: false,
  233. // columnSortable: false,
  234. // sortLv: 0,
  235. // status: true,
  236. // fixed: '',
  237. // columnWidth: 100
  238. // },
  239. {
  240. userId: this.$store.state.user.name,
  241. functionId: 102001,
  242. serialNumber: '102001Table3RequiredQty',
  243. tableId: '102001Table3',
  244. tableName: '测试产品结构',
  245. columnProp: 'requiredQty',
  246. headerAlign: 'center',
  247. align: 'right',
  248. columnLabel: '需求数量',
  249. columnHidden: false,
  250. columnImage: false,
  251. columnSortable: false,
  252. sortLv: 0,
  253. status: true,
  254. fixed: '',
  255. columnWidth: 100
  256. },
  257. // {
  258. // userId: this.$store.state.user.name,
  259. // functionId: 102001,
  260. // serialNumber: '102001Table3ReserveQty',
  261. // tableId: '102001Table3',
  262. // tableName: '测试产品结构',
  263. // columnProp: 'reserveQty',
  264. // headerAlign: 'center',
  265. // align: 'left',
  266. // columnLabel: '预留数量',
  267. // columnHidden: false,
  268. // columnImage: false,
  269. // columnSortable: false,
  270. // sortLv: 0,
  271. // status: true,
  272. // fixed: '',
  273. // columnWidth: 100
  274. // },
  275. // {
  276. // userId: this.$store.state.user.name,
  277. // functionId: 102001,
  278. // serialNumber: '102001Table3IssuedDate',
  279. // tableId: '102001Table3',
  280. // tableName: '测试产品结构',
  281. // columnProp: 'issuedDate',
  282. // headerAlign: 'center',
  283. // align: 'left',
  284. // columnLabel: '发料日期',
  285. // columnHidden: false,
  286. // columnImage: false,
  287. // columnSortable: false,
  288. // sortLv: 0,
  289. // status: true,
  290. // fixed: '',
  291. // columnWidth: 100
  292. // },
  293. {
  294. userId: this.$store.state.user.name,
  295. functionId: 102001,
  296. serialNumber: '102001Table3UnitCost',
  297. tableId: '102001Table3',
  298. tableName: '测试产品结构',
  299. columnProp: 'unitCost',
  300. headerAlign: 'center',
  301. align: 'right',
  302. columnLabel: '单价',
  303. columnHidden: false,
  304. columnImage: false,
  305. columnSortable: false,
  306. sortLv: 0,
  307. status: true,
  308. fixed: '',
  309. columnWidth: 100
  310. },
  311. {
  312. userId: this.$store.state.user.name,
  313. functionId: 102001,
  314. serialNumber: '102001Table3TotalCost',
  315. tableId: '102001Table3',
  316. tableName: '测试产品结构',
  317. columnProp: 'totalCost',
  318. headerAlign: 'center',
  319. align: 'right',
  320. columnLabel: '总价',
  321. columnHidden: false,
  322. columnImage: false,
  323. columnSortable: false,
  324. sortLv: 0,
  325. status: true,
  326. fixed: '',
  327. columnWidth: 100
  328. },
  329. {
  330. userId: this.$store.state.user.name,
  331. functionId: 102001,
  332. serialNumber: '102001Table3Remark',
  333. tableId: '102001Table3',
  334. tableName: '测试产品结构',
  335. columnProp: 'remark',
  336. headerAlign: 'center',
  337. align: 'left',
  338. columnLabel: '备注',
  339. columnHidden: false,
  340. columnImage: false,
  341. columnSortable: false,
  342. sortLv: 0,
  343. status: true,
  344. fixed: '',
  345. columnWidth: 140
  346. },
  347. // {
  348. // userId: this.$store.state.user.name,
  349. // functionId: 102001,
  350. // serialNumber: '102001Table3rmTypeDb',
  351. // tableId: '102001Table3',
  352. // tableName: '测试产品结构',
  353. // columnProp: 'rmTypeDb',
  354. // headerAlign: 'center',
  355. // align: 'left',
  356. // columnLabel: '是否主物料',
  357. // columnHidden: false,
  358. // columnImage: false,
  359. // columnSortable: false,
  360. // sortLv: 0,
  361. // status: true,
  362. // fixed: '',
  363. // columnWidth: 100
  364. // },
  365. ],
  366. saveOrUpdateFlag:false,
  367. umList:[],
  368. }
  369. },
  370. created() {
  371. if (this.columnList.length !== 0){
  372. this.testSoBomColumnList = [...this.columnList]
  373. }
  374. },
  375. methods:{
  376. closePartDialog(){
  377. this.partData = {
  378. partNo: undefined,
  379. partDesc: undefined,
  380. site:this.$store.state.user.site
  381. }
  382. this.partList = [];
  383. },
  384. openPartDialog(){
  385. this.partData.partNo = this.testSoBom.componentPartNo
  386. this.initPartList();
  387. },
  388. initPartList(){
  389. searchPartList(this.partData).then(({data})=>{
  390. if (data && data.code === 200) {
  391. this.partList = data.data;
  392. }
  393. })
  394. },
  395. dblClickPartTable(row){
  396. this.testSoBom.componentPartNo = row.partNo;
  397. this.testSoBom.partDesc = row.partDesc;
  398. this.testSoBom.umId = row.umId;
  399. this.testSoBom.unitCost = row.standardCost;
  400. this.testSoBom.status = row.status;
  401. this.partDialogFlag = false;
  402. },
  403. testSoBomClickRow(row,column){
  404. if (column.label !== '操作'){
  405. this.$refs.testSoBomTable.toggleRowSelection(row,true)
  406. }
  407. },
  408. selectionTestSoBom(rows){
  409. this.selectionTestSoBomList = rows;
  410. },
  411. saveTestSoBom(row){
  412. if (row){
  413. this.testSoBom = JSON.parse(JSON.stringify(row))
  414. }
  415. this.getAllUm()
  416. this.saveOrUpdateFlag = true
  417. },
  418. removeBatchTestSoBom(){
  419. if (this.selectionTestSoBomList.length === 0){
  420. this.$message.warning("请勾选需要删除的信息")
  421. return
  422. }
  423. this.$confirm('此操作将删除材料信息, 是否继续?', '提示', {
  424. confirmButtonText: '确定',
  425. cancelButtonText: '取消',
  426. type: 'warning'
  427. }).then(() => {
  428. removeBatchTestSoBom(this.selectionTestSoBomList).then(({data})=>{
  429. if (data && data.code === 0){
  430. this.$message.success(data.msg)
  431. this.selectTestSoBom();
  432. this.$refs.testSoBomTable.clearSelection()
  433. }else {
  434. this.$alert(data.msg, '错误', {
  435. confirmButtonText: '确定'
  436. })
  437. }
  438. }).catch((error)=>{
  439. this.$alert(error, '错误', {
  440. confirmButtonText: '确定'
  441. })
  442. })
  443. }).catch(() => {});
  444. },
  445. closeTestSoBom(){
  446. this.$refs.saveForm.resetFields();
  447. this.testSoBom = {
  448. site:this.$store.state.user.site,
  449. testNo:undefined,
  450. itemNo:undefined,
  451. componentPartNo:undefined,
  452. partDesc:undefined,
  453. umId:undefined,
  454. assemblyQty:0,
  455. fixedScrapQty:0,
  456. scrapFactor:0,
  457. requiredQty:0,
  458. issuedQty:undefined,
  459. issuedDate:undefined,
  460. reserveQty:0,
  461. mateGroup:undefined,
  462. notifiedQty:undefined,
  463. rmTypeDb:0,
  464. issuedType:undefined,
  465. remark:undefined,
  466. unitCost:0,
  467. totalCost:0,
  468. }
  469. },
  470. clearTable(){
  471. this.$emit("change",[])
  472. this.$refs.testSoBomTable.clearSelection();
  473. },
  474. selectTestSoBom(){
  475. let params = {
  476. testNo:this.testNo,
  477. site:this.$store.state.user.site
  478. }
  479. this.$emit("change",[])
  480. this.$refs.testSoBomTable.clearSelection();
  481. selectTestSoBom(params).then(({data})=>{
  482. if (data && data.code === 0 ){
  483. this.$emit("change",data.rows)
  484. this.restSoBom();
  485. }else {
  486. this.$message.error(data.msg)
  487. }
  488. }).catch((error)=>{
  489. this.$message.error(error)
  490. })
  491. },
  492. saveTestSoBomBtn(isClose){
  493. this.$refs.saveForm.validate((validate,objects)=>{
  494. if (validate){
  495. if (this.testSoBom.itemNo !== undefined && this.testSoBom.itemNo !== null && this.testSoBom.itemNo !== ''){
  496. updateTestSoBom(this.testSoBom).then(({data})=>{
  497. if (data && data.code === 0){
  498. this.$message.success(data.msg)
  499. this.selectTestSoBom()
  500. this.saveOrUpdateFlag = false
  501. }else {
  502. this.$message.error(data.msg)
  503. }
  504. }).catch((error)=>{
  505. this.$message.error(error)
  506. })
  507. }else {
  508. this.testSoBom.testNo = this.testNo
  509. saveTestSoBom(this.testSoBom).then(({data})=>{
  510. if (data && data.code === 0){
  511. this.$message.success(data.msg)
  512. this.selectTestSoBom()
  513. if (!isClose){
  514. this.saveOrUpdateFlag = false
  515. }
  516. }else {
  517. this.$message.error(data.msg)
  518. }
  519. }).catch((error)=>{
  520. this.$message.error(error)
  521. })
  522. }
  523. }else {
  524. for (let key in objects) {
  525. this.$message.error(this.testSoBomLabel[key]+"不能为空")
  526. }
  527. }
  528. })
  529. },
  530. restSoBom(){
  531. this.$nextTick(()=>{
  532. this.testSoBom= {
  533. site:this.$store.state.user.site,
  534. testNo:this.testNo,
  535. itemNo:undefined,
  536. componentPartNo:undefined,
  537. partDesc:undefined,
  538. umId:undefined,
  539. assemblyQty:0,
  540. fixedScrapQty:0,
  541. scrapFactor:0,
  542. requiredQty:0,
  543. issuedQty:undefined,
  544. issuedDate:undefined,
  545. reserveQty:0,
  546. mateGroup:undefined,
  547. notifiedQty:undefined,
  548. rmTypeDb:0,
  549. issuedType:undefined,
  550. remark:undefined,
  551. }
  552. })
  553. },
  554. getAllUm(){
  555. let params = {
  556. site:this.$store.state.user.site
  557. }
  558. searchAllUmInformationList(params).then(({data})=>{
  559. if (data && data.code === 0){
  560. this.umList = data.rows
  561. }else {
  562. this.$message.warning(data.msg)
  563. }
  564. }).catch((error)=>{
  565. this.$message.error(error)
  566. })
  567. },
  568. computeQuantityRequired(){
  569. let total = new Decimal(this.testNumber).mul(new Decimal(this.testSoBom.assemblyQty)).div((new Decimal(100).sub(new Decimal(this.testSoBom.scrapFactor))).div(new Decimal(100)))
  570. this.testSoBom.requiredQty = new Decimal(total.toFixed(3,Decimal.ROUND_FLOOR)).toSignificantDigits().toNumber();
  571. },
  572. computeTotalCost(val){
  573. this.testSoBom.assemblyQty = new Decimal(this.testSoBom.requiredQty).div(new Decimal(this.testNumber)).toNumber()
  574. this.testSoBom.totalCost = new Decimal(this.testSoBom.requiredQty).mul(new Decimal(this.testSoBom.unitCost)).toNumber()
  575. },
  576. handleQueryPart(){
  577. let params = {
  578. site:this.$store.state.user.site,
  579. partNo:this.testSoBom.componentPartNo
  580. }
  581. queryPart(params).then(({data})=>{
  582. if (data && data.code === 0){
  583. if (data.rows && data.rows.length === 1){
  584. this.dblClickPartTable(data.rows[0])
  585. }else {
  586. this.dblClickPartTable({
  587. partNo:this.testSoBom.componentPartNo,
  588. })
  589. }
  590. }else {
  591. this.$message.warning(data.msg)
  592. }
  593. }).catch((error)=>{
  594. this.$message.error(error)
  595. })
  596. }
  597. },
  598. }
  599. </script>
  600. <template>
  601. <div class="testTable">
  602. <div style="margin-bottom: 5px">
  603. <el-button type="primary" v-if="!disabled" @click="saveTestSoBom(null)">新增</el-button>
  604. <el-button type="primary" v-if="!disabled" @click="removeBatchTestSoBom">删除</el-button>
  605. </div>
  606. <el-table
  607. :height="height" border
  608. :data="dataList"
  609. ref="testSoBomTable"
  610. @row-click="testSoBomClickRow"
  611. @selection-change="selectionTestSoBom">
  612. <el-table-column
  613. type="selection"
  614. header-align="center"
  615. align="center"
  616. width="50">
  617. </el-table-column>
  618. <el-table-column
  619. v-for="(item,index) in testSoBomColumnList" :key="index"
  620. :sortable="item.columnSortable"
  621. :prop="item.columnProp"
  622. :header-align="item.headerAlign"
  623. :show-overflow-tooltip="item.showOverflowTooltip"
  624. :align="item.align"
  625. :fixed="item.fixed===''?false:item.fixed"
  626. :min-width="item.columnWidth"
  627. :label="item.columnLabel">
  628. <template slot-scope="scope">
  629. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  630. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  631. </template>
  632. </el-table-column>
  633. <el-table-column label="操作" align="center" fixed="right">
  634. <template slot-scope="{row,$index}">
  635. <a type="text" style="cursor:pointer;" v-if="!disabled" @click="saveTestSoBom(row)">编辑</a>
  636. </template>
  637. </el-table-column>
  638. </el-table>
  639. <el-dialog :title="(testSoBom.itemNo?'编辑':'新增')+'-产品结构'" :close-on-click-modal="false" v-drag width="600px" append-to-body :visible.sync="saveOrUpdateFlag" @close="closeTestSoBom">
  640. <el-form ref="saveForm" label-position="top" :model="testSoBom" :rules="testSoBomRule">
  641. <el-row :gutter="15">
  642. <el-col :span="24">
  643. <el-row :gutter="15">
  644. <el-col :span="8">
  645. <el-form-item label="产品编码" prop="componentPartNo">
  646. <span slot="label" @click="partDialogFlag = true"><a>产品编码</a></span>
  647. <el-input @blur="handleQueryPart" v-model="testSoBom.componentPartNo"></el-input>
  648. </el-form-item>
  649. </el-col>
  650. <el-col :span="11">
  651. <el-form-item label="产品名称" prop="partDesc">
  652. <el-input disabled v-model="testSoBom.partDesc"></el-input>
  653. </el-form-item>
  654. </el-col>
  655. <el-col :span="5">
  656. <el-form-item label="单位" prop="umId">
  657. <el-select disabled v-model="testSoBom.umId">
  658. <el-option v-for="v in umList" :value="v.umId" :label="v.umId" :key="v.umId"></el-option>
  659. </el-select>
  660. </el-form-item>
  661. </el-col>
  662. </el-row>
  663. </el-col>
  664. <el-col :span="8">
  665. <el-form-item label="需求数量" prop="requiredQty">
  666. <el-input-number @input="computeTotalCost" style="width: 100%;margin-top: -5px;" :min="0" v-model="testSoBom.requiredQty" :controls="false"></el-input-number>
  667. </el-form-item>
  668. </el-col>
  669. <el-col :span="8">
  670. <el-form-item label="单价" prop="unitCost">
  671. <el-input-number @input="computeTotalCost" :disabled="testSoBom.status === 'N'" style="width: 100%;margin-top: -5px;" :min="0" v-model="testSoBom.unitCost" :controls="false"></el-input-number>
  672. </el-form-item>
  673. </el-col>
  674. <!-- <el-col :span="8">-->
  675. <!-- <el-form-item label=" ">-->
  676. <!-- </el-form-item>-->
  677. <!-- </el-col>-->
  678. <el-col :span="8">
  679. <el-form-item label="总价" prop="totalCost">
  680. <el-input-number disabled style="width: 100%;margin-top: -5px;" :min="0" v-model="testSoBom.totalCost" :controls="false"></el-input-number>
  681. </el-form-item>
  682. </el-col>
  683. <el-col :span="24">
  684. <el-form-item label="备注" prop="remark" style="height: 90px">
  685. <el-input type="textarea" resize='none' :autosize="{ minRows: 3, maxRows: 3 }" v-model="testSoBom.remark"></el-input>
  686. </el-form-item>
  687. </el-col>
  688. </el-row>
  689. </el-form>
  690. <span slot="footer" class="dialog-footer">
  691. <el-button type="primary" v-if="!testSoBom.itemNo" @click="saveTestSoBomBtn(true)"> </el-button>
  692. <el-button type="primary" @click="saveTestSoBomBtn(false)">保存并关闭</el-button>
  693. <el-button @click="saveOrUpdateFlag = false"> </el-button>
  694. </span>
  695. </el-dialog>
  696. <el-dialog title="产品列表" width="35%" append-to-body :close-on-click-modal="false"
  697. @close="closePartDialog" @open="openPartDialog" v-drag
  698. :visible.sync="partDialogFlag">
  699. <!--搜索条件-->
  700. <el-form :model="partData" ref="partDataForm" label-position="top">
  701. <el-row :gutter="10">
  702. <el-col :span="6">
  703. <el-form-item label="产品编号" prop="partNo">
  704. <el-input v-model="partData.partNo" clearable/>
  705. </el-form-item>
  706. </el-col>
  707. <el-col :span="6" >
  708. <el-form-item label="产品描述" prop="partDesc">
  709. <el-input v-model="partData.partDesc" clearable/>
  710. </el-form-item>
  711. </el-col>
  712. <el-col :span="6" >
  713. <el-form-item label=" ">
  714. <el-button type="primary" @click="initPartList"> </el-button>
  715. </el-form-item>
  716. </el-col>
  717. </el-row>
  718. </el-form>
  719. <!--筛选的数据-->
  720. <el-table :data="partList" ref="partDataTable" :style="{marginTop:'5px'}"
  721. height="200px" stripe border width="30%"
  722. @row-dblclick="dblClickPartTable">
  723. <el-table-column label="产品编号" prop="partNo"/>
  724. <el-table-column label="产品描述" prop="partDesc"/>
  725. </el-table>
  726. </el-dialog>
  727. </div>
  728. </template>
  729. <style scoped>
  730. .el-input-number /deep/ .el-input__inner{
  731. text-align: right;
  732. padding-right: 5px !important;
  733. }
  734. </style>