Browse Source

YT-683,YT-685:线边退料和紧急胶料需求开发

intex
ljlong_2630 1 week ago
parent
commit
a1850e6f86
  1. 38
      src/components/ImportForm/src/ImportFormStep.vue
  2. 4
      src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts
  3. 74
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  4. 28
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts

38
src/components/ImportForm/src/ImportFormStep.vue

@ -87,8 +87,8 @@
{{ t('ts.下载差异数据') }} {{ t('ts.下载差异数据') }}
</el-button> </el-button>
</div> </div>
<el-button :disabled="formLoading" type="primary" @click="submitForm" v-if="active == 0 || active == 1">{{ t('ts.下一步') }}</el-button> <el-button :disabled="formLoading" type="primary" @click="submitForm" v-if="active == 0 || (active == 1 && !error)">{{ t('ts.下一步') }}</el-button>
<el-button :disabled="formLoading" type="primary" @click="submitForm" v-if="active == 2">{{ t('ts.好的') }}</el-button> <el-button :disabled="formLoading" type="primary" @click="submitForm" v-if="active == 2 || (active == 1 && error)">{{ t('ts.好的') }}</el-button>
<el-button @click="dialogVisible = false">{{ t('ts.取 消') }}</el-button> <el-button @click="dialogVisible = false">{{ t('ts.取 消') }}</el-button>
</div> </div>
</template> </template>
@ -219,21 +219,26 @@ const formRef = ref()
const submitForm = async () => { const submitForm = async () => {
// //
if (active.value === 1) { if (active.value === 1) {
if (props.confirmFormSuccess) { if(error.value){
await props.confirmFormSuccess(props.tableObject.tableList, dialogVisible.value = false
(msg)=>{ error.value = false
if(msg){ }else{
message.error(msg) if (props.confirmFormSuccess) {
error.value = false await props.confirmFormSuccess(props.tableObject.tableList,
return (msg)=>{
}else{ if(msg){
message.success(msg) message.error(msg)
error.value = false error.value = false
active.value = 2 // return
return }else{
message.success(msg)
error.value = false
active.value = 2 //
return
}
} }
} )
) }
} }
} }
if(active.value === 2){ if(active.value === 2){
@ -328,7 +333,6 @@ const submitFormSuccess = (response: any) => {
}) })
} else { } else {
message.success('上传成功') message.success('上传成功')
debugger
if(response.data?.successData?.failList&&response.data?.successData?.failList.length>0) { if(response.data?.successData?.failList&&response.data?.successData?.failList.length>0) {
console.log('设置差异数据:', response.data.successData.failList); console.log('设置差异数据:', response.data.successData.failList);
console.log('使用的列定义:', props.errorTableColumns); console.log('使用的列定义:', props.errorTableColumns);

4
src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts

@ -117,7 +117,7 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
{ {
label: '叫料包装数量', label: '标准包装数量',
field: 'callmaterialQty', field: 'callmaterialQty',
sort: 'custom', sort: 'custom',
table: { table: {
@ -204,6 +204,7 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isSearch: true, isSearch: true,
isForm: false,
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
@ -364,6 +365,7 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
isSearch:true, isSearch:true,
form: { form: {
componentProps: { componentProps: {
placeholder: '请选择工位',
disabled: true disabled: true
} }
} }

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

@ -115,6 +115,8 @@ import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading' import { usePageLoading } from '@/hooks/web/usePageLoading'
import * as ruleApi from '@/api/wms/rule/index' import * as ruleApi from '@/api/wms/rule/index'
import * as LocationApi from '@/api/wms/location' import * as LocationApi from '@/api/wms/location'
import * as SupplieritemApi from '@/api/wms/supplieritem'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
const { loadStart, loadDone } = usePageLoading() const { loadStart, loadDone } = usePageLoading()
// 退 // 退
defineOptions({ name: 'ProductionreturnRequestMain' }) defineOptions({ name: 'ProductionreturnRequestMain' })
@ -555,21 +557,29 @@ const buttonTableClick = async (val, row) => {
by: 'ASC', by: 'ASC',
}).then(res => { }).then(res => {
if (res.list.length > 0) { if (res.list.length > 0) {
// //
if (res.list[0].enableMake == "FALSE") { if (res.list[0].enableBuy == "TRUE") {
// tableform // tableform
detailListTableColumns.tableFormColumns.map(itemColumns => { detailListTableColumns.tableFormColumns.map(itemColumns => {
if(itemColumns.field == 'productionLineCodePackage') { // tableform
itemColumns.tableForm.isInpuFocusShow = false if(itemColumns.field == 'supplierItemCode') {
itemColumns.tableForm.disabled = true itemColumns.tableForm.isInpuFocusShow = true
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false itemColumns.tableForm.disabled = false
} ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true
if(itemColumns.field == 'supplierItemCode') { formLabelRef.value.formLoading = true
itemColumns.tableForm.isInpuFocusShow = true SupplieritemApi.getSupplieritemPage({
itemColumns.tableForm.disabled = false pageSize: 10,
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true pageNo: 1,
} code: item.itemCode,
}) sort: '',
by: 'ASC',
}).then(response => {
item.supplierItemCode = response.list[0].supplierCode
formLabelRef.value.formLoading = false
})
}
})
} else { } else {
// tableform // tableform
detailListTableColumns.tableFormColumns.map(itemColumns => { detailListTableColumns.tableFormColumns.map(itemColumns => {
@ -578,11 +588,36 @@ const buttonTableClick = async (val, row) => {
itemColumns.tableForm.disabled = true itemColumns.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = false ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = false
} }
})
}
//
if (res.list[0].enableMake == "TRUE") {
// tableform
detailListTableColumns.tableFormColumns.map(itemColumns => {
if(itemColumns.field == 'productionLineCodePackage') {
item.productionLineCodePackage = item.productionLineCode
itemColumns.tableForm.isInpuFocusShow = true
itemColumns.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = true
formLabelRef.value.formLoading = true
ProductionlineitemApi.getProductionlineitemPage({
pageNo: 1,
code: item.itemCode,
sort: '',
by: 'ASC',
}).then(response => {
item.supplierItemCode = response.list[0].supplierCode
formLabelRef.value.formLoading = false
})
}
})
} else {
// tableform
detailListTableColumns.tableFormColumns.map(itemColumns => {
if(itemColumns.field == 'productionLineCodePackage') { if(itemColumns.field == 'productionLineCodePackage') {
item.productionLineCodePackage = item.productionLineCode itemColumns.tableForm.isInpuFocusShow = false
itemColumns.tableForm.isInpuFocusShow = true
itemColumns.tableForm.disabled = true itemColumns.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = true ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false
} }
}) })
} }
@ -835,10 +870,13 @@ const handlePoint = async (row) => {
}).then((res) => { }).then((res) => {
if(res.list.length > 0) { if(res.list.length > 0) {
isCreateLabel.value = true isCreateLabel.value = true
if (res.list[0].productionLineCode != null) { if (res.list[0].supplierItemCode != null) {
labelType.value = 'cg'
} else if(res.list[0].productionLineCode != null){
labelType.value = 'zz' labelType.value = 'zz'
} else { } else {
labelType.value = 'cg' isCreateLabel.value = false
message.warning('不是采购类型也不是制造类型物料不能打印标签!')
} }
} else { } else {
isCreateLabel.value = false isCreateLabel.value = false

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

@ -1419,18 +1419,18 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
width: 150 width: 150
}, },
tableForm:{ tableForm:{
disabled: true disabled: true,
// isInpuFocusShow: true, isInpuFocusShow: true,
// searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
// searchField: 'productionLineCode', // 查询弹窗赋值字段 searchField: 'productionLineCode', // 查询弹窗赋值字段
// searchTitle: '生产线物料关系信息', // 查询弹窗标题 searchTitle: '生产线物料关系信息', // 查询弹窗标题
// searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类 searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
// searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法 searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
// searchCondition:[{ searchCondition:[{
// key: 'itemCode', key: 'itemCode',
// value: 'itemCode', value: 'itemCode',
// isMainValue: true isMainValue: true
// }] }]
} }
}, },
{ {
@ -1527,7 +1527,7 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
}, },
{ {
label: '包装规格', label: '包装规格',
field: 'uom', field: 'packUnit',
sort: 'custom', sort: 'custom',
tableForm: { tableForm: {
disabled: true disabled: true
@ -1535,7 +1535,7 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
}, },
{ {
label: '包装数量', label: '包装数量',
field: 'uom', field: 'packQty',
sort: 'custom', sort: 'custom',
tableForm: { tableForm: {
disabled: true disabled: true

Loading…
Cancel
Save