| | |
| | | const values = ref('') |
| | | const selectOptions = [ |
| | | { |
| | | value: '库存', |
| | | label: '库存' |
| | | value: t('mainIngredientStock.inventory'), |
| | | label: t('mainIngredientStock.inventory') |
| | | }, |
| | | { |
| | | value: '工程', |
| | | label: '工程', |
| | | value: t('mainIngredientStock.engineering'), |
| | | label: t('mainIngredientStock.engineering'), |
| | | } |
| | | ] |
| | | |
| | |
| | | |
| | | let arr = [ |
| | | |
| | | { 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: 'id',width: '100', title: '库存编号', sortable: true,showOverflow:"ellipsis",filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'projectNo',width: '100', title: '工程号', sortable: true,showOverflow:"ellipsis",filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | { 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: 'id',width: '100', title: t('mainIngredientStock.id'), sortable: true,showOverflow:"ellipsis",filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'projectNo',width: '100', title: t('mainIngredientStock.projectNo'), sortable: true,showOverflow:"ellipsis",filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | //{field: 'safetyStock', 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: 'planQuantity', width: '100',title: '计划数量', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'totalArea',width: '100', title: '总面积', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'dateOfManufacture',width: '100', title: '生产日期', sortable: true}, |
| | | {field: 'qualityGuaranteePeriod',width: '100', title: '保质期', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'inventoryArea',width: '100', title: '库存区域', 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: 'planQuantity', width: '100',title: t('mainIngredientStock.planQuantity'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'totalArea',width: '100', title: t('order.grossArea'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'dateOfManufacture',width: '100', title: t('mainIngredientStock.dateOfManufacture'), sortable: true}, |
| | | {field: 'qualityGuaranteePeriod',width: '100', title: t('mainIngredientStock.qualityGuaranteePeriod'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'inventoryArea',width: '100', title: t('productStock.inventoryArea'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | //{field: 'deadStock',width: '100', title: '积压库存', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'createTime',width: '100', title: '入库时间', sortable: true}, |
| | | {field: 'remarks',width: '80', title: '备注', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'createTime',width: '100', title: t('productStock.storageTime'), sortable: true}, |
| | | {field: 'remarks',width: '80', title: t('basicData.remarks'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | ] |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/原片|辅料`).then((res) => { |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/`+t('mainIngredient.originalFilm')+'|'+t('mainIngredient.accessories')).then((res) => { |
| | | if(res.code==200){ |
| | | gridOptions.columns.splice(0,gridOptions.columns.length) |
| | | BasicData.value = res.data |
| | |
| | | gridOptions.columns.push(aa) |
| | | |
| | | } |
| | | values.value='库存' |
| | | values.value=t('mainIngredientStock.inventory') |
| | | getInventoryWorks() |
| | | |
| | | }else{ |
| | |
| | | } |
| | | |
| | | const selectInventoryWork = () => { |
| | | if(values.value==='库存'){ |
| | | if(values.value===t('mainIngredientStock.inventory')){ |
| | | getInventoryWorks() |
| | | }else{ |
| | | getInventoryEngineeringWork() |
| | |
| | | |
| | | |
| | | const selectOrderList = ()=>{ |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/原片|辅料`).then((res) => { |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/`+t('mainIngredient.originalFilm')+'|'+t('mainIngredient.accessories')).then((res) => { |
| | | if(res.code==200){ |
| | | gridOptions.columns.splice(0,gridOptions.columns.length) |
| | | BasicData.value = res.data |
| | |
| | | gridOptions.columns.push(aa) |
| | | |
| | | } |
| | | if(values.value==='库存'){ |
| | | if(values.value===t('mainIngredientStock.inventory')){ |
| | | getInventoryWorkPaging() |
| | | }else{ |
| | | getInventoryEngineeringWork() |
| | |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {'code': 'out', 'name': '物料出库',status: 'primary'}, |
| | | {'code': 'add', 'name': '物料新增',status: 'primary'}, |
| | | {'code': 'out', 'name': t('mainIngredientStock.materialOutbound'),status: 'primary'}, |
| | | {'code': 'add', 'name': t('mainIngredient.materialAddition'),status: 'primary'}, |
| | | ], |
| | | /*import: false, |
| | | export: true, |
| | |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return t('basicData.total') |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | |
| | | } |
| | | let id = "" |
| | | const array = []; |
| | | if (values.value==='库存'){ |
| | | if (values.value===t('mainIngredientStock.inventory')){ |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | array.push(selectRecords[i].id) |
| | | if (i + 1 === selectRecords.length) { |
| | |
| | | dialogTableVisible.value=true |
| | | select() |
| | | //第一次加载默认 |
| | | value.value='原片' |
| | | filterData.value.type='原片' |
| | | value.value=t('mainIngredient.originalFilm') |
| | | filterData.value.type=t('mainIngredient.originalFilm') |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/${value.value}`).then((res) => { |
| | | if(res.code==200){ |
| | | gridOption.columns.splice(0,gridOption.columns.length) |
| | |
| | | |
| | | |
| | | let arrs = [ |
| | | { type: 'radio',fixed:"left", title: '选择', width: '80' }, |
| | | { type: 'seq',fixed:'left', title: '自序', width: '80' }, |
| | | {field: 'id', width: '150',title: '物料编码', sortable: true,showOverflow:'ellipsis' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged} |
| | | { type: 'radio',fixed:"left", title: t('basicData.check'), width: '80' }, |
| | | { type: 'seq',fixed:'left', title: t('basicData.Number'), width: '80' }, |
| | | {field: 'id', width: '150',title: t('mainIngredient.materialCode'), sortable: true,showOverflow:'ellipsis' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged} |
| | | ] |
| | | |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | | value: '原片', |
| | | label: '原片' |
| | | value: t('mainIngredient.originalFilm'), |
| | | label: t('mainIngredient.originalFilm') |
| | | }, |
| | | { |
| | | value: '辅料', |
| | | label: '辅料', |
| | | value: t('mainIngredient.accessories'), |
| | | label: t('mainIngredient.accessories'), |
| | | } |
| | | ] |
| | | |
| | |
| | | }) |
| | | |
| | | const select=() =>{ |
| | | request.get(`/BasicWarehouse/BasicWarehouseTypes/库存组织`).then((res) => { |
| | | request.get(`/BasicWarehouse/BasicWarehouseTypes/`+t('mainIngredientStock.inventoryOrganization')).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | titleSelectJson.value=deepClone(res.data) |
| | |
| | | //表头数据校验 |
| | | const outboundType = titleUploadData.value.inventoryOrganization |
| | | if(outboundType === null || outboundType === undefined || outboundType === ''){ |
| | | ElMessage.error("请选择库存组织") |
| | | ElMessage.error(t('mainIngredientStock.pleaseSelectInventoryOrganization')) |
| | | return |
| | | } |
| | | const materialRequisitionPersonnel = titleUploadData.value.inventoryQuantity |
| | | if(materialRequisitionPersonnel === null || materialRequisitionPersonnel === undefined || materialRequisitionPersonnel === ''){ |
| | | ElMessage.error("请输入数量") |
| | | ElMessage.error(t('mainIngredientStock.pleaseEnterTheQuantity')) |
| | | return |
| | | } |
| | | const dateOfManufacture= titleUploadData.value.dateOfManufacture |
| | |
| | | |
| | | request.post("/MaterialInventory/saveMaterialInventory", flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success('保存成功') |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | router.push({path: '/main/ingredientsStock/SelectIngredientsStock', query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | |
| | | <el-date-picker |
| | | v-model="selectDate" |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | |
| | | /> |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">查询</el-button> |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">{{$t('basicData.search')}}</el-button> |
| | | <div> |
| | | <el-row> |
| | | <el-select v-model="values" placeholder="请选择类别" @change="selectInventoryWork"> |
| | | <el-select v-model="values" :placeholder="$t('mainIngredient.pleaseSelectACategory')" @change="selectInventoryWork"> |
| | | <el-option |
| | | v-for="item in selectOptions" |
| | | :key="item.value" |
| | |
| | | <!--左边固定显示的插槽--> |
| | | <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> |
| | | 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 }"> |
| | |
| | | |
| | | </vxe-grid> |
| | | |
| | | <el-dialog v-model="dialogTableVisible" title="物料新增" style="width: 70%;height:75% "> |
| | | <el-dialog v-model="dialogTableVisible" :title="$t('mainIngredient.materialAddition')" style="width: 70%;height:75% "> |
| | | <div class="order-primary" > |
| | | <el-row> |
| | | <el-col :span="2"><el-text>生产日期:</el-text></el-col> |
| | | <el-col :span="2"><el-text>{{$t('mainIngredientStock.dateOfManufacture')}}:</el-text></el-col> |
| | | <el-col :span="4"> |
| | | <el-date-picker |
| | | v-model="titleUploadData.dateOfManufacture" |
| | | type="date" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | placeholder="请选择生产日期"/> |
| | | :placeholder="$t('mainIngredientStock.pleaseDateOfManufacture')"/> |
| | | </el-col> |
| | | |
| | | <el-col :span="2"><el-text>保质期:</el-text></el-col> |
| | | <el-col :span="2"><el-text>{{$t('mainIngredientStock.qualityGuaranteePeriod')}}:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.qualityGuaranteePeriod" /></el-col> |
| | | <el-col :span="1"><el-text>产地:</el-text></el-col> |
| | | <el-col :span="1"><el-text>{{$t('mainIngredientStock.producer')}}:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.producer" /></el-col> |
| | | |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>库存组织:</el-text></el-col> |
| | | <el-col :span="2"><el-text>{{$t('mainIngredientStock.inventoryOrganization')}}:</el-text></el-col> |
| | | <el-col :span="4"> |
| | | <el-select v-model="titleUploadData.inventoryOrganization" 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('productStock.inventoryArea')}}:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.inventoryArea" /></el-col> |
| | | <el-col :span="1"><el-text>数量:</el-text></el-col> |
| | | <el-col :span="1"><el-text>{{$t('order.quantity')}}:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.inventoryQuantity" /></el-col> |
| | | <el-col :span="1"><el-text>备注:</el-text></el-col> |
| | | <el-col :span="1"><el-text>{{$t('basicData.remarks')}}:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.remarks" /></el-col> |
| | | |
| | | </el-row> |
| | | </div> |
| | | <div> |
| | | <el-row> |
| | | <el-select v-model="value" placeholder="请选择类别" @change="getStoreWork"> |
| | | <el-select v-model="value" :placeholder="$t('mainIngredientStock.pleaseSelectACategory')" @change="getStoreWork"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |