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,17 +1779,19 @@ export default { ...@@ -1772,17 +1779,19 @@ export default {
}, },
// 默认带出接收仓库 // 默认带出接收仓库
defaultStorage() { defaultStorage() {
post( const params = {
`/ExtDxProductWorkCenter/search`,
{
'pageFrom': 1, 'pageFrom': 1,
'pageSize': 9999, 'pageSize': 9999,
'searchItems': { 'searchItems': {
'children': [ 'children': [
{ {
'items': [ 'items': [{
'fieldName': 'targetId',
'operator': 'EQ',
'value': this.basicData.materialTypeId || ''
},
{ {
'fieldName': 'extDxProductArea.id', 'fieldName': 'source.extDxProductAreaId',
'operator': 'EQ', 'operator': 'EQ',
'value': this.basicData.extDxProductAreaId || '' 'value': this.basicData.extDxProductAreaId || ''
} }
...@@ -1790,27 +1799,21 @@ export default { ...@@ -1790,27 +1799,21 @@ export default {
'operator': 'AND' 'operator': 'AND'
} }
], ],
'items': [] 'items': [],
'operator': 'AND'
}, },
'openProps': [], 'openProps': [{ 'name': 'source' }]
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
} }
] 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,17 +1776,19 @@ export default { ...@@ -1769,17 +1776,19 @@ export default {
}, },
// 默认带出接收仓库 // 默认带出接收仓库
defaultStorage() { defaultStorage() {
post( const params = {
`/ExtDxProductWorkCenter/search`,
{
'pageFrom': 1, 'pageFrom': 1,
'pageSize': 9999, 'pageSize': 9999,
'searchItems': { 'searchItems': {
'children': [ 'children': [
{ {
'items': [ 'items': [{
'fieldName': 'targetId',
'operator': 'EQ',
'value': this.basicData.materialTypeId || ''
},
{ {
'fieldName': 'extDxProductArea.id', 'fieldName': 'source.extDxProductAreaId',
'operator': 'EQ', 'operator': 'EQ',
'value': this.basicData.extDxProductAreaId || '' 'value': this.basicData.extDxProductAreaId || ''
} }
...@@ -1787,27 +1796,21 @@ export default { ...@@ -1787,27 +1796,21 @@ export default {
'operator': 'AND' 'operator': 'AND'
} }
], ],
'items': [] 'items': [],
'operator': 'AND'
}, },
'openProps': [], 'openProps': [{ 'name': 'source' }]
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
} }
] 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