| | |
| | | |
| | | let arr = [ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '60'}, |
| | | {field: 'select',type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | {field: 'inventoryOrganization', width:'150', title: '库存组织', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged }, |
| | | {field: 'materialCode', width: '150',title: '物料编码', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'producer', width: '100',title: '产地', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'projectNo', width: '100',title: '工程号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'inventoryQuantity',width: '100', title: '库存数量', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'availableQuantity', width: '100',title: '可用库存', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'outboundQuantity', width:'150', title: '出库数量', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | {field: 'singlePieceArea', width: '100',title: '单片面积', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'dateOfManufacture',width: '100', title: '生产日期', sortable: true}, |
| | | {field: 'inventoryArea',width: '100', title: '库存区域', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'remarks',width: '80', title: '备注', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | {field: 'select',type: 'checkbox',fixed:"left", title: t('basicData.check'), width: '80' }, |
| | | { type: 'seq',fixed:"left", title: t('basicData.Number'), width: '80' }, |
| | | {field: 'inventoryOrganization', width:'150', title: t('mainIngredientStock.inventoryOrganization'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged }, |
| | | {field: 'materialCode', width: '150',title: t('mainIngredient.materialCode'), sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'producer', width: '100',title: t('mainIngredientStock.producer'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'projectNo', width: '100',title: t('mainIngredientStock.projectNo'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'inventoryQuantity',width: '100', title: t('productStock.inventoryQuantity'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'availableQuantity', width: '100',title: t('productStock.availableQuantity'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'outboundQuantity', width:'150', title: t('mainIngredientStock.outboundQuantity'), sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | {field: 'singlePieceArea', width: '100',title: t('productStock.singlePieceArea'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'dateOfManufacture',width: '100', title: t('mainIngredientStock.dateOfManufacture'), sortable: true}, |
| | | {field: 'inventoryArea',width: '100', title: t('productStock.inventoryArea'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'remarks',width: '80', title: t('basicData.remarks'), sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | ] |
| | | |
| | | |
| | | //页面第一次加载 |
| | | request.get(`/BasicWarehouse/BasicWarehouseTypes/材料出库类型`).then((res) => { |
| | | request.get(`/BasicWarehouse/BasicWarehouseTypes/`+t('mainIngredientStock.materialOutboundType')).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | |
| | |
| | | |
| | | //列查询 |
| | | const getWork = () => { |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/原片|辅料`).then((res) => { |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/`+t('mainIngredient.originalFilm')+'|'+t('mainIngredient.accessories')).then((res) => { |
| | | if(res.code==200){ |
| | | gridOptions.columns=[] |
| | | BasicData.value = res.data |
| | |
| | | const type = route.query.type |
| | | if (typeof id !== 'undefined' && id !== null && id !== '' && id !== '\n' && id !== '\r'){ |
| | | |
| | | if(type==='库存'){ |
| | | if(type===t('mainIngredientStock.inventory')){ |
| | | filterData.value.stockId=id |
| | | number.value=id |
| | | request.post("/MaterialInventory/getSelectMaterialInventory/1/100",filterData.value).then((res) => { |
| | |
| | | //表头数据校验 |
| | | const outboundType = titleUploadData.value.outboundType |
| | | if(outboundType === null || outboundType === undefined || outboundType === ''){ |
| | | ElMessage.error("请选择出库类型") |
| | | ElMessage.error(t('mainIngredientStock.pleaseOutboundType')) |
| | | return |
| | | } |
| | | const materialRequisitionPersonnel = titleUploadData.value.materialRequisitionPersonnel |
| | | if(materialRequisitionPersonnel === null || materialRequisitionPersonnel === undefined || materialRequisitionPersonnel === ''){ |
| | | ElMessage.error("请输入领料员") |
| | | ElMessage.error(t('mainIngredientStock.pleaseMaterialRequisitionPersonnel')) |
| | | return |
| | | } |
| | | const materialRequisitionTeam = titleUploadData.value.materialRequisitionTeam |
| | | if(materialRequisitionTeam === null || materialRequisitionTeam === undefined || materialRequisitionTeam === ''){ |
| | | ElMessage.error("请输入领料班组") |
| | | ElMessage.error(t('mainIngredientStock.pleaseMaterialRequisitionTeam')) |
| | | return |
| | | } |
| | | const orderId = titleUploadData.value.orderId |
| | | if(orderId === null || orderId === undefined || orderId === ''){ |
| | | ElMessage.error("请输入销售单号") |
| | | ElMessage.error(t('mainIngredientStock.pleaseOrderId')) |
| | | return |
| | | } |
| | | |
| | |
| | | }) |
| | | request.post("/MaterialInventory/saveMaterialOutbound", flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success('保存成功') |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | |
| | | ElMessage.success(t('basicData.msg.ReviewSuccess')) |
| | | router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning("审核失败") |
| | | ElMessage.warning(t('basicData.msg.reviewFail')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | | router.push("/login") |
| | | }) |
| | | break |
| | |
| | | ElMessage.success(t('basicData.msg.cancelReviewSuccess')) |
| | | router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning("反审失败") |
| | | ElMessage.warning(t('basicData.msg.cancelReviewFail')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | | router.push("/login") |
| | | }) |
| | | break |
| | |
| | | outboundQuantity: [{ |
| | | validator (e) { |
| | | if (e.row.outboundQuantity > e.row.availableQuantity) { |
| | | return new Error("出库数量不能大于可用数量") |
| | | return new Error(t('mainIngredientStock.theOutboundQuantityCannotBeGreaterThanTheAvailableQuantity')) |
| | | }else if (e.row.outboundQuantity ==="") { |
| | | return new Error("出库数量不能为空或者是等于0") |
| | | return new Error(t('mainIngredientStock.theOutboundQuantityCannotBeEmptyOrEqualTo0')) |
| | | } |
| | | const regex = /^[1-9]\d*$/g |
| | | if ( !regex.test(e.row.outboundQuantity) ) { |
| | |
| | | <div class="main-div"> |
| | | <div class="order-primary" style="background-color: white"> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>领料日期:</el-text></el-col> |
| | | <el-col :span="2"><el-text>{{$t('mainIngredientStock.materialRequisitionDate')}}:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.materialRequisitionDate" :readonly="true" ></el-input></el-col> |
| | | <el-col :span="2"><el-text>领料员:</el-text></el-col> |
| | | <el-col :span="2"><el-text>{{$t('mainIngredientStock.materialRequisitionPersonnel')}}:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.materialRequisitionPersonnel" /></el-col> |
| | | <el-col :span="2"><el-text>领料班组:</el-text></el-col> |
| | | <el-col :span="2"><el-text>{{$t('mainIngredientStock.materialRequisitionTeam')}}:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.materialRequisitionTeam" /></el-col> |
| | | |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>出库类型:</el-text></el-col> |
| | | <el-col :span="2"><el-text>{{$t('mainIngredientStock.outboundType')}}:</el-text></el-col> |
| | | <el-col :span="3"> |
| | | <el-select v-model="titleUploadData.outboundType" clearable placeholder="" > |
| | | <el-option |
| | |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>销售单号:</el-text></el-col> |
| | | <el-col :span="2"><el-text>{{$t('order.orderId')}}:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.orderId" /></el-col> |
| | | <el-col :span="2"><el-text>仓管员:</el-text></el-col> |
| | | <el-col :span="2"><el-text>{{$t('mainIngredientStock.warehouseManager')}}:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.warehouseManager" :readonly="true" /></el-col> |
| | | |
| | | </el-row> |
| | |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">{{$t('basicData.delete')}}</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |