| | |
| | | <template> |
| | | <el-dialog |
| | | width="40%" |
| | | width="60%" |
| | | top="5vh" |
| | | title="投料" |
| | | :visible.sync="innerVisible" |
| | | append-to-body |
| | |
| | | :key="tableKey" |
| | | :data="dataList" |
| | | border |
| | | style="width: 100%;" |
| | | height="400" |
| | | style="width: 100%;overflow-y: scroll;" |
| | | @cell-dblclick="dblhandleCurrentChange" |
| | | show-summary |
| | | :span-method="objectSpanMethod" |
| | | :summary-method="getSummaries" |
| | | > |
| | | <el-table-column header-align="center" align="center" type="index" label="序号"></el-table-column> |
| | | <el-table-column |
| | | prop="partNo" |
| | | header-align="center" |
| | | align="center" |
| | | label="零件编号" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | header-align="center" |
| | | align="center" |
| | | label="零件" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="partBatchNo" |
| | | prop="ifsBatchNo" |
| | | header-align="center" |
| | | align="center" |
| | | label="零件批号" |
| | | label="批号" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | <!-- <el-table-column |
| | | prop="specs" |
| | | header-align="center" |
| | | align="center" |
| | | label="规格型号" |
| | | > |
| | | </el-table-column> |
| | | </el-table-column> --> |
| | | <el-table-column |
| | | prop="suppliedQuantity" |
| | | header-align="center" |
| | |
| | | header-align="center" |
| | | align="center" |
| | | label="单位" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="menu" label="操作" header-align="center" align="center"> |
| | | <template scope="scope"> |
| | | <el-button type="text" icon="el-icon-circle-close" @click="cancelFeed(scope.$index,scope.row)">取消</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | |
| | | password: null |
| | | } |
| | | }, |
| | | beforeUpdate(){ |
| | | this.$nextTick(()=>{ |
| | | this.objectSpanMethod() |
| | | this.$refs.table.doLayout() |
| | | }) |
| | | }, |
| | | directives: { |
| | | focus: { |
| | | inserted: function(el, option) { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | //投入取消按钮 |
| | | cancelFeed(index,row){ |
| | | this.dataList.splice(index,1) |
| | | }, |
| | | confirmData() { |
| | | if (this.password != null) { |
| | | checkSubmitPassword({ password: this.password }).then((response) => { |
| | |
| | | pullFeed() { |
| | | var partNoList = [] |
| | | var partNoLists |
| | | console.log('this.dataList', this.dataList) |
| | | for (var i = 0; i < this.dataList.length; i++) { |
| | | partNoLists = this.dataList[i].partNo |
| | | partNoList.push(partNoLists) |
| | | } |
| | | getCheckRawPart(partNoList).then((response) => { |
| | | console.log(response) |
| | | if (response.data.code === 0) { |
| | | // 需要密码确认情况 |
| | | if (response.data.data.success === false) { |
| | | this.messages = response.data.data.message |
| | | this.onnerVisible = true |
| | | } else { |
| | | //if (response.data.data.success === false) { |
| | | // this.messages = response.data.data.message |
| | | // this.onnerVisible = true |
| | | //} else { |
| | | // 不需要密码 直接投料 |
| | | this.saveFeed() |
| | | } |
| | | //} |
| | | } |
| | | }) |
| | | }, |
| | |
| | | partBatchNo: this.dataList[i].partBatchNo, |
| | | systemNo: this.dataList[i].systemNo, |
| | | partName: this.dataList[i].partName, |
| | | unit: this.dataList[i].unit ? this.dataList[i].unit : '' |
| | | unit: this.dataList[i].unit ? this.dataList[i].unit : '', |
| | | partNo: this.dataList[i].partNo, |
| | | ifsBatchNo: this.dataList[i].ifsBatchNo, |
| | | ifsWdr: this.dataList[i].ifsWdr, |
| | | locationNo: this.dataList[i].locationNo, |
| | | serialNo:this.dataList[i].serialNo, |
| | | engChgLevel:this.dataList[i].engChgLevel, |
| | | configurationId:this.dataList[i].configurationId, |
| | | activitySeq:this.dataList[i].activitySeq |
| | | } |
| | | feeds.push(feed) |
| | | } |
| | |
| | | return reg.test(value) |
| | | }, |
| | | objectSpanMethod() { |
| | | setTimeout(() => { |
| | | this.$nextTick(()=>{ |
| | | if (this.$refs.table.$el) { |
| | | const current = this.$refs.table.$el |
| | | .querySelector('.el-table__footer-wrapper') |
| | | .querySelector('.el-table__footer') |
| | | const cell = current.rows[0].cells |
| | | // cell[1].style.display = 'none' |
| | | cell[0].colSpan = '4' |
| | | cell[0].colSpan = '6' |
| | | } |
| | | }, 50) |
| | | }) |
| | | }, |
| | | getSummaries(param) { |
| | | const { columns, data } = param |
| | |
| | | }, |
| | | watch: { |
| | | currshowlist() { |
| | | this.innerVisible = this.currshowlist |
| | | this.password = null |
| | | if (this.currshowlist) { |
| | | this.$nextTick(() => {}) |
| | | const _than = this |
| | | _than.innerVisible = _than.currshowlist |
| | | _than.password = null |
| | | if (!_than.currshowlist) { |
| | | _than.$nextTick(() => { |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | created(){ |
| | | this.$nextTick(()=>{ |
| | | this.objectSpanMethod() |
| | | }) |
| | | }, |
| | | mounted() {} |
| | | } |