Browse Source

Merge remote-tracking branch 'origin/master'

master
zhaoxuebing 11 months ago
parent
commit
e4773101d6
  1. 8
      src/api/wms/packagemergeDetail/index.ts
  2. 8
      src/api/wms/packageoverDetail/index.ts
  3. 8
      src/api/wms/packagesplitDetail/index.ts
  4. 10
      src/api/wms/purchasereceiptRecordDetail/index.ts
  5. 11
      src/api/wms/purchasereceiptRequestDetail/index.ts
  6. 2
      src/api/wms/supplierdeliverRequestMain/index.ts
  7. 7
      src/api/wms/supplierinvoiceRequestDetail/index.ts
  8. 24
      src/api/wms/supplierinvoiceRequestMain/index.ts
  9. 190
      src/components/HeaderSearch/index.vue
  10. 1
      src/layout/components/ToolHeader.vue
  11. 100
      src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts
  12. 1
      src/views/wms/basicDataManage/itemManage/stdcostprice/index.vue
  13. 84
      src/views/wms/basicDataManage/itemManage/stdcostprice/stdcostprice.data.ts
  14. 45
      src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue
  15. 382
      src/views/wms/basicDataManage/labelManage/manufacturePackage/manufacturePackage.data.ts
  16. 33
      src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue
  17. 383
      src/views/wms/basicDataManage/labelManage/purchasePackage/purchasePackage.data.ts
  18. 37
      src/views/wms/basicDataManage/labelManage/utensilPackage/index.vue
  19. 371
      src/views/wms/basicDataManage/labelManage/utensilPackage/utensilPackage.data.ts
  20. 17
      src/views/wms/basicDataManage/orderManage/team/team.data.ts
  21. 32
      src/views/wms/inventoryjobManage/packageManage/packagemergeMain/packagemergeMain.data.ts
  22. 32
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverMain.data.ts
  23. 32
      src/views/wms/inventoryjobManage/packageManage/packagesplitMain/packagesplitMain.data.ts
  24. 2
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue
  25. 5
      src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/inspectRequestMain.data.ts
  26. 21
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
  27. 21
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  28. 54
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  29. 9
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts
  30. 590
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  31. 281
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

8
src/api/wms/packagemergeDetail/index.ts

@ -32,7 +32,13 @@ export interface PackagemergeDetailVO {
// 查询合包记录子列表 // 查询合包记录子列表
export const getPackagemergeDetailPage = async (params) => { export const getPackagemergeDetailPage = async (params) => {
return await request.get({ url: '/wms/packagemerge-detail/page', params }) if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/packagemerge-detail/senior', data })
} else {
return await request.get({ url: `/wms/packagemerge-detail/page`, params })
}
} }
// 查询合包记录子详情 // 查询合包记录子详情

8
src/api/wms/packageoverDetail/index.ts

@ -32,7 +32,13 @@ export interface PackageoverDetailVO {
// 查询翻包记录子列表 // 查询翻包记录子列表
export const getPackageoverDetailPage = async (params) => { export const getPackageoverDetailPage = async (params) => {
return await request.get({ url: '/wms/packageover-detail/page', params }) if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/packageover-detail/senior', data })
} else {
return await request.get({ url: `/wms/packageover-detail/page`, params })
}
} }
// 查询翻包记录子详情 // 查询翻包记录子详情

8
src/api/wms/packagesplitDetail/index.ts

@ -32,7 +32,13 @@ export interface PackagesplitDetailVO {
// 查询拆包记录子列表 // 查询拆包记录子列表
export const getPackagesplitDetailPage = async (params) => { export const getPackagesplitDetailPage = async (params) => {
return await request.get({ url: '/wms/packagesplit-detail/page', params }) if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/packagesplit-detail/senior', data })
} else {
return await request.get({ url: `/wms/packagesplit-detail/page`, params })
}
} }
// 查询拆包记录子详情 // 查询拆包记录子详情

10
src/api/wms/purchasereceiptRecordDetail/index.ts

@ -90,4 +90,14 @@ export const exportPurchasereceiptRecordDetail = async (params) => {
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/purchasereceipt-record-detail/get-import-template' }) return request.download({ url: '/wms/purchasereceipt-record-detail/get-import-template' })
}
// 缺货明细
export const getScarceGoodsDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchaseshortage-detail/senior', data })
} else {
return await request.get({ url: `/wms/purchaseshortage-detail/page`, params })
}
} }

11
src/api/wms/purchasereceiptRequestDetail/index.ts

@ -65,16 +65,7 @@ export const deletePurchasereceiptRequestDetail = async (id: number) => {
return await request.delete({ url: `/wms/purchasereceipt-request-detail/delete?id=` + id }) return await request.delete({ url: `/wms/purchasereceipt-request-detail/delete?id=` + id })
} }
// 缺货明细
export const getScarceGoodsDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchaseshortage-detail/senior', data })
} else {
return await request.get({ url: `/wms/purchaseshortage-detail/page`, params })
}
}
// 导出采购收货申请子 Excel // 导出采购收货申请子 Excel
export const exportPurchasereceiptRequestDetail = async (params) => { export const exportPurchasereceiptRequestDetail = async (params) => {

2
src/api/wms/supplierdeliverRequestMain/index.ts

@ -88,7 +88,7 @@ export const genLabel = async (id) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/genLabel?id=` + id }) return await request.post({ url: `/wms/supplierdeliver-request-main/genLabel?id=` + id })
} }
// 生成记录 // 生成记录
export const genRecordsSupplierdeliverRequestMain = async (id) => { export const genRecordsSupplierinvoiceRequestMain = async (id) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/genRecords?id=` + id }) return await request.post({ url: `/wms/supplierdeliver-request-main/genRecords?id=` + id })
} }
// 导出供应商发货申请主 Excel // 导出供应商发货申请主 Excel

7
src/api/wms/supplierinvoiceRequestDetail/index.ts

@ -34,6 +34,11 @@ export const getSupplierinvoiceRequestDetailPage = async (params) => {
} }
} }
// 查询供应商发票申请主详情
export const getPoNumber = async (params) => {
return await request.get({ url: `/wms/supplierinvoice-request-detail/getPoNumber`, params})
}
// 查询供应商发票申请子详情 // 查询供应商发票申请子详情
export const getSupplierinvoiceRequestDetail = async (id: number) => { export const getSupplierinvoiceRequestDetail = async (id: number) => {
return await request.get({ url: `/wms/supplierinvoice-request-detail/get?id=` + id }) return await request.get({ url: `/wms/supplierinvoice-request-detail/get?id=` + id })
@ -62,4 +67,4 @@ export const exportSupplierinvoiceRequestDetail = async (params) => {
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/supplierinvoice-request-detail/get-import-template' }) return request.download({ url: '/wms/supplierinvoice-request-detail/get-import-template' })
} }

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

@ -56,6 +56,30 @@ export const deleteSupplierinvoiceRequestMain = async (id: number) => {
return await request.delete({ url: `/wms/supplierinvoice-request-main/delete?id=` + id }) return await request.delete({ url: `/wms/supplierinvoice-request-main/delete?id=` + id })
} }
// 打开供应商发货申请主
export const opeSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/open?id=` + id })
}
// 关闭供应商发货申请主
export const cloSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/close?id=` + id })
}
// 提交审批供应商发货申请主
export const subSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/sub?id=` + id })
}
// 审批通过供应商发货申请主
export const appSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/app?id=` + id })
}
// 驳回供应商发货申请主
export const rejSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/rej?id=` + id })
}
// 生成记录
export const genRecordsSupplierinvoiceRequestMain = async (id) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/genRecords?id=` + id })
}
// 导出供应商发票申请主 Excel // 导出供应商发票申请主 Excel
export const exportSupplierinvoiceRequestMain = async (params) => { export const exportSupplierinvoiceRequestMain = async (params) => {
return await request.download({ url: `/wms/supplierinvoice-request-main/export-excel`, params }) return await request.download({ url: `/wms/supplierinvoice-request-main/export-excel`, params })

190
src/components/HeaderSearch/index.vue

@ -0,0 +1,190 @@
<template>
<div :class="{ show: show }" class="header-search">
<svg-icon
class-name="search-icon"
icon-class="search"
@click.stop="click"
/>
<el-select
ref="headerSearchSelect"
v-model="search"
:remote-method="querySearch"
filterable
default-first-option
remote
placeholder="搜索导航栏"
class="header-search-select"
@change="change"
>
<el-option
v-for="item in options"
:key="item.path"
:value="item"
:label="item.title.join(' > ')"
/>
</el-select>
</div>
</template>
<script>
// fuse is a lightweight fuzzy-search module
// make search results more in line with expectations
import Fuse from 'fuse.js'
import path from 'path'
export default {
name: 'HeaderSearch',
data () {
return {
search: '',
options: [],
searchPool: [],
show: false,
fuse: undefined
}
},
computed: {
routes () {
return this.$store.getters.permission_routes
}
},
watch: {
routes () {
this.searchPool = this.generateRoutes(this.routes)
},
searchPool (list) {
this.initFuse(list)
},
show (value) {
if (value) {
document.body.addEventListener('click', this.close)
} else {
document.body.removeEventListener('click', this.close)
}
}
},
mounted () {
this.searchPool = this.generateRoutes(this.routes)
},
methods: {
click () {
this.show = !this.show
if (this.show) {
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus()
}
},
close () {
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur()
this.options = []
this.show = false
},
change (val) {
this.$router.push(val.path)
this.search = ''
this.options = []
this.$nextTick(() => {
this.show = false
})
},
initFuse (list) {
this.fuse = new Fuse(list, {
shouldSort: true,
threshold: 0.4,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [{
name: 'title',
weight: 0.7
}, {
name: 'path',
weight: 0.3
}]
})
},
// Filter out the routes that can be displayed in the sidebar
// And generate the internationalized title
generateRoutes (routes, basePath = '/', prefixTitle = []) {
let res = []
for (const router of routes) {
// skip hidden router
if (router.hidden) { continue }
const data = {
path: path.resolve(basePath, router.path),
title: [...prefixTitle]
}
if (router.meta && router.meta.title) {
data.title = [...data.title, router.meta.title]
if (router.redirect !== 'noRedirect') {
// only push the routes with title
// special case: need to exclude parent router without redirect
res.push(data)
}
}
// recursive child routes
if (router.children) {
const tempRoutes = this.generateRoutes(router.children, data.path, data.title)
if (tempRoutes.length >= 1) {
res = [...res, ...tempRoutes]
}
}
}
return res
},
querySearch (query) {
if (query !== '') {
this.options = this.fuse.search(query)
} else {
this.options = []
}
}
}
}
</script>
<style lang="scss" scoped>
.header-search {
font-size: 0 !important;
.search-icon {
cursor: pointer;
font-size: 18px;
vertical-align: middle;
}
.header-search-select {
font-size: 18px;
transition: width 0.2s;
width: 0;
overflow: hidden;
background: transparent;
border-radius: 0;
display: inline-block;
vertical-align: middle;
::v-deep .el-input__inner {
border-radius: 0;
border: 0;
padding-left: 0;
padding-right: 0;
box-shadow: none !important;
border-bottom: 1px solid #d9d9d9;
vertical-align: middle;
background: transparent;
}
}
&.show {
.header-search-select {
width: 210px;
margin-left: 10px;
}
}
}
</style>

1
src/layout/components/ToolHeader.vue

@ -10,6 +10,7 @@ import { LocaleDropdown } from '@/layout/components/LocaleDropdown'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
//
const { getPrefixCls, variables } = useDesign() const { getPrefixCls, variables } = useDesign()
const prefixCls = getPrefixCls('tool-header') const prefixCls = getPrefixCls('tool-header')

100
src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts

@ -17,53 +17,53 @@ const { t } = useI18n() // 国际化
* @returns {Array} 线 * @returns {Array} 线
*/ */
export const Productionlineitem = useCrudSchemas(reactive<CrudSchema[]>([ export const Productionlineitem = useCrudSchemas(reactive<CrudSchema[]>([
{ // {
label: '完工收货库位', // label: '完工收货库位',
field: 'fgLocationCode', // field: 'fgLocationCode',
isSearch: true, // isSearch: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150, // width: 150,
fixed: 'left' // fixed: 'left'
}, // },
form: { // form: {
// labelMessage: '信息提示说明!!!', // // labelMessage: '信息提示说明!!!',
componentProps: { // componentProps: {
isSearchList: true, // isSearchList: true,
searchListPlaceholder: '请选择库位代码', // searchListPlaceholder: '请选择库位代码',
searchField: 'code', // searchField: 'code',
searchTitle: '库位信息', // searchTitle: '库位信息',
searchAllSchemas: Location.allSchemas, // searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.getLocationPage, // searchPage: LocationApi.getLocationPage,
searchCondition: [{ // searchCondition: [{
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
isMainValue: false // isMainValue: false
}] // }]
} // }
} // }
}, // },
{ // {
label: '原料库位', // label: '原料库位',
field: 'rawLocationCode', // field: 'rawLocationCode',
isSearch: true, // isSearch: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150, // width: 150,
fixed: 'left' // fixed: 'left'
}, // },
form: { // form: {
// labelMessage: '信息提示说明!!!', // // labelMessage: '信息提示说明!!!',
componentProps: { // componentProps: {
isSearchList: true, // isSearchList: true,
searchListPlaceholder: '请选择库位代码', // searchListPlaceholder: '请选择库位代码',
searchField: 'code', // searchField: 'code',
searchTitle: '库位信息', // searchTitle: '库位信息',
searchAllSchemas: Location.allSchemas, // searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.getLocationPage // searchPage: LocationApi.getLocationPage
} // }
} // }
}, // },
{ {
label: '产线代码' , label: '产线代码' ,
field: 'productionLineCode', field: 'productionLineCode',
@ -237,9 +237,9 @@ export const Productionlineitem = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验 //表单校验
export const ProductionlineitemRules = reactive({ export const ProductionlineitemRules = reactive({
fgLocationCode: [ // fgLocationCode: [
{ required: true, message: '请输入完工收货库位', trigger: 'change' } // { required: true, message: '请输入完工收货库位', trigger: 'change' }
], // ],
productionLineCode: [ productionLineCode: [
{ required: true, message: '请输入产线代码', trigger: 'change' } { required: true, message: '请输入产线代码', trigger: 'change' }
], ],

1
src/views/wms/basicDataManage/itemManage/stdcostprice/index.vue

@ -67,6 +67,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
//
defineOptions({ name: 'Stdcostprice' }) defineOptions({ name: 'Stdcostprice' })
const message = useMessage() // const message = useMessage() //

84
src/views/wms/basicDataManage/itemManage/stdcostprice/stdcostprice.data.ts

@ -1,11 +1,11 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as SupplieritemApi from '@/api/wms/supplieritem' import * as ItembasicApi from '@/api/wms/itembasic'
import { Supplieritem } from '../../supplierManage/supplieritem/supplieritem.data' import { Itembasic } from '../../itemManage/itembasic/itembasic.data'
import * as SupplierApi from '@/api/wms/supplier' // import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' // import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
@ -13,34 +13,34 @@ const { t } = useI18n() // 国际化
* @returns {Array} * @returns {Array}
*/ */
export const Stdcostprice = useCrudSchemas(reactive<CrudSchema[]>([ export const Stdcostprice = useCrudSchemas(reactive<CrudSchema[]>([
{ // {
label: '供应商代码', // label: '供应商代码',
field: 'supplierCode', // field: 'supplierCode',
isSearch: true, // isSearch: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150, // width: 150,
fixed: 'left' // fixed: 'left'
}, // },
form: { // form: {
// labelMessage: '信息提示说明!!!', // // labelMessage: '信息提示说明!!!',
componentProps: { // componentProps: {
isSearchList: true, // 开启查询弹窗 // isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 // searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 // searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题 // searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 // searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法 // searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
searchCondition: [{ // searchCondition: [{
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
action: '==', // action: '==',
isSearch: true, // isSearch: true,
isMainValue: false // isMainValue: false
}] // }]
} // }
} // }
}, // },
{ {
label: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',
@ -54,15 +54,17 @@ export const Stdcostprice = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物品代码', // 输入框占位文本 searchListPlaceholder: '请选择物品代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商物品信息', // 查询弹窗标题 searchTitle: '物品信息', // 查询弹窗标题
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
key:'supplierCode', // {
value:'supplierCode', // key:'supplierCode',
isMainValue: true // value:'supplierCode',
},{ // isMainValue: true
// },
{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false

45
src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue

@ -45,8 +45,8 @@
:rules="PackageRules" :rules="PackageRules"
:formAllSchemas="Package.allSchemas" :formAllSchemas="Package.allSchemas"
:searchTableParams="searchTableParams" :searchTableParams="searchTableParams"
:apiUpdate="PackageApi.updatePackage" :apiUpdate="BarbasicApi.updateBarbasic"
:apiCreate="PackageApi.createPackage" :apiCreate="BarbasicApi.createBarbasic"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"
/> />
@ -62,9 +62,10 @@
import download from '@/utils/download' import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth' import { getAccessToken } from '@/utils/auth'
import { Package,PackageRules } from './manufacturePackage.data' import { Package,PackageRules } from './manufacturePackage.data'
import * as PackageApi from '@/api/wms/package' import * as BarbasicApi from '@/api/wms/barbasic'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
//
defineOptions({ name: 'ManufacturePackage' }) defineOptions({ name: 'ManufacturePackage' })
const message = useMessage() // const message = useMessage() //
@ -75,29 +76,21 @@ const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(Package.allSchemas.tableColumns) const tableColumns = ref(Package.allSchemas.tableColumns)
/** /**
* PurchasePackage regularParams = procure采购件标签记录页面 * PurchasePackage type = PurchaseLabel 采购件标签记录页面
* ManufacturePackage regularParams = manufacture 制造件标签记录页面 * ManufacturePackage type = MakeLabel 制造件标签记录页面
* UtensilPackage regularParams = utensil 器具标签记录页面 * UtensilPackage type = ContainerLabel 器具标签记录页面
* SupplierPackage regularParams = procure 供应商发货标签记录(用采购标签) * SupplierPackage type = PurchaseLabel 供应商发货标签记录(用采购标签)
*/ */
const regularParams = ref(route.name == 'PurchasePackage'?'procure':route.name == 'ManufacturePackage'?'manufacture':route.name == 'UtensilPackage'?'utensil':route.name == 'SupplierPackage'?'procure':'') const type = ref(route.name == 'PurchasePackage'?'PurchaseLabel':route.name == 'ManufacturePackage'?'MakeLabel':route.name == 'UtensilPackage'?'ContainerLabel':route.name == 'SupplierPackage'?'PurchaseLabel':'')
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
// //
const searchTableParams = ref([ const searchTableParams = ref([
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
]) ])
// //
@ -110,9 +103,9 @@ const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row
} }
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: PackageApi.getPackagePage // getListApi: BarbasicApi.getBarbasicPage //
}) })
tableObject.params.regularParams = regularParams.value tableObject.params.type = type.value
// //
const { getList, setSearchParams } = tableMethods const { getList, setSearchParams } = tableMethods
@ -182,7 +175,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} else if (val == 'point') { // } else if (val == 'point') { //
handlePoint(row.id) handlePoint(row.relateNumber)
} }
} }
@ -204,7 +197,7 @@ const handleDelete = async (id: number) => {
// //
await message.delConfirm() await message.delConfirm()
// //
await PackageApi.deletePackage(id) await BarbasicApi.deleteBarbasic(id)
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() await getList()
@ -219,8 +212,8 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const data = await PackageApi.exportPackage(setSearchParams) const data = await BarbasicApi.exportBarbasic(tableObject.params)
download.excel(data, '包装.xlsx') download.excel(data, '制造件标签.xlsx')
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -228,10 +221,10 @@ const handleExport = async () => {
} }
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const src = ref(BASE_URL + '/jmreport/view/894718245021065216?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/899811206721347584?token=' + getAccessToken())
// //
const handlePoint = async (id) => { const handlePoint = async (number) => {
window.open(src.value+'&id='+id) window.open(src.value+'&number='+number)
} }
/** 导入 */ /** 导入 */
@ -256,7 +249,7 @@ const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters, filters: searchData.filters,
regularParams:regularParams.value type:type.value
} }
getList() // getList() //
} }

382
src/views/wms/basicDataManage/labelManage/manufacturePackage/manufacturePackage.data.ts

@ -7,107 +7,54 @@ export const PackageRules = reactive({
itemCode: [required], itemCode: [required],
itemName: [required], itemName: [required],
}) })
export const Package2 = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 150,
fixed: 'left'
},
},
]))
export const Package = useCrudSchemas(reactive<CrudSchema[]>([ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '包装号', label: '标签号',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { table: {
width: 150,
fixed: 'left' fixed: 'left'
}, }
}, },
{ {
label: '物料代码', label: '标签类型',
field: 'itemCode', field: 'type',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { dictType: DICT_TYPE.LABEL_TYPE,
width: 150, dictClass: 'string'
},
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '物品描述2', label: '标签模板',
field: 'itemDesc2', field: 'template',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '批次', label: '标签状态',
field: 'batch', field: 'status',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { dictType: DICT_TYPE.LABEL_STATUS,
width: 150, dictClass: 'string'
},
}, },
{ {
label: '替代批次', label: '关联号',
field: 'altBatch', field: 'relateNumber',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '生产日期', label: '标签条码字符串',
field: 'produceDate', field: 'barcodeString',
sort: 'custom', sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
table: { table: {
width: 180, width: 170,
}, }
}, },
{ {
label: '有效期(日)', label: '打印次数',
field: 'validityDays', field: 'printTimes',
sort: 'custom', sort: 'custom',
form: { form: {
component: 'InputNumber', component: 'InputNumber',
@ -116,297 +63,34 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
}, },
value: 0 value: 0
}, },
table: {
width: 150,
},
}, },
{ {
label: '失效日期', label: '最后打印时间',
field: 'expireDate', field: 'lastPrintTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width:'100%'},
type: 'datetime', type: 'datetime',
valueFormat: 'x' dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
}, },
table: {
width: 180,
},
}, },
{ {
label: '计量单位', label: '最后打印人ID',
field: 'uom', field: 'lastPrintUserId',
sort: 'custom', sort: 'custom'
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '替代计量单位',
field: 'altUom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '替代数量',
field: 'altQty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '转换率',
field: 'convertRate',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '标包数量',
field: 'stdPackQty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '标包单位',
field: 'stdPackUnit',
sort: 'custom',
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
}, },
{ {
label: '仓库代码', label: '最后打印人用户名',
field: 'toWarehouseCode', field: 'lastPrintUserName',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150, width: 170,
}, }
},
{
label: '月台代码',
field: 'toDockCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '供应商物品代码',
field: 'supplierItemCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购计划单号',
field: 'rpNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
table: {
width: 182,
},
},
{
label: '生产订单号',
field: 'woNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产订单行',
field: 'woLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '班组代码',
field: 'teamCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '班次代码',
field: 'shiftCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户月台代码',
field: 'customerDockCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户物品代码',
field: 'customerItemCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '质量等级',
field: 'eqLevel',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '重量',
field: 'weight',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '面积',
field: 'area',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '体积',
field: 'volume',
sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '操作', label: '操作',

33
src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue

@ -45,8 +45,8 @@
:rules="PackageRules" :rules="PackageRules"
:formAllSchemas="Package.allSchemas" :formAllSchemas="Package.allSchemas"
:searchTableParams="searchTableParams" :searchTableParams="searchTableParams"
:apiUpdate="PackageApi.updatePackage" :apiUpdate="BarbasicApi.updateBarbasic"
:apiCreate="PackageApi.createPackage" :apiCreate="BarbasicApi.createBarbasic"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"
/> />
@ -62,9 +62,10 @@
import download from '@/utils/download' import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth' import { getAccessToken } from '@/utils/auth'
import { Package,PackageRules } from './purchasePackage.data' import { Package,PackageRules } from './purchasePackage.data'
import * as PackageApi from '@/api/wms/package' import * as BarbasicApi from '@/api/wms/barbasic'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
//
defineOptions({ name: 'PurchasePackage' }) defineOptions({ name: 'PurchasePackage' })
const message = useMessage() // const message = useMessage() //
@ -77,12 +78,12 @@ const tableColumns = ref(Package.allSchemas.tableColumns)
/** /**
* PurchasePackage regularParams = procure采购件标签记录页面 * PurchasePackage type = PurchaseLabel 采购件标签记录页面
* ManufacturePackage regularParams = manufacture 制造件标签记录页面 * ManufacturePackage type = MakeLabel 制造件标签记录页面
* UtensilPackage regularParams = utensil 器具标签记录页面 * UtensilPackage type = ContainerLabel 器具标签记录页面
* SupplierPackage regularParams = procure 供应商发货标签记录(用采购标签) * SupplierPackage type = PurchaseLabel 供应商发货标签记录(用采购标签)
*/ */
const regularParams = ref(route.name == 'PurchasePackage'?'procure':route.name == 'ManufacturePackage'?'manufacture':route.name == 'UtensilPackage'?'utensil':route.name == 'SupplierPackage'?'procure':'') const type = ref(route.name == 'PurchasePackage'?'PurchaseLabel':route.name == 'ManufacturePackage'?'MakeLabel':route.name == 'UtensilPackage'?'ContainerLabel':route.name == 'SupplierPackage'?'PurchaseLabel':'')
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -110,9 +111,9 @@ const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row
} }
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: PackageApi.getPackagePage // getListApi: BarbasicApi.getBarbasicPage //
}) })
tableObject.params.regularParams = regularParams.value tableObject.params.type = type.value
// //
const { getList, setSearchParams } = tableMethods const { getList, setSearchParams } = tableMethods
@ -204,7 +205,7 @@ const handleDelete = async (id: number) => {
// //
await message.delConfirm() await message.delConfirm()
// //
await PackageApi.deletePackage(id) await BarbasicApi.deleteBarbasic(id)
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() await getList()
@ -219,8 +220,8 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const data = await PackageApi.exportPackage(tableObject.params) const data = await BarbasicApi.exportBarbasic(tableObject.params)
download.excel(data, '包装.xlsx') download.excel(data, '采购件标签.xlsx')
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -228,10 +229,10 @@ const handleExport = async () => {
} }
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const src = ref(BASE_URL + '/jmreport/view/894703223549108224?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/899807302088564736?token=' + getAccessToken())
// //
const handlePoint = async (row) => { const handlePoint = async (row) => {
window.open(src.value+'&id='+row.id) window.open(src.value+'&number='+row.relateNumber)
} }
/** 导入 */ /** 导入 */
@ -256,7 +257,7 @@ const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters, filters: searchData.filters,
regularParams:regularParams.value type:type.value
} }
getList() // getList() //
} }

383
src/views/wms/basicDataManage/labelManage/purchasePackage/purchasePackage.data.ts

@ -7,107 +7,53 @@ export const PackageRules = reactive({
itemCode: [required], itemCode: [required],
itemName: [required], itemName: [required],
}) })
export const Package2 = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 150,
fixed: 'left'
},
},
]))
export const Package = useCrudSchemas(reactive<CrudSchema[]>([ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '包装号', label: '标签号',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { table: {
width: 150,
fixed: 'left' fixed: 'left'
}, }
}, },
{ {
label: '物料代码', label: '标签类型',
field: 'itemCode', field: 'type',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { dictType: DICT_TYPE.LABEL_TYPE,
width: 150, dictClass: 'string'
},
}, },
{ {
label: '物品名称', label: '标签模板',
field: 'itemName', field: 'template',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '物品描述2', label: '标签状态',
field: 'itemDesc2', field: 'status',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '批次',
field: 'batch',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { dictType: DICT_TYPE.LABEL_STATUS,
width: 150, dictClass: 'string'
},
}, },
{ {
label: '替代批次', label: '关联号',
field: 'altBatch', field: 'relateNumber',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '生产日期', label: '标签条码字符串',
field: 'produceDate', field: 'barcodeString',
sort: 'custom', sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
table: { table: {
width: 180, width: 170,
}, }
}, },
{ {
label: '有效期(日)', label: '打印次数',
field: 'validityDays', field: 'printTimes',
sort: 'custom', sort: 'custom',
form: { form: {
component: 'InputNumber', component: 'InputNumber',
@ -116,297 +62,34 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
}, },
value: 0 value: 0
}, },
table: {
width: 150,
},
}, },
{ {
label: '失效日期', label: '最后打印时间',
field: 'expireDate', field: 'lastPrintTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width:'100%'},
type: 'datetime', type: 'datetime',
valueFormat: 'x' dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
}, },
table: {
width: 180,
},
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '替代计量单位',
field: 'altUom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '替代数量',
field: 'altQty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '转换率',
field: 'convertRate',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '标包数量',
field: 'stdPackQty',
sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '标包单位', label: '最后打印人ID',
field: 'stdPackUnit', field: 'lastPrintUserId',
sort: 'custom', sort: 'custom'
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
}, },
{ {
label: '仓库代码', label: '最后打印人用户名',
field: 'toWarehouseCode', field: 'lastPrintUserName',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150, width: 170,
}, }
},
{
label: '月台代码',
field: 'toDockCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '供应商物品代码',
field: 'supplierItemCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购计划单号',
field: 'rpNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
table: {
width: 182,
},
},
{
label: '生产订单号',
field: 'woNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产订单行',
field: 'woLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '班组代码',
field: 'teamCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '班次代码',
field: 'shiftCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户月台代码',
field: 'customerDockCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户物品代码',
field: 'customerItemCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '质量等级',
field: 'eqLevel',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '重量',
field: 'weight',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '面积',
field: 'area',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '体积',
field: 'volume',
sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '操作', label: '操作',
@ -417,4 +100,4 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right' fixed: 'right'
} }
} }
])) ]))

37
src/views/wms/basicDataManage/labelManage/utensilPackage/index.vue

@ -45,8 +45,8 @@
:rules="PackageRules" :rules="PackageRules"
:formAllSchemas="Package.allSchemas" :formAllSchemas="Package.allSchemas"
:searchTableParams="searchTableParams" :searchTableParams="searchTableParams"
:apiUpdate="PackageApi.updatePackage" :apiUpdate="BarbasicApi.updateBarbasic"
:apiCreate="PackageApi.createPackage" :apiCreate="BarbasicApi.createBarbasic"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"
/> />
@ -62,9 +62,10 @@
import download from '@/utils/download' import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth' import { getAccessToken } from '@/utils/auth'
import { Package,PackageRules } from './utensilPackage.data' import { Package,PackageRules } from './utensilPackage.data'
import * as PackageApi from '@/api/wms/package' import * as BarbasicApi from '@/api/wms/barbasic'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
//
defineOptions({ name: 'UtensilPackage' }) defineOptions({ name: 'UtensilPackage' })
const message = useMessage() // const message = useMessage() //
@ -77,12 +78,12 @@ const tableColumns = ref(Package.allSchemas.tableColumns)
/** /**
* PurchasePackage regularParams = procure采购件标签记录页面 * PurchasePackage type = PurchaseLabel 采购件标签记录页面
* ManufacturePackage regularParams = manufacture 制造件标签记录页面 * ManufacturePackage type = MakeLabel 制造件标签记录页面
* UtensilPackage regularParams = utensil 器具标签记录页面 * UtensilPackage type = ContainerLabel 器具标签记录页面
* SupplierPackage regularParams = procure 供应商发货标签记录(用采购标签) * SupplierPackage type = PurchaseLabel 供应商发货标签记录(用采购标签)
*/ */
const regularParams = ref(route.name == 'PurchasePackage'?'procure':route.name == 'ManufacturePackage'?'manufacture':route.name == 'UtensilPackage'?'utensil':route.name == 'SupplierPackage'?'procure':'') const type = ref(route.name == 'PurchasePackage'?'PurchaseLabel':route.name == 'ManufacturePackage'?'MakeLabel':route.name == 'UtensilPackage'?'ContainerLabel':route.name == 'SupplierPackage'?'PurchaseLabel':'')
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -110,9 +111,9 @@ const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row
} }
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: PackageApi.getPackagePage // getListApi: BarbasicApi.getBarbasicPage //
}) })
tableObject.params.regularParams = regularParams.value tableObject.params.type = type.value
// //
const { getList, setSearchParams } = tableMethods const { getList, setSearchParams } = tableMethods
@ -182,7 +183,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} else if (val == 'point') { // } else if (val == 'point') { //
handlePoint(row.id) handlePoint(row)
} }
} }
@ -204,7 +205,7 @@ const handleDelete = async (id: number) => {
// //
await message.delConfirm() await message.delConfirm()
// //
await PackageApi.deletePackage(id) await BarbasicApi.deleteBarbasic(id)
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() await getList()
@ -219,8 +220,8 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const data = await PackageApi.exportPackage(setSearchParams) const data = await BarbasicApi.exportBarbasic(tableObject.params)
download.excel(data, '包装.xlsx') download.excel(data, '器具标签.xlsx')
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -228,10 +229,10 @@ const handleExport = async () => {
} }
const BASE_URL = 'http://dev.ccwin-in.com:25110' const BASE_URL = 'http://dev.ccwin-in.com:25110'
const src = ref(BASE_URL + '/jmreport/view/881303562245316608?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/899807302088564736?token=' + getAccessToken())
// //
const handlePoint = async (id) => { const handlePoint = async (row) => {
window.open(src.value+'&id='+id) window.open(src.value+'&number='+row.relateNumber)
} }
/** 导入 */ /** 导入 */
@ -256,7 +257,7 @@ const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters, filters: searchData.filters,
regularParams:regularParams.value type:type.value
} }
getList() // getList() //
} }

371
src/views/wms/basicDataManage/labelManage/utensilPackage/utensilPackage.data.ts

@ -21,93 +21,51 @@ export const Package2 = useCrudSchemas(reactive<CrudSchema[]>([
])) ]))
export const Package = useCrudSchemas(reactive<CrudSchema[]>([ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '包装号', label: '标签号',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { table: {
width: 150,
fixed: 'left' fixed: 'left'
}, }
}, },
{ {
label: '物料代码', label: '标签类型',
field: 'itemCode', field: 'type',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { dictType: DICT_TYPE.LABEL_TYPE,
width: 150, dictClass: 'string'
},
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '物品描述2', label: '标签模板',
field: 'itemDesc2', field: 'template',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '批次', label: '标签状态',
field: 'batch', field: 'status',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { dictType: DICT_TYPE.LABEL_STATUS,
width: 150, dictClass: 'string'
},
}, },
{ {
label: '替代批次', label: '关联号',
field: 'altBatch', field: 'relateNumber',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '生产日期', label: '标签条码字符串',
field: 'produceDate', field: 'barcodeString',
sort: 'custom', sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
table: { table: {
width: 180, width: 170,
}, }
}, },
{ {
label: '有效期(日)', label: '打印次数',
field: 'validityDays', field: 'printTimes',
sort: 'custom', sort: 'custom',
form: { form: {
component: 'InputNumber', component: 'InputNumber',
@ -116,297 +74,34 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
}, },
value: 0 value: 0
}, },
table: {
width: 150,
},
}, },
{ {
label: '失效日期', label: '最后打印时间',
field: 'expireDate', field: 'lastPrintTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width:'100%'},
type: 'datetime', type: 'datetime',
valueFormat: 'x' dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
}, },
table: {
width: 180,
},
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '替代计量单位',
field: 'altUom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '替代数量',
field: 'altQty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '转换率',
field: 'convertRate',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '标包数量',
field: 'stdPackQty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '标包单位',
field: 'stdPackUnit',
sort: 'custom',
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '月台代码',
field: 'toDockCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '供应商物品代码',
field: 'supplierItemCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购计划单号',
field: 'rpNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
table: {
width: 182,
},
},
{
label: '生产订单号',
field: 'woNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产订单行',
field: 'woLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '班组代码',
field: 'teamCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '班次代码',
field: 'shiftCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户月台代码',
field: 'customerDockCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户物品代码',
field: 'customerItemCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '质量等级',
field: 'eqLevel',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '重量', label: '最后打印人ID',
field: 'weight', field: 'lastPrintUserId',
sort: 'custom', sort: 'custom'
table: {
width: 150,
},
}, },
{ {
label: '面积', label: '最后打印人用户名',
field: 'area', field: 'lastPrintUserName',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150, width: 170,
}, }
},
{
label: '体积',
field: 'volume',
sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '操作', label: '操作',
@ -417,4 +112,4 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right' fixed: 'right'
} }
} }
])) ]))

17
src/views/wms/basicDataManage/orderManage/team/team.data.ts

@ -13,7 +13,6 @@ export const Team = useCrudSchemas(reactive<CrudSchema[]>([
field: 'code', field: 'code',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150,
fixed: 'left' fixed: 'left'
}, },
isSearch: true, isSearch: true,
@ -22,18 +21,12 @@ export const Team = useCrudSchemas(reactive<CrudSchema[]>([
label: '名称', label: '名称',
field: 'name', field: 'name',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
isSearch: true, isSearch: true,
}, },
{ {
label: '成员', label: '成员',
field: 'members', field: 'members',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
isSearch: true, isSearch: true,
}, },
{ {
@ -44,9 +37,6 @@ export const Team = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true, isTable: true,
isSearch: true, isSearch: true,
sort: 'custom', sort: 'custom',
table: {
width: 150
},
form: { form: {
component: 'Switch', component: 'Switch',
value: 'TRUE', value: 'TRUE',
@ -104,9 +94,6 @@ export const Team = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
}, },
{ {
label: '创建时间', label: '创建时间',
@ -135,9 +122,6 @@ export const Team = useCrudSchemas(reactive<CrudSchema[]>([
label: '创建者', label: '创建者',
field: 'creator', field: 'creator',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
isForm: false, isForm: false,
isTable: false, isTable: false,
}, },
@ -147,7 +131,6 @@ export const Team = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false, isDetail: false,
isForm: false , isForm: false ,
table: { table: {
width: 150,
fixed: 'right' fixed: 'right'
} }
} }

32
src/views/wms/inventoryjobManage/packageManage/packagemergeMain/packagemergeMain.data.ts

@ -251,6 +251,22 @@ export const PackagemergeDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{
label: '从数量',
field: 'fromQty',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到数量',
field: 'toQty',
sort: 'custom',
table: {
width: 150
},
},
{ {
label: '从批次', label: '从批次',
field: 'fromBatch', field: 'fromBatch',
@ -355,22 +371,6 @@ export const PackagemergeDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{
label: '到数量',
field: 'toQty',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从数量',
field: 'fromQty',
sort: 'custom',
table: {
width: 150
},
},
{ {
label: '计量单位', label: '计量单位',
field: 'uom', field: 'uom',

32
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverMain.data.ts

@ -253,6 +253,22 @@ export const PackageoverDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{
label: '从数量',
field: 'fromQty',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到数量',
field: 'toQty',
sort: 'custom',
table: {
width: 150
},
},
{ {
label: '从批次', label: '从批次',
field: 'fromBatch', field: 'fromBatch',
@ -357,22 +373,6 @@ export const PackageoverDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{
label: '到数量',
field: 'toQty',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从数量',
field: 'fromQty',
sort: 'custom',
table: {
width: 150
},
},
{ {
label: '计量单位', label: '计量单位',
field: 'uom', field: 'uom',

32
src/views/wms/inventoryjobManage/packageManage/packagesplitMain/packagesplitMain.data.ts

@ -253,6 +253,22 @@ export const PackagesplitDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{
label: '从数量',
field: 'fromQty',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到数量',
field: 'toQty',
sort: 'custom',
table: {
width: 150
},
},
{ {
label: '从批次', label: '从批次',
field: 'fromBatch', field: 'fromBatch',
@ -357,22 +373,6 @@ export const PackagesplitDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{
label: '到数量',
field: 'toQty',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从数量',
field: 'fromQty',
sort: 'custom',
table: {
width: 150
},
},
{ {
label: '计量单位', label: '计量单位',
field: 'uom', field: 'uom',

2
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue

@ -453,7 +453,7 @@ const submitForm = async (formType, data) => {
}) })
if (!childListRs) { if (!childListRs) {
message.warning('请填写Bom信息!') message.warning('请填写Bom信息!')
formRef.value.dialogVisible = false formRef.value.formLoading = false
return return
} }
try { try {

5
src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/inspectRequestMain.data.ts

@ -59,6 +59,11 @@ export const InspectRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isSearch: true, isSearch: true,
form:{
componentProps:{
disabled:true
}
}
}, },
{ {
label: '单据号', label: '单据号',

21
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue

@ -54,9 +54,11 @@
ref="detailRef" ref="detailRef"
:isBasic="false" :isBasic="false"
:allSchemas="PurchasereceiptRecordMain.allSchemas" :allSchemas="PurchasereceiptRecordMain.allSchemas"
:detailAllSchemas="PurchasereceiptRecordDetail.allSchemas" :detailAllSchemas="detailAllSchemas"
:detailAllSchemasRules="PurchasereceiptRecordDetailRules" :detailAllSchemasRules="PurchasereceiptRecordDetailRules"
:apiPage="PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage" :apiPage="apiPage"
:tabs="PurchasereceiptRequestTabsList"
@changeTabs="changeTabs"
/> />
</template> </template>
@ -66,10 +68,13 @@ import { PurchasereceiptRecordMain,PurchasereceiptRecordMainRules,Purchasereceip
import * as PurchasereceiptRecordMainApi from '@/api/wms/purchasereceiptRecordMain' import * as PurchasereceiptRecordMainApi from '@/api/wms/purchasereceiptRecordMain'
import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail' import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList'
// //
defineOptions({ name: 'PurchasereceiptRecordMain' }) defineOptions({ name: 'PurchasereceiptRecordMain' })
const apiPage = ref(PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage)
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
@ -77,6 +82,7 @@ const route = useRoute() // 路由信息
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(PurchasereceiptRecordMain.allSchemas.tableColumns) const tableColumns = ref(PurchasereceiptRecordMain.allSchemas.tableColumns)
const detailAllSchemas = ref(PurchasereceiptRecordDetail.allSchemas)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -154,6 +160,17 @@ const searchFormClick = (searchData) => {
} }
getList() // getList() //
} }
// tabs
const changeTabs = (data) =>{
if(data.prop == 'receiptDetail'){
console.log(data)
apiPage.value = PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage
detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas
}else if(data.prop == 'scarceGoodsDetail'){
apiPage.value = PurchasereceiptRecordDetailApi.getScarceGoodsDetailPage
detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas
}
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {

21
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -68,9 +68,7 @@
:apiPage="apiPage" :apiPage="apiPage"
:apiDelete="PurchasereceiptRequestDetailApi.deletePurchasereceiptRequestDetail" :apiDelete="PurchasereceiptRequestDetailApi.deletePurchasereceiptRequestDetail"
:Echo="Echo" :Echo="Echo"
:tabs="PurchasereceiptRequestTabsList"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
@changeTabs="changeTabs"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -83,7 +81,6 @@ import { PurchasereceiptRequestMain,PurchasereceiptRequestMainRules,Purchaserece
import * as PurchasereceiptRequestMainApi from '@/api/wms/purchasereceiptRequestMain' import * as PurchasereceiptRequestMainApi from '@/api/wms/purchasereceiptRequestMain'
import * as PurchasereceiptRequestDetailApi from '@/api/wms/purchasereceiptRequestDetail' import * as PurchasereceiptRequestDetailApi from '@/api/wms/purchasereceiptRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList'
// //
defineOptions({ name: 'PurchasereceiptRequestMain' }) defineOptions({ name: 'PurchasereceiptRequestMain' })
@ -368,15 +365,15 @@ const searchFormClick = (searchData) => {
} }
// tabs // tabs
const changeTabs = (data) =>{ // const changeTabs = (data) =>{
if(data.prop == 'receiptDetail'){ // if(data.prop == 'receiptDetail'){
apiPage.value = PurchasereceiptRequestDetailApi.getPurchasereceiptRequestDetailPage // apiPage.value = PurchasereceiptRequestDetailApi.getPurchasereceiptRequestDetailPage
detailAllSchemas.value = PurchasereceiptRequestDetail.allSchemas // detailAllSchemas.value = PurchasereceiptRequestDetail.allSchemas
}else if(data.prop == 'scarceGoodsDetail'){ // }else if(data.prop == 'scarceGoodsDetail'){
apiPage.value = PurchasereceiptRequestDetailApi.getScarceGoodsDetailPage // apiPage.value = PurchasereceiptRequestDetailApi.getScarceGoodsDetailPage
detailAllSchemas.value = PurchasereceiptRequestDetail.allSchemas // detailAllSchemas.value = PurchasereceiptRequestDetail.allSchemas
} // }
} // }
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {

54
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

@ -143,10 +143,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
row['supplierQty'] = val[0]['supplierQty'] row['supplierQty'] = val[0]['supplierQty']
row['supplierUom'] = val[0]['supplierUom'] row['supplierUom'] = val[0]['supplierUom']
row['inventoryStatus'] = val[0]['inventoryStatus'] row['inventoryStatus'] = val[0]['inventoryStatus']
row['fromLocationCode'] = val[0]['fromLocationCode'] row['fromLocationCode'] = val[0]['locationCode']
row['toLocationCode'] = '' row['toLocationCode'] = null
row['fromLocationGroupCode'] = val[0]['fromLocationGroupCode'] row['fromLocationGroupCode'] = val[0]['locationGroupCode']
row['toLocationGroupCode'] = '' row['toLocationGroupCode'] = null
row['toWarehouseCode'] = null
row['toLocationTypes'] = null
row['fromAreaCode'] = val[0]['areaCode'] row['fromAreaCode'] = val[0]['areaCode']
row['toAreaCode'] = val[0]['toAreaCode'] row['toAreaCode'] = val[0]['toAreaCode']
row['fromQwnerCode'] = val[0]['fromQwnerCode'] row['fromQwnerCode'] = val[0]['fromQwnerCode']
@ -177,11 +179,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
item.batch = item.toBatch item.batch = item.toBatch
item.packingNumber = item.toPackingNumber item.packingNumber = item.toPackingNumber
item.containerNumber = item.toContainerNumber item.containerNumber = item.toContainerNumber
let fromLocationCode = item.fromLocationCode item.toLocationGroupCode = null
item.fromLocationCode = item.toLocationCode item.toWarehouseCode = null
item.toLocationCode = fromLocationCode item.toLocationTypes = null
item.toLocationCode = null
// item.fromLocationCode = item.fromLocationCode
// item.fromLocationGroupCode = item.fromLocationGroupCode
}) })
isShowButton.value = false isShowButton.value = false
console.log('formSchema', PurchasereturnRequestMain.allSchemas.formSchema)
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
item.componentProps.disabled = true
}
})
PurchasereturnRequestDetail.allSchemas.tableFormColumns.map((item) => { PurchasereturnRequestDetail.allSchemas.tableFormColumns.map((item) => {
item.tableForm.disabled = true item.tableForm.disabled = true
if (item.field == 'remark') { if (item.field == 'remark') {
@ -334,6 +346,11 @@ const formRef = ref()
const openForm = async (type: string, row?: number) => { const openForm = async (type: string, row?: number) => {
tableData.value = [] // tableData.value = [] //
isShowButton.value = true isShowButton.value = true
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
item.componentProps.disabled = false
}
})
formRef.value.open(type, row) formRef.value.open(type, row)
} }
@ -443,25 +460,28 @@ const handleAddTable = () => {
item.tableForm.disabled = false item.tableForm.disabled = false
} }
if (item.field == 'itemCode') { if (item.field == 'itemCode') {
item.tableForm.isInpuFocusShow = true item.tableForm.isInpuFocusShow = true
} }
}) })
} }
// //
const handleDeleteTable = (item, index,formRef) => { const handleDeleteTable = (item, index, formRef) => {
tableData.value.splice(index, 1) tableData.value.splice(index, 1)
if (tableData.value.length == 0) { if (tableData.value.length == 0) {
isShowButton.value = true isShowButton.value = true
nextTick(() => { PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
const setV = {} item.componentProps.disabled = false
}
setV['purchaseReceiptRecordNumber'] = '' })
nextTick(() => {
const setV = {}
setV['purchaseReceiptRecordNumber'] = ''
setV['supplierCode'] = '' setV['supplierCode'] = ''
formRef.setValues(setV) formRef.setValues(setV)
}) })
} }
} }
// //

9
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

@ -75,6 +75,11 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isSearch: true, isSearch: true,
form:{
componentProps:{
disabled:false
}
}
}, },
{ {
label: '承运商', label: '承运商',
@ -118,6 +123,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTableForm:false,
isForm: false, isForm: false,
}, },
{ {
@ -142,6 +148,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTableForm:false,
isForm: false, isForm: false,
}, },
{ {
@ -161,6 +168,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isForm: false, isForm: false,
isTableForm:false,
}, },
{ {
label: '从月台代码', label: '从月台代码',
@ -735,7 +743,6 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
isTableForm:false,
tableForm:{ tableForm:{
disabled:true disabled:true
} }

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

@ -1,32 +1,21 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="SupplierinvoiceRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="SupplierinvoiceRequestMain.allSchemas.searchSchema" @search="setSearchParams"
@reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead <TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
:HeadButttondata="HeadButttondata" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick"
@button-base-click="buttonBaseClick" :allSchemas="SupplierinvoiceRequestMain.allSchemas" />
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="SupplierinvoiceRequestMain.allSchemas"
/>
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table <Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total total: tableObject.total
}" }" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:pageSize="tableObject.pageSize" v-model:sort="tableObject.sort">
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{row}"> <template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
@ -39,277 +28,344 @@
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm ref="formRef" @success="getList" :rules="SupplierinvoiceRequestMainRules"
ref="formRef" :formAllSchemas="SupplierinvoiceRequestMain.allSchemas" :searchTableParams="searchTableParams"
@success="getList" :tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas" :tableFormRules="SupplierinvoiceRequestDetailRules"
:rules="SupplierinvoiceRequestMainRules" :tableData="tableData" :apiUpdate="SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain"
:formAllSchemas="SupplierinvoiceRequestMain.allSchemas" :apiCreate="SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain" :isBusiness="true"
:searchTableParams="searchTableParams" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess"
:tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas" @submitForm="submitForm" />
:tableFormRules="SupplierinvoiceRequestDetailRules"
:tableData="tableData"
:apiUpdate="SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain"
:apiCreate="SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain"
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail ref="detailRef" :isBasic="false" :allSchemas="SupplierinvoiceRequestMain.allSchemas"
ref="detailRef"
:isBasic="false"
:allSchemas="SupplierinvoiceRequestMain.allSchemas"
:detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas" :detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
:detailAllSchemasRules="SupplierinvoiceRequestDetailRules" :detailAllSchemasRules="SupplierinvoiceRequestDetailRules" :searchTableParams="searchTableParams"
:searchTableParams="searchTableParams"
:apiCreate="SupplierinvoiceRequestDetailApi.createSupplierinvoiceRequestDetail" :apiCreate="SupplierinvoiceRequestDetailApi.createSupplierinvoiceRequestDetail"
:apiUpdate="SupplierinvoiceRequestDetailApi.updateSupplierinvoiceRequestDetail" :apiUpdate="SupplierinvoiceRequestDetailApi.updateSupplierinvoiceRequestDetail"
:apiPage="SupplierinvoiceRequestDetailApi.getSupplierinvoiceRequestDetailPage" :apiPage="SupplierinvoiceRequestDetailApi.getSupplierinvoiceRequestDetailPage"
:apiDelete="SupplierinvoiceRequestDetailApi.deleteSupplierinvoiceRequestDetail" :apiDelete="SupplierinvoiceRequestDetailApi.deleteSupplierinvoiceRequestDetail" :Echo="Echo" />
:Echo="Echo"
/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
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 SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain'
import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail' import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as SupplierApi from '@/api/wms/supplier' import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '../../../basicDataManage/supplierManage/supplier/supplier.data' import { Supplier } from '../../../basicDataManage/supplierManage/supplier/supplier.data'
defineOptions({ name: 'SupplierinvoiceRequestMain' }) defineOptions({ name: 'SupplierinvoiceRequestMain' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(SupplierinvoiceRequestMain.allSchemas.tableColumns) const tableColumns = ref(SupplierinvoiceRequestMain.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
// //
const searchTableParams = ref([ const searchTableParams = ref([
{ {
formField: 'supplierCode', formField: 'supplierCode',
searchTableTitle: '供应商信息', searchTableTitle: '供应商信息',
searchTableAllSchemas: Supplier.allSchemas, searchTableAllSchemas: Supplier.allSchemas,
searchTablePage: SupplierApi.getSupplierPage searchTablePage: SupplierApi.getSupplierPage
}
])
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
if (type == 'tableForm') {
//
//row[formField] = val[0][searchField]
//row['poLine'] = val[0]['poLine']
//row['batch'] = val[0]['toBatch']
//row['altBatch'] = val[0]['altBatch']
//row['itemCode'] = val[0]['itemCode']
//row['itemName'] = val[0]['itemName']
//row['itemDesc1'] = val[0]['itemDesc1']
//row['itemDesc2'] = val[0]['itemDesc2']
//row['projectCode'] = val[0]['projectCode']
//row['qty'] = val[0]['qty']
//row['uom'] = val[0]['uom']
} else {
const setV = {}
setV[formField] = val[0][searchField]
//setV['ppNumber'] = val[0]['ppNumber']
//setV['supplierCode'] = val[0]['supplierCode']
formRef.setValues(setV)
} }
])
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
if (formField == 'poNumber') {
row['poNumber'] = val[0]['poNumber']
row['poLine'] = val[0]['poLine']
row['itemCode'] = val[0]['itemCode']
}
} else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: SupplierinvoiceRequestMainApi.getSupplierinvoiceRequestMainPage //
}) })
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({ //
getListApi: SupplierinvoiceRequestMainApi.getSupplierinvoiceRequestMainPage // const { getList, setSearchParams } = tableMethods
})
// //
const { getList, setSearchParams } = tableMethods const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: 'wms:supplierinvoice-request-main:create' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierinvoice-request-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
// //
const HeadButttondata = [ const buttonBaseClick = (val, item) => {
defaultButtons.defaultAddBtn({hasPermi:'wms:supplierinvoice-request-main:create'}), // if (val == 'add') { //
openForm('create')
defaultButtons.defaultExportBtn({hasPermi:'wms:supplierinvoice-request-main:export'}), // } else if (val == 'import') { //
defaultButtons.defaultFreshBtn(null), // handleImport()
defaultButtons.defaultFilterBtn(null), // } else if (val == 'export') { //
defaultButtons.defaultSetBtn(null), // handleExport()
// { } else if (val == 'refresh') { //
// label: '', getList()
// name: 'zdy', } else if (val == 'filtrate') { //
// hide: false, } else { //
// type: 'primary', console.log('其他按钮', item)
// icon: 'Select', }
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
} }
}
//
// const isShowMainButton = (row, val) => {
const isShowMainButton = (row,val) => { if (val.indexOf(row.status) > -1) {
if (val.indexOf(row.status) > -1) { return false
return false } else {
} else { return true
return true }
} }
}
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4']) }), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-request-main:update'}), // defaultButtons.mainListEditBtn({ hasPermi: 'wms:supplierinvoice-request-main:update' }), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-request-main:delete'}), // //
{
label: '处理',
name: 'genRecords',
hide: isShowMainButton(row, ['3']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
},
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-request-main:delete'}), //
] ]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} }
}
/** 添加/修改操作 */
const formRef = ref() // -
const openForm =async (type: string, row?: number) => { const buttonTableClick = async (val, row) => {
tableData.value = [] // if (val == 'mainPurPlanOpe') { //
formRef.value.open(type, row) handleOpe(row.id)
} } else if (val == 'mainPurPlanClo') {//
handleClo(row.id)
/** 详情操作 */ } else if (val == 'mainPlanSub') { //
const detailRef = ref() handleSub(row.id)
const openDetail = (row: any, titleName: any, titleValue: any) => { } else if (val == 'mainPlanApp') { //
detailRef.value.openDetail(row, titleName, titleValue) handleApp(row.id)
} } else if (val == 'mainPlanTur') { //
handleTur(row.id)
/** 删除按钮操作 */ } else if (val == 'genRecords') { //
const handleDelete = async (id: number) => { genRecords(row.id)
try { } else if (val == 'edit') { //
// openForm('update', row)
await message.delConfirm() } else if (val == 'delete') { //
// handleDelete(row.id)
await SupplierinvoiceRequestMainApi.deleteSupplierinvoiceRequestMain(id) }
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await SupplierinvoiceRequestMainApi.exportSupplierinvoiceRequestMain(setSearchParams)
download.excel(data, '供应商发票申请主.xlsx')
} catch {
} finally {
exportLoading.value = false
} }
}
/** 添加/修改操作 */
/** const formRef = ref()
* tableForm方法 const openForm = async (type : string, row ?: number) => {
*/ tableData.value = [] //
const tableFormKeys = {} formRef.value.open(type, row)
SupplierinvoiceRequestDetail.allSchemas.tableFormColumns.forEach(item => { }
tableFormKeys[item.field] = item.default ? item.default : ''
}) /** 详情操作 */
const tableData = ref([]) const detailRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => {
// detailRef.value.openDetail(row, titleName, titleValue)
const handleAddTable = () => { }
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
} /** 删除按钮操作 */
// const handleDelete = async (id : number) => {
const handleDeleteTable = (item, index) => { try {
tableData.value.splice(index, 1) //
} await message.delConfirm()
//
// await SupplierinvoiceRequestMainApi.deleteSupplierinvoiceRequestMain(id)
const submitForm = async (formType, data) => { message.success(t('common.delSuccess'))
data.subList = tableData.value // //
try { await getList()
if (formType === 'create') { } catch { }
await SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain(data) }
message.success(t('common.createSuccess'))
} else { /** 关闭按钮操作 */
await SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain(data) const handleClo = async (id : number) => {
message.success(t('common.updateSuccess')) try {
//
await message.confirm('是否关闭所选中数据?')
//
await SupplierinvoiceRequestMainApi.cloSupplierinvoiceRequestMain(id)
message.success(t('关闭成功!'))
//
await getList()
} catch { }
}
/** 打开按钮操作 */
const handleOpe = async (id : number) => {
try {
//
await message.confirm('是否打开所选中数据?')
//
await SupplierinvoiceRequestMainApi.opeSupplierinvoiceRequestMain(id)
message.success(t('打开成功!'))
//
await getList()
} catch { }
}
/** 提交审批按钮操作 */
const handleSub = async (id : number) => {
try {
//
await message.confirm('是否提交审批所选中数据?')
//
await SupplierinvoiceRequestMainApi.subSupplierinvoiceRequestMain(id)
message.success(t('提交审批成功!'))
//
await getList()
} catch { }
}
/** 审批通过按钮操作 */
const handleApp = async (id : number) => {
try {
//
await message.confirm('是否审批通过所选中数据?')
//
await SupplierinvoiceRequestMainApi.appSupplierinvoiceRequestMain(id)
message.success(t('审批通过成功!'))
//
await getList()
} catch { }
}
/** 驳回按钮操作 */
const handleTur = async (id : number) => {
try {
//
await message.confirm('是否驳回所选中数据?')
//
await SupplierinvoiceRequestMainApi.rejSupplierinvoiceRequestMain(id)
message.success(t('驳回成功!'))
//
await getList()
} catch { }
}
/** 处理按钮操作 */
const genRecords = async (id : number) => {
try {
//
await message.confirm('是否处理所选中数据?')
//
await SupplierinvoiceRequestMainApi.genRecordsSupplierinvoiceRequestMain(id)
message.success(t('处理成功!'))
//
await getList()
} catch { }
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await SupplierinvoiceRequestMainApi.exportSupplierinvoiceRequestMain(setSearchParams)
download.excel(data, '供应商发票申请主.xlsx')
} catch {
} finally {
exportLoading.value = false
} }
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
} }
}
// /**
const searchFormClick = (searchData) => { * tableForm方法
tableObject.params = { */
isSearch: true, const tableFormKeys = {}
filters: searchData.filters SupplierinvoiceRequestDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
} }
getList() //
}
/** 初始化 **/ //
onMounted(async () => { const submitForm = async (formType, data) => {
getList() data.subList = tableData.value //
}) try {
if (formType === 'create') {
await SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain(data)
message.success(t('common.createSuccess'))
} else {
await SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
})
</script> </script>

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

@ -3,20 +3,21 @@ import { dateFormatter } from '@/utils/formatTime'
import * as SupplierApi from '@/api/wms/supplier' import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
const recordTypeList = [{ label:'收货单号', value:'1' },{ label:'退货单号', value:'2' },{ label:'索赔单号', value:'3' }] const recordTypeList = [{ label: '收货单号', value: '1' }, { label: '退货单号', value: '2' }, { label: '索赔单号', value: '3' }]
import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as supplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain' import * as supplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain'
import * as supplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail'
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = { const queryParams = {
pageSize:10, pageSize: 10,
pageNo:1, pageNo: 1,
code:'PurchaseInvoiceRequest' code: 'PurchaseInvoiceRequest'
} }
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{} const requestsettingData = data?.list[0] || {}
// 获取当前操作人的部门 // 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore() const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept const userDept = userStore.userSelfInfo.dept
@ -25,26 +26,26 @@ const userDept = userStore.userSelfInfo.dept
* @returns {Array} * @returns {Array}
*/ */
export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '供应商代码', label: '供应商代码',
field: 'supplierCode', field: 'supplierCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isSearch: true, isSearch: true,
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题 searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法 searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法
} }
} }
}, },
{ {
label: '调增金额', label: '调增金额',
field: 'adjustAmount', field: 'adjustAmount',
@ -76,8 +77,8 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}, },
form: { form: {
value: 'SupplierInvoice', value: 'SupplierInvoice',
componentProps:{ componentProps: {
disabled:true, disabled: true,
} }
} }
}, },
@ -130,8 +131,8 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}, },
form: { form: {
value: userDept.name, value: userDept.name,
componentProps:{ componentProps: {
disabled:true, disabled: true,
} }
}, },
}, },
@ -232,7 +233,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: { componentProps: {
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TRUE', activeValue: 'TRUE',
disabled:true, disabled: true,
} }
} }
}, },
@ -252,7 +253,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: { componentProps: {
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TRUE', activeValue: 'TRUE',
disabled:true, disabled: true,
} }
} }
}, },
@ -272,7 +273,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: { componentProps: {
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TRUE', activeValue: 'TRUE',
disabled:true, disabled: true,
} }
} }
}, },
@ -292,7 +293,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: { componentProps: {
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TRUE', activeValue: 'TRUE',
disabled:true, disabled: true,
} }
} }
}, },
@ -333,6 +334,78 @@ 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} * @returns {Array}
*/ */
@ -349,55 +422,103 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
initOptions: recordTypeList, initOptions: recordTypeList,
}, },
}, },
{
label: '单号',
field: 'requesNumber',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择单号',
searchField: 'number',
searchTitle: '单号信息',
searchAllSchemas: SupplierinvoiceRequestMain.allSchemas,
searchPage: supplierinvoiceRequestMainApi.getNumber,
searchCondition: [{
key: 'supplierCode',
value: 'supplierCode',
isMainValue: true
},
{
key: 'recordType',
value: 'recordType',
isMainValue: true
}]
}
},
{ {
label: '货主代码', label: '单号',
field: 'ownerCode' field: 'recordNumber',
}, sort: 'custom',
{ table: {
label: '批次', width: 150
field: 'batch' },
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择单号',
searchField: 'number',
searchTitle: '单号信息',
searchAllSchemas: SupplierinvoiceRequestMain.allSchemas,
searchPage: supplierinvoiceRequestMainApi.getNumber,
searchCondition: [{
key: 'supplierCode',
value: 'supplierCode',
isMainValue: true
},
{
key: 'recordType',
value: 'recordType',
isMainValue: true
}]
}
}, },
{ {
label: '订单号', label: '订单号',
field: 'poNumber' field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '订单号信息',
searchAllSchemas: SupplierinvoiceRequestDetailaa.allSchemas,
searchPage: supplierinvoiceRequestDetailApi.getPoNumber
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '订单号信息',
searchAllSchemas: SupplierinvoiceRequestDetailaa.allSchemas,
searchPage: supplierinvoiceRequestDetailApi.getPoNumber,
searchCondition: [
{
key: 'number',
value: 'recordNumber',
isMainValue: true
}
,
{
key: 'recordType',
value: 'recordType',
isMainValue: true
}]
}
}, },
{ {
label: '订单行', label: '订单行',
field: 'poLine' field: 'poLine',
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
{
label: '物品代码',
field: 'itemCode',
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
{
label: '货主代码',
field: 'ownerCode'
},
{
label: '批次',
field: 'batch'
}, },
{
label: '物品代码',
field: 'itemCode'
},
{ {
label: '单价', label: '单价',
field: 'singlePrice', field: 'singlePrice',
@ -412,7 +533,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
component: 'InputNumber', component: 'InputNumber',
} }
}, },
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
@ -438,12 +559,12 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
label: '操作', label: '操作',
field: 'action', field: 'action',
isDetail: false, isDetail: false,
isForm: false , isForm: false,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'
}, },
isTableForm:false, isTableForm: false,
} }
])) ]))

Loading…
Cancel
Save