| | |
| | | title="汇报产出" |
| | | :visible.sync="innerVisible" |
| | | append-to-body |
| | | @close="$emit('update:currshowlist', false)" |
| | | @close="handleClose" |
| | | :show="currshowlist" |
| | | :close-on-click-modal="false" |
| | | class="batch-product-out-form" |
| | |
| | | ><el-col :span="2" class="batch-product-out-form-header-col" |
| | | ><span>零件名称</span></el-col |
| | | > |
| | | <el-col :span="4" class="batch-product-out-form-header-col" |
| | | <!-- <el-col :span="4" class="batch-product-out-form-header-col" |
| | | ><span>序列号</span></el-col |
| | | > |
| | | > --> |
| | | <!-- <el-col :span="2" class="batch-product-out-form-header-col" |
| | | ><span>载具编号</span></el-col |
| | | > |
| | |
| | | <el-col :span="1" class="batch-product-out-form-header-col" |
| | | ><span>单位</span></el-col |
| | | > |
| | | <el-col :span="2" class="batch-product-out-form-header-col" |
| | | <!-- <el-col :span="2" class="batch-product-out-form-header-col" |
| | | ><span>WDR号</span></el-col |
| | | > |
| | | > --> |
| | | <!-- <el-col :span="1" class="batch-product-out-form-header-col" |
| | | ><span>分段描述</span></el-col |
| | | > --> |
| | |
| | | <span class="inline-el-hidden">{{ item.partName }}</span> |
| | | </el-tooltip> |
| | | </el-col> |
| | | <el-col :span="4" class="batch-product-out-form-body-col l-mes"> |
| | | <!-- <el-col :span="4" class="batch-product-out-form-body-col l-mes"> --> |
| | | <!-- <span>{{ item.outBatchNo }}</span> --> |
| | | <el-input v-model="item.outBatchNo"> |
| | | <!-- <el-input v-model="item.outBatchNo"> |
| | | </el-input> |
| | | </el-col> |
| | | </el-col> --> |
| | | <!-- <el-col :span="2" class="batch-product-out-form-body-col l-mes"> |
| | | <el-input v-model="item.reelNumber"></el-input> |
| | | </el-col> |
| | |
| | | <el-col :span="1" class="batch-product-out-form-body-col"> |
| | | <span>{{ item.unit }}</span> |
| | | </el-col> |
| | | <el-col :span="2" class="batch-product-out-form-body-col l-mes"> |
| | | <!-- <el-col :span="2" class="batch-product-out-form-body-col l-mes"> |
| | | <el-input v-model="item.wdr"></el-input> |
| | | </el-col> |
| | | </el-col> --> |
| | | <!-- <el-col :span="1" class="batch-product-out-form-body-col l-mes"> |
| | | <el-input v-model="item.segmentDesc"></el-input> |
| | | </el-col> --> |
| | | <el-col :span="2" class="batch-product-out-form-body-col l-mes"> |
| | | <el-input v-model="item.outNum"></el-input> |
| | | <span v-text="item.outNum"></span> |
| | | </el-col> |
| | | <el-col :span="2" class="batch-product-out-form-body-col l-mes"> |
| | | <el-input v-model="item.scrapQty"></el-input> |
| | | <el-select v-model="item.scrapQty"> |
| | | <el-option label="0" value="0"> |
| | | </el-option> |
| | | <el-option label="1" value="1"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-col> |
| | | <!-- <el-col :span="1" class="batch-product-out-form-body-col l-mes"> |
| | | <el-input v-model="item.reelWeight"></el-input> |
| | |
| | | <el-input v-model="item.remark"></el-input> |
| | | </el-col>--> |
| | | <el-col :span="2" class="batch-product-out-form-body-col l-mes"> |
| | | <el-input v-model="item.mainRemark"></el-input> |
| | | <el-input v-model="item.remark"></el-input> |
| | | </el-col> |
| | | <el-col :span="1" class="batch-product-out-form-body-col"> |
| | | <span |
| | |
| | | data() { |
| | | return { |
| | | innerVisible: false, |
| | | staffNameList: [], |
| | | personSelection: [], |
| | | saveDisabled: false, |
| | | currDutyInitproducts: [], // 用于缓存页面中原有的staff产出记录,并且是属于当前班次下的,用于勾选人员时作为原数据参照 |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | initProductList(){ |
| | | let val = this.personSelection |
| | | //按人员报工 |
| | | if(this.groupStatus){ |
| | | this.products = [] |
| | | this.addProductOutForPerson() |
| | | }else{ |
| | | //按组报工 |
| | | let nameList = [] |
| | | val.forEach(obj=>{ |
| | | nameList.push(obj.staffName) |
| | | }) |
| | | let staffName = Array.from(new Set(nameList)).join(",") |
| | | if(staffName!=''){ |
| | | this.products = this.productList |
| | | this.products.forEach(item=>{ |
| | | item.staffName = staffName |
| | | item.outNum=1 |
| | | }) |
| | | }else{ |
| | | this.products = [] |
| | | } |
| | | } |
| | | }, |
| | | handleClose(){ |
| | | this.$emit('update:currshowlist', false) |
| | | this.$nextTick(()=>{ |
| | | this.$refs.productOutPersonList.clearSelection() |
| | | }) |
| | | }, |
| | | isNumber(value) { |
| | | var reg = /^[0-9]+(.[0-9]{1,4})?$/ |
| | | if ( |
| | |
| | | // 再去与products(此为页面的实时数据,用户有改动即更新)对比,将其中存在的相同人员的生产数量和生产批次同步过来,若products中生产数量或生产批次不存在值,则不进行同步,沿用原来的。 |
| | | // 最后,将组装好的选中人员信息,更新到products(按照班次进行),注意更新之后选中人员信息在products位置顺序 |
| | | this.personSelection = val |
| | | if(this.currshowlist){ |
| | | this.initProductList() |
| | | } |
| | | }, |
| | | // 根据选中的人员,生成人员产出信息,并且放在右边列表的最前面 |
| | | addProductOutForPerson() { |
| | |
| | | newProduct.partNo = this.parentInfo.partNo |
| | | newProduct.partName = this.parentInfo.partName |
| | | newProduct.outBatchNo = oriOutBatchNo |
| | | newProduct.productQty = 0 |
| | | newProduct.productQty = 1 |
| | | newProduct.outNum = 1 |
| | | newProduct.unit = this.parentInfo.unit |
| | | newProduct.productStaffs = productStaffs |
| | | newProduct.productStaffIds = productStaffIds |
| | |
| | | saveProductOuts2() { |
| | | this.clickDateArr.push(new Date().getTime()) |
| | | var productOutputList = [] |
| | | this.productList.forEach(a=>{ |
| | | this.products.forEach(a=>{ |
| | | productOutputList.push({ |
| | | partId: a.partId, |
| | | productQty: a.outNum, |
| | | outBatchNo: a.outBatchNo, |
| | | scrapQty: a.scrapQty, |
| | | remark: a.remark, |
| | | wdr: a.wdr, |
| | | wdr: a.wdr, |
| | | staffNo: a.staffNo, |
| | | staffName: a.staffName, |
| | | status: a.status, |
| | | dutyRecordId: a.dutyRecordId, |
| | | productStaffIds: a.productStaffIds, |
| | | productStaffs: a.productStaffs |
| | | productStaffs: a.productStaffs, |
| | | sortNo: a.sortNo |
| | | }) |
| | | }) |
| | | var productMains = { |
| | |
| | | // this.saveDisabled = false |
| | | // }) |
| | | // .catch((error) => { |
| | | // console.log('失败' + new Date().getTime()) |
| | | // this.saveDisabled = false |
| | | // }) |
| | | } else { |
| | |
| | | // this.saveDisabled = false |
| | | // }) |
| | | // .catch((error) => { |
| | | // console.log('失败' + new Date().getTime()) |
| | | // this.saveDisabled = false |
| | | // }) |
| | | }) |
| | |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.log('失败' + new Date().getTime()) |
| | | this.saveDisabled = false |
| | | }) |
| | | } else { |
| | |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.log('失败' + new Date().getTime()) |
| | | this.saveDisabled = false |
| | | }) |
| | | } |
| | |
| | | spinner: 'el-icon-loading', |
| | | background: 'rgba(0, 0, 0, 0.7)' |
| | | }) |
| | | // console.log('==========') |
| | | // console.log(nowListIndex) |
| | | // console.log(oriList[nowListIndex]) |
| | | const list = [] |
| | | list.push(oriList[nowListIndex]) |
| | | // 将数据的盘数 分成段后 更新此次盘数 |
| | |
| | | } |
| | | } |
| | | |
| | | // console.log(idx) |
| | | // console.log(submitCount) |
| | | // console.log(list) |
| | | // console.log(listDisNumber) |
| | | // |
| | | // setTimeout(() => { |
| | | // loading.close() |
| | |
| | | if (data.code == 0) { |
| | | // 返回报工主表id,用于刷新页面 |
| | | var productMainId = data.data |
| | | // console.log(idx) |
| | | // console.log(submitCount) |
| | | // console.log(listDisNumber) |
| | | loading.close() |
| | | // 已完成数据 消息记录 |
| | | this.messageMap['' + nowListIndex] = |
| | |
| | | } else { |
| | | // 批量提交完成,刷新报工页面数据 |
| | | this.$emit('refreshProductOutputList', productMainId) |
| | | console.log(this.messageMap) |
| | | this.$message.success('新增成功') |
| | | this.innerVisible = false |
| | | } |
| | |
| | | }) |
| | | .catch((error) => { |
| | | loading.close() |
| | | console.log('失败' + new Date().getTime()) |
| | | this.saveDisabled = false |
| | | this.showError() |
| | | }) |
| | |
| | | // this.saveDisabled = false |
| | | // }) |
| | | // .catch((error) => { |
| | | // console.log('失败' + new Date().getTime()) |
| | | // this.saveDisabled = false |
| | | // }) |
| | | } else { |
| | |
| | | // this.saveDisabled = false |
| | | // }) |
| | | // .catch((error) => { |
| | | // console.log('失败' + new Date().getTime()) |
| | | // this.saveDisabled = false |
| | | // }) |
| | | }) |
| | |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.log('失败' + new Date().getTime()) |
| | | this.saveDisabled = false |
| | | }) |
| | | } |
| | |
| | | this.products.push(this.productList[i]) |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$refs.productOutPersonList.clearSelection() |
| | | this.$refs.productOutPersonList.toggleAllSelection() |
| | | }) |
| | | } else { |
| | | for (let i = 0; i < this.productList.length; i++) { |
| | | this.products.push(this.productList[i]) |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$refs.productOutPersonList.clearSelection() |
| | | this.$refs.productOutPersonList.toggleAllSelection() |
| | | }) |
| | | } |
| | | } |