¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog |
| | | width="60%" |
| | | title="åæ°" |
| | | top="5vh" |
| | | :visible.sync="innerVisible" |
| | | :show="currshowlist" |
| | | @close="$emit('update:currshowlist', false)" |
| | | append-to-body |
| | | class="part-dialog" |
| | | > |
| | | <ttable |
| | | :table="table" |
| | | @handleSelectionChange="handleSelectionChange" |
| | | :prelang="prelang" |
| | | :options="options" |
| | | :ajaxFun="ajaxFun" |
| | | :paramObj="packageBoxIddata" |
| | | :bottomOffset="350" |
| | | ref="paramTable" |
| | | > |
| | | <template #toolbar></template> |
| | | </ttable> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="innerVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="saveSelectRow">ç¡® å®</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | <script> |
| | | import { dataadd,saveList } from '@/api/quality/Packaging_ledger' |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | | export default { |
| | | props:{ |
| | | currshowlist: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | packageBoxIddata:{ |
| | | type: Object |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | datalist:[], |
| | | datalistid:"", |
| | | ajaxFun: dataadd, |
| | | currentRow: false, |
| | | typeOptions: [], |
| | | innerVisible: false, |
| | | listLoading: true, |
| | | multipleSelection: [], |
| | | isShowQuery: false, |
| | | uploadInfo: { |
| | | // æ¯å¦å±ç¤ºä¸ä¼ EXCEL以å对åºçurl |
| | | isShow: false, |
| | | url: '' |
| | | }, |
| | | prelang: 'operation', |
| | | options: { |
| | | height: 300, // é»è®¤é«åº¦-为äºè¡¨å¤´åºå® |
| | | stripe: true, // æ¯å¦ä¸ºæé©¬çº¹ table |
| | | highlightCurrentRow: false, // æ¯å¦è¦é«äº®å½åè¡ |
| | | border: true, // æ¯å¦æçºµåè¾¹æ¡ |
| | | lazy: false, // æ¯å¦éè¦æå è½½ |
| | | fit: true, // åç宽度æ¯å¦èªæå¼ |
| | | multiSelect: true, // |
| | | seqNo: true, |
| | | isShowHide: true, // æ¯å¦æ¾ç¤ºæ¾å½±æé® |
| | | isSearch: true, // é«çº§æ¥è¯¢æé® |
| | | defaultOrderBy: { column: 'createTime', direction: 'desc' } |
| | | }, |
| | | table: { |
| | | total: 0, |
| | | currentPage: 1, |
| | | pageSize: 20, |
| | | data: [], |
| | | // æ é¢ |
| | | column: [ |
| | | { |
| | | minWidth: 'code', |
| | | prop: 'product', |
| | | label: '产å', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | | prop: 'productNo', |
| | | label: '产åç¼å·', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'specs', |
| | | label: 'è§æ ¼åå·', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | | prop: 'unit', |
| | | label: 'åä½', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'datetimerange' |
| | | }, |
| | | ], |
| | | }, |
| | | addOrUpdateVisible: false |
| | | } |
| | | }, |
| | | components: { |
| | | ttable |
| | | }, |
| | | watch: { |
| | | currshowlist() { |
| | | console.log(22211); |
| | | this.innerVisible = this.currshowlist |
| | | } |
| | | }, |
| | | computed: { |
| | | // ...mapGetters(['permissions']) |
| | | }, |
| | | created() { |
| | | this.getParamType() |
| | | }, |
| | | methods: { |
| | | // è·åæ°æ®å表 |
| | | getData() { |
| | | this.$refs.paramTable.getDataList() |
| | | }, |
| | | handleSelectionChange(val){ |
| | | let data = val |
| | | data.forEach(el => { |
| | | this.datalistid = el |
| | | }); |
| | | }, |
| | | saveSelectRow() { |
| | | console.log(this.packageBoxIddata,"123"); |
| | | // saveList ({customerId:this.datalistid.id,contractNo:this.datalistid.contractNo}).then((res =>{ |
| | | // console.log(res); |
| | | // if (res.status === 200) { |
| | | // this.$message.success('æ°å¢æå') |
| | | // }else{ |
| | | // this.$message.error('å建失败') |
| | | // } |
| | | // })) |
| | | this.innerVisible = false |
| | | // this.$emit('handleSelectionChange',this.innerVisible ) |
| | | }, |
| | | handleSelectionChange(val){ |
| | | this.datalist = val |
| | | console.log(this.datalist,"æ°æ®"); |
| | | }, |
| | | saveSelectRow(){ |
| | | this.$emit('handleSelectionChange',this.datalist ) |
| | | this.innerVisible = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |