Browse Source

Merge remote-tracking branch 'origin/master'

master
zhaoxuebing 9 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) => {
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) => {
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) => {
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 = () => {
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 })
}
// 缺货明细
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
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 })
}
// 生成记录
export const genRecordsSupplierdeliverRequestMain = async (id) => {
export const genRecordsSupplierinvoiceRequestMain = async (id) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/genRecords?id=` + id })
}
// 导出供应商发货申请主 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) => {
return await request.get({ url: `/wms/supplierinvoice-request-detail/get?id=` + id })
@ -62,4 +67,4 @@ export const exportSupplierinvoiceRequestDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
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 })
}
// 打开供应商发货申请主
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
export const exportSupplierinvoiceRequestMain = async (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 { useDesign } from '@/hooks/web/useDesign'
//
const { getPrefixCls, variables } = useDesign()
const prefixCls = getPrefixCls('tool-header')

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

@ -17,53 +17,53 @@ const { t } = useI18n() // 国际化
* @returns {Array} 线
*/
export const Productionlineitem = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '完工收货库位',
field: 'fgLocationCode',
isSearch: true,
sort: 'custom',
table: {
width: 150,
fixed: 'left'
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择库位代码',
searchField: 'code',
searchTitle: '库位信息',
searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.getLocationPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '原料库位',
field: 'rawLocationCode',
isSearch: true,
sort: 'custom',
table: {
width: 150,
fixed: 'left'
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择库位代码',
searchField: 'code',
searchTitle: '库位信息',
searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.getLocationPage
}
}
},
// {
// label: '完工收货库位',
// field: 'fgLocationCode',
// isSearch: true,
// sort: 'custom',
// table: {
// width: 150,
// fixed: 'left'
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择库位代码',
// searchField: 'code',
// searchTitle: '库位信息',
// searchAllSchemas: Location.allSchemas,
// searchPage: LocationApi.getLocationPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// }
// },
// {
// label: '原料库位',
// field: 'rawLocationCode',
// isSearch: true,
// sort: 'custom',
// table: {
// width: 150,
// fixed: 'left'
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择库位代码',
// searchField: 'code',
// searchTitle: '库位信息',
// searchAllSchemas: Location.allSchemas,
// searchPage: LocationApi.getLocationPage
// }
// }
// },
{
label: '产线代码' ,
field: 'productionLineCode',
@ -237,9 +237,9 @@ export const Productionlineitem = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
export const ProductionlineitemRules = reactive({
fgLocationCode: [
{ required: true, message: '请输入完工收货库位', trigger: 'change' }
],
// fgLocationCode: [
// { required: true, message: '请输入完工收货库位', trigger: 'change' }
// ],
productionLineCode: [
{ 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 Detail from '@/components/Detail/src/Detail.vue'
//
defineOptions({ name: 'Stdcostprice' })
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 { dateFormatter } from '@/utils/formatTime'
import * as SupplieritemApi from '@/api/wms/supplieritem'
import { Supplieritem } from '../../supplierManage/supplieritem/supplieritem.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '../../itemManage/itembasic/itembasic.data'
import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
// import * as SupplierApi from '@/api/wms/supplier'
// import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
const { t } = useI18n() // 国际化
@ -13,34 +13,34 @@ const { t } = useI18n() // 国际化
* @returns {Array}
*/
export const Stdcostprice = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '供应商代码',
field: 'supplierCode',
isSearch: true,
sort: 'custom',
table: {
width: 150,
fixed: 'left'
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
},
// {
// label: '供应商代码',
// field: 'supplierCode',
// isSearch: true,
// sort: 'custom',
// table: {
// width: 150,
// fixed: 'left'
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '供应商信息', // 查询弹窗标题
// searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
// searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// action: '==',
// isSearch: true,
// isMainValue: false
// }]
// }
// }
// },
{
label: '物料代码',
field: 'itemCode',
@ -54,15 +54,17 @@ export const Stdcostprice = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物品代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '供应商物品信息', // 查询弹窗标题
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'supplierCode',
value:'supplierCode',
isMainValue: true
},{
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物品信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [
// {
// key:'supplierCode',
// value:'supplierCode',
// isMainValue: true
// },
{
key: 'available',
value: 'TRUE',
isMainValue: false

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

@ -45,8 +45,8 @@
:rules="PackageRules"
:formAllSchemas="Package.allSchemas"
:searchTableParams="searchTableParams"
:apiUpdate="PackageApi.updatePackage"
:apiCreate="PackageApi.createPackage"
:apiUpdate="BarbasicApi.updateBarbasic"
:apiCreate="BarbasicApi.createBarbasic"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
@ -62,9 +62,10 @@
import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth'
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'
//
defineOptions({ name: 'ManufacturePackage' })
const message = useMessage() //
@ -75,29 +76,21 @@ const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Package.allSchemas.tableColumns)
/**
* PurchasePackage regularParams = procure采购件标签记录页面
* ManufacturePackage regularParams = manufacture 制造件标签记录页面
* UtensilPackage regularParams = utensil 器具标签记录页面
* SupplierPackage regularParams = procure 供应商发货标签记录(用采购标签)
* PurchasePackage type = PurchaseLabel 采购件标签记录页面
* ManufacturePackage type = MakeLabel 制造件标签记录页面
* UtensilPackage type = ContainerLabel 器具标签记录页面
* 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) => {
tableColumns.value = val
}
//
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({
getListApi: PackageApi.getPackagePage //
getListApi: BarbasicApi.getBarbasicPage //
})
tableObject.params.regularParams = regularParams.value
tableObject.params.type = type.value
//
const { getList, setSearchParams } = tableMethods
@ -182,7 +175,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'point') { //
handlePoint(row.id)
handlePoint(row.relateNumber)
}
}
@ -204,7 +197,7 @@ const handleDelete = async (id: number) => {
//
await message.delConfirm()
//
await PackageApi.deletePackage(id)
await BarbasicApi.deleteBarbasic(id)
message.success(t('common.delSuccess'))
//
await getList()
@ -219,8 +212,8 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await PackageApi.exportPackage(setSearchParams)
download.excel(data, '包装.xlsx')
const data = await BarbasicApi.exportBarbasic(tableObject.params)
download.excel(data, '制造件标签.xlsx')
} catch {
} finally {
exportLoading.value = false
@ -228,10 +221,10 @@ const handleExport = async () => {
}
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) => {
window.open(src.value+'&id='+id)
const handlePoint = async (number) => {
window.open(src.value+'&number='+number)
}
/** 导入 */
@ -256,7 +249,7 @@ const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters,
regularParams:regularParams.value
type:type.value
}
getList() //
}

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

@ -7,107 +7,54 @@ export const PackageRules = reactive({
itemCode: [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[]>([
{
label: '包装号',
label: '标签号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 150,
fixed: 'left'
},
}
},
{
label: '物料代码',
field: 'itemCode',
label: '标签类型',
field: 'type',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150,
},
dictType: DICT_TYPE.LABEL_TYPE,
dictClass: 'string'
},
{
label: '物品描述2',
field: 'itemDesc2',
label: '标签模板',
field: 'template',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '批次',
field: 'batch',
label: '标签状态',
field: 'status',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
dictType: DICT_TYPE.LABEL_STATUS,
dictClass: 'string'
},
{
label: '替代批次',
field: 'altBatch',
label: '关联号',
field: 'relateNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产日期',
field: 'produceDate',
label: '标签条码字符串',
field: 'barcodeString',
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: {
width: 180,
},
width: 170,
}
},
{
label: '有效期(日)',
field: 'validityDays',
label: '打印次数',
field: 'printTimes',
sort: 'custom',
form: {
component: 'InputNumber',
@ -116,297 +63,34 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
},
value: 0
},
table: {
width: 150,
},
},
{
label: '失效日期',
field: 'expireDate',
label: '最后打印时间',
field: 'lastPrintTime',
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: {
style: {width:'100%'},
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: '最后打印人ID',
field: 'lastPrintUserId',
sort: 'custom'
},
{
label: '仓库代码',
field: 'toWarehouseCode',
label: '最后打印人用户名',
field: 'lastPrintUserName',
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: '重量',
field: 'weight',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '面积',
field: 'area',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '体积',
field: 'volume',
sort: 'custom',
table: {
width: 150,
},
width: 170,
}
},
{
label: '操作',

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

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

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

@ -7,107 +7,53 @@ export const PackageRules = reactive({
itemCode: [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[]>([
{
label: '包装号',
label: '标签号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 150,
fixed: 'left'
},
}
},
{
label: '物料代码',
field: 'itemCode',
label: '标签类型',
field: 'type',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
dictType: DICT_TYPE.LABEL_TYPE,
dictClass: 'string'
},
{
label: '物品名称',
field: 'itemName',
label: '标签模板',
field: 'template',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '批次',
field: 'batch',
label: '标签状态',
field: 'status',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
dictType: DICT_TYPE.LABEL_STATUS,
dictClass: 'string'
},
{
label: '替代批次',
field: 'altBatch',
label: '关联号',
field: 'relateNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产日期',
field: 'produceDate',
label: '标签条码字符串',
field: 'barcodeString',
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: {
width: 180,
},
width: 170,
}
},
{
label: '有效期(日)',
field: 'validityDays',
label: '打印次数',
field: 'printTimes',
sort: 'custom',
form: {
component: 'InputNumber',
@ -116,297 +62,34 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
},
value: 0
},
table: {
width: 150,
},
},
{
label: '失效日期',
field: 'expireDate',
label: '最后打印时间',
field: 'lastPrintTime',
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: {
style: {width:'100%'},
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: '最后打印人ID',
field: 'lastPrintUserId',
sort: 'custom'
},
{
label: '仓库代码',
field: 'toWarehouseCode',
label: '最后打印人用户名',
field: 'lastPrintUserName',
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: '重量',
field: 'weight',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '面积',
field: 'area',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '体积',
field: 'volume',
sort: 'custom',
table: {
width: 150,
},
width: 170,
}
},
{
label: '操作',
@ -417,4 +100,4 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right'
}
}
]))
]))

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

@ -45,8 +45,8 @@
:rules="PackageRules"
:formAllSchemas="Package.allSchemas"
:searchTableParams="searchTableParams"
:apiUpdate="PackageApi.updatePackage"
:apiCreate="PackageApi.createPackage"
:apiUpdate="BarbasicApi.updateBarbasic"
:apiCreate="BarbasicApi.createBarbasic"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
@ -62,9 +62,10 @@
import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth'
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'
//
defineOptions({ name: 'UtensilPackage' })
const message = useMessage() //
@ -77,12 +78,12 @@ const tableColumns = ref(Package.allSchemas.tableColumns)
/**
* PurchasePackage regularParams = procure采购件标签记录页面
* ManufacturePackage regularParams = manufacture 制造件标签记录页面
* UtensilPackage regularParams = utensil 器具标签记录页面
* SupplierPackage regularParams = procure 供应商发货标签记录(用采购标签)
* PurchasePackage type = PurchaseLabel 采购件标签记录页面
* ManufacturePackage type = MakeLabel 制造件标签记录页面
* UtensilPackage type = ContainerLabel 器具标签记录页面
* 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) => {
@ -110,9 +111,9 @@ const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row
}
const { tableObject, tableMethods } = useTable({
getListApi: PackageApi.getPackagePage //
getListApi: BarbasicApi.getBarbasicPage //
})
tableObject.params.regularParams = regularParams.value
tableObject.params.type = type.value
//
const { getList, setSearchParams } = tableMethods
@ -182,7 +183,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'point') { //
handlePoint(row.id)
handlePoint(row)
}
}
@ -204,7 +205,7 @@ const handleDelete = async (id: number) => {
//
await message.delConfirm()
//
await PackageApi.deletePackage(id)
await BarbasicApi.deleteBarbasic(id)
message.success(t('common.delSuccess'))
//
await getList()
@ -219,8 +220,8 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await PackageApi.exportPackage(setSearchParams)
download.excel(data, '包装.xlsx')
const data = await BarbasicApi.exportBarbasic(tableObject.params)
download.excel(data, '器具标签.xlsx')
} catch {
} finally {
exportLoading.value = false
@ -228,10 +229,10 @@ const handleExport = async () => {
}
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) => {
window.open(src.value+'&id='+id)
const handlePoint = async (row) => {
window.open(src.value+'&number='+row.relateNumber)
}
/** 导入 */
@ -256,7 +257,7 @@ const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters,
regularParams:regularParams.value
type:type.value
}
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[]>([
{
label: '包装号',
label: '标签号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 150,
fixed: 'left'
},
}
},
{
label: '物料代码',
field: 'itemCode',
label: '标签类型',
field: 'type',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150,
},
dictType: DICT_TYPE.LABEL_TYPE,
dictClass: 'string'
},
{
label: '物品描述2',
field: 'itemDesc2',
label: '标签模板',
field: 'template',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '批次',
field: 'batch',
label: '标签状态',
field: 'status',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
dictType: DICT_TYPE.LABEL_STATUS,
dictClass: 'string'
},
{
label: '替代批次',
field: 'altBatch',
label: '关联号',
field: 'relateNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产日期',
field: 'produceDate',
label: '标签条码字符串',
field: 'barcodeString',
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: {
width: 180,
},
width: 170,
}
},
{
label: '有效期(日)',
field: 'validityDays',
label: '打印次数',
field: 'printTimes',
sort: 'custom',
form: {
component: 'InputNumber',
@ -116,297 +74,34 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
},
value: 0
},
table: {
width: 150,
},
},
{
label: '失效日期',
field: 'expireDate',
label: '最后打印时间',
field: 'lastPrintTime',
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: {
style: {width:'100%'},
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: '重量',
field: 'weight',
sort: 'custom',
table: {
width: 150,
},
label: '最后打印人ID',
field: 'lastPrintUserId',
sort: 'custom'
},
{
label: '面积',
field: 'area',
label: '最后打印人用户名',
field: 'lastPrintUserName',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '体积',
field: 'volume',
sort: 'custom',
table: {
width: 150,
},
width: 170,
}
},
{
label: '操作',
@ -417,4 +112,4 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right'
}
}
]))
]))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -68,9 +68,7 @@
:apiPage="apiPage"
:apiDelete="PurchasereceiptRequestDetailApi.deletePurchasereceiptRequestDetail"
:Echo="Echo"
:tabs="PurchasereceiptRequestTabsList"
@searchTableSuccessDetail="searchTableSuccessDetail"
@changeTabs="changeTabs"
/>
<!-- 导入 -->
@ -83,7 +81,6 @@ import { PurchasereceiptRequestMain,PurchasereceiptRequestMainRules,Purchaserece
import * as PurchasereceiptRequestMainApi from '@/api/wms/purchasereceiptRequestMain'
import * as PurchasereceiptRequestDetailApi from '@/api/wms/purchasereceiptRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList'
//
defineOptions({ name: 'PurchasereceiptRequestMain' })
@ -368,15 +365,15 @@ const searchFormClick = (searchData) => {
}
// tabs
const changeTabs = (data) =>{
if(data.prop == 'receiptDetail'){
apiPage.value = PurchasereceiptRequestDetailApi.getPurchasereceiptRequestDetailPage
detailAllSchemas.value = PurchasereceiptRequestDetail.allSchemas
}else if(data.prop == 'scarceGoodsDetail'){
apiPage.value = PurchasereceiptRequestDetailApi.getScarceGoodsDetailPage
detailAllSchemas.value = PurchasereceiptRequestDetail.allSchemas
}
}
// const changeTabs = (data) =>{
// if(data.prop == 'receiptDetail'){
// apiPage.value = PurchasereceiptRequestDetailApi.getPurchasereceiptRequestDetailPage
// detailAllSchemas.value = PurchasereceiptRequestDetail.allSchemas
// }else if(data.prop == 'scarceGoodsDetail'){
// apiPage.value = PurchasereceiptRequestDetailApi.getScarceGoodsDetailPage
// detailAllSchemas.value = PurchasereceiptRequestDetail.allSchemas
// }
// }
/** 初始化 **/
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['supplierUom'] = val[0]['supplierUom']
row['inventoryStatus'] = val[0]['inventoryStatus']
row['fromLocationCode'] = val[0]['fromLocationCode']
row['toLocationCode'] = ''
row['fromLocationGroupCode'] = val[0]['fromLocationGroupCode']
row['toLocationGroupCode'] = ''
row['fromLocationCode'] = val[0]['locationCode']
row['toLocationCode'] = null
row['fromLocationGroupCode'] = val[0]['locationGroupCode']
row['toLocationGroupCode'] = null
row['toWarehouseCode'] = null
row['toLocationTypes'] = null
row['fromAreaCode'] = val[0]['areaCode']
row['toAreaCode'] = val[0]['toAreaCode']
row['fromQwnerCode'] = val[0]['fromQwnerCode']
@ -177,11 +179,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
item.batch = item.toBatch
item.packingNumber = item.toPackingNumber
item.containerNumber = item.toContainerNumber
let fromLocationCode = item.fromLocationCode
item.fromLocationCode = item.toLocationCode
item.toLocationCode = fromLocationCode
item.toLocationGroupCode = null
item.toWarehouseCode = null
item.toLocationTypes = null
item.toLocationCode = null
// item.fromLocationCode = item.fromLocationCode
// item.fromLocationGroupCode = item.fromLocationGroupCode
})
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) => {
item.tableForm.disabled = true
if (item.field == 'remark') {
@ -334,6 +346,11 @@ const formRef = ref()
const openForm = async (type: string, row?: number) => {
tableData.value = [] //
isShowButton.value = true
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
item.componentProps.disabled = false
}
})
formRef.value.open(type, row)
}
@ -443,25 +460,28 @@ const handleAddTable = () => {
item.tableForm.disabled = false
}
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)
if (tableData.value.length == 0) {
isShowButton.value = true
nextTick(() => {
const setV = {}
setV['purchaseReceiptRecordNumber'] = ''
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
item.componentProps.disabled = false
}
})
nextTick(() => {
const setV = {}
setV['purchaseReceiptRecordNumber'] = ''
setV['supplierCode'] = ''
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
},
isSearch: true,
form:{
componentProps:{
disabled:false
}
}
},
{
label: '承运商',
@ -118,6 +123,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm:false,
isForm: false,
},
{
@ -142,6 +148,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm:false,
isForm: false,
},
{
@ -161,6 +168,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isForm: false,
isTableForm:false,
},
{
label: '从月台代码',
@ -735,7 +743,6 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
isTableForm:false,
tableForm:{
disabled:true
}

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

@ -1,32 +1,21 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SupplierinvoiceRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="SupplierinvoiceRequestMain.allSchemas.searchSchema" @search="setSearchParams"
@reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="SupplierinvoiceRequestMain.allSchemas"
/>
<!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick"
:allSchemas="SupplierinvoiceRequestMain.allSchemas" />
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort">
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
@ -39,277 +28,344 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
@success="getList"
:rules="SupplierinvoiceRequestMainRules"
:formAllSchemas="SupplierinvoiceRequestMain.allSchemas"
:searchTableParams="searchTableParams"
:tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
:tableFormRules="SupplierinvoiceRequestDetailRules"
:tableData="tableData"
:apiUpdate="SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain"
:apiCreate="SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain"
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
<BasicForm ref="formRef" @success="getList" :rules="SupplierinvoiceRequestMainRules"
:formAllSchemas="SupplierinvoiceRequestMain.allSchemas" :searchTableParams="searchTableParams"
:tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas" :tableFormRules="SupplierinvoiceRequestDetailRules"
:tableData="tableData" :apiUpdate="SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain"
:apiCreate="SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain" :isBusiness="true"
@handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" />
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="SupplierinvoiceRequestMain.allSchemas"
<Detail ref="detailRef" :isBasic="false" :allSchemas="SupplierinvoiceRequestMain.allSchemas"
:detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
:detailAllSchemasRules="SupplierinvoiceRequestDetailRules"
:searchTableParams="searchTableParams"
:detailAllSchemasRules="SupplierinvoiceRequestDetailRules" :searchTableParams="searchTableParams"
:apiCreate="SupplierinvoiceRequestDetailApi.createSupplierinvoiceRequestDetail"
:apiUpdate="SupplierinvoiceRequestDetailApi.updateSupplierinvoiceRequestDetail"
:apiPage="SupplierinvoiceRequestDetailApi.getSupplierinvoiceRequestDetailPage"
:apiDelete="SupplierinvoiceRequestDetailApi.deleteSupplierinvoiceRequestDetail"
:Echo="Echo"
/>
:apiDelete="SupplierinvoiceRequestDetailApi.deleteSupplierinvoiceRequestDetail" :Echo="Echo" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { SupplierinvoiceRequestMain,SupplierinvoiceRequestMainRules,SupplierinvoiceRequestDetail,SupplierinvoiceRequestDetailRules } from './supplierinvoiceRequestMain.data'
import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain'
import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '../../../basicDataManage/supplierManage/supplier/supplier.data'
defineOptions({ name: 'SupplierinvoiceRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(SupplierinvoiceRequestMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableParams = ref([
{
formField: 'supplierCode',
searchTableTitle: '供应商信息',
searchTableAllSchemas: Supplier.allSchemas,
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)
import download from '@/utils/download'
import { SupplierinvoiceRequestMain, SupplierinvoiceRequestMainRules, SupplierinvoiceRequestDetail, SupplierinvoiceRequestDetailRules } from './supplierinvoiceRequestMain.data'
import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain'
import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '../../../basicDataManage/supplierManage/supplier/supplier.data'
defineOptions({ name: 'SupplierinvoiceRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(SupplierinvoiceRequestMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableParams = ref([
{
formField: 'supplierCode',
searchTableTitle: '供应商信息',
searchTableAllSchemas: Supplier.allSchemas,
searchTablePage: SupplierApi.getSupplierPage
}
])
//
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 = [
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 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 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) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
}
// -
const butttondata = (row) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-request-main:delete'}), //
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4']) }), //
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListEditBtn({ hasPermi: 'wms:supplierinvoice-request-main:update' }), //
//
{
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) => {
tableData.value = [] //
formRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
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 buttonTableClick = async (val, row) => {
if (val == 'mainPurPlanOpe') { //
handleOpe(row.id)
} else if (val == 'mainPurPlanClo') {//
handleClo(row.id)
} else if (val == 'mainPlanSub') { //
handleSub(row.id)
} else if (val == 'mainPlanApp') { //
handleApp(row.id)
} else if (val == 'mainPlanTur') { //
handleTur(row.id)
} else if (val == 'genRecords') { //
genRecords(row.id)
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
}
/**
* tableForm方法
*/
const tableFormKeys = {}
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)
}
//
const submitForm = async (formType, data) => {
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'))
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type : string, row ?: number) => {
tableData.value = [] //
formRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => {
detailRef.value.openDetail(row, titleName, titleValue)
}
/** 删除按钮操作 */
const handleDelete = async (id : number) => {
try {
//
await message.delConfirm()
//
await SupplierinvoiceRequestMainApi.deleteSupplierinvoiceRequestMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch { }
}
/** 关闭按钮操作 */
const handleClo = async (id : number) => {
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) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
/**
* tableForm方法
*/
const tableFormKeys = {}
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 () => {
getList()
})
//
const submitForm = async (formType, data) => {
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>

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

Loading…
Cancel
Save