Browse Source

Merge remote-tracking branch 'origin/master_hella' into master_hella

master_hella_20240701
gaojs 6 months ago
parent
commit
b3ebf3bba7
  1. 3
      .env
  2. 5
      src/api/wms/purchasereceiptJobMain/index.ts
  3. 60
      src/api/wms/qadCostcentre/index.ts
  4. 59
      src/api/wms/qadProject/index.ts
  5. 61
      src/api/wms/subjectAccount/index.ts
  6. 6
      src/components/rowDrop/index.vue
  7. 2
      src/locales/en-US.ts
  8. 2
      src/locales/zh-CN.ts
  9. 4
      src/views/mes/orderDay/components/schedule.vue
  10. 10
      src/views/mes/workSchedulingQaform/index.vue
  11. 43
      src/views/mes/workSchedulingQaform/workSchedulingQaform.data.ts
  12. 44
      src/views/wms/basicDataManage/labelManage/locationLabel/index.vue
  13. 244
      src/views/wms/basicDataManage/subject/qadCostcentre/index.vue
  14. 153
      src/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data.ts
  15. 244
      src/views/wms/basicDataManage/subject/qadProject/index.vue
  16. 186
      src/views/wms/basicDataManage/subject/qadProject/qadProject.data.ts
  17. 244
      src/views/wms/basicDataManage/subject/subjectAccount/index.vue
  18. 173
      src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts
  19. 11
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
  20. 12
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue
  21. 22
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue
  22. 5
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts

3
.env

@ -15,3 +15,6 @@ VITE_APP_CAPTCHA_ENABLE=true
# 百度统计 # 百度统计
VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc
# 查看质检报告环境
VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400'

5
src/api/wms/purchasereceiptJobMain/index.ts

@ -124,3 +124,8 @@ export const abandonPurchasereceiptJobMainSpare = (id: number) => {
export const acceptPurchasereceiptJobMain = (id: number) => { export const acceptPurchasereceiptJobMain = (id: number) => {
return request.put({ url: '/wms/purchasereceipt-job-main/accept?id=' + id }) return request.put({ url: '/wms/purchasereceipt-job-main/accept?id=' + id })
} }
// 拒收采购收货任务主
export const refusalPurchasereceiptJobMain = (id: number) => {
return request.put({ url: '/wms/purchasereceipt-job-main/refusal?id=' + id })
}

60
src/api/wms/qadCostcentre/index.ts

@ -0,0 +1,60 @@
import request from '@/config/axios'
export interface QadCostcentreVO {
id: number
code: string
usageDescription: string
costcentreId: string
costcentreCode: string
costcentreDescription: string
costcentreActive: string
costcentreType: string
available: string
remark: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询QAD成品中心列表
export const getQadCostcentrePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/qad-costcentre/senior', data })
} else {
return await request.get({ url: `/wms/qad-costcentre/page`, params })
}
}
// 查询QAD成品中心详情
export const getQadCostcentre = async (id: number) => {
return await request.get({ url: `/wms/qad-costcentre/get?id=` + id })
}
// 新增QAD成品中心
export const createQadCostcentre = async (data: QadCostcentreVO) => {
return await request.post({ url: `/wms/qad-costcentre/create`, data })
}
// 修改QAD成品中心
export const updateQadCostcentre = async (data: QadCostcentreVO) => {
return await request.put({ url: `/wms/qad-costcentre/update`, data })
}
// 删除QAD成品中心
export const deleteQadCostcentre = async (id: number) => {
return await request.delete({ url: `/wms/qad-costcentre/delete?id=` + id })
}
// 导出QAD成品中心 Excel
export const exportQadCostcentre = async (params) => {
return await request.download({ url: `/wms/qad-costcentre/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/qad-costcentre/get-import-template' })
}

59
src/api/wms/qadProject/index.ts

@ -0,0 +1,59 @@
import request from '@/config/axios'
export interface QadProjectVO {
id: number
projectId: string
projectCode: string
projectDescription: string
projectStartDate: string
projectEndDate: string
statusCode: string
available: string
remark: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询QAD项目信息列表
export const getQadProjectPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/qad-project/senior', data })
} else {
return await request.get({ url: `/wms/qad-project/page`, params })
}
}
// 查询QAD项目信息详情
export const getQadProject = async (id: number) => {
return await request.get({ url: `/wms/qad-project/get?id=` + id })
}
// 新增QAD项目信息
export const createQadProject = async (data: QadProjectVO) => {
return await request.post({ url: `/wms/qad-project/create`, data })
}
// 修改QAD项目信息
export const updateQadProject = async (data: QadProjectVO) => {
return await request.put({ url: `/wms/qad-project/update`, data })
}
// 删除QAD项目信息
export const deleteQadProject = async (id: number) => {
return await request.delete({ url: `/wms/qad-project/delete?id=` + id })
}
// 导出QAD项目信息 Excel
export const exportQadProject = async (params) => {
return await request.download({ url: `/wms/qad-project/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/qad-project/get-import-template' })
}

61
src/api/wms/subjectAccount/index.ts

@ -0,0 +1,61 @@
import request from '@/config/axios'
export interface SubjectAccountVO {
id: number
code: string
usageDescription: string
costecentreId: string
costecentreCode: string
costecentreType: string
projectId: string
projectCode: string
address: string
available: string
remark: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询科目账户配置列表
export const getSubjectAccountPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/subject-account/senior', data })
} else {
return await request.get({ url: `/wms/subject-account/page`, params })
}
}
// 查询科目账户配置详情
export const getSubjectAccount = async (id: number) => {
return await request.get({ url: `/wms/subject-account/get?id=` + id })
}
// 新增科目账户配置
export const createSubjectAccount = async (data: SubjectAccountVO) => {
return await request.post({ url: `/wms/subject-account/create`, data })
}
// 修改科目账户配置
export const updateSubjectAccount = async (data: SubjectAccountVO) => {
return await request.put({ url: `/wms/subject-account/update`, data })
}
// 删除科目账户配置
export const deleteSubjectAccount = async (id: number) => {
return await request.delete({ url: `/wms/subject-account/delete?id=` + id })
}
// 导出科目账户配置 Excel
export const exportSubjectAccount = async (params) => {
return await request.download({ url: `/wms/subject-account/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/subject-account/get-import-template' })
}

6
src/components/rowDrop/index.vue

@ -153,7 +153,7 @@ const initSelectSta = () => {
if (item.field != 'action') { if (item.field != 'action') {
checkedDataList.value.push(item.label) checkedDataList.value.push(item.label)
_showTableColumns.push(_myTableColumns.find(myItem => (myItem.label == item.label))) _showTableColumns.push(_myTableColumns.find(myItem => (myItem.label == item.label)))
allData.value.push(t(`ts.${item.label}`)) allData.value.push(t(`ts.${item.label}`).replace('ts.',''))
} }
} }
}) })
@ -165,7 +165,7 @@ const initSelectSta = () => {
if (!myTableItem.fixed) { if (!myTableItem.fixed) {
if (myTableItem.field != 'action') { if (myTableItem.field != 'action') {
if (allData.value.indexOf(myTableItem.label) == -1) { if (allData.value.indexOf(myTableItem.label) == -1) {
allData.value.push(t(`ts.${myTableItem.label}`)) allData.value.push(t(`ts.${myTableItem.label}`).replace('ts.',''))
} }
} }
} }
@ -195,7 +195,7 @@ const initSelectSta = () => {
if (!item.fixed) { if (!item.fixed) {
if (item.field != 'action') { if (item.field != 'action') {
checkedDataList.value.push(item.label) checkedDataList.value.push(item.label)
allData.value.push(t(`ts.${item.label}`)) allData.value.push(t(`ts.${item.label}`).replace('ts.',''))
} }
} }
}) })

2
src/locales/en-US.ts

@ -56,6 +56,7 @@ export default {
copySuccess: 'Copy Success', copySuccess: 'Copy Success',
copyError: 'Copy Error', copyError: 'Copy Error',
closeSuccess: 'Close Success', closeSuccess: 'Close Success',
refusalSuccess: 'Refusal Success',
reAddSuccess: 'ReAdd Success', reAddSuccess: 'ReAdd Success',
submitSuccess: 'Submit Success', submitSuccess: 'Submit Success',
agreeSuccess: 'Agree Success', agreeSuccess: 'Agree Success',
@ -66,6 +67,7 @@ export default {
giveupSuccess: 'Giveup Success', giveupSuccess: 'Giveup Success',
dealwithSuccess: 'Dealwith Success', dealwithSuccess: 'Dealwith Success',
confirmColse: 'Confirm Close?', confirmColse: 'Confirm Close?',
confirmRefusal: 'Confirm Refusal?',
confirmReAdd: 'Confirm ReAdd?', confirmReAdd: 'Confirm ReAdd?',
confirmAgree: 'Confirm Agree?', confirmAgree: 'Confirm Agree?',
confirmRefused: 'Confirm Refused?', confirmRefused: 'Confirm Refused?',

2
src/locales/zh-CN.ts

@ -56,6 +56,7 @@ export default {
copySuccess: '复制成功', copySuccess: '复制成功',
copyError: '复制失败', copyError: '复制失败',
closeSuccess: '关闭成功', closeSuccess: '关闭成功',
refusalSuccess: '拒收成功',
reAddSuccess: '重新添加成功', reAddSuccess: '重新添加成功',
submitSuccess: '提交成功', submitSuccess: '提交成功',
agreeSuccess: '审批通过成功', agreeSuccess: '审批通过成功',
@ -66,6 +67,7 @@ export default {
acceptSuccess: '承接成功', acceptSuccess: '承接成功',
giveupSuccess: '放弃成功', giveupSuccess: '放弃成功',
confirmColse: '确认关闭吗?', confirmColse: '确认关闭吗?',
confirmRefusal: '确认拒收吗?',
confirmReAdd: '确认重新添加吗?', confirmReAdd: '确认重新添加吗?',
confirmAgree: '确认审批通过吗?', confirmAgree: '确认审批通过吗?',
confirmRefused: '确认审批驳回吗?', confirmRefused: '确认审批驳回吗?',

4
src/views/mes/orderDay/components/schedule.vue

@ -226,8 +226,6 @@ import { Graph } from '@antv/x6'
import * as TeamApi from '@/api/wms/team' import * as TeamApi from '@/api/wms/team'
import {searchUser} from "@/views/wms/basicDataManage/orderManage/team/team.data"; import {searchUser} from "@/views/wms/basicDataManage/orderManage/team/team.data";
import {getStrDictOptions} from "@/utils/dict"; import {getStrDictOptions} from "@/utils/dict";
import {Equipment} from "@/views/mes/workstation/workstation.data";
import * as WorkstationApi from "@/api/mes/workstation";
import {DeviceInfo, OrderDay} from "@/views/mes/orderDay/orderDay.data"; import {DeviceInfo, OrderDay} from "@/views/mes/orderDay/orderDay.data";
//import {TableForm} from '@/components/TableForm/src/TableForm.vue' // TableForm.vue //import {TableForm} from '@/components/TableForm/src/TableForm.vue' // TableForm.vue
const graphContainer = ref<HTMLElement | null>(null) const graphContainer = ref<HTMLElement | null>(null)
@ -651,6 +649,7 @@ const handleConfirm = (row)=>{
// //
_searchCondition.isSearch = true _searchCondition.isSearch = true
_searchCondition.filters = filters _searchCondition.filters = filters
searchTableRef.value.open( searchTableRef.value.open(
'添加人员',// '添加人员',//
searchUser.allSchemas, searchUser.allSchemas,
@ -662,6 +661,7 @@ const handleConfirm = (row)=>{
undefined, undefined,
_searchCondition _searchCondition
) )
searchTableRef.value.hiddenFilterButton()
} }

10
src/views/mes/workSchedulingQaform/index.vue

@ -99,8 +99,8 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'mes:workSchedulingQaform:create'}), // //defaultButtons.defaultAddBtn({hasPermi:'mes:workSchedulingQaform:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'mes:workSchedulingQaform:import'}), // // defaultButtons.defaultImportBtn({hasPermi:'mes:workSchedulingQaform:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'mes:workSchedulingQaform:export'}), // defaultButtons.defaultExportBtn({hasPermi:'mes:workSchedulingQaform:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
@ -118,7 +118,7 @@ const HeadButttondata = [
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') { //
openForm('create') //openForm('create')
} else if (val == 'import') { // } else if (val == 'import') { //
handleImport() handleImport()
} else if (val == 'export') { // } else if (val == 'export') { //
@ -133,14 +133,14 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = [ const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'mes:workSchedulingQaform:update'}), // //defaultButtons.mainListEditBtn({hasPermi:'mes:workSchedulingQaform:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'mes:workSchedulingQaform:delete'}), // defaultButtons.mainListDeleteBtn({hasPermi:'mes:workSchedulingQaform:delete'}), //
] ]
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') { //
openForm('update', row) //openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} }

43
src/views/mes/workSchedulingQaform/workSchedulingQaform.data.ts

@ -37,6 +37,7 @@ export const WorkSchedulingQaform = useCrudSchemas(reactive<CrudSchema[]>([
field: 'id', field: 'id',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
isTable: false,
}, },
{ {
label: '状态', label: '状态',
@ -63,22 +64,7 @@ export const WorkSchedulingQaform = useCrudSchemas(reactive<CrudSchema[]>([
value: 0 value: 0
}, },
}, },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{ {
label: '删除用户名', label: '删除用户名',
field: 'deleter', field: 'deleter',
@ -131,6 +117,22 @@ export const WorkSchedulingQaform = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{ {
label: '检验类型', label: '检验类型',
field: 'qaFormType', field: 'qaFormType',
@ -164,7 +166,7 @@ export const WorkSchedulingQaform = useCrudSchemas(reactive<CrudSchema[]>([
label: '检测数量', label: '检测数量',
field: 'qaCount', field: 'qaCount',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -174,7 +176,7 @@ export const WorkSchedulingQaform = useCrudSchemas(reactive<CrudSchema[]>([
label: '检测合格数量', label: '检测合格数量',
field: 'qaCountPassed', field: 'qaCountPassed',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -184,7 +186,7 @@ export const WorkSchedulingQaform = useCrudSchemas(reactive<CrudSchema[]>([
label: '检测不合格数量', label: '检测不合格数量',
field: 'qaCountNotpassed', field: 'qaCountNotpassed',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -194,12 +196,13 @@ export const WorkSchedulingQaform = useCrudSchemas(reactive<CrudSchema[]>([
label: '合格率', label: '合格率',
field: 'qaPassRate', field: 'qaPassRate',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
}, },
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
isTable:false,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'

44
src/views/wms/basicDataManage/labelManage/locationLabel/index.vue

@ -16,7 +16,7 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table v-clientTable <Table v-clientTable ref="tableRef" :selection="true"
:columns="tableColumns" :columns="tableColumns"
:data="tableObject.tableList" :data="tableObject.tableList"
:loading="tableObject.loading" :loading="tableObject.loading"
@ -26,6 +26,7 @@
v-model:pageSize="tableObject.pageSize" v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
@getSelectionRows="getSelectionRows"
> >
<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)">
@ -90,6 +91,7 @@ const { getList, setSearchParams } = tableMethods
const HeadButttondata = [ const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'wms:package:create'}), // // defaultButtons.defaultAddBtn({hasPermi:'wms:package:create'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:package:export'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:package:export'}), //
defaultButtons.mainLisSelectiontPointBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -110,6 +112,8 @@ const buttonBaseClick = (val, item) => {
getList() getList()
} }
} else if (val == 'filtrate') { // } else if (val == 'filtrate') { //
} else if (val=='selection_point'){//
handleSelectionPoint()
}else { // }else { //
console.log('其他按钮', item) console.log('其他按钮', item)
} }
@ -186,6 +190,16 @@ const handlePoint = async (row) => {
window.open(src.value+'&id='+row.id) window.open(src.value+'&id='+row.id)
} }
const srcPoint = ref(BASE_URL + '/jmreport/view/953469704945139712?token=' + getAccessToken())
const handleSelectionPoint = async ()=>{
let rows:any = []
selectionRows.value.forEach(item=>{
rows = [...rows,...item.selectionRows.map(item1=>item1.id)]
})
console.log('批量打印',rows.join(','))
window.open(srcPoint.value+'&relateNumber='+rows.join(','))
}
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {
@ -196,6 +210,34 @@ const searchFormClick = (searchData) => {
getList() // getList() //
} }
watch(
() => tableObject.tableList,
() => {
const currentRows = selectionRows.value.find(item=>item.currentPage==tableObject.currentPage)
if(currentRows){
nextTick(() => {
currentRows.selectionRows.forEach(item=>{
tableRef.value.toggleRowSelection(item,true)
})
})
}
}
)
const selectionRows = ref<any>([])
const tableRef = ref()
const getSelectionRows = (currentPage,currentPageSelectionRows) => {
console.log("getSelectionRows",currentPage,currentPageSelectionRows)
const currentRows = selectionRows.value.find(item=>item.currentPage==currentPage)
if(currentRows){
currentRows.selectionRows = currentPageSelectionRows
}else{
selectionRows.value.push({
currentPage,
selectionRows:currentPageSelectionRows
})
}
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

244
src/views/wms/basicDataManage/subject/qadCostcentre/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="QadCostcentre.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="QadCostcentre.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<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"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="QadCostcentreRules"
:formAllSchemas="QadCostcentre.allSchemas"
:apiUpdate="QadCostcentreApi.updateQadCostcentre"
:apiCreate="QadCostcentreApi.createQadCostcentre"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="QadCostcentre.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/qad-costcentre/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { QadCostcentre,QadCostcentreRules } from './qadCostcentre.data'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
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: 'QadCostcentre' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(QadCostcentre.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: QadCostcentreApi.getQadCostcentrePage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:qadCostcentre:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:qadCostcentre:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:qadCostcentre: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 butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:qadCostcentre:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:qadCostcentre:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =QadCostcentre.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await QadCostcentreApi.createQadCostcentre(data)
message.success(t('common.createSuccess'))
} else {
await QadCostcentreApi.updateQadCostcentre(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicQadCostcentre')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await QadCostcentreApi.deleteQadCostcentre(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 QadCostcentreApi.exportQadCostcentre(tableObject.params)
download.excel(data, 'QAD成品中心.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: 'QAD成品中心导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await QadCostcentreApi.importTemplate()
})
</script>

153
src/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data.ts

@ -0,0 +1,153 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const QadCostcentreRules = reactive({
code: [required],
usageDescription: [required],
available: [required],
concurrencyStamp: [required],
})
export const QadCostcentre = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
isTable:false,
},
{
label: '成本中心ID',
field: 'costcentreId',
sort: 'custom',
isSearch: false,
},
{
label: '成本中心代码',
field: 'costcentreCode',
sort: 'custom',
isSearch: true,
},
{
label: '成本中心描述',
field: 'costcentreDescription',
sort: 'custom',
isSearch: false,
form: {
component: 'Editor',
componentProps: {
valueHtml: '',
height: 200
}
},
},
{
label: '启用',
field: 'costcentreActive',
sort: 'custom',
isSearch: false,
},
{
label: '成本中心类型',
field: 'costcentreType',
sort: 'custom',
isSearch: false,
form: {
component: 'SelectV2'
},
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable:false,
search: {
component: 'DatePicker',
componentProps: {
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'
}
},
},
{
label: '删除者ID',
field: 'deleterId',
sort: 'custom',
isSearch: false,
isTable:false,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isSearch: false,
isTable:false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable:false,
},
{
label: '操作',
field: 'action',
isForm: false,
isTable:false,
table: {
width: 150,
fixed: 'right'
}
}
]))

244
src/views/wms/basicDataManage/subject/qadProject/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="QadProject.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="QadProject.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<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"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="QadProjectRules"
:formAllSchemas="QadProject.allSchemas"
:apiUpdate="QadProjectApi.updateQadProject"
:apiCreate="QadProjectApi.createQadProject"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="QadProject.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/qad-project/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { QadProject,QadProjectRules } from './qadProject.data'
import * as QadProjectApi from '@/api/wms/qadProject'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
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: 'QadProject' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(QadProject.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: QadProjectApi.getQadProjectPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:qadProject:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:qadProject:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:qadProject: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 butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:qadProject:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:qadProject:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =QadProject.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await QadProjectApi.createQadProject(data)
message.success(t('common.createSuccess'))
} else {
await QadProjectApi.updateQadProject(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicQadProject')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await QadProjectApi.deleteQadProject(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 QadProjectApi.exportQadProject(tableObject.params)
download.excel(data, 'QAD项目信息.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: 'QAD项目信息导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await QadProjectApi.importTemplate()
})
</script>

186
src/views/wms/basicDataManage/subject/qadProject/qadProject.data.ts

@ -0,0 +1,186 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const QadProjectRules = reactive({
available: [required],
concurrencyStamp: [required],
})
export const QadProject = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
isTable:false,
},
{
label: '项目ID',
field: 'projectId',
sort: 'custom',
isSearch: false,
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
isSearch: true,
},
{
label: '项目描述',
field: 'projectDescription',
sort: 'custom',
isSearch: false,
form: {
component: 'Editor',
componentProps: {
valueHtml: '',
height: 200
}
},
},
{
label: '项目开始时间',
field: 'projectStartDate',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
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'
}
},
},
{
label: '项目结束时间',
field: 'projectEndDate',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
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'
}
},
},
{
label: '状态代码',
field: 'statusCode',
sort: 'custom',
isSearch: false,
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable:false,
search: {
component: 'DatePicker',
componentProps: {
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'
}
},
},
{
label: '删除者ID',
field: 'deleterId',
sort: 'custom',
isSearch: false,
isTable:false,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isSearch: false,
isTable:false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable:false,
},
{
label: '操作',
field: 'action',
isForm: false,
isTable:false,
table: {
width: 150,
fixed: 'right'
}
}
]))

244
src/views/wms/basicDataManage/subject/subjectAccount/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SubjectAccount.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="SubjectAccount.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<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"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="SubjectAccountRules"
:formAllSchemas="SubjectAccount.allSchemas"
:apiUpdate="SubjectAccountApi.updateSubjectAccount"
:apiCreate="SubjectAccountApi.createSubjectAccount"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="SubjectAccount.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/subject-account/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { SubjectAccount,SubjectAccountRules } from './subjectAccount.data'
import * as SubjectAccountApi from '@/api/wms/subjectAccount'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
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: 'SubjectAccount' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(SubjectAccount.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: SubjectAccountApi.getSubjectAccountPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:subjectAccount:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:subjectAccount:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:subjectAccount: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 butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:subjectAccount:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:subjectAccount:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =SubjectAccount.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await SubjectAccountApi.createSubjectAccount(data)
message.success(t('common.createSuccess'))
} else {
await SubjectAccountApi.updateSubjectAccount(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicSubjectAccount')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await SubjectAccountApi.deleteSubjectAccount(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 SubjectAccountApi.exportSubjectAccount(tableObject.params)
download.excel(data, '科目账户配置.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '科目账户配置导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await SubjectAccountApi.importTemplate()
})
</script>

173
src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts

@ -0,0 +1,173 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const SubjectAccountRules = reactive({
code: [required],
usageDescription: [required],
costecentreId: [required],
costecentreCode: [required],
costecentreType: [required],
projectId: [required],
projectCode: [required],
available: [required],
concurrencyStamp: [required],
})
export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
isTable:false,
},
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch: true,
},
{
label: '领用描述',
field: 'usageDescription',
sort: 'custom',
isSearch: true,
form: {
component: 'Editor',
componentProps: {
valueHtml: '',
height: 200
}
},
},
{
label: '成本中心ID',
field: 'costecentreId',
sort: 'custom',
isSearch: false,
isTable:false,
},
{
label: '成本中心代码',
field: 'costecentreCode',
sort: 'custom',
isSearch: false,
},
{
label: '成本中心类型',
field: 'costecentreType',
sort: 'custom',
isSearch: false,
form: {
component: 'SelectV2'
},
},
{
label: '项目ID',
field: 'projectId',
sort: 'custom',
isSearch: false,
isTable:false,
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
isSearch: false,
},
{
label: '科目',
field: 'address',
sort: 'custom',
isSearch: false,
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
},
{
label: '备注',
field: 'remark',
sort: 'custom',
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isTable:false,
search: {
component: 'DatePicker',
componentProps: {
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'
}
},
},
{
label: '删除者ID',
field: 'deleterId',
sort: 'custom',
isSearch: false,
isTable:false,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isSearch: false,
isTable:false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
isTable:false,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable:false
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

11
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue

@ -197,12 +197,21 @@ DeliverRequestDetail.allSchemas.tableFormColumns.map(item => {
key: 'businessType', key: 'businessType',
value: businessType.value , value: businessType.value ,
isMainValue: false isMainValue: false
},] },
{
key: 'customerCode',
value: 'customerCode' ,
isMainValue: true
}]
item.form.componentProps.searchCondition = [ item.form.componentProps.searchCondition = [
{ {
key: 'businessType', key: 'businessType',
value: businessType.value, value: businessType.value,
isMainValue: false isMainValue: false
},{
key: 'customerCode',
value: 'customerCode' ,
isMainValue: true
}] }]
} }
}) })

12
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

@ -195,12 +195,22 @@ DeliverPlanDetail.allSchemas.tableFormColumns.map(item => {
key: 'businessType', key: 'businessType',
value: businessType.value , value: businessType.value ,
isMainValue: false isMainValue: false
},] },
{
key: 'customerCode',
value: 'customerCode' ,
isMainValue: true
}]
item.form.componentProps.searchCondition = [ item.form.componentProps.searchCondition = [
{ {
key: 'businessType', key: 'businessType',
value: businessType.value, value: businessType.value,
isMainValue: false isMainValue: false
},
{
key: 'customerCode',
value: 'customerCode' ,
isMainValue: true
}] }]
} }
}) })

22
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue

@ -90,12 +90,8 @@
> >
<iframe height="600px" width="100%" :src="qualityReport" frameborder="0"></iframe> <iframe height="600px" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog> </el-dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { PurchasereceiptJobMain, import { PurchasereceiptJobMain,
@ -217,17 +213,17 @@ const butttondata = (row,$index) => {
} }
return [ return [
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
// defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
{ {
label: '拒收', label: '拒收',
name: 'mainJobClo', name: 'mainJobRefusal',
hide: isShowMainButton(row, ['1']), hide: isShowMainButton(row, ['1']),
type: 'primary', type: 'primary',
icon: '', icon: '',
color: '', color: '',
hasPermi: 'wms:purchasereceipt-job-main:close', hasPermi: 'wms:purchasereceipt-job-main:refusal',
link: true // link: true //
}, },
defaultButtons.mainListPlanCheckQualityReportBtn({}), // defaultButtons.mainListPlanCheckQualityReportBtn({}), //
@ -247,6 +243,8 @@ const buttonTableClick = async (val, row) => {
} else if(val == 'mainPlanCheckQualityReport'){ } else if(val == 'mainPlanCheckQualityReport'){
// //
checkQualityReport(row) checkQualityReport(row)
} else if(val == 'mainJobRefusal'){
handleRefusal(row.masterId)
} }
} }
// //
@ -267,6 +265,16 @@ const handleClose = async (id: number) => {
} catch {} } catch {}
} }
/** 拒收按钮操作 */
const handleRefusal = async (id: number) => {
try {
await message.confirm(t('common.confirmRefusal'))
await PurchasereceiptJobMainApi.refusalPurchasereceiptJobMain(id)
message.success(t('common.refusalSuccess'))
await getList()
} catch {}
}
// //
const detailParenPackingRef = ref() const detailParenPackingRef = ref()
const { tableObject: packingDetatableData, tableMethods: packDetatableMethods } = useTable({ const { tableObject: packingDetatableData, tableMethods: packDetatableMethods } = useTable({

5
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts

@ -1,6 +1,7 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import { fa } from 'element-plus/es/locale' import { fa } from 'element-plus/es/locale'
import { DICT_TYPE } from '@/utils/dict'
/** /**
* @returns {Array} * @returns {Array}
@ -609,7 +610,7 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false, isDetail: false,
isForm: false, isForm: false,
table: { table: {
width: 180, width: 200,
fixed: 'right' fixed: 'right'
}, },
}, },
@ -1108,7 +1109,7 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false, isDetail: false,
isForm: false , isForm: false ,
table: { table: {
width: 150, width: 180,
fixed: 'right' fixed: 'right'
}, },
isTableForm:true, isTableForm:true,

Loading…
Cancel
Save