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