bug: 🐛 页面逻辑修复并完善
This commit is contained in:
parent
fd0e324bc9
commit
7ca2ebcf5d
@ -3591,7 +3591,7 @@
|
||||
"isDefsType": false,
|
||||
"templateIndex": -1,
|
||||
"compileTemplateKeyword": "#/definitions/",
|
||||
"enum": ["'ALL'", "'PARTIAL'"],
|
||||
"enum": ["'SCAN'", "'MANUAL'"],
|
||||
"typeProperties": []
|
||||
}
|
||||
},
|
||||
@ -4398,7 +4398,7 @@
|
||||
"isDefsType": false,
|
||||
"templateIndex": -1,
|
||||
"compileTemplateKeyword": "#/definitions/",
|
||||
"enum": ["'PURCHASE_RECEIPT'", "'RETURN_RECEIPT'", "'LOAN_OUT'", "'AUDIT'"],
|
||||
"enum": ["'PURCHASE_RECEIPT'", "'RETURN_RECEIPT'", "'LOAN_OUT'", "'AUDIT'", "'SCRAP_OUT'"],
|
||||
"typeProperties": []
|
||||
},
|
||||
"name": "applyType",
|
||||
@ -4660,11 +4660,11 @@
|
||||
"isDefsType": false,
|
||||
"templateIndex": -1,
|
||||
"compileTemplateKeyword": "#/definitions/",
|
||||
"enum": ["'ALL'", "'PARTIAL'"],
|
||||
"enum": ["'SCAN'", "'MANUAL'"],
|
||||
"typeProperties": []
|
||||
},
|
||||
"name": "auditType",
|
||||
"description": "盘点类型(1: 全盘 2: 部分盘点)",
|
||||
"description": "盘点类型(1: 扫码 2: 人工)",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
@ -4770,7 +4770,7 @@
|
||||
"isDefsType": false,
|
||||
"templateIndex": -1,
|
||||
"compileTemplateKeyword": "#/definitions/",
|
||||
"enum": ["'PURCHASE_RECEIPT'", "'RETURN_RECEIPT'", "'LOAN_OUT'", "'AUDIT'"],
|
||||
"enum": ["'PURCHASE_RECEIPT'", "'RETURN_RECEIPT'", "'LOAN_OUT'", "'AUDIT'", "'SCRAP_OUT'"],
|
||||
"typeProperties": []
|
||||
},
|
||||
"name": "type",
|
||||
@ -4900,11 +4900,11 @@
|
||||
"isDefsType": false,
|
||||
"templateIndex": -1,
|
||||
"compileTemplateKeyword": "#/definitions/",
|
||||
"enum": ["'ALL'", "'PARTIAL'"],
|
||||
"enum": ["'SCAN'", "'MANUAL'"],
|
||||
"typeProperties": []
|
||||
},
|
||||
"name": "auditType",
|
||||
"description": "盘点类型(1: 全盘 2: 部分盘点)",
|
||||
"description": "盘点类型(1: 扫码 2: 人工)",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
@ -5034,13 +5034,37 @@
|
||||
"isDefsType": false,
|
||||
"templateIndex": -1,
|
||||
"compileTemplateKeyword": "#/definitions/",
|
||||
"enum": ["'PURCHASE_RECEIPT'", "'RETURN_RECEIPT'", "'LOAN_OUT'", "'AUDIT'"],
|
||||
"enum": ["'PURCHASE_RECEIPT'", "'RETURN_RECEIPT'", "'LOAN_OUT'", "'AUDIT'", "'SCRAP_OUT'"],
|
||||
"typeProperties": []
|
||||
},
|
||||
"name": "type",
|
||||
"description": "类型(1: 采购入库申请 2: 归还入库申请 3: 出库外借申请 4: 盘点申请)",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"dataType": {
|
||||
"typeArgs": [
|
||||
{
|
||||
"typeArgs": [],
|
||||
"typeName": "string",
|
||||
"isDefsType": false,
|
||||
"templateIndex": -1,
|
||||
"compileTemplateKeyword": "#/definitions/",
|
||||
"enum": [],
|
||||
"typeProperties": []
|
||||
}
|
||||
],
|
||||
"typeName": "Array",
|
||||
"isDefsType": false,
|
||||
"templateIndex": -1,
|
||||
"compileTemplateKeyword": "#/definitions/",
|
||||
"enum": [],
|
||||
"typeProperties": []
|
||||
},
|
||||
"name": "types",
|
||||
"description": "物料类型",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"dataType": {
|
||||
"typeArgs": [],
|
||||
@ -5580,6 +5604,19 @@
|
||||
"description": "类型",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"dataType": {
|
||||
"typeArgs": [],
|
||||
"typeName": "string",
|
||||
"isDefsType": false,
|
||||
"templateIndex": -1,
|
||||
"compileTemplateKeyword": "#/definitions/",
|
||||
"enum": [],
|
||||
"typeProperties": []
|
||||
},
|
||||
"name": "typeName",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"dataType": {
|
||||
"typeArgs": [],
|
||||
|
23
src/api/material/api.d.ts
vendored
23
src/api/material/api.d.ts
vendored
@ -13,7 +13,7 @@ declare namespace material {
|
||||
applyNum?: string
|
||||
|
||||
/** 申请类型 */
|
||||
applyType?: 'PURCHASE_RECEIPT' | 'RETURN_RECEIPT' | 'LOAN_OUT' | 'AUDIT'
|
||||
applyType?: 'PURCHASE_RECEIPT' | 'RETURN_RECEIPT' | 'LOAN_OUT' | 'AUDIT' | 'SCRAP_OUT'
|
||||
|
||||
/** 物料编码 */
|
||||
code?: string
|
||||
@ -76,8 +76,8 @@ declare namespace material {
|
||||
/** 申请日期 */
|
||||
applyDate?: string
|
||||
|
||||
/** 盘点类型(1: 全盘 2: 部分盘点) */
|
||||
auditType?: 'ALL' | 'PARTIAL'
|
||||
/** 盘点类型(1: 扫码 2: 人工) */
|
||||
auditType?: 'SCAN' | 'MANUAL'
|
||||
|
||||
/** 是否确认(0: 未确认 1: 已确认) */
|
||||
confirm?: boolean
|
||||
@ -101,7 +101,7 @@ declare namespace material {
|
||||
taker?: string
|
||||
|
||||
/** 类型(1: 采购入库申请 2: 归还入库申请 3: 出库外借申请 4: 盘点申请) */
|
||||
type?: 'PURCHASE_RECEIPT' | 'RETURN_RECEIPT' | 'LOAN_OUT' | 'AUDIT'
|
||||
type?: 'PURCHASE_RECEIPT' | 'RETURN_RECEIPT' | 'LOAN_OUT' | 'AUDIT' | 'SCRAP_OUT'
|
||||
|
||||
/** updatedTime */
|
||||
updatedTime?: string
|
||||
@ -131,8 +131,8 @@ declare namespace material {
|
||||
/** 申请日期 */
|
||||
applyDate?: string
|
||||
|
||||
/** 盘点类型(1: 全盘 2: 部分盘点) */
|
||||
auditType?: 'ALL' | 'PARTIAL'
|
||||
/** 盘点类型(1: 扫码 2: 人工) */
|
||||
auditType?: 'SCAN' | 'MANUAL'
|
||||
|
||||
/** 是否确认(0: 未确认 1: 已确认) */
|
||||
confirm?: boolean
|
||||
@ -146,9 +146,6 @@ declare namespace material {
|
||||
/** 物料ids */
|
||||
ids?: Array<string>
|
||||
|
||||
/** 物料类型 */
|
||||
types?: Array<string>
|
||||
|
||||
/** 审核意见 */
|
||||
reviewRemark?: string
|
||||
|
||||
@ -162,7 +159,10 @@ declare namespace material {
|
||||
taker?: string
|
||||
|
||||
/** 类型(1: 采购入库申请 2: 归还入库申请 3: 出库外借申请 4: 盘点申请) */
|
||||
type?: 'PURCHASE_RECEIPT' | 'RETURN_RECEIPT' | 'LOAN_OUT' | 'AUDIT'
|
||||
type?: 'PURCHASE_RECEIPT' | 'RETURN_RECEIPT' | 'LOAN_OUT' | 'AUDIT' | 'SCRAP_OUT'
|
||||
|
||||
/** 物料类型 */
|
||||
types?: Array<string>
|
||||
|
||||
/** updatedTime */
|
||||
updatedTime?: string
|
||||
@ -213,6 +213,9 @@ declare namespace material {
|
||||
/** 类型 */
|
||||
type?: string
|
||||
|
||||
/** typeName */
|
||||
typeName?: string
|
||||
|
||||
/** updatedTime */
|
||||
updatedTime?: string
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ export interface Params {
|
||||
/** 页面大小 */
|
||||
size?: number
|
||||
/** 盘点类型 */
|
||||
auditType?: 'ALL' | 'PARTIAL'
|
||||
auditType?: 'SCAN' | 'MANUAL'
|
||||
/** 盘点人 */
|
||||
taker?: string
|
||||
/** 创建日期 */
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<a-form :model="formData" name="basic" layout="horizontal" label-wrap>
|
||||
<a-form-item label="申请人" name="applicant">
|
||||
<a-input :value="formData.applicant" style="width: 40%" />
|
||||
<a-input v-model="formData.applicant" style="width: 40%" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="申请类型" name="applyType">
|
||||
@ -29,7 +29,6 @@
|
||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||
placeholder="请选择物料类型"
|
||||
allow-clear
|
||||
tree-default-expand-all
|
||||
:tree-data="types"
|
||||
tree-node-filter-prop="label"
|
||||
/>
|
||||
@ -68,7 +67,7 @@
|
||||
<vxe-column field="code" title="编码" />
|
||||
<vxe-column field="spec" title="规格" />
|
||||
<vxe-column field="price" title="价格" />
|
||||
<vxe-column field="type" title="类型" />
|
||||
<vxe-column field="typeName" title="类型" />
|
||||
<vxe-column field="assignRule" title="是否赋码">
|
||||
<template #default="{ row }">
|
||||
{{ row.assignRule ? '是' : '否' }}
|
||||
@ -174,6 +173,7 @@
|
||||
code: string
|
||||
spec: string
|
||||
type: string
|
||||
typeName: string
|
||||
quantity: number
|
||||
disabled: boolean
|
||||
checked: boolean
|
||||
@ -218,6 +218,7 @@
|
||||
name: m.name ? m.name : '',
|
||||
code: m.code ? m.code : '',
|
||||
spec: m.spec ? m.spec : '',
|
||||
typeName: m.typeName ? m.typeName : '',
|
||||
type: m.type ? m.type : '',
|
||||
price: m.price ? m.price : 0,
|
||||
quantity: 1,
|
||||
|
@ -38,7 +38,7 @@
|
||||
<vxe-column field="name" title="物料名称" />
|
||||
<vxe-column field="code" title="编码" />
|
||||
<vxe-column field="spec" title="规格" />
|
||||
<vxe-column field="type" title="类型" />
|
||||
<vxe-column field="typeName" title="类型" />
|
||||
<vxe-column field="times" title="扫码时间" />
|
||||
<vxe-column field="oprator" title="操作">
|
||||
<template #default="{ row }">
|
||||
@ -127,6 +127,7 @@
|
||||
code: string
|
||||
spec: string
|
||||
type: string
|
||||
typeName: string
|
||||
times: string
|
||||
}
|
||||
|
||||
@ -193,6 +194,7 @@
|
||||
code: materialInfo?.code ?? '',
|
||||
spec: materialInfo?.spec ?? '',
|
||||
type: materialInfo?.type ?? '',
|
||||
typeName: materialInfo?.typeName ?? '',
|
||||
times: new Date().toLocaleString(),
|
||||
}
|
||||
$table.insert(row)
|
||||
|
@ -98,7 +98,7 @@ export const formItems = (types: TreeDataNode[]): FormItem[] => [
|
||||
autoLink: true,
|
||||
hasFeedback: false,
|
||||
label: '是否赋码',
|
||||
name: 'azry',
|
||||
name: 'assignRule',
|
||||
required: true,
|
||||
},
|
||||
properties: {
|
||||
|
@ -3,7 +3,7 @@
|
||||
<!-- 页面操作栏 -->
|
||||
<template #ops>
|
||||
<a-row>
|
||||
<a-col :span="6">
|
||||
<a-col :span="16">
|
||||
<a-input-search
|
||||
v-model:value="searchKey"
|
||||
:placeholder="`名称/编码/类型`"
|
||||
@ -12,7 +12,7 @@
|
||||
@search="loadData()"
|
||||
></a-input-search>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-col :span="8">
|
||||
<a-button type="primary" style="margin-left: 10px" @click="addOrEdit()">
|
||||
<template #icon>
|
||||
<icon-font type="icon-plus" />
|
||||
@ -161,7 +161,7 @@
|
||||
},
|
||||
{
|
||||
title: '物料类型',
|
||||
dataIndex: 'type',
|
||||
dataIndex: 'typeName',
|
||||
},
|
||||
{
|
||||
title: '物料型号',
|
||||
@ -178,7 +178,6 @@
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'operation',
|
||||
width: 400,
|
||||
},
|
||||
]
|
||||
|
||||
|
@ -60,6 +60,11 @@
|
||||
|
||||
//表格列
|
||||
const columns = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'key',
|
||||
customRender: ({ index }: { index: number }) => `${index + 1}`,
|
||||
},
|
||||
{
|
||||
title: '物料名称',
|
||||
dataIndex: 'name',
|
||||
|
@ -60,6 +60,11 @@
|
||||
|
||||
//表格列
|
||||
const columns = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'key',
|
||||
customRender: ({ index }: { index: number }) => `${index + 1}`,
|
||||
},
|
||||
{
|
||||
title: '物料名称',
|
||||
dataIndex: 'name',
|
||||
|
@ -35,10 +35,10 @@
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.dataIndex === 'auditType'">
|
||||
{{ record.auditType === 'ALL' ? '全部盘点' : '部分盘点' }}
|
||||
{{ record.auditType === 'SCAN' ? '扫码盘点' : '人工盘点' }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'reviewResult'">
|
||||
<template v-if="record.reviewResult === 'WAIT_SCAN'"><span style="color: #faad14">待扫码</span></template>
|
||||
<template v-if="record.reviewResult === 'WAIT_SCAN'"><span style="color: #faad14">待盘点</span></template>
|
||||
<template v-if="record.reviewResult === 'WAIT_SUBMIT'"><span style="color: #1890ff">待提交</span></template>
|
||||
<template v-if="record.reviewResult === 'WAIT_REVIEW'"><span style="color: #722ed1">待审核</span></template>
|
||||
<template v-if="record.reviewResult === 'PASS'"><span style="color: #52c41a">审核通过</span></template>
|
||||
@ -53,7 +53,7 @@
|
||||
<template #icon>
|
||||
<icon-font type="icon-edit" />
|
||||
</template>
|
||||
开始扫码
|
||||
开始盘点
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="record.reviewResult === 'WAIT_SUBMIT'"
|
||||
@ -129,7 +129,7 @@
|
||||
const confirmLoading = ref(false) // 盘点作业弹窗提交按钮loading
|
||||
// 新增申请表单对象
|
||||
const applyForm = ref<Partial<material.AuditApplyInfo>>({
|
||||
auditType: 'ALL',
|
||||
auditType: 'SCAN',
|
||||
applicant: userStore.fullName,
|
||||
type: 'AUDIT',
|
||||
applyDate: dayjs() + '',
|
||||
@ -167,7 +167,14 @@
|
||||
applyForm,
|
||||
() => {
|
||||
if (applyForm.value && applyForm.value.types && applyForm.value.types.length > 0) {
|
||||
getMaterialList()
|
||||
api.materialApi.material.all({ type: applyForm.value.types[0] }, (data) => {
|
||||
materialList.value = data.map((item) => {
|
||||
return {
|
||||
value: item?.id + '',
|
||||
label: item?.name,
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -189,16 +196,6 @@
|
||||
key: areaTree.value,
|
||||
}))
|
||||
}
|
||||
const getMaterialList = async () => {
|
||||
await api.materialApi.material.all({ type: '' }, (data) => {
|
||||
materialList.value = data.map((item) => {
|
||||
return {
|
||||
value: item?.id + '',
|
||||
label: item?.name,
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
//抽屉组件
|
||||
const formDrawer = ref<typeof FormDrawer>()
|
||||
@ -300,7 +297,21 @@
|
||||
// 盘点作业弹窗相关
|
||||
const open = ref<boolean>(false)
|
||||
const applyIdRef = ref()
|
||||
const showModal = (applyId: number) => {
|
||||
const showModal = (applyId: number, auditType: string) => {
|
||||
if (auditType === 'SCAN') {
|
||||
showScanModal(applyId)
|
||||
} else {
|
||||
showManualModal(applyId)
|
||||
}
|
||||
}
|
||||
|
||||
// 人工
|
||||
const showManualModal = (applyId: number) => {
|
||||
console.log('点击传参' + applyId)
|
||||
}
|
||||
|
||||
// 扫码弹窗
|
||||
const showScanModal = (applyId: number) => {
|
||||
open.value = true
|
||||
applyIdRef.value = applyId
|
||||
let m = '需要扫码的物料: '
|
||||
@ -313,6 +324,7 @@
|
||||
window.console.log(m)
|
||||
msg.value = m
|
||||
}
|
||||
|
||||
// 盘点作业提交数据
|
||||
|
||||
//关闭弹窗 提交数据
|
||||
|
@ -59,8 +59,8 @@ export default defineConfig(({ mode }) => {
|
||||
open: true,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'https://ims.riemann.tech/api/',
|
||||
// target: 'http://127.0.0.1:8888',
|
||||
// target: 'https://ims.riemann.tech/api/',
|
||||
target: 'http://127.0.0.1:8888',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user