| | |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import { useI18n } from 'vue-i18n' |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | |
| | | const userStore = useUserInfoStore() |
| | | const username = userStore.user.userName |
| | |
| | | if (selectRecords.length > 0) { |
| | | const errMap = await $grid.validate(selectRecords) |
| | | if (errMap) { |
| | | ElMessage.warning("数据校验失败") |
| | | ElMessage.warning(t('productStock.dataVerificationFailed')) |
| | | return |
| | | } |
| | | } else { |
| | | ElMessage.warning("未选中数据") |
| | | ElMessage.warning(t('productStock.unselectedData')) |
| | | return |
| | | } |
| | | |
| | | const operatetype = operateType._rawValue |
| | | if(operatetype === null || operatetype === undefined || operatetype === ''){ |
| | | ElMessage.warning("请选择领出类型") |
| | | ElMessage.warning(t('productStock.pleaseSelectTheTypeOfWithdrawal')) |
| | | return |
| | | } |
| | | |
| | |
| | | }) |
| | | request.post("/FinishedGoodsInventory/updateFinishedGoodsInventoryTakeOut",flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success("领出成功") |
| | | ElMessage.success(t('productStock.successfullyRetrieved')) |
| | | router.push({path:'/main/productStock/FinishedGoodsIssue',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | |
| | | body: { |
| | | options: [ |
| | | [ |
| | | { code: 'copyChecked', name: '选中相同', prefixIcon: 'vxe-icon-copy', visible: true, disabled: false }, |
| | | { code: 'copyChecked', name: t('basicData.selectSame'), prefixIcon: 'vxe-icon-copy', visible: true, disabled: false }, |
| | | ] |
| | | ] |
| | | } |
| | |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '50'}, |
| | | { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | {field: 'finishedGoodsInventory.orderId', width: '150',title: '销售单号',showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.project', width: '150',title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'productId',width: '150', title: '产品编号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'productName', width: '150',title: '产品名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'finishedGoodsInventory.quantityAvailable',width: '140', title: '数量', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'quantity',width: '140', title: '领出数量',editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | {field: 'order.customerId', width: '100',title: '客户编号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.customerName',width: '150', title: '客户名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'width', width: '100',title: '宽度', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'height',width: '100', title: '高度', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'finishedGoodsInventory.actualSignalArea',width: '140', title: '单片面积', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'finishedGoodsInventory.area',width: '150', title: '总面积', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'finishedGoodsInventory.storageRegion',width: '100', title: '库存区域', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | { type: 'checkbox',fixed:"left", title: t('basicData.check'), width: '80' }, |
| | | { type: 'seq',fixed:"left", title: t('basicData.Number'), width: '80' }, |
| | | {field: 'finishedGoodsInventory.orderId', width: '150',title: t('order.orderId'),showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.project', width: '150',title: t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'productId',width: '150', title: t('order.productId'), filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'productName', width: '150',title: t('order.productId'), filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'finishedGoodsInventory.quantityAvailable',width: '140', title: t('order.quantity'), filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'quantity',width: '140', title: t('productStock.receivedQuantity'),editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | {field: 'order.customerId', width: '100',title: t('customer.customerNumber'), filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.customerName',width: '150', title: t('customer.customerName'), filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'width', width: '100',title: t('order.width'), filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'height',width: '100', title: t('order.height'), filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'finishedGoodsInventory.actualSignalArea',width: '140', title: t('productStock.singlePieceArea'), filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'finishedGoodsInventory.area',width: '150', title: t('productStock.totalArea'), filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'finishedGoodsInventory.storageRegion',width: '100', title: t('productStock.inventoryArea'), filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [{ |
| | | 'name': '确认领出', |
| | | 'name': t('productStock.confirmWithdrawal'), |
| | | 'code': 'verify', |
| | | status: 'primary' |
| | | },{ |
| | | 'name': '领出记录','code':'out', |
| | | 'name': t('productStock.pickingOutRecords'),'code':'out', |
| | | }], |
| | | /*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) |
| | |
| | | quantity: [{ |
| | | validator (e) { |
| | | if (e.row.quantity > e.row.finishedGoodsInventory.quantityAvailable) { |
| | | return new Error('领出数量不能大于订单数') |
| | | return new Error(t('productStock.theClaimedQuantityCannotBeGreaterThanTheOrderQuantity')) |
| | | }else if (e.row.quantity ==="") { |
| | | return new Error('领出数量不能为空或者是0') |
| | | return new Error(t('productStock.claimedQuantityCannotBeEmptyOr0')) |
| | | } |
| | | const regex = /^[1-9]\d*$/g |
| | | if ( !regex.test(e.row.quantity) ) { |
| | | return new Error('请输入正整数') |
| | | return new Error(t('productStock.pleaseEnterAPositiveInteger')) |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <vxe-select v-model="operateType" placeholder="请选择领出类型"> |
| | | <vxe-select style="width: 260px" v-model="operateType" :placeholder="$t('productStock.pleaseSelectTheTypeOfWithdrawal')"> |
| | | <vxe-option v-for="(item,index) in takeOut" :key="index" :value="item.operateTypeName" :label="item.operateTypeName" ></vxe-option> |
| | | </vxe-select> |
| | | |
| | | <vxe-input v-model="remarks" placeholder="备注"></vxe-input> |
| | | <vxe-input v-model="remarks" :placeholder="$t('productStock.pleaseEnterANote')"></vxe-input> |
| | | |
| | | <vxe-grid |
| | | max-height="100%" |
| | |
| | | </ul> |
| | | </template> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">订单调拨</el-button> |
| | | <el-button @click="getTableRow(row,'out')" link type="primary" size="small">成品领出</el-button> |
| | | <el-button @click="getTableRow(row,'back')" link type="primary" size="small">成品领出</el-button> |
| | | </template> |
| | | |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |