Browse Source

Merge remote-tracking branch 'origin/master'

master
zhaoxuebing 11 months ago
parent
commit
616ceb70af
  1. 12
      src/api/wms/customerreturnRequestMain/index.ts
  2. 30
      src/api/wms/customersettleRequestMain/index.ts
  3. 14
      src/api/wms/deliverJobMain/index.ts
  4. 29
      src/api/wms/deliverRequestMain/index.ts
  5. 5
      src/api/wms/itembasic/index.ts
  6. 5
      src/api/wms/owner/index.ts
  7. 5
      src/api/wms/purchasereceiptRecordMain/index.ts
  8. 24
      src/api/wms/supplierdeliverRequestMain/index.ts
  9. 94
      src/components/BasicForm/src/BasicForm.vue
  10. 11
      src/components/Detail/src/Detail.vue
  11. 3
      src/components/DetailCountPlan/index.ts
  12. 499
      src/components/DetailCountPlan/src/DetailCountPlan.vue
  13. 8
      src/components/TableForm/src/TableForm.vue
  14. 3
      src/components/TableFormCountPlan/index.ts
  15. 193
      src/components/TableFormCountPlan/src/TableFormCountPlan.vue
  16. 1
      src/utils/dict.ts
  17. 367
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  18. 353
      src/views/wms/countManage/count/countPlanMain/index.vue
  19. 38
      src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts
  20. 40
      src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/customerreceiptRequestMain.data.ts
  21. 38
      src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/customerreturnJobMain.data.ts
  22. 38
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/customerreturnRecordMain.data.ts
  23. 162
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  24. 47
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue
  25. 92
      src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/customersettleRequestMain.data.ts
  26. 61
      src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue
  27. 39
      src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts
  28. 88
      src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue
  29. 38
      src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts
  30. 153
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts
  31. 64
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
  32. 134
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  33. 5
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue
  34. 4
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts
  35. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
  36. 194
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

12
src/api/wms/customerreturnRequestMain/index.ts

@ -80,31 +80,31 @@ export const importTemplate = () => {
}
// 关闭客户退货申请主 Excel
export const closeProductreceiptRequestMain = async (id) => {
export const close = async (id) => {
return await request.put({ url: `/wms/customerreturn-request-main/close?id=` + id })
}
// 重新添加客户退货申请主 Excel
export const reAddProductreceiptRequestMain = async (id) => {
export const reAdd = async (id) => {
return await request.put({ url: `/wms/customerreturn-request-main/reAdd?id=` + id })
}
// 提交客户退货申请主 Excel
export const submitProductreceiptRequestMain = async (id) => {
export const submit = async (id) => {
return await request.put({ url: `/wms/customerreturn-request-main/submit?id=` + id })
}
// 审批通过客户退货申请主 Excel
export const agreeProductreceiptRequestMain = async (id) => {
export const agree = async (id) => {
return await request.put({ url: `/wms/customerreturn-request-main/agree?id=` + id })
}
// 审批驳回客户退货申请主 Excel
export const refusedProductreceiptRequestMain = async (id) => {
export const refused = async (id) => {
return await request.put({ url: `/wms/customerreturn-request-main/refused?id=` + id })
}
// 处理驳回客户退货申请主 Excel
export const handleProductreceiptRequestMain = async (id) => {
export const handle = async (id) => {
return await request.put({ url: `/wms/customerreturn-request-main/handle?id=` + id })
}

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

@ -64,3 +64,33 @@ export const exportCustomersettleRequestMain = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/customersettle-request-main/get-import-template' })
}
// 关闭
export const close = (id) => {
return request.put({ url: '/wms/customersettle-request-main/close?id=' + id })
}
// 重新添加
export const reAdd = (id) => {
return request.put({ url: '/wms/customersettle-request-main/reAdd?id=' + id })
}
// 提交审批
export const submit = (id) => {
return request.put({ url: '/wms/customersettle-request-main/submit?id=' + id })
}
// 驳回
export const refused = (id) => {
return request.put({ url: '/wms/customersettle-request-main/refused?id=' + id })
}
// 审批通过
export const agree = (id) => {
return request.put({ url: '/wms/customersettle-request-main/agree?id=' + id })
}
// 处理
export const handle = (id) => {
return request.put({ url: '/wms/customersettle-request-main/handle?id=' + id })
}

14
src/api/wms/deliverJobMain/index.ts

@ -94,22 +94,22 @@ export const importTemplate = () => {
return request.download({ url: '/wms/deliver-job-main/get-import-template' })
}
// 承接客户退货任务主 Excel
export const submitDeliverJobMain = async (id) => {
// 承接发货任务 Excel
export const acceptDeliverJobMain = async (id) => {
return await request.put({ url: `/wms/deliver-job-main/accept?id=` + id })
}
// 取消承接客户退货任务主 Excel
export const agreeDeliverJobMain = async (id) => {
// 取消承接发货任务 Excel
export const abandonDeliverJobMain = async (id) => {
return await request.put({ url: `/wms/deliver-job-main/abandon?id=` + id })
}
// 取消客户退货任务主 Excel
export const refusedDeliverJobMain = async (id) => {
// 关闭发货任务主 Excel
export const closeDeliverJobMain = async (id) => {
return await request.put({ url: `/wms/deliver-job-main/close?id=` + id })
}
// 执行客户退货任务主
// 执行货任务主
export const executeDeliverJobMain = async (data: DeliverJobMainVO) => {
return await request.put({ url: `/wms/deliver-job-main/execute`, data })
}

29
src/api/wms/deliverRequestMain/index.ts

@ -72,3 +72,32 @@ export const exportDeliverRequestMain = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/deliver-request-main/get-import-template' })
}
// 关闭
export const close = (id) => {
return request.put({ url: '/wms/deliver-request-main/close?id=' + id })
}
// 重新添加
export const reAdd = (id) => {
return request.put({ url: '/wms/deliver-request-main/reAdd?id=' + id })
}
// 提交审批
export const submit = (id) => {
return request.put({ url: '/wms/deliver-request-main/submit?id=' + id })
}
// 驳回
export const refused = (id) => {
return request.put({ url: '/wms/deliver-request-main/refused?id=' + id })
}
// 审批通过
export const agree = (id) => {
return request.put({ url: '/wms/deliver-request-main/agree?id=' + id })
}
// 处理
export const handle = (id) => {
return request.put({ url: '/wms/deliver-request-main/handle?id=' + id })
}

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

@ -38,7 +38,10 @@ export const getItembasicPage = async (params) => {
return await request.get({ url: `/wms/itembasic/page`, params })
}
}
// 查询物品基本信息列表
export const getItembasicList = async (params) => {
return await request.get({ url: `/wms/itembasic/list`, params })
}
// 查询物品基本信息详情
export const getItembasic = async (id: number) => {
return await request.get({ url: `/wms/itembasic/get?id=` + id })

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

@ -31,7 +31,10 @@ export const getOwnerPage = async (params) => {
return await request.get({ url: `/wms/owner/page`, params })
}
}
// 查询所有货主列表
export const getOwnerList = async (params) => {
return await request.get({ url: `/wms/owner/list`, params })
}
// 查询货主详情
export const getOwner = async (id: number) => {
return await request.get({ url: `/wms/owner/get?id=` + id })

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

@ -66,8 +66,13 @@ export const deletePurchasereceiptRecordMain = async (id: number) => {
// 导出采购收货记录主 Excel
export const exportPurchasereceiptRecordMain = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchasereceipt-record-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/purchasereceipt-record-main/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {

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

@ -63,6 +63,30 @@ export const deleteSupplierdeliverRequestMain = async (id: number) => {
return await request.delete({ url: `/wms/supplierdeliver-request-main/delete?id=` + id })
}
// 打开供应商发货申请主
export const opeSupplierdeliverRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/open?id=` + id })
}
// 关闭供应商发货申请主
export const cloSupplierdeliverRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/close?id=` + id })
}
// 提交审批供应商发货申请主
export const subSupplierdeliverRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/sub?id=` + id })
}
// 审批通过供应商发货申请主
export const appSupplierdeliverRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/app?id=` + id })
}
// 驳回供应商发货申请主
export const rejSupplierdeliverRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/rej?id=` + id })
}
// 生成标签
export const genLabel = async (id) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/genLabel?id=` + id })
}
// 导出供应商发货申请主 Excel
export const exportSupplierdeliverRequestMain = async (params) => {
return await request.download({ url: `/wms/supplierdeliver-request-main/export-excel`, params })

94
src/components/BasicForm/src/BasicForm.vue

@ -1,5 +1,10 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" :width="isBusiness ? '60%' : '40%'" :close-on-click-modal="false">
<Dialog
:title="dialogTitle"
v-model="dialogVisible"
:width="isBusiness ? '60%' : '40%'"
:close-on-click-modal="false"
>
<Form
ref="formRef"
v-loading="formLoading"
@ -12,7 +17,11 @@
<crontab v-model="formSchema.crontab" />
</template>
<template #type="formSchema" v-if="fromeWhere == 'countPlan'">
<el-select v-model="formSchema.type" placeholder="选择盘点类型" @change="selectChange('type',$event)">
<el-select
v-model="formSchema.type"
placeholder="选择盘点类型"
@change="selectChange('type', $event)"
>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.COUNT_TYPE)"
:key="dict.value"
@ -22,7 +31,7 @@
</el-select>
</template>
</Form>
<div class="table" v-if="isBusiness && formType == 'create'">
<div class="table" v-if="isBusiness && formType == 'create' && fromeWhere != 'countPlan'">
<TableForm
ref="tableFormRef"
class="w-[100%]"
@ -35,12 +44,24 @@
@tableSelectionChange="tableSelectionChange"
@extendedButtonsClick="extendedButtonsClick"
@formSelectChange="formSelectChange"
@formSelectvVisibleChange="formSelectvVisibleChange"
@tableSortChange="tableSortChange"
@selectCallback="selectCallback"
@handleTableSelect="handleTableSelect"
@inpuFocus="inpuFocus"
/>
</div>
<div v-if="isBusiness && formType == 'create' && fromeWhere == 'countPlan'">
<TableFormCountPlan
:tableFields="tableAllSchemas.tableFormColumns"
:tableData="tableData"
:countScopeType="countScopeType"
:tableFormRules="tableFormRules"
ref="tableFormRef"
@tableFormChange="tableFormChange"
@handleAddTable="handleAddTable"
/>
</div>
<template #footer>
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" />
</template>
@ -52,6 +73,7 @@ import { SearchTable } from '@/components/SearchTable'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ButtonBase from '@/components/XButton/src/ButtonBase.vue'
import TableForm from '@/components/TableForm/src/TableForm.vue'
import TableFormCountPlan from '@/components/TableFormCountPlan/src/TableFormCountPlan.vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
const props = defineProps({
@ -142,6 +164,11 @@ const props = defineProps({
type: String,
required: false,
default: ''
},
countScopeType: {
type: Array,
required: false,
default: null
}
})
@ -155,7 +182,9 @@ const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formRef = ref() // Ref
const formSchema = ref(props.formAllSchemas?.formSchema)
console.log('props.formAllSchemas',props.formAllSchemas)
const tableAllSchemas = ref(props.tableAllSchemas)
const tableFormRules = ref(props.tableFormRules)
console.log('tableAllSchemas', tableAllSchemas.value)
/** 弹层操作 */
// formField form
@ -337,6 +366,7 @@ const emit = defineEmits([
'tableSelectionChange',
'extendedButtonsClick',
'formSelectChange',
'formSelectvVisibleChange',
'tableSortChange',
'selectCallback',
'handleTableSelect',
@ -346,11 +376,15 @@ const emit = defineEmits([
'searchTableSuccess',
'opensearchTable',
'submitForm',
'selectChange'
'selectChange',
'tableFormChange'
])
//
const formSelectChange = (field, val) => {
emit('formSelectChange', field, val)
const formSelectChange = (field, val, row) => {
emit('formSelectChange', field, val, row)
}
const formSelectvVisibleChange = (field, val, row) => {
emit('formSelectvVisibleChange', field, val, row)
}
// selection
const tableSelectionChange = (val) => {
@ -380,8 +414,6 @@ const handleAddTable = () => {
}
//
const inpuFocus = (headerItem, row, index) => {
console.log(headerItem.tableForm.multiple)
opensearchTable(
headerItem.field,
headerItem.tableForm.searchField,
@ -394,16 +426,56 @@ const inpuFocus = (headerItem, row, index) => {
row
)
}
//
const selectChange=((field,val)=>{
const selectChange = (field, val) => {
emit('selectChange', field, val)
})
}
const tableFormChange = (field, val, row) => {
emit('tableFormChange', field, val, row)
}
</script>
<style lang="scss" scoped>
.table {
border: 1px solid #dedede;
border-radius: 8px;
padding: 10px;
width: calc(100% - 20px);
display: flex;
}
::v-deep(.el-table__body) {
padding: 10px 0px;
}
::v-deep(.el-table--default .el-table__cell) {
padding: 2px 0px;
border: none;
}
::v-deep(.el-table td.el-table__cell .el-form-item__content) {
display: flex !important;
align-items: center !important;
justify-content: center !important;
}
::v-deep(.el-table td.el-table__cell div) {
overflow: visible;
}
::v-deep(.el-icon) {
display: block;
}button
.button {
> div {
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
> div {
margin-left: 6px;
text-decoration: underline;
color: #409eff;
}
}
}
</style>

11
src/components/Detail/src/Detail.vue

@ -46,7 +46,7 @@
:columns="2"
/>
<Table
v-if="!isBasic"
v-if="!isBasic && fromeWhere != 'countPlan'"
:columns="detailAllSchemasRef.tableColumns"
:data="tableObjectRef.tableList"
:loading="tableObjectRef.loading"
@ -61,6 +61,7 @@
/>
</template>
</Table>
</ContentWrap>
<ContentWrap class="w-[27%] ml-16px">
<!-- 附件组件 -->
@ -180,7 +181,13 @@ const props = defineProps({
type: Function,
required: false,
default: null
}
},
// countPlan
fromeWhere: {
type: String,
required: false,
default: ''
},
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)

3
src/components/DetailCountPlan/index.ts

@ -0,0 +1,3 @@
import DetailCountPlan from './src/DetailCountPlan.vue'
export { DetailCountPlan }

499
src/components/DetailCountPlan/src/DetailCountPlan.vue

@ -0,0 +1,499 @@
<template>
<div>
<el-drawer
v-model="isShowDrawer"
title="详情"
direction="rtl"
size="80%"
v-loading="detailLoading"
>
<template #header>
<div class="font-size-18px">
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span>
</div>
</template>
<ContentWrap v-if="!isBasic">
<Descriptions
:data="detailData"
labelClassName="label-class-name"
label-align="left"
direction="vertical"
:column="8"
:schema="allSchemas.detailSchema"
:columns="2"
width="200px"
/>
</ContentWrap>
<Tabs :tabsList="tabsList" :current="current" @change="change" />
<div class="flex">
<!-- 详情 -->
<ContentWrap class="w-[73%]">
<!-- 列表头部 -->
<TableHead
v-if="!isBasic"
:HeadButttondata="HeadButttondata"
:masterId="masterParmas.masterId"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@searchFormClick="searchFormClick"
:allSchemas="detailAllSchemas"
/>
<Descriptions
v-if="isBasic"
:data="detailData"
:schema="allSchemas.detailSchema"
:columns="2"
/>
<Table
v-if="!isBasic"
:columns="detailAllSchemasRef.tableColumns"
:data="tableObjectRef.tableList"
:loading="tableObjectRef.loading"
:pagination="{ total: tableObjectRef.total }"
v-model:pageSize="tableObjectRef.pageSize"
v-model:currentPage="tableObjectRef.currentPage"
>
<template #action="{ row }">
<ButtonBase
:Butttondata="buttondata"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
<ContentWrap class="w-[27%] ml-16px">
<!-- 附件组件 -->
<Annex
:annexData="annexData"
@handleAnnexSuccess="handleAnnexSuccess"
@deleteAnnexSuccess="deleteAnnexSuccess"
:upData="remarksData.data"
/>
<!-- 备注组件 -->
<Remarks
:remarksData="remarksData"
class="mt-20px"
@remarksSubmitScuess="remarksSubmitScuess"
/>
<!-- 变更记录组件 -->
<ChangeRecord :changeRecordData="changeRecordData" class="mt-20px" />
</ContentWrap>
</div>
</el-drawer>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
@success="submitForm"
:rules="detailAllSchemasRules"
:formAllSchemas="detailAllSchemas"
:isBusiness="false"
:apiUpdate="apiUpdate"
:apiCreate="apiCreate"
@searchTableSuccess="searchTableSuccess"
:detailData="detailData"
@submitForm="submitForm"
/>
</div>
</template>
<script lang="ts" setup>
import Annex from '@/components/Annex/src/Annex.vue'
import Remarks from '@/components/Remarks/src/Remarks.vue'
import ChangeRecord from '@/components/ChangeRecord/src/ChangeRecord.vue'
import Tabs from '@/components/Tabs/src/Tabs.vue'
import * as RemarkApi from '@/api/wms/remark'
import * as FileApi from '@/api/wms/file'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
defineOptions({ name: 'DetailCountPlan' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
routeName.value = routeName.value.substring(0, routeName.value.length - 4) + 'Detail'
const props = defineProps({
//
tabs: {
type: Object,
required: true,
default: null
},
//
isBasic: {
type: Boolean,
required: false,
default: false
},
//
allSchemas: {
type: Object,
required: true,
default: null
},
//
detailAllSchemas: {
type: Object,
required: true,
default: null
},
//
detailAllSchemasRules: {
type: Object,
required: true,
default: null
},
// API
apiCreate: {
type: Function,
required: false,
default: null
},
// API
apiUpdate: {
type: Function,
required: false,
default: null
},
// API
apiPage: {
type: Function,
required: false,
default: null
},
// API
apiDelete: {
type: Function,
required: false,
default: null
},
//
detailValidate: {
type: Function,
required: false,
default: null
}
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
const tabsList = ref(JSON.parse(JSON.stringify(props.tabs ? props.tabs : '')))
if (props.isBasic == true) {
if (tabsList.value && tabsList.value.length > 0) {
tabsList.value.unshift({
label: '详情',
prop: 'Detail'
})
}
} else {
if (tabsList.value && tabsList.value.length > 0) {
} else {
tabsList.value = [
{
label: '明细',
prop: 'Detail'
}
]
}
}
if (tabsList.value) {
}
//
const annexData = reactive({
annexList: []
})
//
const remarksData = reactive({
remarksList: [],
data: {}
})
//
const changeRecordData = reactive({
changeRecordList: []
})
const detailData = ref({}) //
//
const getFileList = async () => {
detailLoading.value = true
try {
annexData.annexList = await FileApi.getFileList(remarksData.data)
} finally {
detailLoading.value = false
}
}
/** 添加附件 */
const handleAnnexSuccess = () => {
getFileList()
getChangeRecordList()
}
//
const deleteAnnexSuccess = async () => {
getFileList()
getChangeRecordList()
}
// Tabs
const current = ref(0)
const change = (item, index) => {
current.value = index
emit('changeTabs', item)
}
//
const masterParmas = ref({
masterId: '', //id
number: '', //
status: '' //
})
//
const HeadButttondata = ref()
// -
const buttondata = ref()
/** 打开弹窗 */
const titleNameRef = ref()
const titleValueRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
titleValueRef.value = titleValue
remarksData.data = {
tableId: row.id,
tableName: tableName
}
//
if (!props.isBasic) {
// id
masterParmas.value.masterId = row.id
masterParmas.value.number = row.number
masterParmas.value.status = row.status
tableObjectRef.value.params = {
masterId: row.id
}
getList()
}
isShowDrawer.value = true
if (row) {
detailLoading.value = true
try {
detailData.value = row
getRemarkList()
getFileList()
getChangeRecordList()
//
if(routeName.value.indexOf('Job') > -1){
HeadButttondata.value = [
defaultButtons.defaultFilterBtn(null) //
]
}else{
HeadButttondata.value = [
defaultButtons.defaultAddBtn({
hide: isShowMainButton(row, ['1'])
}), //
defaultButtons.defaultFilterBtn(null) //
]
}
//
buttondata.value = [
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['1'])
}), //
defaultButtons.mainListDeleteBtn({
hide: isShowMainButton(row, ['1'])
}) //
]
} finally {
detailLoading.value = false
}
}
}
defineExpose({ openDetail }) // open
//
const getRemarkList = async () => {
detailLoading.value = true
try {
remarksData.remarksList = await RemarkApi.getRemarkPage(remarksData.data)
} finally {
detailLoading.value = false
}
}
//
const remarksSubmitScuess = async (remark) => {
detailLoading.value = false
getRemarkList()
getChangeRecordList()
}
//
const getChangeRecordList = async () => {
changeRecordData.changeRecordList = await RemarkApi.getChangeRecordPage(remarksData.data)
}
const tableObjectRef = ref()
const tableMethodsRef = ref()
const detailAllSchemasRef = ref()
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage //
})
tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods
detailAllSchemasRef.value = props.detailAllSchemas
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
//
const { getList } = tableMethodsRef.value
//
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 updataTableColumns = (val) => {
// detailAllSchemas.tableColumns.value = val
// }
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'delete') {
//
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type: string, row?: number) => {
formRef.value.open(type, row, masterParmas.value)
}
// form
const submitForm = async (formType, data) => {
try {
// detailValidate
const rs = await props.detailValidate?props.detailValidate(data):true
if (!rs) return
if (formType === 'create') {
await props.apiCreate(data)
message.success(t('common.createSuccess'))
} else {
await props.apiUpdate(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
}
}
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
emit('searchTableSuccessDetail', formField, searchField, val, formRef)
}
//
const emit = defineEmits(['searchTableSuccessDetail', 'changeTabs'])
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await props.apiDelete(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
//
const searchFormClick = (searchData) => {
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage //
})
tableObject.params = {
isSearch: true,
filters: searchData.filters
? searchData.filters
: [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }]
}
detailAllSchemasRef.value = props.detailAllSchemas
tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods
tableObjectRef.value.tableList = []
const { getList } = tableMethods
getList()
// tableObjectRef.value.params = {
// isSearch: true,
// filters: searchData.filters
// ? searchData.filters
// : [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }]
// }
// getList() //
}
//
watch(
() =>props.apiPage,
() => {
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage //
})
tableObject.params.masterId = masterParmas.value.masterId
detailAllSchemasRef.value = props.detailAllSchemas
tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods
const { getList } = tableMethods
getList()
},
)
</script>
<style lang="scss">
.el-drawer__body {
background: #f5f5f5 !important;
}
::v-deep(.label-class-name) {
color: #dedede;
}
</style>
<style scoped lang="scss"></style>

8
src/components/TableForm/src/TableForm.vue

@ -112,7 +112,7 @@
:allow-create="headerItem?.tableForm.allowCreate"
style="width: 100%"
:placeholder="headerItem?.tableForm?.placeholder || '请选择' + headerItem.label"
@change="formSelectChange(row[headerItem.field], $event)">
@change="formSelectChange(headerItem.field, $event,row)">
<el-option
v-for="op in initSelectOptions(headerItem)"
:label="op.label"
@ -337,9 +337,10 @@ const initSelectOptions = (item) => {
return item.dictType ? getStrDictOptions(item.dictType) : item.tableForm.initOptions
}
//
const formSelectChange = (field, val) => {
emit('formSelectChange', field, val)
const formSelectChange = (field, val,row) => {
emit('formSelectChange', field, val,row)
}
// selection
const tableSelectionChange = (val) => {
emit('tableSelectionChange', val)
@ -376,6 +377,7 @@ const TableBaseForm_Ref = ref()
*/
const validateForm = () => {
console.log(TableBaseForm_Ref.value)
let _lists = TableBaseForm_Ref.value?.map(v => v.validate())
return Promise.all(_lists).then(() => {
return true

3
src/components/TableFormCountPlan/index.ts

@ -0,0 +1,3 @@
import TableFormCountPlan from './src/TableFormCountPlan.vue'
export { TableFormCountPlan }

193
src/components/TableFormCountPlan/src/TableFormCountPlan.vue

@ -0,0 +1,193 @@
<!-- 附件组件 -->
<template>
<!-- 盘点计划的子表 -->
<div class="table">
<el-table :data="tableData" stripe style="width: 100%"
ref="TableBaseComponents_Ref" >
<el-table-column fixed="left" :width="50" v-slot="{ row, $index }">
<Icon
icon="ep:remove"
color="#757575"
size="26"
style="cursor: pointer;margin-top: -16px;"
@click="handleDeleteTable(row, $index)"
/>
</el-table-column>
<el-table-column :label="tableFields[0].label" align="center">
<template v-slot="{ row }">
<el-form
ref="TableBaseForm_Ref"
:model="row"
style="width: 100%;"
:rules="tableFormRules"
:class="tableFormRules ? '' : 'noRulesForm'">
<el-form-item :prop="tableFields[0].field">
<el-select
v-model="row.type"
:placeholder="tableFields[0].placeholder || '请输入' + tableFields[0].label"
@change="tableFormChange(tableFields[0].field, $event, row)"
>
<el-option
v-for="dict in countScopeType"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-form>
</template>
</el-table-column>
<el-table-column
:prop="tableFields[1].field"
:label="tableFields[1].label"
align="center"
>
<template v-slot="{ row }">
<el-form
ref="TableBaseForm_Ref1"
:model="row"
style="width: 100%;"
:rules="tableFormRules"
:class="tableFormRules ? '' : 'noRulesForm'">
<el-form-item :prop="tableFields[1].field">
<el-select
v-model="row.value"
:placeholder="
tableFields[1].placeholder ||
'请输入' + tableFields[1].label
"
v-if="
row.type == 'OWNER' ||
row.type == 'SUPPLIER' ||
row.type == 'CUSTOMER' ||
row.type == 'ABC' ||
row.type == 'ITEMS_TYPE' ||
row.type == 'ITEMS_GROUP' ||
row.type == 'ITEMS_CODE' ||
row.type == 'WAREHOUSE_CODE' ||
row.type == 'AREABASIC_CODE' ||
row.type == 'LOCATIONGROUP_CODE' ||
row.type == 'LOCATION_CODE'
"
>
<el-option
v-for="item in row.initOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-input
v-model="row.value"
:placeholder="
tableFields[1].placeholder ||
'请输入' + tableFields[1].label
"
v-else
/>
</el-form-item>
</el-form>
</template>
</el-table-column>
</el-table>
<div class="button flex">
<div class="p-12px" @click="handleAddTable">
<Icon icon="ep:circle-plus" color="#409eff" size="26" style="cursor: pointer" />
<div>添加明细</div>
</div>
</div>
</div>
</template>
<script setup>
defineComponent({
name: 'TableFormCountPlan'
})
const props = defineProps({
//
tableFields: {
type: Array,
default: () => {
return []
}
},
//
tableData: {
type: Array,
default: () => {
return []
}
},
tableFormRules: {
type: Array,
required: true,
default: null
},
countScopeType: {
type: Array,
required: false,
default: null
},
})
const tableData = props.tableData
const tableFields = props.tableFields
const TableBaseComponents_Ref = ref()
const TableBaseForm_Ref = ref()
const TableBaseForm_Ref1 = ref()
const tableFormRules = ref(props.tableFormRules)
console.log('tableFormRules',tableFormRules.value)
/**
* 验证表单是否符合rules
* @param {*} success 如果验证成功走的方法
* @param {*} error 如果验证不成功走的方法
*/
const validateForm = () => {
let TableBaseForm_Arr = []
TableBaseForm_Arr.push(TableBaseForm_Ref.value)
TableBaseForm_Arr.push(TableBaseForm_Ref1.value)
let _lists = TableBaseForm_Arr?.map(v => v.validate())
return Promise.all(_lists).then(() => {
return true
}).catch(() => {
return false
})
}
//
const emit = defineEmits(['handleAddTable', 'selectChange', 'tableFormChange'])
//
const selectChange = (field, val) => {
emit('selectChange', field, val)
}
const tableFormChange = (field, val, row) => {
emit('tableFormChange', field, val, row)
}
//
const handleAddTable = () => {
emit('handleAddTable')
}
// setup
defineExpose({
TableBaseComponents_Ref,
validateForm
})
</script>
<style scoped lang="scss">
.button {
> div {
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
> div {
margin-left: 6px;
text-decoration: underline;
color: #409eff;
}
}
}
</style>

1
src/utils/dict.ts

@ -222,6 +222,7 @@ export enum DICT_TYPE {
REQEUST_MODE = 'reqeust_mode', // 申请模式
TIME_UNIT = 'time_unit', // 时间单位
COUNT_TYPE = 'count_type', // 盘点类型
COUNT_SCOPE_TYPE = 'count_scope_type', // 盘点范围类型
BARCODE_PREFIX = 'barcode_prefix', // 条码前缀
SETTLEMENT_TYPE = 'settlement_type', // 结算类型
FROZEN_REASON = 'frozen_reason', // 冻结原因

367
src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts

@ -434,179 +434,221 @@ export const CountPlanMainRules = reactive({
/**
* @returns {Array}
*/
// export const CountPlanDetail = useCrudSchemas(<CrudSchema[]>([
// {
// label: '盘点范围类型',
// field: 'type',
// dictType: DICT_TYPE.COUNT_TYPE,
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// type: 'Select'
// }
// },
// {
// label: '盘点范围值',
// field: 'value',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '单据号',
// field: 'number',
// sort: 'custom',
// table: {
// width: 150,
// },
// isTableForm: false,
// form: {
// componentProps: {
// disabled: true
// }
// }
// },
// {
// label: '物品代码',
// field: 'itemCode',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '备注',
// field: 'remark',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '创建者',
// field: 'creator',
// sort: 'custom',
// table: {
// width: 150
// },
// isTableForm: false,
// isForm: false,
// },
// {
// label: '创建时间',
// field: 'createTime',
// formatter: dateFormatter,
// detail: {
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
// },
// sort: 'custom',
// table: {
// width: 180
// },
// form: {
// component: 'DatePicker',
// componentProps: {
// style: {width:'100%'},
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// isTableForm: false,
// isForm: false,
// },
// {
// label: '最后更新时间',
// field: 'updateTime',
// formatter: dateFormatter,
// detail: {
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
// },
// sort: 'custom',
// table: {
// width: 180
// },
// form: {
// component: 'DatePicker',
// componentProps: {
// style: {width:'100%'},
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// isTableForm: false,
// isForm: false,
// },
// {
// label: '最后更新者',
// field: 'updater',
// sort: 'custom',
// table: {
// width: 150
// },
// isTableForm: false,
// isForm: false,
// },
// {
// label: '计划数量',
// field: 'planQty',
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// component: 'InputNumber',
// componentProps: {
// min: 1,
// precision: 6
// }
// },
// tableForm: {
// type: 'InputNumber',
// min: 1,
// precision: 6
// }
// },
// {
// label: '计量单位',
// field: 'uom',
// dictType: DICT_TYPE.UOM,
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// type: 'Select'
// }
// },
// {
// label: '是否可用',
// field: 'available',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isTable: true,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// },
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// type: 'Select'
// }
// },
// {
// label: '操作',
// field: 'action',
// isDetail: false,
// isForm: false ,
// table: {
// width: 150,
// fixed: 'right'
// },
// isTableForm:false,
// }
// ]))
//表单校验
export const CountPlanDetail = useCrudSchemas(<CrudSchema[]>([
{
label: '盘点范围类型',
field: 'type',
dictType: DICT_TYPE.COUNT_TYPE,
dictType: DICT_TYPE.COUNT_SCOPE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
width: 300
},
tableForm: {
type: 'Select'
type: 'Select',
width: '300'
}
},
{
label: '盘点范围值',
field: 'value',
sort: 'custom',
table: {
width: 150
},
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 150,
},
isTableForm: false,
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isTableForm: false,
isForm: false,
},
{
label: '最后更新时间',
field: 'updateTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isTableForm: false,
isForm: false,
},
{
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '计划数量',
field: 'planQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
width: 300
},
tableForm: {
type: 'Select'
}
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select'
width: '300',
}
},
{
@ -621,22 +663,11 @@ export const CountPlanDetail = useCrudSchemas(<CrudSchema[]>([
isTableForm:false,
}
]))
//表单校验
export const CountPlanDetailRules = reactive({
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
uom: [
{ required: true, message: '请选择计量单位', trigger: 'change' }
],
planQty: [
{ required: true, message: '请输入计划数量', trigger: 'blur' }
],
number: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
type: [
{ required: true, message: '请选择盘点范围类型', trigger: 'change' }
],
itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' }
value: [
{ required: true, message: '请选择盘点范围值', trigger: 'change' }
],
})

353
src/views/wms/countManage/count/countPlanMain/index.vue

@ -37,7 +37,10 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event, row)" />
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
@ -53,14 +56,16 @@
:tableData="tableData"
:apiUpdate="CountPlanMainApi.updateCountPlanMain"
:apiCreate="CountPlanMainApi.createCountPlanMain"
:isBusiness="false"
fromeWhere="countPlan"
:countScopeType="getStrDictOptions(DICT_TYPE.COUNT_SCOPE_TYPE)"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@formSelectChange="formSelectChange"
@formSelectvVisibleChange="formSelectvVisibleChange"
@selectChange="selectChange"
@tableFormChange="tableFormChange"
/>
<!-- 详情 -->
@ -76,6 +81,7 @@
:apiPage="CountPlanDetailApi.getCountPlanDetailPage"
:apiDelete="CountPlanDetailApi.deleteCountPlanDetail"
:Echo="Echo"
fromeWhere="countPlan"
/>
<!-- 导入 -->
@ -89,12 +95,27 @@
<script setup lang="ts">
import download from '@/utils/download'
import { CountPlanMain,CountPlanMainRules,CountPlanDetail,CountPlanDetailRules } from './countPlanMain.data'
import {
CountPlanMain,
CountPlanMainRules,
CountPlanDetail,
CountPlanDetailRules
} from './countPlanMain.data'
import * as CountPlanMainApi from '@/api/wms/countPlanMain'
import * as CountPlanDetailApi from '@/api/wms/countPlanDetail'
import * as OwnerApi from '@/api/wms/owner'
import * as SupplierApi from '@/api/wms/supplier'
import * as CustomerApi from '@/api/wms/customer'
import * as WarehouseApi from '@/api/wms/warehouse'
import * as AreaApi from '@/api/wms/areabasic'
import * as LocationgroupApi from '@/api/wms/locationgroup'
import * as LocationpApi from '@/api/wms/location'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict'
console.log('CountPlanDetail.allSchemas', CountPlanDetail.allSchemas)
//
defineOptions({ name: 'CountPlanMain' })
@ -125,7 +146,6 @@ const searchTableParams = ref([
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
//
//row[formField] = val[0][searchField]
@ -142,7 +162,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else {
const setV = {}
// setV[formField] = val[0][searchField]
setV[formField] = val.map(item=>item.code).join(',')
setV[formField] = val.map((item) => item.code).join(',')
formRef.setValues(setV)
}
})
@ -165,7 +185,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'wms:count-plan-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -178,16 +198,22 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
@ -204,79 +230,63 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListPlanOpeBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:count-plan-main:open'}), //
defaultButtons.mainListPlanCloBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:count-plan-main:close'}), //
defaultButtons.mainListPlanSubBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-plan-main:submit'}), //
defaultButtons.mainListPlanTurBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:count-plan-main:reject'}), //
defaultButtons.mainListPlanAppBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:count-plan-main:agree'}), //
defaultButtons.mainListPlanPubBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:count-plan-main:publish'}), //
defaultButtons.mainListPlanResBtn({hide:isShowMainButton(row,['4']),hasPermi:'wms:count-plan-main:resetting'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-plan-main:update'}), //
defaultButtons.mainListPlanOpeBtn({
hide: isShowMainButton(row, ['5']),
hasPermi: 'wms:count-plan-main:open'
}), //
defaultButtons.mainListPlanCloBtn({
hide: isShowMainButton(row, ['1', '2', '3', '4']),
hasPermi: 'wms:count-plan-main:close'
}), //
defaultButtons.mainListPlanSubBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'wms:count-plan-main:submit'
}), //
defaultButtons.mainListPlanTurBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: 'wms:count-plan-main:reject'
}), //
defaultButtons.mainListPlanAppBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: 'wms:count-plan-main:agree'
}), //
defaultButtons.mainListPlanPubBtn({
hide: isShowMainButton(row, ['3']),
hasPermi: 'wms:count-plan-main:publish'
}), //
defaultButtons.mainListPlanResBtn({
hide: isShowMainButton(row, ['4']),
hasPermi: 'wms:count-plan-main:resetting'
}), //
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'wms:count-plan-main:update'
}) //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainPlanOpe') { //
CountPlanMainApi.open(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanClo') { //
await message.confirm('确认要关闭吗?')
CountPlanMainApi.close(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanSub') { //
await message.confirm('确认要提交审批吗?')
CountPlanMainApi.submit(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanTur') { //
await message.confirm('确认要驳回吗?')
CountPlanMainApi.reject(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanApp') { //
await message.confirm('确认要审批通过吗?')
CountPlanMainApi.agree(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanPub') { //
await message.confirm('确认要发布吗?')
CountPlanMainApi.publish(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanRes') { //
await message.confirm('确认要重置吗?')
CountPlanMainApi.resetting(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'edit') { //
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') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
}
}
@ -284,8 +294,20 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type: string, row?: number) => {
tableData.value = [] //
tableData.value = [ {
type: '',
value: ''
}] //
formRef.value.open(type, row)
getOwnerAllList()
getSupplierAllList()
getCustomerAllList()
getItembasicAllList()
getWarehouseAllList()
getAreaAllList()
getLocationgroupAllList()
getLocationAllList()
}
/** 详情操作 */
@ -326,14 +348,22 @@ const handleExport = async () => {
/**
* tableForm方法
*/
const tableFormKeys = {}
CountPlanDetail.allSchemas.tableFormColumns.forEach(item => {
let tableFormKeys = {}
CountPlanDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
const tableData = ref([{
type: '',
value: ''
}])
//
const handleAddTable = () => {
// tableFormKeys.formType=''
tableFormKeys = {
type: '',
value: ''
}
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
@ -343,7 +373,13 @@ const handleDeleteTable = (item, index) => {
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
data.subList = tableData.value.map(item=>{
return{
type:item.type,
value:item.value,
}
}) //
console.log(tableData.value)
try {
if (formType === 'create') {
await CountPlanMainApi.createCountPlanMain(data)
@ -387,7 +423,6 @@ const searchFormClick = (searchData) => {
}
//
const selectChange = (field, val) => {
console.log(val)
if (field == 'type') {
if (val == 'DYNAMIC') {
CountPlanMain.allSchemas.formSchema[3].label = '限值(%)'
@ -404,7 +439,155 @@ const selectChange = (field,val)=>{
}
}
}
//
const tableFormChange = async (field, val, row) => {
console.log(field)
console.log(val)
if (field == 'type') {
row.value = ''
if (
row.type == 'OWNER' ||
row.type == 'SUPPLIER' ||
row.type == 'CUSTOMER' ||
row.type == 'ABC' ||
row.type == 'ITEMS_TYPE' ||
row.type == 'ITEMS_GROUP' ||
row.type == 'ITEMS_CODE' ||
row.type == 'WAREHOUSE_CODE' ||
row.type == 'AREABASIC_CODE' ||
row.type == 'LOCATIONGROUP_CODE' ||
row.type == 'LOCATION_CODE'
) {
row.formType = 'Select'
switch (row.type) {
case 'OWNER':
row.initOptions = ownerAllList.value
break
case 'SUPPLIER':
row.initOptions = supplierAllList.value
break
case 'CUSTOMER':
row.initOptions = customerAllList.value
break
case 'ABC':
row.initOptions = getStrDictOptions(DICT_TYPE.ABC_CLASS)
break
case 'ITEMS_TYPE':
row.initOptions = getStrDictOptions(DICT_TYPE.ITEM_TYPE)
break
case 'ITEMS_GROUP':
row.initOptions = getStrDictOptions(DICT_TYPE.ITEM_GROUP)
break
case 'ITEMS_CODE':
row.initOptions = itembasicAllList.value
break
case 'WAREHOUSE_CODE':
row.initOptions = warehouseAllList.value
break
case 'AREABASIC_CODE':
row.initOptions = areaAllList.value
break
case 'LOCATIONGROUP_CODE':
row.initOptions = locationgroupAllList.value
break
case 'LOCATION_CODE':
row.initOptions = locationAllList.value
break
}
} else if (row.type == 'PROJECT') {
row.formType = 'InputString'
}
}
}
const ownerAllList = ref()
const supplierAllList = ref()
const customerAllList = ref()
const itembasicAllList = ref()
const warehouseAllList = ref()
const areaAllList = ref()
const locationgroupAllList = ref()
const locationAllList = ref()
//
const getOwnerAllList = async () => {
await OwnerApi.getOwnerList().then((res) => {
res.forEach((element) => {
element.value = element.code
element.label = element.name
})
ownerAllList.value = res
})
}
//
const getSupplierAllList = async () => {
await SupplierApi.getSupplierList().then((res) => {
res.forEach((element) => {
element.value = element.code
element.label = element.name
})
supplierAllList.value = res
})
}
//
const getCustomerAllList = async () => {
await CustomerApi.getCustomerList().then((res) => {
res.forEach((element) => {
element.value = element.code
element.label = element.name
})
customerAllList.value = res
})
}
//
const getItembasicAllList = async () => {
await ItembasicApi.getItembasicList().then((res) => {
res.forEach((element) => {
element.value = element.code
element.label = element.name
})
itembasicAllList.value = res
})
}
//
const getWarehouseAllList = async () => {
await WarehouseApi.getWarehouseList({ available: 'TRUE' }).then((res) => {
res.forEach((element) => {
element.value = element.code
element.label = element.name
})
warehouseAllList.value = res
})
}
//
const getAreaAllList = async () => {
await AreaApi.getAreaList({ available: 'TRUE' }).then((res) => {
res.forEach((element) => {
element.value = element.code
element.label = element.name
})
areaAllList.value = res
})
}
//
const getLocationgroupAllList = async () => {
await LocationgroupApi.getLocationgroupList({ available: 'TRUE' }).then((res) => {
res.forEach((element) => {
element.value = element.code
element.label = element.name
})
locationgroupAllList.value = res
})
}
//
const getLocationAllList = async () => {
await LocationpApi.getLocationList({ available: 'TRUE' }).then((res) => {
res.forEach((element) => {
element.value = element.code
element.label = element.name
})
locationAllList.value = res
})
}
/** 初始化 **/
onMounted(async () => {
getList()

38
src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts

@ -396,22 +396,22 @@ export const CustomerreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150
},
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '销售订单号',
// field: 'soNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '销售订单行',
// field: 'soLine',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '物品代码',
field: 'itemCode',
@ -694,9 +694,9 @@ export const CustomerreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
//表单校验
export const CustomerreceiptRecordDetailRules = reactive({
soNumber: [
{ required: true, message: '请选择销售订单号', trigger: 'blur' }
],
// soNumber: [
// { required: true, message: '请选择销售订单号', trigger: 'blur' }
// ],
fromPackingNumber: [
{ required: true, message: '请选择从包装号', trigger: 'blur' }
],

40
src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/customerreceiptRequestMain.data.ts

@ -51,8 +51,8 @@ export const CustomerreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}
},
{
label: '发货申请单号',
field: 'deliverRequestNumber',
label: '发货记录单号',
field: 'deliverRecordNumber',
sort: 'custom',
table: {
width: 150
@ -461,24 +461,24 @@ export const CustomerreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
}
}
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
isForm: false,
table: {
width: 150
},
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
isForm: false,
table: {
width: 150
},
},
// {
// label: '销售订单号',
// field: 'soNumber',
// sort: 'custom',
// isForm: false,
// table: {
// width: 150
// },
// },
// {
// label: '销售订单行',
// field: 'soLine',
// sort: 'custom',
// isForm: false,
// table: {
// width: 150
// },
// },
{
label: '物品代码',
field: 'itemCode',

38
src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/customerreturnJobMain.data.ts

@ -670,22 +670,22 @@ export const CustomerreturnJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '销售订单号',
// field: 'soNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '销售订单行',
// field: 'soLine',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '物品代码',
field: 'itemCode',
@ -847,9 +847,9 @@ export const CustomerreturnJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
export const CustomerreturnJobDetailRules = reactive({
soNumber: [
{ required: true, message: '请选择销售订单号', trigger: 'change' }
],
// soNumber: [
// { required: true, message: '请选择销售订单号', trigger: 'change' }
// ],
packingNumber: [
{ required: true, message: '请选择包装号', trigger: 'change' }
],

38
src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/customerreturnRecordMain.data.ts

@ -416,22 +416,22 @@ export const CustomerreturnRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '销售订单号',
// field: 'soNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '销售订单行',
// field: 'soLine',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '物品代码',
field: 'itemCode',
@ -714,9 +714,9 @@ export const CustomerreturnRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
//表单校验
export const CustomerreturnRecordDetailRules = reactive({
soNumber: [
{ required: true, message: '请选择销售订单号', trigger: 'change' }
],
// soNumber: [
// { required: true, message: '请选择销售订单号', trigger: 'change' }
// ],
fromPackingNumber: [
{ required: true, message: '请选择从包装号', trigger: 'change' }
],

162
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts

@ -3,7 +3,9 @@ import { dateFormatter } from '@/utils/formatTime'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as DeliverRecordMainApi from '@/api/wms/deliverRecordMain'
import * as DeliverPlanMainApi from '@/api/wms/deliverPlanMain'
import { DeliverRecordMain } from '../../deliver/deliverRecordMain/deliverRecordMain.data'
import { DeliverPlanMain } from '../../deliverplan/deliverPlanMain/deliverPlanMain.data'
import * as SaleMainApi from '@/api/wms/saleMain'
import * as SaleDetailApi from '@/api/wms/saleDetail'
@ -95,6 +97,12 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isSearch: true,
form: {
componentProps: {
disabled: true
}
}
},
{
label: '客户代码',
@ -505,80 +513,80 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}
}
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择销售订单号',
searchField: 'number',
searchTitle: '销售订单信息',
searchAllSchemas: SaleMain.allSchemas,
searchPage: SaleMainApi.getSaleMainPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择销售订单号',
searchField: 'number',
searchTitle: '销售订单信息',
searchAllSchemas: SaleMain.allSchemas,
searchPage: SaleMainApi.getSaleMainPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择销售订单行',
searchField: 'lineNumber',
searchTitle: '销售订单信息',
searchAllSchemas: SaleDetail.allSchemas,
searchPage: SaleDetailApi.getSaleDetailPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择销售订单行',
searchField: 'lineNumber',
searchTitle: '销售订单信息',
searchAllSchemas: SaleDetail.allSchemas,
searchPage: SaleDetailApi.getSaleDetailPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
// {
// label: '销售订单号',
// field: 'soNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm:{
// isInpuFocusShow: true, // 开启查询弹窗
// searchListPlaceholder: '请选择销售订单号',
// searchField: 'number',
// searchTitle: '销售订单信息',
// searchAllSchemas: SaleMain.allSchemas,
// searchPage: SaleMainApi.getSaleMainPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择销售订单号',
// searchField: 'number',
// searchTitle: '销售订单信息',
// searchAllSchemas: SaleMain.allSchemas,
// searchPage: SaleMainApi.getSaleMainPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// }
// },
// {
// label: '销售订单行',
// field: 'soLine',
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm:{
// isInpuFocusShow: true, // 开启查询弹窗
// searchListPlaceholder: '请选择销售订单行',
// searchField: 'lineNumber',
// searchTitle: '销售订单信息',
// searchAllSchemas: SaleDetail.allSchemas,
// searchPage: SaleDetailApi.getSaleDetailPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择销售订单行',
// searchField: 'lineNumber',
// searchTitle: '销售订单信息',
// searchAllSchemas: SaleDetail.allSchemas,
// searchPage: SaleDetailApi.getSaleDetailPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// }
// },
{
label: '物品代码',
field: 'itemCode',
@ -911,9 +919,9 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
//表单校验
export const CustomerreturnRequestDetailRules = reactive({
soNumber: [
{ required: true, message: '请选择销售订单号', trigger: 'change' }
],
// soNumber: [
// { required: true, message: '请选择销售订单号', trigger: 'change' }
// ],
// packingNumber: [
// { required: true, message: '请选择包装号', trigger: 'change' }
// ],

47
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

@ -219,15 +219,50 @@ const butttondata = (row) => {
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
await message.confirm('确认要关闭吗?')
CustomerreturnRequestMainApi.close(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
}) } else if (val == 'mainReAdd') { //
await message.confirm('确认要重新添加吗?')
CustomerreturnRequestMainApi.reAdd(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
await message.confirm('确认要提交审批吗?')
CustomerreturnRequestMainApi.submit(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
await message.confirm('确认要重新添加吗?')
CustomerreturnRequestMainApi.refused(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
CustomerreturnRequestMainApi.agree(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainHandle') { //
CustomerreturnRequestMainApi.handle(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //

92
src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/customersettleRequestMain.data.ts

@ -418,49 +418,49 @@ export const CustomersettleRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}
}
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择销售订单号',
searchField: 'soNumber',
searchTitle: '发货记录信息',
searchAllSchemas: DeliverRecordDetail.allSchemas,
searchPage: DeliverRecordDetailApi.getDeliverRecordDetailPage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择销售订单号',
searchField: 'soNumber',
searchTitle: '发货记录信息',
searchAllSchemas: DeliverRecordDetail.allSchemas,
searchPage: DeliverRecordDetailApi.getDeliverRecordDetailPage
}
}
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
// {
// label: '销售订单号',
// field: 'soNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm:{
// isInpuFocusShow: true, // 开启查询弹窗
// searchListPlaceholder: '请选择销售订单号',
// searchField: 'soNumber',
// searchTitle: '发货记录信息',
// searchAllSchemas: DeliverRecordDetail.allSchemas,
// searchPage: DeliverRecordDetailApi.getDeliverRecordDetailPage
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择销售订单号',
// searchField: 'soNumber',
// searchTitle: '发货记录信息',
// searchAllSchemas: DeliverRecordDetail.allSchemas,
// searchPage: DeliverRecordDetailApi.getDeliverRecordDetailPage
// }
// }
// },
// {
// label: '销售订单行',
// field: 'soLine',
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// disabled: true
// },
// form: {
// componentProps: {
// disabled: true
// }
// }
// },
{
label: '物品代码',
field: 'itemCode',
@ -713,9 +713,9 @@ export const CustomersettleRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
//表单校验
export const CustomersettleRequestDetailRules = reactive({
soNumber: [
{ required: true, message: '请选择销售订单号', trigger: 'change' }
],
// soNumber: [
// { required: true, message: '请选择销售订单号', trigger: 'change' }
// ],
// packingNumber: [
// { required: true, message: '请选择包装号', trigger: 'change' }
// ],

61
src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue

@ -189,13 +189,13 @@ const isShowMainButton = (row,val) => {
// -
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:customersettle-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:customersettle-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:customersettle-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:customersettle-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:customersettle-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:customersettle-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:customersettle-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:customersettle-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:customersettle-request-main:update'}), //
]
}
@ -204,15 +204,50 @@ const butttondata = (row) => {
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
await message.confirm('确认要关闭吗?')
CustomersettleRequestMainApi.close(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
}) } else if (val == 'mainReAdd') { //
await message.confirm('确认要重新添加吗?')
CustomersettleRequestMainApi.reAdd(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
await message.confirm('确认要提交审批吗?')
CustomersettleRequestMainApi.submit(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
await message.confirm('确认要重新添加吗?')
CustomersettleRequestMainApi.refused(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
CustomersettleRequestMainApi.agree(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainHandle') { //
CustomersettleRequestMainApi.handle(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //

39
src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts

@ -87,6 +87,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '运输方式',
field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom',
table: {
width: 150
@ -666,22 +667,22 @@ export const DeliverJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '销售订单号',
// field: 'soNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '销售订单行',
// field: 'soLine',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '物品代码',
field: 'itemCode',
@ -843,9 +844,9 @@ export const DeliverJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
export const DeliverJobDetailRules = reactive({
soNumber: [
{ required: true, message: '请选择销售订单号', trigger: 'change' }
],
// soNumber: [
// { required: true, message: '请选择销售订单号', trigger: 'change' }
// ],
packingNumber: [
{ required: true, message: '请选择包装号', trigger: 'change' }
],

88
src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue

@ -183,47 +183,47 @@ const butttondata = (row) => {
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { //
let aaa = {
"id": "1809190002130023642",
"requestNumber": "REQ1720231128-0001",
"deliverPlanNumber": "REQ0120231116-0001",
"customerDeliverNumber": null,
"customerCode": "customer01",
"customerDockCode": "测试",
 if (val == 'mainJobExe') { //
    let aaa = {
"id": "1809190002130023676",
"requestNumber": "REQ1720231205-0001",
"deliverPlanNumber": "DP20231205-0002",
"customerDeliverNumber": "CUST20231205-00000001",
"customerCode": "CF",
"customerDockCode": "CFCKYT",
"deliverDock": null,
"carrierCode": "cys-001",
"transferMode": "",
"vehiclePlateNumber": "",
"transferMode": "LOAD",
"vehiclePlateNumber": "车牌号",
"fromWarehouseCode": null,
"toWarehouseCode": null,
"requestTime": 1701137233000,
"requestDueTime": 0,
"toWarehouseCode": "CFCK",
"requestTime": 1701740774000,
"requestDueTime": 1704470400000,
"status": "2",
"expiredTime": null,
"updateTime": 1701137233000,
"updateTime": 1701740969000,
"updater": "1",
"jobStageStatus": null,
"priority": null,
"priorityincrement": null,
"departmentCode": "研发部门",
"acceptUserId": null,
"acceptTime": null,
"completeUserId": "1",
"completeTime": 1701137339000,
"acceptUserId": "1",
"acceptTime": 1701742448000,
"completeUserId": null,
"completeTime": null,
"fromLocationTypes": "FG",
"toLocationTypes": "CUST",
"number": "JOB2420231128-0001",
"number": "JOB2420231205-0001",
"businessType": "DeliverJob",
"remark": "",
"createTime": 1701137233000,
"remark": "主表备注",
"createTime": 1701740969000,
"creator": "1",
"ruleUserId": null,
"fromAreaCodes": "采购在途库",
"toAreaCodes": "采购在途库",
"fromDockCode": null,
"autoComplete": "FALSE",
"allowModifyLocation": "TRUE",
"allowModifyLocation": "FALSE",
"allowModifyQty": "TRUE",
"allowBiggerQty": "TRUE",
"allowSmallerQty": "TRUE",
@ -232,34 +232,36 @@ const buttonTableClick = async (val, row) => {
"allowPartialComplete": "TRUE",
"allowModifyBatch": "FALSE",
"allowModifyPackingNumber": "FALSE",
"inInventoryStatuses": "OK",
"outInventoryStatuses": "OK",
"subList": [{
"id": "1809190001245559365",
"soNumber": "222",
"soLine": "1",
"packingNumber": "PN20230112300001",
"batch": "20231123",
"inventoryStatus": null,
"id": "1809190001245559377",
"soNumber": null,
"soLine": null,
"packingNumber": null,
"batch": "20231130",
"inventoryStatus": "OK",
"ownerCode": null,
"containerNumber": null,
"fromLocationCode": "INSPECT",
"toLocationCode": null,
"itemCode": "THILDD0A701AG",
"itemName": "HL后雾灯(新)-右\r\n",
"itemDesc1": "HL后雾灯(新)-右\r\n",
"itemDesc2": "",
"projectCode": "P0001",
"fromLocationCode": "Loc_testCF",
"toLocationCode": "CUST",
"itemCode": "testCF",
"itemName": "陈放测试物品",
"itemDesc1": "测试用",
"itemDesc2": "测试用",
"projectCode": "5",
"qty": 1,
"uom": "EA",
"number": "JOB2420231128-0001",
"remark": "",
"createTime": 1701137234000,
"number": "JOB2420231205-0001",
"remark": "子表备注",
"createTime": 1701740970000,
"creator": "1",
"toPackingNumber": null,
"toContainerNumber": null,
"toBatch": null,
"handleQty": null,
"toInventoryStatus": null,
recordLst: [{
recordList: [{
handleQty: 10,
toPackingNumber: '12',
toContainerNumber: '001',
@ -281,11 +283,11 @@ const buttonTableClick = async (val, row) => {
handleHandle(aaa)
console.log('列表-操作按钮事件-执行')
} else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃')
DeliverJobMainApi.abandonDeliverJobMain(row.id)
} else if (val == 'mainJobClo') { //
console.log('列表-操作按钮事件-关闭')
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
DeliverJobMainApi.closeDeliverJobMain(row.id)
} else if (val == 'mainJobAcc') { //
DeliverJobMainApi.executeDeliverJobMain(row.id)
}
}

38
src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts

@ -413,22 +413,22 @@ export const DeliverRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '销售订单号',
// field: 'soNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '销售订单行',
// field: 'soLine',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '物品代码',
field: 'itemCode',
@ -687,9 +687,9 @@ export const DeliverRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
export const DeliverRecordDetailRules = reactive({
soNumber: [
{ required: true, message: '请选择销售订单号', trigger: 'change' }
],
// soNumber: [
// { required: true, message: '请选择销售订单号', trigger: 'change' }
// ],
packingNumber: [
{ required: true, message: '请选择包装号', trigger: 'change' }
],

153
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts

@ -90,6 +90,11 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '6',
isMainValue: false
}]
}
}
@ -563,80 +568,80 @@ export const DeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择销售订单号',
searchField: 'number',
searchTitle: '销售订单信息',
searchAllSchemas: SaleMain.allSchemas,
searchPage: SaleMainApi.getSaleMainPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择销售订单号',
searchField: 'number',
searchTitle: '销售订单信息',
searchAllSchemas: SaleMain.allSchemas,
searchPage: SaleMainApi.getSaleMainPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择销售订单行',
searchField: 'lineNumber',
searchTitle: '销售订单信息',
searchAllSchemas: SaleDetail.allSchemas,
searchPage: SaleDetailApi.getSaleDetailPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择销售订单行',
searchField: 'lineNumber',
searchTitle: '销售订单信息',
searchAllSchemas: SaleDetail.allSchemas,
searchPage: SaleDetailApi.getSaleDetailPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
// {
// label: '销售订单号',
// field: 'soNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm:{
// isInpuFocusShow: true, // 开启查询弹窗
// searchListPlaceholder: '请选择销售订单号',
// searchField: 'number',
// searchTitle: '销售订单信息',
// searchAllSchemas: SaleMain.allSchemas,
// searchPage: SaleMainApi.getSaleMainPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择销售订单号',
// searchField: 'number',
// searchTitle: '销售订单信息',
// searchAllSchemas: SaleMain.allSchemas,
// searchPage: SaleMainApi.getSaleMainPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// }
// },
// {
// label: '销售订单行',
// field: 'soLine',
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm:{
// isInpuFocusShow: true, // 开启查询弹窗
// searchListPlaceholder: '请选择销售订单行',
// searchField: 'lineNumber',
// searchTitle: '销售订单信息',
// searchAllSchemas: SaleDetail.allSchemas,
// searchPage: SaleDetailApi.getSaleDetailPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择销售订单行',
// searchField: 'lineNumber',
// searchTitle: '销售订单信息',
// searchAllSchemas: SaleDetail.allSchemas,
// searchPage: SaleDetailApi.getSaleDetailPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// }
// },
{
label: '物品代码',
field: 'itemCode',

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

@ -31,6 +31,7 @@
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
@ -184,13 +185,14 @@ const isShowMainButton = (row,val) => {
// -
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:deliver-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:deliver-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:deliver-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:deliver-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:deliver-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:deliver-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:deliver-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:deliver-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:deliver-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:deliver-request-main:delete'}), //
]
}
@ -199,15 +201,53 @@ const butttondata = (row) => {
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
await message.confirm('确认要关闭吗?')
DeliverRequestMainApi.close(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
await message.confirm('确认要重新添加吗?')
DeliverRequestMainApi.reAdd(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
await message.confirm('确认要重新添加吗?')
DeliverRequestMainApi.submit(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
await message.confirm('确认要重新添加吗?')
DeliverRequestMainApi.refused(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
await message.confirm('确认要审批通过吗?')
DeliverRequestMainApi.agree(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainHandle') { //
await message.confirm('确认要 处理吗?')
DeliverRequestMainApi.handle(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //

134
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts

@ -260,80 +260,59 @@ export const DeliverPlanMainRules = reactive({
* @returns {Array}
*/
export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择销售订单号',
searchField: 'number',
searchTitle: '销售订单信息',
searchAllSchemas: SaleMain.allSchemas,
searchPage: SaleMainApi.getSaleMainPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择销售订单号',
searchField: 'number',
searchTitle: '销售订单信息',
searchAllSchemas: SaleMain.allSchemas,
searchPage: SaleMainApi.getSaleMainPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择销售订单行',
searchField: 'lineNumber',
searchTitle: '销售订单信息',
searchAllSchemas: SaleDetail.allSchemas,
searchPage: SaleDetailApi.getSaleDetailPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择销售订单行',
searchField: 'lineNumber',
searchTitle: '销售订单信息',
searchAllSchemas: SaleDetail.allSchemas,
searchPage: SaleDetailApi.getSaleDetailPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
// {
// label: '销售订单号',
// field: 'soNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm:{
// isInpuFocusShow: true, // 开启查询弹窗
// searchListPlaceholder: '请选择销售订单号',
// searchField: 'number',
// searchTitle: '销售订单信息',
// searchAllSchemas: SaleDetail.allSchemas,
// searchPage: SaleDetailApi.getSaleDetailPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择销售订单号',
// searchField: 'number',
// searchTitle: '销售订单信息',
// searchAllSchemas: SaleDetail.allSchemas,
// searchPage: SaleDetailApi.getSaleDetailPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// }
// },
// {
// label: '销售订单行',
// field: 'soLine',
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// disabled: true
// },
// form: {
// componentProps: {
// disabled: true
// }
// }
// },
{
label: '客户月台',
field: 'customerDockCode',
@ -389,7 +368,6 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择物品代码',
@ -561,7 +539,7 @@ export const DeliverPlanDetailRules = reactive({
planQty: [
{ required: true, message: '请输入计划数量', trigger: 'blur' }
],
soNumber: [
{ required: true, message: '请选择销售订单号', trigger: 'change' }
],
// soNumber: [
// { required: true, message: '请选择销售订单号', trigger: 'change' }
// ],
})

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

@ -116,6 +116,11 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
// setV['soLine'] = val[0]['lineNumber']
// setV['lineNumber'] = val[0]['lineNumber']
// setV['itemCode'] = val[0]['itemCode']
// setV['remark'] = val[0]['remark']
// setV['uom'] = val[0]['uom']
formRef.setValues(setV)
})
}

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

@ -219,7 +219,7 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '承接人',
field: 'acceptUserId',
field: 'acceptUserName',
sort: 'custom',
table: {
width: 150
@ -247,7 +247,7 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '完成人',
field: 'completeUserId',
field: 'completeUserName',
sort: 'custom',
table: {
width: 150

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

@ -138,7 +138,7 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMain(setSearchParams)
const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMain(tableObject.params)
download.excel(data, '采购收货记录主.xlsx')
} catch {
} finally {

194
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -1,32 +1,21 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SupplierdeliverRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="SupplierdeliverRequestMain.allSchemas.searchSchema" @search="setSearchParams"
@reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="SupplierdeliverRequestMain.allSchemas"
/>
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick"
:allSchemas="SupplierdeliverRequestMain.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,37 +28,22 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
@success="getList"
:rules="SupplierdeliverRequestMainRules"
:formAllSchemas="SupplierdeliverRequestMain.allSchemas"
:tableAllSchemas="SupplierdeliverRequestDetail.allSchemas"
:tableFormRules="SupplierdeliverRequestDetailRules"
:tableData="tableData"
<BasicForm ref="formRef" @success="getList" :rules="SupplierdeliverRequestMainRules"
:formAllSchemas="SupplierdeliverRequestMain.allSchemas" :tableAllSchemas="SupplierdeliverRequestDetail.allSchemas"
:tableFormRules="SupplierdeliverRequestDetailRules" :tableData="tableData"
:apiUpdate="SupplierdeliverRequestMainApi.updateSupplierdeliverRequestMain"
:apiCreate="SupplierdeliverRequestMainApi.createSupplierdeliverRequestMain"
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
:apiCreate="SupplierdeliverRequestMainApi.createSupplierdeliverRequestMain" :isBusiness="true"
@handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" />
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="SupplierdeliverRequestMain.allSchemas"
:detailAllSchemas="SupplierdeliverRequestDetail.allSchemas"
:detailAllSchemasRules="SupplierdeliverRequestDetailRules"
<Detail ref="detailRef" :isBasic="false" :allSchemas="SupplierdeliverRequestMain.allSchemas"
:detailAllSchemas="SupplierdeliverRequestDetail.allSchemas" :detailAllSchemasRules="SupplierdeliverRequestDetailRules"
:apiCreate="SupplierdeliverRequestDetailApi.createSupplierdeliverRequestDetail"
:apiUpdate="SupplierdeliverRequestDetailApi.updateSupplierdeliverRequestDetail"
:apiPage="SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage"
:apiDelete="SupplierdeliverRequestDetailApi.deleteSupplierdeliverRequestDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
:apiDelete="SupplierdeliverRequestDetailApi.deleteSupplierdeliverRequestDetail" :Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/supplierdeliver-request-main/import" :importTemplateData="importTemplateData"
@ -77,22 +51,17 @@
<!-- 打印 -->
<el-dialog v-model="dialogVisible" :title="dialogTitle" width="60%">
<Table
:columns="detailListTableColumns"
:data="detatableData.tableList"
:loading="detatableData.loading"
:pagination="{
<Table :columns="detailListTableColumns" :data="detatableData.tableList" :loading="detatableData.loading" :pagination="{
total: detatableData.total
}"
v-model:pageSize="detatableData.pageSize"
v-model:currentPage="detatableData.currentPage"
v-model:sort="detatableData.sort"
>
}" v-model:pageSize="detatableData.pageSize" v-model:currentPage="detatableData.currentPage"
v-model:sort="detatableData.sort">
<template #batch="{ row }">
<el-input v-model="row.batch">{{ row.batch }}</el-input>
</template>
</Table>
<el-button @click="closeDialog">关闭</el-button>
<el-button @click="genLabel()">生成标签</el-button>
<el-button @click="print">打印</el-button>
</el-dialog>
</template>
@ -185,8 +154,6 @@ const buttonBaseClick = (val, item) => {
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
@ -202,11 +169,11 @@ const isShowMainButton = (row,val) => {
// -
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.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '3', '4']) }), //
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListEditBtn({ hasPermi: 'wms:supplierdeliver-request-main:update' }), //
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:supplierdeliver-request-main:delete' }), //
defaultButtons.mainListPointBtn(null), //
@ -214,20 +181,18 @@ const butttondata = (row) => {
]
}
// -
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('列表-操作按钮事件-审批通过')
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 == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
@ -265,6 +230,71 @@ const handleDelete = async (id: number) => {
} catch { }
}
/** 关闭按钮操作 */
const handleClo = async (id: number) => {
try {
//
await message.confirm('是否关闭所选中数据?')
//
await SupplierdeliverRequestMainApi.cloSupplierdeliverRequestMain(id)
message.success(t('关闭成功!'))
//
await getList()
} catch { }
}
/** 打开按钮操作 */
const handleOpe = async (id: number) => {
try {
//
await message.confirm('是否打开所选中数据?')
//
await SupplierdeliverRequestMainApi.opeSupplierdeliverRequestMain(id)
message.success(t('打开成功!'))
//
await getList()
} catch { }
}
/** 提交审批按钮操作 */
const handleSub = async (id: number) => {
try {
//
await message.confirm('是否提交审批所选中数据?')
//
await SupplierdeliverRequestMainApi.subSupplierdeliverRequestMain(id)
message.success(t('提交审批成功!'))
//
await getList()
} catch { }
}
/** 审批通过按钮操作 */
const handleApp = async (id: number) => {
try {
//
await message.confirm('是否审批通过所选中数据?')
//
await SupplierdeliverRequestMainApi.appSupplierdeliverRequestMain(id)
message.success(t('审批通过成功!'))
//
await getList()
} catch { }
}
/** 驳回按钮操作 */
const handleTur = async (id: number) => {
try {
//
await message.confirm('是否驳回所选中数据?')
//
await SupplierdeliverRequestMainApi.rejSupplierdeliverRequestMain(id)
message.success(t('驳回成功!'))
//
await getList()
} catch { }
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
@ -298,8 +328,24 @@ const closeDialog = () =>{
isShow.value = false
}
/** 生成标签按钮操作 */
const genLabel = async () => {
try {
//
await message.confirm('是否为此数据生成标签?')
//
await SupplierdeliverRequestMainApi.genLabel(genLabelId.value)
dialogVisible.value = false
isShow.value = false
message.success(t('生成标签成功!'))
//
await getList()
} catch { }
}
const BASE_URL = 'http://dev.ccwin-in.com:25110'
const src = ref(BASE_URL + '/jmreport/view/881303562245316608?token=' + getAccessToken())
const genLabelId = ref();
//
const handlePoint = async (row) => {
tableObject.params = {
@ -308,6 +354,7 @@ const handlePoint = async (row) => {
await getDetailList()
dialogVisible.value = true
dialogTitle.value = row.number + '单据号'
genLabelId.value = row.number
}
const print = async () => {
@ -401,6 +448,7 @@ const handleDocumentPrint = async (id) => {
*/
const tableFormKeys = {}
SupplierdeliverRequestDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])

Loading…
Cancel
Save