生产任务单和汇报单
parent
bb62d787c1
commit
2594128248
|
@ -33,4 +33,8 @@ export default {
|
||||||
inventoryInvoiceDetailList(data) {
|
inventoryInvoiceDetailList(data) {
|
||||||
return request('detail/list', data, 'get')
|
return request('detail/list', data, 'get')
|
||||||
},
|
},
|
||||||
|
// 获取发货通知单明细列表
|
||||||
|
inventoryInvoiceComplete(data) {
|
||||||
|
return request('complete', data, 'get')
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,23 @@
|
||||||
<template>
|
<template>
|
||||||
<a-page-header style="padding: 10px; font-size: 20px" @back="handleBack">
|
<a-page-header style="padding: 10px; font-size: 20px">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
|
<a-button @click="handleBack('/inventory/inbound')">退出</a-button>
|
||||||
<!-- <a-button v-if="route.query.type !== 'SEARCH'" key="1" type="primary" @click="onSubmitForm">保存</a-button>-->
|
<!-- <a-button v-if="route.query.type !== 'SEARCH'" key="1" type="primary" @click="onSubmitForm">保存</a-button>-->
|
||||||
</template>
|
</template>
|
||||||
</a-page-header>
|
</a-page-header>
|
||||||
|
|
||||||
<a-card :bordered="false" title="入库单">
|
<a-card :bordered="false" title="入库单">
|
||||||
<DynamicForm
|
<a-descriptions bordered :column="3">
|
||||||
:allDisabled="route.query.type === 'SEARCH'"
|
<a-descriptions-item
|
||||||
:formItems="unitFormItems"
|
:span="item.span"
|
||||||
:model="formData"
|
:label="item.label"
|
||||||
:rules="formRules"
|
v-for="(item, index) in inboundFormItems"
|
||||||
ref="formRef1"
|
:key="index"
|
||||||
/>
|
>
|
||||||
|
<span v-if="!item.type">{{ detailData[item.name] }}</span>
|
||||||
|
<span v-if="item.type === 'dict'">{{ tool.dictTypeData(item.attrs.options, detailData[item.name]) }}</span>
|
||||||
|
</a-descriptions-item>
|
||||||
|
</a-descriptions>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|
||||||
<a-card :bordered="false" class="mt-4" style="height: 100%">
|
<a-card :bordered="false" class="mt-4" style="height: 100%">
|
||||||
|
@ -57,10 +62,12 @@
|
||||||
import produceReportApi from '@/api/production/produceTask/produceReportApi'
|
import produceReportApi from '@/api/production/produceTask/produceReportApi'
|
||||||
import useFormHandler from '@/hook/useFormHandler'
|
import useFormHandler from '@/hook/useFormHandler'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { unitFormItems, formRules } from '@/views/productionBusiness/productionCenter/report/formFields/detailFields'
|
|
||||||
import { detailColumns, modalColumns } from '@/views/productionBusiness/productionCenter/report/columns/detailColumns'
|
import { detailColumns, modalColumns } from '@/views/productionBusiness/productionCenter/report/columns/detailColumns'
|
||||||
import { cloneDeep } from 'lodash-es'
|
import { cloneDeep } from 'lodash-es'
|
||||||
import inventoryInboundApi from '@/api/inventory/inventoryInboundApi'
|
import inventoryInboundApi from '@/api/inventory/inventoryInboundApi'
|
||||||
|
import {inboundFormItems, formRules} from "@/views/productionBusiness/inventory/inbound/formFields/detailFields";
|
||||||
|
import {brandViewFormItems} from "@/views/productionBusiness/basicData/brand/formFields/detailFields";
|
||||||
|
import tool from "@/utils/tool";
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const formRef1 = ref(null)
|
const formRef1 = ref(null)
|
||||||
|
@ -68,31 +75,17 @@
|
||||||
let extendData = ref([])
|
let extendData = ref([])
|
||||||
let searchFormState = ref({})
|
let searchFormState = ref({})
|
||||||
|
|
||||||
let { formData, formRefs, inform, handleBack, fetchData, getExtendField } = useFormHandler(unitFormItems, {
|
let { formData, formRefs, inform, handleBack, fetchData, getExtendField } = useFormHandler(inboundFormItems, {
|
||||||
getDetail: inventoryInboundApi.inventoryInboundDetail
|
getDetail: inventoryInboundApi.inventoryInboundDetail
|
||||||
})
|
})
|
||||||
|
|
||||||
let detailDataSource = ref([])
|
let detailDataSource = ref([])
|
||||||
|
let detailData = ref([])
|
||||||
const options = {
|
|
||||||
alert: {
|
|
||||||
show: true,
|
|
||||||
clear: () => {
|
|
||||||
selectedRowKeys.value = []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
rowSelection: {
|
|
||||||
onChange: (selectedRowKey, selectedRows) => {
|
|
||||||
selectedRowKeys.value = selectedRowKey
|
|
||||||
}
|
|
||||||
},
|
|
||||||
toolConfig: { refresh: true, height: true, columnSetting: true, striped: false }
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
formRefs.value = [formRef1.value]
|
formRefs.value = [formRef1.value]
|
||||||
const detailData = await fetchData(route.query.type)
|
detailData.value = await fetchData(route.query.type)
|
||||||
searchFormState.value.inboundId = detailData.id
|
searchFormState.value.inboundId = detailData.value?.id
|
||||||
// tableRef.value.refresh(true)
|
// tableRef.value.refresh(true)
|
||||||
await loadData()
|
await loadData()
|
||||||
extendData.value = await getExtendField('MATERIAL')
|
extendData.value = await getExtendField('MATERIAL')
|
||||||
|
|
|
@ -1,69 +1,47 @@
|
||||||
import { required } from '@/utils/formRules'
|
export const inboundFormItems = reactive([
|
||||||
import tool from '@/utils/tool'
|
|
||||||
|
|
||||||
export const unitFormItems = reactive([
|
|
||||||
{
|
{
|
||||||
label: '单号:',
|
label: '单号:',
|
||||||
name: 'billNumber',
|
name: 'billNumber',
|
||||||
type: 'a-input-number',
|
span: 1,
|
||||||
span: 6,
|
|
||||||
attrs: {
|
|
||||||
placeholder: '请输入编码',
|
|
||||||
allowClear: true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '业务日期:',
|
label: '业务日期:',
|
||||||
name: 'businessDate',
|
name: 'businessDate',
|
||||||
type: 'a-date-picker',
|
span: 1
|
||||||
span: 6,
|
|
||||||
attrs: {
|
|
||||||
placeholder: '请输入业务日期',
|
|
||||||
allowClear: true,
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '状态:',
|
label: '状态:',
|
||||||
name: 'state',
|
name: 'state',
|
||||||
type: 'a-select',
|
type: 'dict',
|
||||||
span: 6,
|
span: 1,
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: '请选择可用状态',
|
options: 'PRODUCE_REPORT_STATE'
|
||||||
options: tool.dictList('PRODUCE_REPORT_STATE')
|
|
||||||
},
|
},
|
||||||
defaultValue: ''
|
},
|
||||||
|
{
|
||||||
|
label: '仓库:',
|
||||||
|
name: 'storeName',
|
||||||
|
span: 1,
|
||||||
|
},{
|
||||||
|
label: '供应商:',
|
||||||
|
name: 'customerName',
|
||||||
|
span: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '类型:',
|
label: '类型:',
|
||||||
name: 'produceType',
|
name: 'type',
|
||||||
type: 'a-select',
|
type: 'dict',
|
||||||
span: 6,
|
span: 1,
|
||||||
attrs: {
|
attrs: {
|
||||||
options: tool.dictList('PRODUCE_TYPE')
|
options: 'INBOUND_TYPE'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
/*{
|
||||||
label: '生产线:',
|
label: '生产线:',
|
||||||
name: 'productionLineName',
|
name: 'productionLineName',
|
||||||
type: 'a-select',
|
span: 1,
|
||||||
span: 6,
|
}*/
|
||||||
attrs: {
|
|
||||||
placeholder: '请选择是否基本单位',
|
|
||||||
options: tool.dictList('YES_NO')
|
|
||||||
},
|
|
||||||
defaultValue: 'NO'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '备注:',
|
|
||||||
name: 'remarks',
|
|
||||||
type: 'a-textarea',
|
|
||||||
span: 24,
|
|
||||||
attrs: {
|
|
||||||
placeholder: '请输入备注',
|
|
||||||
allowClear: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
])
|
])
|
||||||
|
|
||||||
export const formRules = {}
|
export const formRules = {}
|
||||||
|
|
|
@ -103,6 +103,12 @@
|
||||||
</a>
|
</a>
|
||||||
<template #overlay>
|
<template #overlay>
|
||||||
<a-menu>
|
<a-menu>
|
||||||
|
<a-menu-item>
|
||||||
|
<a-button type="link" size="small" @click="handleComplete(record)">
|
||||||
|
<FormOutlined />
|
||||||
|
完成
|
||||||
|
</a-button>
|
||||||
|
</a-menu-item>
|
||||||
<a-menu-item>
|
<a-menu-item>
|
||||||
<a-button
|
<a-button
|
||||||
type="link"
|
type="link"
|
||||||
|
@ -131,7 +137,6 @@
|
||||||
删除
|
删除
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
|
|
||||||
</a-menu>
|
</a-menu>
|
||||||
</template>
|
</template>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
|
@ -294,5 +299,15 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleComplete = (record) => {
|
||||||
|
inventoryInvoiceApi
|
||||||
|
.inventoryInvoiceComplete([
|
||||||
|
{
|
||||||
|
id: record.id
|
||||||
|
}
|
||||||
|
])
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,18 +1,22 @@
|
||||||
<template>
|
<template>
|
||||||
<a-page-header style="padding: 10px; font-size: 20px" @back="handleBack">
|
<a-page-header style="padding: 10px; font-size: 20px">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<!-- <a-button v-if="route.query.type !== 'SEARCH'" key="1" type="primary" @click="onSubmitForm">保存</a-button>-->
|
<a-button @click="handleBack('/inventory/inbound')">退出</a-button>
|
||||||
</template>
|
</template>
|
||||||
</a-page-header>
|
</a-page-header>
|
||||||
|
|
||||||
<a-card :bordered="false" title="出库单">
|
<a-card :bordered="false" title="出库单">
|
||||||
<DynamicForm
|
<a-descriptions bordered :column="3">
|
||||||
:allDisabled="route.query.type === 'SEARCH'"
|
<a-descriptions-item
|
||||||
:formItems="unitFormItems"
|
:span="item.span"
|
||||||
:model="formData"
|
:label="item.label"
|
||||||
:rules="formRules"
|
v-for="(item, index) in outboundFormItems"
|
||||||
ref="formRef1"
|
:key="index"
|
||||||
/>
|
>
|
||||||
|
<span v-if="!item.type">{{ detailData[item.name] }}</span>
|
||||||
|
<span v-if="item.type === 'dict'">{{ tool.dictTypeData(item.attrs.options, detailData[item.name]) }}</span>
|
||||||
|
</a-descriptions-item>
|
||||||
|
</a-descriptions>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|
||||||
<a-card :bordered="false" class="mt-4" style="height: 100%">
|
<a-card :bordered="false" class="mt-4" style="height: 100%">
|
||||||
|
@ -57,11 +61,11 @@
|
||||||
import produceReportApi from '@/api/production/produceTask/produceReportApi'
|
import produceReportApi from '@/api/production/produceTask/produceReportApi'
|
||||||
import useFormHandler from '@/hook/useFormHandler'
|
import useFormHandler from '@/hook/useFormHandler'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { unitFormItems, formRules } from '@/views/productionBusiness/productionCenter/report/formFields/detailFields'
|
|
||||||
import { detailColumns, modalColumns } from '@/views/productionBusiness/productionCenter/report/columns/detailColumns'
|
import { detailColumns, modalColumns } from '@/views/productionBusiness/productionCenter/report/columns/detailColumns'
|
||||||
import { cloneDeep } from 'lodash-es'
|
import { cloneDeep } from 'lodash-es'
|
||||||
import produceReportDetailApi from '@/api/production/produceTask/produceReportDetailApi'
|
|
||||||
import inventoryOutboundApi from '@/api/inventory/inventoryOutboundApi'
|
import inventoryOutboundApi from '@/api/inventory/inventoryOutboundApi'
|
||||||
|
import tool from '@/utils/tool'
|
||||||
|
import { outboundFormItems } from '@/views/productionBusiness/inventory/outbound/formFields/detailFields'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const formRef1 = ref(null)
|
const formRef1 = ref(null)
|
||||||
|
@ -69,31 +73,17 @@
|
||||||
let extendData = ref([])
|
let extendData = ref([])
|
||||||
let searchFormState = ref({})
|
let searchFormState = ref({})
|
||||||
|
|
||||||
let { formData, formRefs, inform, handleBack, fetchData, getExtendField } = useFormHandler(unitFormItems, {
|
let { formData, formRefs, inform, handleBack, fetchData, getExtendField } = useFormHandler(outboundFormItems, {
|
||||||
getDetail: inventoryOutboundApi.inventoryOutboundDetail
|
getDetail: inventoryOutboundApi.inventoryOutboundDetail
|
||||||
})
|
})
|
||||||
|
|
||||||
let detailDataSource = ref([])
|
let detailDataSource = ref([])
|
||||||
|
let detailData = ref([])
|
||||||
const options = {
|
|
||||||
alert: {
|
|
||||||
show: true,
|
|
||||||
clear: () => {
|
|
||||||
selectedRowKeys.value = []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
rowSelection: {
|
|
||||||
onChange: (selectedRowKey, selectedRows) => {
|
|
||||||
selectedRowKeys.value = selectedRowKey
|
|
||||||
}
|
|
||||||
},
|
|
||||||
toolConfig: { refresh: true, height: true, columnSetting: true, striped: false }
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
formRefs.value = [formRef1.value]
|
formRefs.value = [formRef1.value]
|
||||||
const detailData = await fetchData(route.query.type)
|
detailData.value = await fetchData(route.query.type)
|
||||||
searchFormState.value.inboundId = detailData.id
|
searchFormState.value.inboundId = detailData.value?.id
|
||||||
// tableRef.value.refresh(true)
|
// tableRef.value.refresh(true)
|
||||||
await loadData()
|
await loadData()
|
||||||
extendData.value = await getExtendField('MATERIAL')
|
extendData.value = await getExtendField('MATERIAL')
|
||||||
|
@ -116,7 +106,8 @@
|
||||||
const handleOpenViewScan = (record) => {
|
const handleOpenViewScan = (record) => {
|
||||||
recordTable = record
|
recordTable = record
|
||||||
visible.value = true
|
visible.value = true
|
||||||
inventoryOutboundApi.inventoryOutboundBarcodeTree({
|
inventoryOutboundApi
|
||||||
|
.inventoryOutboundBarcodeTree({
|
||||||
docsDetailId: record.id,
|
docsDetailId: record.id,
|
||||||
docsId: record.inboundId
|
docsId: record.inboundId
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,69 +1,47 @@
|
||||||
import { required } from '@/utils/formRules'
|
export const outboundFormItems = reactive([
|
||||||
import tool from '@/utils/tool'
|
|
||||||
|
|
||||||
export const unitFormItems = reactive([
|
|
||||||
{
|
{
|
||||||
label: '单号:',
|
label: '单号:',
|
||||||
name: 'billNumber',
|
name: 'billNumber',
|
||||||
type: 'a-input-number',
|
span: 1
|
||||||
span: 6,
|
|
||||||
attrs: {
|
|
||||||
placeholder: '请输入编码',
|
|
||||||
allowClear: true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '业务日期:',
|
label: '业务日期:',
|
||||||
name: 'businessDate',
|
name: 'businessDate',
|
||||||
type: 'a-date-picker',
|
span: 1
|
||||||
span: 6,
|
|
||||||
attrs: {
|
|
||||||
placeholder: '请输入业务日期',
|
|
||||||
allowClear: true,
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '状态:',
|
label: '状态:',
|
||||||
name: 'state',
|
name: 'state',
|
||||||
type: 'a-select',
|
type: 'dict',
|
||||||
span: 6,
|
span: 1,
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: '请选择可用状态',
|
options: 'PRODUCE_REPORT_STATE'
|
||||||
options: tool.dictList('PRODUCE_REPORT_STATE')
|
}
|
||||||
},
|
},
|
||||||
defaultValue: ''
|
{
|
||||||
|
label: '仓库:',
|
||||||
|
name: 'storeName',
|
||||||
|
span: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '供应商:',
|
||||||
|
name: 'customerName',
|
||||||
|
span: 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '类型:',
|
label: '类型:',
|
||||||
name: 'produceType',
|
name: 'type',
|
||||||
type: 'a-select',
|
type: 'dict',
|
||||||
span: 6,
|
span: 1,
|
||||||
attrs: {
|
attrs: {
|
||||||
options: tool.dictList('PRODUCE_TYPE')
|
options: 'OUTBOUND_TYPE'
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
{
|
/*{
|
||||||
label: '生产线:',
|
label: '生产线:',
|
||||||
name: 'productionLineName',
|
name: 'productionLineName',
|
||||||
type: 'a-select',
|
span: 1,
|
||||||
span: 6,
|
}*/
|
||||||
attrs: {
|
|
||||||
placeholder: '请选择是否基本单位',
|
|
||||||
options: tool.dictList('YES_NO')
|
|
||||||
},
|
|
||||||
defaultValue: 'NO'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '备注:',
|
|
||||||
name: 'remarks',
|
|
||||||
type: 'a-textarea',
|
|
||||||
span: 24,
|
|
||||||
attrs: {
|
|
||||||
placeholder: '请输入备注',
|
|
||||||
allowClear: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
])
|
])
|
||||||
|
|
||||||
export const formRules = {}
|
export const formRules = {}
|
||||||
|
|
Loading…
Reference in New Issue