Browse Source

发票修改

master_hella_20240701
zhaoxuebing 8 months ago
parent
commit
04b5d9d94f
  1. 1
      src/api/wms/supplierinvoiceRequestMain/index.ts
  2. 1
      src/utils/dict.ts
  3. 60
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  4. 341
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

1
src/api/wms/supplierinvoiceRequestMain/index.ts

@ -88,3 +88,4 @@ export const exportSupplierinvoiceRequestMain = async (params) => {
return await request.download({ url: `/wms/supplierinvoice-request-main/export-excel`, params })
}
}

1
src/utils/dict.ts

@ -278,4 +278,5 @@ export enum DICT_TYPE {
PURCHASERECEIPT_SOURCE_TYPE="purchasereceipt_source_type",//采购收货数据来源
PLAN_PRODUCTION_TYPE = "plan_production_type", // 生产计划类型
DELIVER_TYPE="deliver_type",//发货类型
BILL_TYPE="bill_type", // 发票类型
}

60
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -1,14 +1,18 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SupplierinvoiceRequestMain.allSchemas.searchSchema" @search="setSearchParams"
@reset="setSearchParams" />
<Search :schema="SupplierinvoiceRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick"
:allSchemas="SupplierinvoiceRequestMain.allSchemas" />
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="SupplierinvoiceRequestMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
@ -28,28 +32,48 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm ref="formRef" @success="getList" :rules="SupplierinvoiceRequestMainRules"
:formAllSchemas="SupplierinvoiceRequestMain.allSchemas" :searchTableParams="searchTableParams"
:tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas" :tableFormRules="SupplierinvoiceRequestDetailRules"
:tableData="tableData" :apiUpdate="SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain"
:apiCreate="SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain" :isBusiness="true"
@handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" />
<BasicForm
ref="formRef"
@success="getList"
:rules="SupplierinvoiceRequestMainRules"
:formAllSchemas="SupplierinvoiceRequestMain.allSchemas"
:searchTableParams="searchTableParams"
:tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
:tableFormRules="SupplierinvoiceRequestDetailRules"
:tableData="tableData"
:apiUpdate="SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain"
:apiCreate="SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain"
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="false" :allSchemas="SupplierinvoiceRequestMain.allSchemas"
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="SupplierinvoiceRequestMain.allSchemas"
:detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
:detailAllSchemasRules="SupplierinvoiceRequestDetailRules" :searchTableParams="searchTableParams"
:detailAllSchemasRules="SupplierinvoiceRequestDetailRules"
:searchTableParams="searchTableParams"
:apiCreate="SupplierinvoiceRequestDetailApi.createSupplierinvoiceRequestDetail"
:apiUpdate="SupplierinvoiceRequestDetailApi.updateSupplierinvoiceRequestDetail"
:apiPage="SupplierinvoiceRequestDetailApi.getSupplierinvoiceRequestDetailPage"
:apiDelete="SupplierinvoiceRequestDetailApi.deleteSupplierinvoiceRequestDetail" :Echo="Echo" />
:apiDelete="SupplierinvoiceRequestDetailApi.deleteSupplierinvoiceRequestDetail"
:Echo="Echo"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { SupplierinvoiceRequestMain, SupplierinvoiceRequestMainRules, SupplierinvoiceRequestDetail, SupplierinvoiceRequestDetailRules } from './supplierinvoiceRequestMain.data'
import { SupplierinvoiceRequestMain,
SupplierinvoiceRequestMainRules,
SupplierinvoiceRequestDetail,
SupplierinvoiceRequestDetailRules } from './supplierinvoiceRequestMain.data'
import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain'
import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -98,6 +122,10 @@
}
} else {
const setV = {}
if(formField == 'recordNumber'){
setV['recordNumber'] = val[0]['number']
setV['asnBillNum'] = val[0]['asnNumber']
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}

341
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -3,7 +3,7 @@ import { dateFormatter } from '@/utils/formatTime'
import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
const { t } = useI18n() // 国际化
const recordTypeList = [{ label: '收货单号', value: '1' }, { label: '退货单号', value: '2' }, { label: '索赔单号', value: '3' }]
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as supplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain'
import * as supplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail'
@ -27,6 +27,94 @@ const requestsettingData = data?.list[0] || {}
const userDeptArray:any = [userDept]
export const PurchaseReceiptOrReturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number'
},
{
label: '供应商代码',
field: 'supplierCode'
},
{
label: '发货单号',
field: 'asnNumber'
},
{
label: '备注',
field: 'remark',
},
{
label: '创建时间',
field: 'createTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isTableForm: false,
isForm: false
},
{
label: '创建者',
field: 'creator',
isTableForm: false,
isForm: false
}
]))
/**
* @returns {Array} 退
*/
export const PurchaseReceiptOrReturnRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '订单号',
field: 'poNumber'
},
{
label: '物料代码',
field: 'itemCode'
},
{
label: '货主代码',
field: 'ownerCode'
},
{
label: '批次',
field: 'batch'
},
{
label: '单价',
field: 'singlePrice',
form: {
component: 'InputNumber',
}
},
{
label: '备注',
field: 'remark',
},
{
label: '创建时间',
field: 'createTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isTableForm: false,
isForm: false
},
{
label: '创建者',
field: 'creator',
isTableForm: false,
isForm: false
}
]))
/**
* @returns {Array}
*/
@ -62,6 +150,136 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}
}
},
{
label: '单据类型',
field: 'billType',
dictType: DICT_TYPE.BILL_TYPE,
dictClass: 'string',
isTable: true,
isSearch: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '记录单号',
field: 'recordNumber',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '单号信息', // 查询弹窗标题
searchAllSchemas: PurchaseReceiptOrReturnRecordMain.allSchemas,
searchPage: supplierinvoiceRequestMainApi.getNumber,
searchCondition: [{
key: 'supplierCode',
value: 'supplierCode',
message: '请填写供应商代码!',
isMainValue: true
},
{
key: 'billType',
value: 'billType',
message: '请填写单据类型!',
isMainValue: true
}]
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择单号',
searchField: 'number',
searchTitle: '单号信息',
searchAllSchemas: PurchaseReceiptOrReturnRecordMain.allSchemas,
searchPage: supplierinvoiceRequestMainApi.getNumber,
searchCondition: [{
key: 'supplierCode',
value: 'supplierCode',
message: '请填写供应商代码!',
isMainValue: true
},
{
key: 'billType',
value: 'billType',
message: '请填写单据类型!',
isMainValue: true
}]
}
},
{
label: '发货单号',
field: 'asnBillNum',
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
{
label: '订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '订单号信息',
searchAllSchemas: PurchaseReceiptOrReturnRecordDetail.allSchemas,
searchPage: supplierinvoiceRequestDetailApi.getPoNumber,
searchCondition: [
{
key: 'number',
value: 'recordNumber',
message: '请填写记录单号!',
isMainValue: true
}
,
{
key: 'billType',
value: 'billType',
message: '请填写单号类型!',
isMainValue: true
}]
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '订单号信息',
searchAllSchemas: PurchaseReceiptOrReturnRecordDetail.allSchemas,
searchPage: supplierinvoiceRequestDetailApi.getPoNumber,
searchCondition: [
{
key: 'number',
value: 'recordNumber',
message: '请填写记录单号!',
isMainValue: true
}
,
{
key: 'billType',
value: 'billType',
message: '请填写单号类型!',
isMainValue: true
}]
}
},
{
label: '调增金额',
field: 'adjustAmount',
@ -69,6 +287,8 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
isForm:false,
isTable:false,
form: {
component: 'InputNumber',
},
@ -80,6 +300,8 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
isTable:false,
isForm:false,
form: {
value: 'SupplierInvoice',
componentProps: {
@ -98,6 +320,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 180
},
isForm:false,
form: {
component: 'DatePicker',
componentProps: {
@ -118,6 +341,8 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 180
},
isForm:false,
isTable:false,
form: {
component: 'DatePicker',
componentProps: {
@ -236,7 +461,8 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
field: 'autoCommit',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
isForm:false,
sort: 'custom',
table: {
width: 150
@ -256,7 +482,8 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
field: 'autoAgree',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
isForm: false,
sort: 'custom',
table: {
width: 150
@ -276,7 +503,8 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
field: 'autoExecute',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
isForm: false,
sort: 'custom',
table: {
width: 150
@ -352,78 +580,7 @@ export const SupplierinvoiceRequestMainRules = reactive({
],
})
/**
* @returns {Array}
*/
export const SupplierinvoiceRequestDetailaa = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '订单行',
field: 'poNumber'
},
{
label: '订单行',
field: 'poLine'
},
{
label: '物料代码',
field: 'itemCode'
},
{
label: '货主代码',
field: 'ownerCode'
},
{
label: '批次',
field: 'batch'
},
{
label: '单价',
field: 'singlePrice',
form: {
component: 'InputNumber',
}
},
{
label: '金额',
field: 'amount',
form: {
component: 'InputNumber',
}
},
{
label: '备注',
field: 'remark',
},
{
label: '创建时间',
field: 'createTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isTableForm: false,
isForm: false
},
{
label: '创建者',
field: 'creator',
isTableForm: false,
isForm: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 150,
fixed: 'right'
},
isTableForm: false,
}
]))
/**
* @returns {Array}
*/
@ -437,36 +594,8 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
},
tableForm: {
type: 'Select',
initOptions: recordTypeList,
},
},
{
label: '单号',
field: 'recordNumber',
sort: 'custom',
table: {
width: 150
initOptions: [{ label: '收货单号', value: '1' }, { label: '退货单号', value: '2' }],
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择单号',
searchField: 'number',
searchTitle: '单号信息',
searchAllSchemas: SupplierinvoiceRequestMain.allSchemas,
searchPage: supplierinvoiceRequestMainApi.getNumber,
searchCondition: [{
key: 'supplierCode',
value: 'supplierCode',
message: '请填写供应商代码!',
isMainValue: true
},
{
key: 'recordType',
value: 'recordType',
message: '请填写单号类型!',
isMainValue: true
}]
}
},
{
label: '订单号',
@ -482,7 +611,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '订单号信息',
searchAllSchemas: SupplierinvoiceRequestDetailaa.allSchemas,
searchAllSchemas: PurchaseReceiptOrReturnRecordDetail.allSchemas,
searchPage: supplierinvoiceRequestDetailApi.getPoNumber
}
},
@ -491,7 +620,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '订单号信息',
searchAllSchemas: SupplierinvoiceRequestDetailaa.allSchemas,
searchAllSchemas: PurchaseReceiptOrReturnRecordDetail.allSchemas,
searchPage: supplierinvoiceRequestDetailApi.getPoNumber,
searchCondition: [
{

Loading…
Cancel
Save