Browse Source

退料修改

master_hella_20240701
陈薪名 8 months ago
parent
commit
0d308ca27c
  1. 36
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  2. 124
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  3. 8
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  4. 122
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts

36
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue

@ -175,6 +175,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['uom'] = val[0]['uom']
row['inventoryStatus'] = val[0]['inventoryStatus']
row['qty'] = val[0]['qty']
// 000000
if (val[0]['batch'] !== '') {
row['batch'] = val[0]['batch']
} else {
row['batch'] = '000000'
}
// tableform
// TODO: tableFormColumns 10 20 20
ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => {
@ -186,6 +192,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else if(formField == 'workStationCode') {
row['workStationCode'] = val[0]['code']
row['fromLocationCode'] = val[0]['rawLocationCode']
} else if(formField == 'packUnit') {
row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty']
} else {
row[formField] = val[0][searchField]
}
@ -210,6 +219,12 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
setV['uom'] = val[0]['uom']
setV['inventoryStatus'] = val[0]['inventoryStatus']
setV['qty'] = val[0]['qty']
// 000000
if (val[0]['batch'] !== '') {
setV['batch'] = val[0]['batch']
} else {
setV['batch'] = '000000'
}
// tableform
ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'qty' && val[0]['qty'] > 0) {
@ -220,6 +235,9 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
} else if(formField == 'workStationCode') {
setV['workStationCode'] = val[0]['code']
setV['fromLocationCode'] = val[0]['rawLocationCode']
} else if(formField == 'packUnit') {
setV['packUnit'] = val[0]['packUnit']
setV['packQty'] = val[0]['packQty']
} else {
setV[formField] = val[0][searchField]
}
@ -381,7 +399,7 @@ const buttonTableClick = async (val, row) => {
// dialogVisible.value = true
formLabelRef.value.open('create', row)
detatableData.tableList.map((item) => {
item.batch = '000000'
// item.batch = '000000'
// 线
ItembasicApi.getItembasicPage({
pageSize: 10,
@ -498,7 +516,7 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
/** 详情操作——子表表单 */
const detailOpenForm = (type, row) => {
nextTick(()=>{
detailRef.value.formRef.formRef.formModel.batch = '000000'
// detailRef.value.formRef.formRef.formModel.batch = '000000'
})
}
@ -545,7 +563,7 @@ const tableData = ref([])
//
const handleAddTable = () => {
let tfk = JSON.parse(JSON.stringify(tableFormKeys))
tfk.batch = '000000'
// tfk.batch = '000000'
tableData.value.push(tfk)
}
//
@ -556,6 +574,17 @@ const handleDeleteTable = (item, index) => {
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
let isZC = true //
data.subList.forEach(item => {
if (item.qty % item.packQty !== 0) {
isZC = false
}
})
if(!isZC) {
formRef.value.formLoading = false
await message.confirm('含有不整箱情况,是否继续?')
formRef.value.formLoading = true
}
// 退 isOK
data.isOK = true
try {
@ -583,6 +612,7 @@ const submitForm = async (formType, data) => {
const submitFormLabel = async (formType, data) => {
try {
detatableData.tableList.forEach(async (item) => {
item.toLocationCode = item.fromLocationCode
await PackageApi.createPackageLabel(item).then(() => {
isCreateLabel.value = true
message.success('创建标签成功')

124
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts

@ -17,6 +17,9 @@ import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data'
import * as ItempackagingApi from '@/api/wms/itempackage'
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
import * as SupplieritemApi from '@/api/wms/supplieritem'
import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data'
@ -533,22 +536,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
}]
},
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料代码',
field: 'itemCode',
@ -658,6 +646,71 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
precision: 6
}
},
{
label: '包装规格',
field: 'packUnit',
sort: 'custom',
isSearch: true,
table: {
width: 120
},
tableForm:{
isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格', // 输入框占位文本
searchField: 'packUnit', // 查询弹窗赋值字段
searchTitle: '物料包装信息', // 查询弹窗标题
searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
searchPage: ItempackagingApi.getItempackagingPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'itemCode',
value: 'itemCode',
message: '请先选择物料代码!',
isMainValue: true
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格', // 输入框占位文本
searchField: 'packUnit', // 查询弹窗赋值字段
searchTitle: '物料包装信息', // 查询弹窗标题
searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
searchPage: ItempackagingApi.getItempackagingPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'itemCode',
value: 'itemCode',
message: '请先选择物料代码!', // 当前置条件为空时 弹出信息提示
isMainValue: true
}]
}
}
},
{
label: '标包数量',
field: 'packQty',
sort: 'custom',
table: {
width: 120
},
tableForm:{
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '计量单位',
field: 'uom',
@ -666,7 +719,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
isTable: true,
sort: 'custom',
table: {
width: 150
width: 120
},
tableForm: {
type: 'Select',
@ -708,18 +761,15 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
isTableForm: false,
isForm: false,
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
@ -728,14 +778,35 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
}
}
},
{
label: '批次',
field: 'batch',
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
@ -907,6 +978,9 @@ export const ProductionreturnRequestDetailRules = reactive({
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
packUnit: [
{ required: true, message: '请选择包装规格', trigger: 'blur' }
]
})
/**

8
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue

@ -86,7 +86,7 @@
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/productionreturn-request-main/importNO" :importTemplateData="importTemplateData"
<ImportForm ref="importFormRef" url="/wms/productionreturn-request-main/hold-import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
</template>
@ -190,6 +190,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else if(formField == 'workStationCode') {
row['workStationCode'] = val[0]['code']
row['fromLocationCode'] = val[0]['rawLocationCode']
} else if(formField == 'packUnit') {
row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty']
} else {
row[formField] = val[0][searchField]
}
@ -225,6 +228,9 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
} else if(formField == 'workStationCode') {
setV['workStationCode'] = val[0]['code']
setV['fromLocationCode'] = val[0]['rawLocationCode']
} else if(formField == 'packUnit') {
setV['packUnit'] = val[0]['packUnit']
setV['packQty'] = val[0]['packQty']
} else {
setV[formField] = val[0][searchField]
}

122
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts

@ -13,6 +13,9 @@ import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/worksta
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as ItempackagingApi from '@/api/wms/itempackage'
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
const { t } = useI18n() // 国际化
/**
@ -123,22 +126,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
}]
},
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料代码',
field: 'itemCode',
@ -248,6 +236,71 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
precision: 6
}
},
{
label: '包装规格',
field: 'packUnit',
sort: 'custom',
isSearch: true,
table: {
width: 120
},
tableForm:{
isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格', // 输入框占位文本
searchField: 'packUnit', // 查询弹窗赋值字段
searchTitle: '物料包装信息', // 查询弹窗标题
searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
searchPage: ItempackagingApi.getItempackagingPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'itemCode',
value: 'itemCode',
message: '请先选择物料代码!',
isMainValue: true
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格', // 输入框占位文本
searchField: 'packUnit', // 查询弹窗赋值字段
searchTitle: '物料包装信息', // 查询弹窗标题
searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
searchPage: ItempackagingApi.getItempackagingPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'itemCode',
value: 'itemCode',
message: '请先选择物料代码!', // 当前置条件为空时 弹出信息提示
isMainValue: true
}]
}
}
},
{
label: '标包数量',
field: 'packQty',
sort: 'custom',
table: {
width: 120
},
tableForm:{
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '计量单位',
field: 'uom',
@ -298,18 +351,31 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
isTableForm: false,
isForm: false,
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: false
},
form: {
componentProps: {
disabled: false
}
}
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
@ -319,18 +385,22 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
}
},
{
label: '批次',
field: 'batch',
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: false
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: false
disabled: true
}
}
},

Loading…
Cancel
Save