Browse Source

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

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

10
src/components/ImportForm/src/ImportFormStep.vue

@ -87,8 +87,8 @@
{{ t('ts.下载差异数据') }}
</el-button>
</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 == 2">{{ 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 || (active == 1 && error)">{{ t('ts.好的') }}</el-button>
<el-button @click="dialogVisible = false">{{ t('ts.取 消') }}</el-button>
</div>
</template>
@ -219,6 +219,10 @@ const formRef = ref()
const submitForm = async () => {
//
if (active.value === 1) {
if(error.value){
dialogVisible.value = false
error.value = false
}else{
if (props.confirmFormSuccess) {
await props.confirmFormSuccess(props.tableObject.tableList,
(msg)=>{
@ -236,6 +240,7 @@ const submitForm = async () => {
)
}
}
}
if(active.value === 2){
dialogVisible.value = false
error.value = false
@ -328,7 +333,6 @@ const submitFormSuccess = (response: any) => {
})
} else {
message.success('上传成功')
debugger
if(response.data?.successData?.failList&&response.data?.successData?.failList.length>0) {
console.log('设置差异数据:', response.data.successData.failList);
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',
sort: 'custom',
table: {
@ -204,6 +204,7 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isSearch: true,
isForm: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
@ -364,6 +365,7 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
isSearch:true,
form: {
componentProps: {
placeholder: '请选择工位',
disabled: true
}
}

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

@ -115,6 +115,8 @@ import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading'
import * as ruleApi from '@/api/wms/rule/index'
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()
// 退
defineOptions({ name: 'ProductionreturnRequestMain' })
@ -555,21 +557,29 @@ const buttonTableClick = async (val, row) => {
by: 'ASC',
}).then(res => {
if (res.list.length > 0) {
//
if (res.list[0].enableMake == "FALSE") {
//
if (res.list[0].enableBuy == "TRUE") {
// tableform
detailListTableColumns.tableFormColumns.map(itemColumns => {
if(itemColumns.field == 'productionLineCodePackage') {
itemColumns.tableForm.isInpuFocusShow = false
itemColumns.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false
}
// tableform
if(itemColumns.field == 'supplierItemCode') {
itemColumns.tableForm.isInpuFocusShow = true
itemColumns.tableForm.disabled = false
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true
formLabelRef.value.formLoading = true
SupplieritemApi.getSupplieritemPage({
pageSize: 10,
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 => {
@ -578,11 +588,36 @@ const buttonTableClick = async (val, row) => {
itemColumns.tableForm.disabled = true
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') {
itemColumns.tableForm.isInpuFocusShow = false
itemColumns.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false
}
})
}
@ -835,10 +870,13 @@ const handlePoint = async (row) => {
}).then((res) => {
if(res.list.length > 0) {
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'
} else {
labelType.value = 'cg'
isCreateLabel.value = false
message.warning('不是采购类型也不是制造类型物料不能打印标签!')
}
} else {
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
},
tableForm:{
disabled: true
// isInpuFocusShow: true,
// searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
// searchField: 'productionLineCode', // 查询弹窗赋值字段
// searchTitle: '生产线物料关系信息', // 查询弹窗标题
// searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
// searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
// searchCondition:[{
// key: 'itemCode',
// value: 'itemCode',
// isMainValue: true
// }]
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'productionLineCode', // 查询弹窗赋值字段
searchTitle: '生产线物料关系信息', // 查询弹窗标题
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'itemCode',
value: 'itemCode',
isMainValue: true
}]
}
},
{
@ -1527,7 +1527,7 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
},
{
label: '包装规格',
field: 'uom',
field: 'packUnit',
sort: 'custom',
tableForm: {
disabled: true
@ -1535,7 +1535,7 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
},
{
label: '包装数量',
field: 'uom',
field: 'packQty',
sort: 'custom',
tableForm: {
disabled: true

Loading…
Cancel
Save