| | |
| | | pleaseNumber12:'本工序报工数:', |
| | | pleaseNumber13:'下工序报工数:', |
| | | pleaseNumber14:'本工序修改数不能小于下工序报工数', |
| | | pleaseNumber15:'已入库数量不能大于已完工数量', |
| | | }, |
| | | productStock:{ |
| | | page:{ |
| | |
| | | pleaseNumber12:'本工序报工数:', |
| | | pleaseNumber13:'下工序报工数:', |
| | | pleaseNumber14:'本工序修改数不能小于下工序报工数', |
| | | |
| | | pleaseNumber15:'已入库数量不能大于已完工数量', |
| | | }, |
| | | productStock:{ |
| | | page:{ |
| | |
| | | pleaseNumber12:'本工序报工数:', |
| | | pleaseNumber13:'下工序报工数:', |
| | | pleaseNumber14:'本工序修改数不能小于下工序报工数', |
| | | pleaseNumber15:'已入库数量不能大于已完工数量', |
| | | }, |
| | | productStock:{ |
| | | page:{ |
| | |
| | | pleaseNumber12:'本工序报工数:', |
| | | pleaseNumber13:'下工序报工数:', |
| | | pleaseNumber14:'本工序修改数不能小于下工序报工数', |
| | | pleaseNumber15:'已入库数量不能大于已完工数量', |
| | | }, |
| | | productStock:{ |
| | | page:{ |
| | |
| | | pleaseNumber12:'本工序报工数:', |
| | | pleaseNumber13:'下工序报工数:', |
| | | pleaseNumber14:'本工序修改数不能小于下工序报工数', |
| | | pleaseNumber15:'已入库数量不能大于已完工数量', |
| | | }, |
| | | productStock:{ |
| | | page:{ |
| | |
| | | }else if(row.quantity_card<row.completedQuantity){ |
| | | return new Error(t('reportingWorks.pleaseNumber10')) |
| | | } |
| | | const nextProcess = titleUploadData.value.nextProcess//下工序 |
| | | |
| | | const completedSum = Number(row.thisQuantitySum) //总完工数量 |
| | | const nextQuantitySum = Number(row.nextQuantitySum) //总下工序完工数量 |
| | | let nextQuantitySum = '' |
| | | if (nextProcess!=''){ |
| | | nextQuantitySum = Number(row.nextQuantitySum) //总下工序完工数量 |
| | | }else { |
| | | nextQuantitySum = Number(row.received_quantity) //总下工序完工数量 |
| | | } |
| | | const totalQuantity = Number(row.quantity) //可完工数量 |
| | | const val = Number(cellValue) //输入值 |
| | | |
| | |
| | | `) |
| | | } |
| | | if(titleUploadData.value.reportingWorkId!=null){ |
| | | if(row.completedQuantityComputed>=row.minQuantity ){ |
| | | if((val<(row.completedQuantityComputed-row.minQuantity || val>=row.completedQuantityComputed))){ |
| | | return new Error(`${row.completedQuantityComputed-row.minQuantity} |
| | | if (nextProcess!=''){//非最后一道工序 |
| | | if(row.completedQuantityComputed>=row.minQuantity ){ |
| | | if((val<(row.completedQuantityComputed-row.minQuantity || val>=row.completedQuantityComputed))){ |
| | | return new Error(`${row.completedQuantityComputed-row.minQuantity} |
| | | <=val<= |
| | | ${row.completedQuantityComputed}`) |
| | | } |
| | | }else{ |
| | | if((val>row.completedQuantityComputed)){ |
| | | return new Error(`val |
| | | } |
| | | }else{ |
| | | if((val>row.completedQuantityComputed)){ |
| | | return new Error(`val |
| | | <= |
| | | ${row.completedQuantityComputed}`) |
| | | } |
| | | } |
| | | }else {//最后一道工序 |
| | | if (val<row.completedQuantityComputed){ |
| | | //库存数量、已入库数量 |
| | | if (val>(row.inventory_quantity-row.received_quantity)){ |
| | | return new Error(`val |
| | | <= |
| | | ${row.inventory_quantity-row.received_quantity}`) |
| | | }else { |
| | | if (val < (row.inventory_quantity-row.received_quantity)){ |
| | | //完工总数、本次完工数、已入库数量 |
| | | if (completedSum-row.completedQuantityComputed <row.received_quantity){ |
| | | return new Error(`${t('reportingWorks.pleaseNumber15')}`) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | width: '', |
| | | height: '', |
| | | quantity: '', |
| | | shape: '', |
| | | bendRadius: '', |
| | | edgingType: '' |
| | | }) |
| | | //与表格内的值对应 |
| | | const fieldMap = { |
| | |
| | | width: 'width', |
| | | height: 'height', |
| | | quantity: 'quantity', |
| | | shape: 'shape', |
| | | bendRadius: 'bendRadius', |
| | | edgingType: 'edgingType' |
| | | } |
| | | |
| | | function ensureCurrentRowSync() { |
| | |
| | | |
| | | <!-- </el-row>--> |
| | | </div> |
| | | <div class="ipDiv" style="background:#fff;height:40px;margin-top:10px"> |
| | | <div class="order-primary" style="background:#fff;height:40px;margin-top:10px"> |
| | | <el-row :gutter="6"> |
| | | <el-col :span="2">楼层编号</el-col> |
| | | <el-col :span="2"><el-input style="width: 100%" v-model="form.floorNo" @input="onFormInput('floorNo')" /></el-col> |
| | | <el-col :span="2">{{$t('order.buildingNumber')}}:</el-col> |
| | | <el-col :span="1"><el-input v-model="form.floorNo" @input="onFormInput('floorNo')" /></el-col> |
| | | |
| | | <el-col :span="1">单价</el-col> |
| | | <el-col :span="1"><el-input style="width: 100%" v-model="form.price" @input="onFormInput('price')" /></el-col> |
| | | <el-col :span="1">{{$t('order.price')}}:</el-col> |
| | | <el-col :span="1"><el-input v-model="form.price" @input="onFormInput('price')" /></el-col> |
| | | |
| | | <el-col :span="1">宽</el-col> |
| | | <el-col :span="1"><el-input style="width: 100%" v-model="form.width" @input="onFormInput('width')" /></el-col> |
| | | <el-col :span="1">{{$t('order.width')}}:</el-col> |
| | | <el-col :span="1"><el-input v-model="form.width" @input="onFormInput('width')" /></el-col> |
| | | |
| | | <el-col :span="1">高</el-col> |
| | | <el-col :span="1"><el-input style="width: 100%" v-model="form.height" @input="onFormInput('height')" /></el-col> |
| | | <el-col :span="1">{{$t('order.height')}}:</el-col> |
| | | <el-col :span="1"><el-input v-model="form.height" @input="onFormInput('height')" /></el-col> |
| | | |
| | | <el-col :span="1">数量</el-col> |
| | | <el-col :span="1"><el-input style="width: 100%" v-model="form.quantity" @input="onFormInput('quantity')" /></el-col> |
| | | <el-col :span="1">{{$t('order.quantity')}}:</el-col> |
| | | <el-col :span="1"><el-input v-model="form.quantity" @input="onFormInput('quantity')" /></el-col> |
| | | |
| | | <el-col :span="1">形状</el-col> |
| | | <el-col :span="1"><el-input style="width: 100%" v-model="form.shape" @input="onFormInput('shape')" /></el-col> |
| | | <el-col :span="2">{{$t('order.bendRadius')}}:</el-col> |
| | | <el-col :span="1"><el-input v-model="form.bendRadius" @input="onFormInput('bendRadius')" /></el-col> |
| | | |
| | | <el-col :span="2">弯钢半径</el-col> |
| | | <el-col :span="1"><el-input style="width: 100%" v-model="form.bendRadius" @input="onFormInput('bendRadius')" /></el-col> |
| | | |
| | | <el-col :span="2">磨边类型</el-col> |
| | | <el-col :span="1"><el-input style="width: 100%" v-model="form.edgingType" @input="onFormInput('edgingType')" /></el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="order-detail"> |
| | |
| | | log.setFunction("deleteWork报工删除"); |
| | | log.setOperatorId(userId); |
| | | log.setOperator(userName); |
| | | if(reportingWork.getReviewedState()==0){ |
| | | //查询当前报工编号完工次破数量的数据 |
| | | List<Map<String, Object>> workDateList = reportingWorkMapper.reportingWorkDate(reportingWorkId); |
| | | for (Map<String, Object> item : workDateList) { |
| | | //更新报工流程表数据 |
| | | reportingWorkMapper.updateWorkProcess(processId, item.get("order_number"), item.get("technology_number"), item.get("completed_quantity"), item.get("breakage_quantity"), thisProcess); |
| | | } |
| | | //删除报工,将审核状态改为-1 |
| | | reportingWorkMapper.deleteWork(reportingWorkId); |
| | | logService.saveLog(log); |
| | | return true; |
| | | } |
| | | |
| | | |
| | | //判断是否是入库工序 |
| | | if (lastProcess.equals(thisProcess)) {//是入库工序 |
| | |
| | | } |
| | | |
| | | } else {//不是入库工序 |
| | | if(reportingWork.getReviewedState()==0){ |
| | | //查询当前报工编号完工次破数量的数据 |
| | | List<Map<String, Object>> workDateList = reportingWorkMapper.reportingWorkDate(reportingWorkId); |
| | | for (Map<String, Object> item : workDateList) { |
| | | //更新报工流程表数据 |
| | | reportingWorkMapper.updateWorkProcess(processId, item.get("order_number"), item.get("technology_number"), item.get("completed_quantity"), item.get("breakage_quantity"), thisProcess); |
| | | } |
| | | //删除报工,将审核状态改为-1 |
| | | reportingWorkMapper.deleteWork(reportingWorkId); |
| | | logService.saveLog(log); |
| | | return true; |
| | | } |
| | | |
| | | if (count == 0) { |
| | | //查询当前报工编号完工次破数量的数据 |
| | | List<Map<String, Object>> workDateList = reportingWorkMapper.reportingWorkDate(reportingWorkId); |
| | |
| | | ) as minQuantity -- 修改最小数 |
| | | </if> |
| | | <if test="nextProcess == null or nextProcess == ''"> -- 最后一道工序 |
| | | # c.received_quantity, -- 已入库数量 |
| | | # c.inventory_quantity, -- 库存数量 |
| | | c.received_quantity, -- 已入库数量 |
| | | c.inventory_quantity, -- 库存数量 |
| | | if(ifnull(inventory_quantity,0) |
| | | -ifnull(c.received_quantity,0) |
| | | >= a.completed_quantity,0, |
| | | (a.completed_quantity-(ifnull(c.inventory_quantity,0) |
| | | -ifnull(c.received_quantity,0))) |
| | | >= a.completed_quantity,a.completed_quantity, |
| | | (ifnull(c.inventory_quantity,0) |
| | | -ifnull(c.received_quantity,0)) |
| | | ) |
| | | as minQuantity -- 修改最小数 |
| | | </if> |