Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
zhaoxuebing 6 months ago
parent
commit
45dcf4b7a6
  1. 56
      src/api/mes/itemRequestDetail/index.ts
  2. 65
      src/api/wms/saleShipmentDetailRecord/index.ts
  3. 30
      src/api/wms/saleShipmentMain/index.ts
  4. 56
      src/api/wms/saleShipmentMainRecord/index.ts
  5. 9
      src/views/mes/components/Detail.vue
  6. 29
      src/views/mes/itemRequestMain/index.vue
  7. 181
      src/views/mes/itemRequestMain/itemRequestMain.data.ts
  8. 2
      src/views/mes/qualityform/index.vue
  9. 8
      src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts
  10. 224
      src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue
  11. 278
      src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts
  12. 30
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue
  13. 16
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts

56
src/api/mes/itemRequestDetail/index.ts

@ -0,0 +1,56 @@
import request from '@/config/axios'
export interface ItemRequestDetailVO {
deleteTime: Date
id: number
status: string
concurrencyStamp: number
remark: string
deleter: string
requestBillNo: string
itemBasicCode: string
itemCounts: number
itemUom: string
siteId: number
}
// 查询叫料申请明细列表
export const getItemRequestDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/item-request-detail/senior', data })
} else {
return await request.get({ url: `/mes/item-request-detail/page`, params })
}
}
// 查询叫料申请明细详情
export const getItemRequestDetail = async (id: number) => {
return await request.get({ url: `/mes/item-request-detail/get?id=` + id })
}
// 新增叫料申请明细
export const createItemRequestDetail = async (data: ItemRequestDetailVO) => {
return await request.post({ url: `/mes/item-request-detail/create`, data })
}
// 修改叫料申请明细
export const updateItemRequestDetail = async (data: ItemRequestDetailVO) => {
return await request.put({ url: `/mes/item-request-detail/update`, data })
}
// 删除叫料申请明细
export const deleteItemRequestDetail = async (id: number) => {
return await request.delete({ url: `/mes/item-request-detail/delete?id=` + id })
}
// 导出叫料申请明细 Excel
export const exportItemRequestDetail = async (params) => {
return await request.download({ url: `/mes/item-request-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/mes/item-request-detail/get-import-template' })
}

65
src/api/wms/saleShipmentDetailRecord/index.ts

@ -0,0 +1,65 @@
import request from '@/config/axios'
export interface SaleShipmentDetailRecordVO {
id: number
soNumber: string
soLine: string
fromOwnerCode: string
packingNumber: string
batch: string
inventoryStatus: string
fromLocationCode: string
masterId: number
number: string
itemCode: string
itemName: string
itemDesc1: string
itemDesc2: string
projectCode: string
qty: number
uom: string
remark: string
concurrencyStamp: string
siteId: number
}
// 查询销售发运记录子列表
export const getSaleShipmentDetailRecordPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/sale-shipment-detail-record/senior', data })
} else {
return await request.get({ url: `/wms/sale-shipment-detail-record/page`, params })
}
}
// 查询销售发运记录子详情
export const getSaleShipmentDetailRecord = async (id: number) => {
return await request.get({ url: `/wms/sale-shipment-detail-record/get?id=` + id })
}
// 新增销售发运记录子
export const createSaleShipmentDetailRecord = async (data: SaleShipmentDetailRecordVO) => {
return await request.post({ url: `/wms/sale-shipment-detail-record/create`, data })
}
// 修改销售发运记录子
export const updateSaleShipmentDetailRecord = async (data: SaleShipmentDetailRecordVO) => {
return await request.put({ url: `/wms/sale-shipment-detail-record/update`, data })
}
// 删除销售发运记录子
export const deleteSaleShipmentDetailRecord = async (id: number) => {
return await request.delete({ url: `/wms/sale-shipment-detail-record/delete?id=` + id })
}
// 导出销售发运记录子 Excel
export const exportSaleShipmentDetailRecord = async (params) => {
return await request.download({ url: `/wms/sale-shipment-detail-record/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/sale-shipment-detail-record/get-import-template' })
}

30
src/api/wms/saleShipmentMain/index.ts

@ -62,3 +62,33 @@ export const exportSaleShipmentMain = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/sale-shipment-main-request/get-import-template' }) return request.download({ url: '/wms/sale-shipment-main-request/get-import-template' })
} }
// 关闭-销售发运申请
export const closeSaleShipmentMain = async (id) => {
return await request.put({ url: `/wms/sale-shipment-main-request/close?id=` + id })
}
// 重新添加-销售发运申请
export const reAddSaleShipmentMain = async (id) => {
return await request.put({ url: `/wms/sale-shipment-main-request/reAdd?id=` + id })
}
// 提交审批-销售发运申请
export const submitSaleShipmentMain = async (id) => {
return await request.put({ url: `/wms/sale-shipment-main-request/submit?id=` + id })
}
// 审批驳回-销售发运申请
export const refusedSaleShipmentMain = async (id) => {
return await request.put({ url: `/wms/sale-shipment-main-request/refused?id=` + id })
}
// 审批通过-销售发运申请
export const agreeSaleShipmentMain = async (id) => {
return await request.put({ url: `/wms/sale-shipment-main-request/agree?id=` + id })
}
// 处理-销售发运申请
export const handleSaleShipmentMain = async (id) => {
return await request.put({ url: `/wms/sale-shipment-main-request/handle?id=` + id })
}

56
src/api/wms/saleShipmentMainRecord/index.ts

@ -0,0 +1,56 @@
import request from '@/config/axios'
export interface SaleShipmentMainRecordVO {
id: number
requestNumber: string
customerCode: string
invoiceTime: Date
executeTime: Date
available: string
departmentCode: string
number: string
businessType: string
extraProperties: string
siteId: string
}
// 查询销售发运记录主列表
export const getSaleShipmentMainRecordPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/sale-shipment-main-record/senior', data })
} else {
return await request.get({ url: `/wms/sale-shipment-main-record/page`, params })
}
}
// 查询销售发运记录主详情
export const getSaleShipmentMainRecord = async (id: number) => {
return await request.get({ url: `/wms/sale-shipment-main-record/get?id=` + id })
}
// 新增销售发运记录主
export const createSaleShipmentMainRecord = async (data: SaleShipmentMainRecordVO) => {
return await request.post({ url: `/wms/sale-shipment-main-record/create`, data })
}
// 修改销售发运记录主
export const updateSaleShipmentMainRecord = async (data: SaleShipmentMainRecordVO) => {
return await request.put({ url: `/wms/sale-shipment-main-record/update`, data })
}
// 删除销售发运记录主
export const deleteSaleShipmentMainRecord = async (id: number) => {
return await request.delete({ url: `/wms/sale-shipment-main-record/delete?id=` + id })
}
// 导出销售发运记录主 Excel
export const exportSaleShipmentMainRecord = async (params) => {
return await request.download({ url: `/wms/sale-shipment-main-record/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/sale-shipment-main-record/get-import-template' })
}

9
src/views/mes/components/Detail.vue

@ -533,7 +533,8 @@ const change = (item, index) => {
const masterParmas = ref({ const masterParmas = ref({
masterId: '', //id masterId: '', //id
number: '', // number: '', //
status: '' // status: '', //
requestBillNo:'' //
}) })
// //
@ -578,13 +579,15 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
} }
count.value++ count.value++
// //
if (!props.isBasic) { if (!props.isBasic && !props.isBasicMes) {
// id // id
masterParmas.value.masterId = row.masterId||row.id masterParmas.value.masterId = row.masterId||row.id
masterParmas.value.number = row.number masterParmas.value.number = row.number
masterParmas.value.status = row.status masterParmas.value.status = row.status
masterParmas.value.requestBillNo = row.requestBillNo
tableObjectRef.value.params = { tableObjectRef.value.params = {
masterId: row.masterId||row.id masterId: row.masterId||row.id,
requestBillNo:row.requestBillNo
} }
await getList() await getList()
} }

29
src/views/mes/itemRequestMain/index.vue

@ -27,9 +27,9 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #code="{row}"> <template #requestBillNo="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> <el-button type="primary" link @click="openDetail(row, '代码', row.requestBillNo)">
<span>{{ row.code }}</span> <span>{{ row.requestBillNo }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
@ -51,7 +51,23 @@
/> />
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ItemRequestMain.allSchemas" /> <Detail ref="detailRef"
:isBasic="false"
:isBasicMes="false"
:allSchemas="ItemRequestMain.allSchemas"
:detailAllSchemas="ItemRequestDetail.allSchemas"
:detailAllSchemasRules="ItemRequestMainRules"
:apiPage="ItemRequestDetailApi.getItemRequestDetailPage"
:apiCreate="ItemRequestDetailApi.createItemRequestDetail"
:apiUpdate="ItemRequestDetailApi.updateItemRequestDetail"
:apiDelete="ItemRequestDetailApi.deleteItemRequestDetail"
:detailButtonIsShowAdd="true"
:detailButtonIsShowEdit="true"
:detailButtonIsShowDelete="true"
@handleMainFefresh="handleMainFefresh"
@searchTableSuccessDetail="searchTableSuccessDetail"
:key="count"
/>
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/item-request-main/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportForm ref="importFormRef" url="/mes/item-request-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
@ -59,12 +75,13 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { ItemRequestMain,ItemRequestMainRules } from './itemRequestMain.data' import { ItemRequestMain,ItemRequestMainRules,ItemRequestDetail,ItemRequestDetailRules } from './itemRequestMain.data'
import * as ItemRequestMainApi from '@/api/mes/itemRequestMain' import * as ItemRequestMainApi from '@/api/mes/itemRequestMain'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemRequestDetailApi from '@/api/mes/itemRequestDetail'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '../components/Detail.vue'
defineOptions({ name: 'MesItemRequestMain' }) defineOptions({ name: 'MesItemRequestMain' })

181
src/views/mes/itemRequestMain/itemRequestMain.data.ts

@ -32,6 +32,12 @@ export const ItemRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
{
label: '申请单号',
field: 'requestBillNo',
sort: 'custom',
isSearch: true,
},
{ {
label: '主键', label: '主键',
field: 'id', field: 'id',
@ -45,7 +51,10 @@ export const ItemRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '状态', label: '状态',
field: 'status', field: 'status',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: { form: {
component: 'Radio' component: 'Radio'
}, },
@ -64,11 +73,73 @@ export const ItemRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '备注', label: '删除用户名',
field: 'remark', field: 'deleter',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '位置ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '计划编码',
field: 'planDayCode',
sort: 'custom',
isSearch: true,
},
{
label: '工单编码',
field: 'workBillNo',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },
{
label: '批次编码',
field: 'batchCode',
sort: 'custom',
isSearch: true,
},
{
label: '工位编码',
field: 'workstationCode',
sort: 'custom',
isSearch: true,
},
{
label: '产品编码',
field: 'productCode',
sort: 'custom',
isSearch: true,
},
{
label: '工序编码',
field: 'processCode',
sort: 'custom',
isSearch: true,
},
{
label: '类型(1:叫料、2:补料)',
field: 'requestType',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
},
},
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
@ -86,8 +157,32 @@ export const ItemRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false, isForm: false,
}, },
{ {
label: '删除用户名', label: '备注',
field: 'deleter', field: 'remark',
sort: 'custom',
isSearch: true,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
export const ItemRequestDetailRules = reactive({
concurrencyStamp: [required],
})
export const ItemRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '主键',
field: 'id',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false, isTable: false,
@ -95,8 +190,20 @@ export const ItemRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isDetail:false, isDetail:false,
}, },
{ {
label: '位置ID', label: '状态',
field: 'siteId', field: 'status',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'Radio'
},
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false, isTable: false,
@ -107,56 +214,74 @@ export const ItemRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
value: 0 value: 0
}, },
}, },
{ {
label: '计划编码', label: '删除用户名',
field: 'planDayCode', field: 'deleter',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
}, },
{ {
label: '工单编码', label: '申请单号',
field: 'workBillNo', field: 'requestBillNo',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },
{ {
label: '批次编码', label: '物料编码',
field: 'batchCode', field: 'itemBasicCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },
{ {
label: '申请单号', label: '物料数量',
field: 'requestBillNo', field: 'itemCounts',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },
{ {
label: '工位编码', label: '物料单位',
field: 'workstationCode', field: 'itemUom',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },
{ {
label: '产品编码', label: '位置ID',
field: 'productCode', field: 'siteId',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
},
}, },
{ {
label: '工序编码', label: '创建时间',
field: 'processCode', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter,
isSearch: true, 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: '类型(1:叫料、2:补料)', label: '备注',
field: 'requestType', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: {
component: 'SelectV2'
},
}, },
{ {
label: '操作', label: '操作',

2
src/views/mes/qualityform/index.vue

@ -53,7 +53,7 @@
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" <Detail ref="detailRef"
:isBasic="false" :isBasic="false"
:isBasicMes="true" :isBasicMes="false"
:allSchemas="Qualityform.allSchemas" :allSchemas="Qualityform.allSchemas"
:detailAllSchemas="QualityformDetail.allSchemas" :detailAllSchemas="QualityformDetail.allSchemas"
:detailAllSchemasRules="QualityformDetailRules" :detailAllSchemasRules="QualityformDetailRules"

8
src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts

@ -364,6 +364,14 @@ export const SaleDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格代码',
searchField: 'code',
searchTitle: '包装规格信息',
searchAllSchemas: Packageunit.allSchemas, // 查询弹窗所需类
searchPage: PackageunitApi.getPackageunitPage, // 查询弹窗所需分页方法
},
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {

224
src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue

@ -0,0 +1,224 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SaleShipmentMainRecord.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="SaleShipmentMainRecord.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="SaleShipmentMainRecordRules"
:formAllSchemas="SaleShipmentMainRecord.allSchemas"
:apiUpdate="SaleShipmentMainRecordApi.updateSaleShipmentMainRecord"
:apiCreate="SaleShipmentMainRecordApi.createSaleShipmentMainRecord"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="SaleShipmentMainRecord.allSchemas" />
<!-- 导入 -->
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { SaleShipmentMainRecord,SaleShipmentMainRecordRules } from './saleShipmentMainRecord.data'
import * as SaleShipmentMainRecordApi from '@/api/wms/saleShipmentMainRecord'
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: 'SaleShipmentMainRecord' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(SaleShipmentMainRecord.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: SaleShipmentMainRecordApi.getSaleShipmentMainRecordPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:saleShipmentMainRecord:create'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:saleShipmentMainRecord: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 == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:saleShipmentMainRecord:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:saleShipmentMainRecord: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 =SaleShipmentMainRecord.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 SaleShipmentMainRecordApi.createSaleShipmentMainRecord(data)
message.success(t('common.createSuccess'))
} else {
await SaleShipmentMainRecordApi.updateSaleShipmentMainRecord(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, 'basicSaleShipmentMainRecord')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await SaleShipmentMainRecordApi.deleteSaleShipmentMainRecord(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 SaleShipmentMainRecordApi.exportSaleShipmentMainRecord(tableObject.params)
download.excel(data, '销售发运记录主.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
})
</script>

278
src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts

@ -0,0 +1,278 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const SaleShipmentMainRecordRules = reactive({
})
export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
isSearch: true,
},
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
isSearch: true,
},
{
label: '发票时间',
field: 'invoiceTime',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '执行时间',
field: 'executeTime',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: true,
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isSearch: true,
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
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: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: true,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验
export const SaleShipmentDetailRecordRules = reactive({
})
export const SaleShipmentDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
isSearch: true,
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
isSearch: true,
},
{
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
isSearch: true,
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
isSearch: true,
},
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: true,
},
{
label: '库存状态',
field: 'inventoryStatus',
sort: 'custom',
isSearch: true,
form: {
component: 'Radio'
},
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
isSearch: true,
},
{
label: '主表ID',
field: 'masterId',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
isSearch: true,
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
isSearch: true,
},
{
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
isSearch: true,
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
isSearch: true,
},
{
label: '数量',
field: 'qty',
sort: 'custom',
isSearch: true,
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
isSearch: true,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
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: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: true,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

30
src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue

@ -77,7 +77,7 @@
/> />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/sale-shipment-main/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportForm ref="importFormRef" url="/wms/sale-shipment-main-request/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -194,12 +194,34 @@ const buttonBaseClick = (val, item) => {
} }
} }
//
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// - // -
const butttondata = [ const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
return []
}
return [
defaultButtons.mainListEditBtn({hasPermi:'wms:sale-shipment-main-request:update'}), // defaultButtons.mainListEditBtn({hasPermi:'wms:sale-shipment-main-request:update'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:sale-shipment-main-request:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:sale-shipment-main-request:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:sale-shipment-main-request:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:sale-shipment-main-request:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:sale-shipment-main-request:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:sale-shipment-main-request:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:sale-shipment-main-request:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-request:delete'}), // defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-request:delete'}), //
] ]
}
const tableData = ref([]) const tableData = ref([])

16
src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts

@ -27,6 +27,9 @@ export const SaleShipmentMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'customerCode', field: 'customerCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 150
},
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
@ -51,6 +54,9 @@ export const SaleShipmentMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false, isForm: false,
table: {
width: 150
},
}, },
{ {
label: '业务类型', label: '业务类型',
@ -71,6 +77,9 @@ export const SaleShipmentMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '发票时间', label: '发票时间',
field: 'invoiceTime', field: 'invoiceTime',
sort: 'custom', sort: 'custom',
table: {
width: 180
},
formatter: dateFormatter, formatter: dateFormatter,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
@ -251,6 +260,7 @@ export const SaleShipmentDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isSearch: true,
tableForm: { tableForm: {
type: 'Select', type: 'Select',
disabled: true disabled: true
@ -356,11 +366,11 @@ export const SaleShipmentDetail = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false, isForm: false,
}, },
{ {
label: '从库位代码', label: '客户库位',
field: 'fromLocationCode', field: 'fromLocationCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isTableForm: false isTableForm: true
}, },
{ {
@ -402,7 +412,7 @@ export const SaleShipmentDetail = useCrudSchemas(reactive<CrudSchema[]>([
hiddenInMain: true, hiddenInMain: true,
}, },
{ {
label: '数量', label: '开票数量',
field: 'qty', field: 'qty',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,

Loading…
Cancel
Save