Commit 062b31b9 authored by jingnan's avatar jingnan 👀

采购入库及返厂入库接收仓库接口修改

parent 867cecb8
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
*/ */
<template> <template>
<div class="storageDetails-create"> <div class="storageDetails-create">
<dee-dialog :dialog-visible="dialogVisibleDetails" title="采购入库申请创建" width="90%" @handleClose="handleClose"> <dee-dialog :dialog-visible="dialogVisibleDetails" title="返厂入库明细编辑" width="90%" @handleClose="handleClose">
<dee-form <dee-form
ref="form" ref="form"
:form="form" :form="form"
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
import { post } from '@/utils/http' import { post } from '@/utils/http'
export default { export default {
componentName: '采购入库申请创建', // componentName: '采购入库申请创建',
name: 'StorageDetailsCreate', // name写在组件的最前方,自定义组件为必填 name: 'StorageDetailsCreate', // name写在组件的最前方,自定义组件为必填
components: {}, components: {},
props: { props: {
...@@ -230,6 +230,13 @@ export default { ...@@ -230,6 +230,13 @@ export default {
message: '请填写表单信息', message: '请填写表单信息',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
} }
],
storageZone: [
{
required: true,
message: '请填写表单信息',
trigger: ['blur', 'change']
}
] ]
// purchaseAmount: [{ required: true, message: '请填写表单信息', trigger: ['blur', 'change'] }], // purchaseAmount: [{ required: true, message: '请填写表单信息', trigger: ['blur', 'change'] }],
}, },
...@@ -1772,45 +1779,41 @@ export default { ...@@ -1772,45 +1779,41 @@ export default {
}, },
// 默认带出接收仓库 // 默认带出接收仓库
defaultStorage() { defaultStorage() {
post( const params = {
`/ExtDxProductWorkCenter/search`, 'pageFrom': 1,
{ 'pageSize': 9999,
'pageFrom': 1, 'searchItems': {
'pageSize': 9999, 'children': [
'searchItems': { {
'children': [ 'items': [{
'fieldName': 'targetId',
'operator': 'EQ',
'value': this.basicData.materialTypeId || ''
},
{ {
'items': [ 'fieldName': 'source.extDxProductAreaId',
{ 'operator': 'EQ',
'fieldName': 'extDxProductArea.id', 'value': this.basicData.extDxProductAreaId || ''
'operator': 'EQ',
'value': this.basicData.extDxProductAreaId || ''
}
],
'operator': 'AND'
} }
], ],
'items': [] 'operator': 'AND'
},
'openProps': [],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
} }
] ],
'items': [],
'operator': 'AND'
}, },
) 'openProps': [{ 'name': 'source' }]
}
post(`ExtCenterResourceTypeLink/search`, params)
.then((res) => { .then((res) => {
this.form.storageZone =
res.items && res.items.content.length ? res.items.content[0].id : ''
const STORAGE = this.formFileds[0].data.find( const STORAGE = this.formFileds[0].data.find(
(item) => item.key === 'storageZone' (item) => item.key === 'storageZone'
) )
STORAGE.component.options = res.items.content.map((item) => { STORAGE.component.options = res.items.content.map((item) => {
return { return {
label: item.extname, label: item.source && item.source.extname,
value: item.id value: item.source && item.source.id
} }
}) })
}) })
......
...@@ -230,6 +230,13 @@ export default { ...@@ -230,6 +230,13 @@ export default {
message: '请填写表单信息', message: '请填写表单信息',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
} }
],
storageZone: [
{
required: true,
message: '请填写表单信息',
trigger: ['blur', 'change']
}
] ]
// purchaseAmount: [{ required: true, message: '请填写表单信息', trigger: ['blur', 'change'] }], // purchaseAmount: [{ required: true, message: '请填写表单信息', trigger: ['blur', 'change'] }],
}, },
...@@ -1769,45 +1776,41 @@ export default { ...@@ -1769,45 +1776,41 @@ export default {
}, },
// 默认带出接收仓库 // 默认带出接收仓库
defaultStorage() { defaultStorage() {
post( const params = {
`/ExtDxProductWorkCenter/search`, 'pageFrom': 1,
{ 'pageSize': 9999,
'pageFrom': 1, 'searchItems': {
'pageSize': 9999, 'children': [
'searchItems': { {
'children': [ 'items': [{
'fieldName': 'targetId',
'operator': 'EQ',
'value': this.basicData.materialTypeId || ''
},
{ {
'items': [ 'fieldName': 'source.extDxProductAreaId',
{ 'operator': 'EQ',
'fieldName': 'extDxProductArea.id', 'value': this.basicData.extDxProductAreaId || ''
'operator': 'EQ',
'value': this.basicData.extDxProductAreaId || ''
}
],
'operator': 'AND'
} }
], ],
'items': [] 'operator': 'AND'
},
'openProps': [],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
} }
] ],
'items': [],
'operator': 'AND'
}, },
) 'openProps': [{ 'name': 'source' }]
}
post(`ExtCenterResourceTypeLink/search`, params)
.then((res) => { .then((res) => {
this.form.storageZone =
res.items && res.items.content.length ? res.items.content[0].id : ''
const STORAGE = this.formFileds[0].data.find( const STORAGE = this.formFileds[0].data.find(
(item) => item.key === 'storageZone' (item) => item.key === 'storageZone'
) )
STORAGE.component.options = res.items.content.map((item) => { STORAGE.component.options = res.items.content.map((item) => {
return { return {
label: item.extname, label: item.source && item.source.extname,
value: item.id value: item.source && item.source.id
} }
}) })
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment