chenfang 10 months ago
parent
commit
a8104f73f1
  1. 8
      src/api/wms/countPlanDetail/index.ts
  2. 2
      src/api/wms/inspectJobMain/index.ts
  3. 2
      src/api/wms/purchasereceiptJobMain/index.ts
  4. 2
      src/api/wms/putawayJobMain/index.ts
  5. 4
      src/api/wms/supplierdeliverRequestMain/index.ts
  6. 32
      src/api/wms/unplannedissueRequestMain/index.ts
  7. 59
      src/components/BasicForm/src/BasicForm.vue
  8. 80
      src/components/Detail/src/Detail.vue
  9. 24
      src/components/DetailTable/src/DetailTable.vue
  10. 2
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  11. 123
      src/views/wms/countManage/count/countPlanMain/index.vue
  12. 6
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/index.vue
  13. 84
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue
  14. 8
      src/views/wms/purchasereceiptManage/inspect/inspectJobMain/inspectJobMain.data.ts
  15. 6
      src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue
  16. 19
      src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/inspectRequestMain.data.ts
  17. 1
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  18. 4
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts
  19. 8
      src/views/wms/purchasereceiptManage/putaway/putawayJobMain/putawayJobMain.data.ts
  20. 6
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  21. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue
  22. 892
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  23. 98
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/point.vue

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

@ -17,7 +17,13 @@ export interface CountPlanDetailVO {
// 查询盘点计划子列表
export const getCountPlanDetailPage = async (params) => {
return await request.get({ url: `/wms/count-plan-detail/page`, params })
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/count-plan-detail/senior', data })
} else {
return await request.get({ url: `/wms/count-plan-detail/page`, params })
}
}
// 查询盘点计划子详情

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

@ -92,5 +92,5 @@ export const importTemplate = () => {
// 关闭检验任务主
export const closeInspectJobMain = (id: number) => {
return request.download({ url: '/wms/inspect-job-main/close?id=' + id })
return request.put({ url: '/wms/inspect-job-main/close?id=' + id })
}

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

@ -95,5 +95,5 @@ export const importTemplate = () => {
// 关闭采购收货任务主
export const closePurchasereceiptJobMain = (id: number) => {
return request.download({ url: '/wms/purchasereceipt-job-main/close?id=' + id })
return request.put({ url: '/wms/purchasereceipt-job-main/close?id=' + id })
}

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

@ -84,5 +84,5 @@ export const importTemplate = () => {
// 关闭上架任务主
export const closePutawayJobMain = (id: number) => {
return request.download({ url: '/wms/putaway-job-main/close?id=' + id })
return request.put({ url: '/wms/putaway-job-main/close?id=' + id })
}

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

@ -87,6 +87,10 @@ export const rejSupplierdeliverRequestMain = async (id: number) => {
export const genLabel = async (id) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/genLabel?id=` + id })
}
// 生成记录
export const genRecordsSupplierdeliverRequestMain = async (id) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/genRecords?id=` + id })
}
// 导出供应商发货申请主 Excel
export const exportSupplierdeliverRequestMain = async (params) => {
return await request.download({ url: `/wms/supplierdeliver-request-main/export-excel`, params })

32
src/api/wms/unplannedissueRequestMain/index.ts

@ -66,4 +66,34 @@ export const exportUnplannedissueRequestMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/unplannedissue-request-main/get-import-template' })
}
}
// 关闭-计划外出库申请
export const closeUnplannedissueRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedissue-request-main/close?id=` + id })
}
// 重新添加-计划外出库申请
export const reAddUnplannedissueRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedissue-request-main/reAdd?id=` + id })
}
// 提交审批-计划外出库申请
export const submitUnplannedissueRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedissue-request-main/submit?id=` + id })
}
// 审批驳回-计划外出库申请
export const refusedUnplannedissueRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedissue-request-main/refused?id=` + id })
}
// 审批通过-计划外出库申请
export const agreeUnplannedissueRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedissue-request-main/agree?id=` + id })
}
// 处理-计划外出库申请
export const handleUnplannedissueRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedissue-request-main/handle?id=` + id })
}

59
src/components/BasicForm/src/BasicForm.vue

@ -21,6 +21,7 @@
v-model="formSchema.type"
placeholder="选择盘点类型"
@change="selectChange('type', $event)"
v-if="!isDetail"
>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.COUNT_TYPE)"
@ -29,6 +30,34 @@
:value="dict.value"
/>
</el-select>
<el-select
v-model="formSchema.type"
placeholder="选择盘点范围类型"
@change="selectChangeDetail('type', $event,formSchema)"
v-if="isDetail"
>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.COUNT_SCOPE_TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</template>
<template #value="formSchema" v-if="fromeWhere == 'countPlan'">
<el-select
v-model="formSchema.value"
placeholder="选择盘点范围值"
v-if="isDetail&& formTypeDetail =='Select'"
>
<el-option
v-for="dict in countPlanAllList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<el-input v-model="formSchema.value" v-if="isDetail && formTypeDetail =='InputString'"/>
</template>
</Form>
<div class="table" v-if="isBusiness && formType == 'create' && fromeWhere != 'countPlan'">
@ -165,11 +194,30 @@ const props = defineProps({
required: false,
default: ''
},
//
countScopeType: {
type: Array,
required: false,
default: null
}
},
//
isDetail: {
type: Boolean,
required: false,
default: false
},
//
formTypeDetail: {
type: String,
required: false,
default: 'InputString'
},
//
countPlanAllList: {
type: Array,
required: false,
default: null
},
})
const { t } = useI18n() //
@ -184,7 +232,7 @@ const formRef = ref() // 表单 Ref
const formSchema = ref(props.formAllSchemas?.formSchema)
const tableAllSchemas = ref(props.tableAllSchemas)
const tableFormRules = ref(props.tableFormRules)
console.log('tableAllSchemas', tableAllSchemas.value)
console.log('fromeWhere', props.fromeWhere)
/** 弹层操作 */
// formField form
@ -377,6 +425,7 @@ const emit = defineEmits([
'opensearchTable',
'submitForm',
'selectChange',
'selectChangeDetail',
'tableFormChange'
])
//
@ -431,6 +480,12 @@ const inpuFocus = (headerItem, row, index) => {
const selectChange = (field, val) => {
emit('selectChange', field, val)
}
//
const selectChangeDetail = (field, val,formSchema) => {
formSchema.value = ''
emit('selectChangeDetail', field, val)
}
const tableFormChange = (field, val, row) => {
emit('tableFormChange', field, val, row)

80
src/components/Detail/src/Detail.vue

@ -61,14 +61,15 @@
/>
</template>
</Table>
<DetailTable
<DetailTable
v-if="!isBasic && fromeWhere == 'countPlan' && isShowDrawer"
:columns="detailAllSchemasRef.tableColumns"
:data="tableObjectRef.tableList"
:allList="allList"
:countScopeType="countScopeType"
:key="updateKey"
>
<template #action="{ row }">
<template #action="{ row }">
<ButtonBase
:Butttondata="buttondata"
@button-base-click="buttonTableClick($event, row)"
@ -104,9 +105,14 @@
:isBusiness="false"
:apiUpdate="apiUpdate"
:apiCreate="apiCreate"
:fromeWhere="fromeWhere"
:isDetail="true"
@searchTableSuccess="searchTableSuccess"
:detailData="detailData"
@submitForm="submitForm"
@selectChangeDetail="selectChangeDetail"
:formTypeDetail="formTypeDetail"
:countPlanAllList="countPlanAllList"
/>
</div>
</template>
@ -125,7 +131,6 @@ import DetailTable from '@/components/DetailTable/src/DetailTable.vue'
defineOptions({ name: 'Detail' })
const message = useMessage() //
const { t } = useI18n() //
@ -133,7 +138,7 @@ const route = useRoute() // 路由信息
const routeName = ref()
routeName.value = route.name
routeName.value = routeName.value.substring(0, routeName.value.length - 4) + 'Detail'
const updateKey = ref(0)
const props = defineProps({
//
@ -208,10 +213,23 @@ const props = defineProps({
required: true,
default: null
},
//
countScopeType: {
type: Array,
required: false,
default: null
},
//
formTypeDetail: {
type: String,
required: false,
default: 'InputString'
},
//
countPlanAllList: {
type: Array,
required: false,
default: null
}
})
const isShowDrawer = ref(false)
@ -324,18 +342,27 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
getFileList()
getChangeRecordList()
//
if(routeName.value.indexOf('Job') > -1){
if (routeName.value.indexOf('Job') > -1) {
HeadButttondata.value = [
defaultButtons.defaultFilterBtn(null) //
]
}else{
} else {
HeadButttondata.value = [
defaultButtons.defaultAddBtn({
hide: isShowMainButton(row, ['1'])
}), //
defaultButtons.defaultFilterBtn(null) //
]
//
if (props.fromeWhere == 'countPlan') {
HeadButttondata.value = [
defaultButtons.defaultAddBtn({
hide: isShowMainButton(row, ['1'])
}) //
]
}
}
//
buttondata.value = [
defaultButtons.mainListEditBtn({
@ -372,7 +399,6 @@ const getChangeRecordList = async () => {
changeRecordData.changeRecordList = await RemarkApi.getChangeRecordPage(remarksData.data)
}
const tableObjectRef = ref()
const tableMethodsRef = ref()
const detailAllSchemasRef = ref()
@ -429,6 +455,7 @@ const buttonTableClick = async (val, row) => {
if (val == 'edit') {
//
openForm('update', row)
emit('detailOpenForm', row)
} else if (val == 'delete') {
//
handleDelete(row.id)
@ -443,7 +470,7 @@ const openForm = async (type: string, row?: number) => {
const submitForm = async (formType, data) => {
try {
// detailValidate
const rs = await props.detailValidate?props.detailValidate(data):true
const rs = (await props.detailValidate) ? props.detailValidate(data) : true
if (!rs) return
if (formType === 'create') {
await props.apiCreate(data)
@ -454,7 +481,8 @@ const submitForm = async (formType, data) => {
}
formRef.value.dialogVisible = false
//
getList()
await getList()
updateKey.value += 1
} finally {
formRef.value.formLoading = false
}
@ -465,7 +493,12 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
emit('searchTableSuccessDetail', formField, searchField, val, formRef)
}
//
const emit = defineEmits(['searchTableSuccessDetail', 'changeTabs'])
const emit = defineEmits([
'searchTableSuccessDetail',
'changeTabs',
'selectChangeDetail',
'detailOpenForm'
])
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
@ -476,25 +509,27 @@ const handleDelete = async (id: number) => {
message.success(t('common.delSuccess'))
//
await getList()
updateKey.value += 1
} catch {}
}
//
const searchFormClick = (searchData) => {
const searchFormClick = async (searchData) => {
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage //
})
tableObject.params = {
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 = tableObject
tableMethodsRef.value = tableMethods
tableObjectRef.value.tableList = []
const { getList } = tableMethods
getList()
const { getList } = tableMethods
await getList()
updateKey.value += 1
// tableObjectRef.value.params = {
// isSearch: true,
// filters: searchData.filters
@ -503,10 +538,13 @@ const searchFormClick = (searchData) => {
// }
// getList() //
}
//
const selectChangeDetail = (field, val) => {
emit('selectChangeDetail', field, val)
}
//
watch(
() =>props.apiPage,
() => props.apiPage,
() => {
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage //
@ -517,7 +555,7 @@ watch(
tableMethodsRef.value = tableMethods
const { getList } = tableMethods
getList()
},
}
)
</script>
<style lang="scss">

24
src/components/DetailTable/src/DetailTable.vue

@ -13,6 +13,12 @@
<div v-else> {{ forrmatter1(scope.row) }}</div>
</template>
</el-table-column>
<el-table-column prop="" label="操作" align="center">
<template #default="scope">
<slot name="action" :row="scope.row" v-if="columns[2].field == 'action'"></slot>
</template>
</el-table-column>
</el-table>
</div>
</template>
@ -20,6 +26,11 @@
<script lang="ts" setup>
defineOptions({ name: 'DetailTable' })
const props = defineProps({
row: {
type: Object,
required: true,
default: null
},
columns: {
type: Array,
required: true,
@ -30,7 +41,7 @@ const props = defineProps({
required: true,
default: null
},
//
//
allList: {
type: Object,
required: true,
@ -80,9 +91,14 @@ const forrmatter1 = (item) => {
return ''
}
}
onMounted(async () => {
console.log('props.data',props.data)
})
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
</script>
<style lang="scss">
</style>

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

@ -649,7 +649,7 @@ export const CountPlanDetail = useCrudSchemas(<CrudSchema[]>([
},
tableForm: {
width: '300',
}
},
},
{
label: '操作',

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

@ -83,7 +83,11 @@
:allList="allList"
:countScopeType="getStrDictOptions(DICT_TYPE.COUNT_SCOPE_TYPE)"
:Echo="Echo"
@selectChangeDetail="selectChangeDetail"
fromeWhere="countPlan"
:formTypeDetail="formTypeDetail"
:countPlanAllList="countPlanAllList"
@detailOpenForm="detailOpenForm"
/>
<!-- 导入 -->
@ -326,6 +330,63 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
getLocationAllList()
detailRef.value.openDetail(row, titleName, titleValue)
}
//
const detailOpenForm = (row) => {
console.log(row)
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'
) {
formTypeDetail.value = 'Select'
switch (row.type) {
case 'OWNER':
countPlanAllList.value = allList.value.ownerAllList
break
case 'SUPPLIER':
countPlanAllList.value = allList.value.supplierAllList
break
case 'CUSTOMER':
countPlanAllList.value = allList.value.customerAllList
break
case 'ABC':
countPlanAllList.value = getStrDictOptions(DICT_TYPE.ABC_CLASS)
break
case 'ITEMS_TYPE':
countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_TYPE)
break
case 'ITEMS_GROUP':
countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_GROUP)
break
case 'ITEMS_CODE':
countPlanAllList.value = allList.value.itembasicAllList
break
case 'WAREHOUSE_CODE':
countPlanAllList.value = allList.value.warehouseAllList
break
case 'AREABASIC_CODE':
countPlanAllList.value = allList.value.areaAllList
break
case 'LOCATIONGROUP_CODE':
countPlanAllList.value = allList.value.locationgroupAllList
break
case 'LOCATION_CODE':
countPlanAllList.value = allList.value.locationAllList
break
}
} else if (val == 'PROJECT') {
formTypeDetail.value = 'InputString'
}
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
@ -451,6 +512,66 @@ const selectChange = (field, val) => {
}
}
}
const formTypeDetail = ref('InputString') //
const countPlanAllList = ref([]) //
//
const selectChangeDetail = (field, val) => {
if (field == 'type') {
// CountPlanDetail.allSchemas.formSchema[1].value = ''
if (
val == 'OWNER' ||
val == 'SUPPLIER' ||
val == 'CUSTOMER' ||
val == 'ABC' ||
val == 'ITEMS_TYPE' ||
val == 'ITEMS_GROUP' ||
val == 'ITEMS_CODE' ||
val == 'WAREHOUSE_CODE' ||
val == 'AREABASIC_CODE' ||
val == 'LOCATIONGROUP_CODE' ||
val == 'LOCATION_CODE'
) {
formTypeDetail.value = 'Select'
switch (val) {
case 'OWNER':
countPlanAllList.value = allList.value.ownerAllList
break
case 'SUPPLIER':
countPlanAllList.value = allList.value.supplierAllList
break
case 'CUSTOMER':
countPlanAllList.value = allList.value.customerAllList
break
case 'ABC':
countPlanAllList.value = getStrDictOptions(DICT_TYPE.ABC_CLASS)
break
case 'ITEMS_TYPE':
countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_TYPE)
break
case 'ITEMS_GROUP':
countPlanAllList.value = getStrDictOptions(DICT_TYPE.ITEM_GROUP)
break
case 'ITEMS_CODE':
countPlanAllList.value = allList.value.itembasicAllList
break
case 'WAREHOUSE_CODE':
countPlanAllList.value = allList.value.warehouseAllList
break
case 'AREABASIC_CODE':
countPlanAllList.value = allList.value.areaAllList
break
case 'LOCATIONGROUP_CODE':
countPlanAllList.value = allList.value.locationgroupAllList
break
case 'LOCATION_CODE':
countPlanAllList.value = allList.value.locationAllList
break
}
} else if (val == 'PROJECT') {
formTypeDetail.value = 'InputString'
}
}
}
//
const tableFormChange = async (field, val, row) => {
if (field == 'type') {
@ -570,7 +691,7 @@ const getItembasicAllList = async () => {
//
const getWarehouseAllList = async () => {
await WarehouseApi.getWarehouseList({ available: 'TRUE' }).then((res) => {
allList.value.warehouseAllList = res.map((element) => {
allList.value.warehouseAllList = res.map((element) => {
return {
value: element.code,
label: element.name

6
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/index.vue

@ -174,9 +174,9 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
// defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}

84
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue

@ -82,6 +82,7 @@ import { UnplannedissueRequestMain,UnplannedissueRequestMainRules,Unplannedissue
import * as UnplannedissueRequestMainApi from '@/api/wms/unplannedissueRequestMain'
import * as UnplannedissueRequestDetailApi from '@/api/wms/unplannedissueRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as TransferissueRequestMainApi from "@/api/wms/transferissueRequestMain";
//
defineOptions({ name: 'UnplannedissueRequestMain' })
@ -190,13 +191,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:unplannedissue-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:unplannedissue-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:unplannedissue-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:unplannedissue-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedissue-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:unplannedissue-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:unplannedissue-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:unplannedissue-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedissue-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:unplannedissue-request-main:delete'}), //
]
}
@ -206,14 +208,21 @@ const butttondata = (row) => {
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
handleClose(row.id)
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
handleReAdd(row.id)
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
handleSubmit(row.id)
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
handleRefused(row.id)
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
handleAgree(row.id)
} else if (val == 'mainHandle') { //
handleHandle(row.id)
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
@ -221,6 +230,67 @@ const buttonTableClick = async (val, row) => {
}
}
/** 处理按钮操作 */
const handleHandle = async (id: number) => {
try {
await message.confirm(t('common.confirmHandle'))
await UnplannedissueRequestMainApi.handleUnplannedissueRequestMain(id)
message.success(t('common.handleSuccess'))
await getList()
} catch {}
}
/** 审批通过按钮操作 */
const handleAgree = async (id: number) => {
try {
await message.confirm(t('common.confirmAgree'))
await UnplannedissueRequestMainApi.agreeUnplannedissueRequestMain(id)
message.success(t('common.agreeSuccess'))
await getList()
} catch {}
}
/** 审批驳回按钮操作 */
const handleRefused = async (id: number) => {
try {
await message.confirm(t('common.confirmRefused'))
await UnplannedissueRequestMainApi.refusedUnplannedissueRequestMain(id)
message.success(t('common.refusedSuccess'))
await getList()
} catch {}
}
/** 提交按钮操作 */
const handleSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await UnplannedissueRequestMainApi.submitUnplannedissueRequestMain(id)
message.success(t('common.submitSuccess'))
await getList()
} catch {}
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await UnplannedissueRequestMainApi.closeUnplannedissueRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 重新添加按钮操作 */
const handleReAdd = async (id: number) => {
try {
await message.confirm(t('common.confirmReAdd'))
await UnplannedissueRequestMainApi.reAddUnplannedissueRequestMain(id)
message.success(t('common.reAddSuccess'))
await getList()
} catch {}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {

8
src/views/wms/purchasereceiptManage/inspect/inspectJobMain/inspectJobMain.data.ts

@ -177,8 +177,8 @@ export const InspectJobMain = useCrudSchemas(reactive<CrudSchema[]>([
},
},
{
label: '承接人用户名',
field: 'acceptUserId',
label: '承接人',
field: 'acceptUserName',
sort: 'custom',
table: {
width: 150
@ -205,8 +205,8 @@ export const InspectJobMain = useCrudSchemas(reactive<CrudSchema[]>([
},
},
{
label: '完成人用户名',
field: 'completeUserId',
label: '完成人',
field: 'completeUserName',
sort: 'custom',
table: {
width: 150

6
src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue

@ -63,11 +63,7 @@
:allSchemas="InspectRequestMain.allSchemas"
:detailAllSchemas="InspectRequestDetail.allSchemas"
:detailAllSchemasRules="InspectRequestDetailRules"
:apiCreate="InspectRequestDetailApi.createInspectRequestDetail"
:apiUpdate="InspectRequestDetailApi.updateInspectRequestDetail"
:apiPage="InspectRequestDetailApi.getInspectRequestDetailPage"
:apiDelete="InspectRequestDetailApi.deleteInspectRequestDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
@ -271,7 +267,7 @@ const handleSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await InspectRequestMainApi.submitInspectRequestMain(id)
message.success(t('common.closeSuccess'))
message.success(t('common.submitSuccess'))
await getList()
} catch {}
}

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

@ -106,8 +106,8 @@ export const InspectRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '从库位类型范围',
field: 'fromLocationTypes',
// dictType: DICT_TYPE.LOCATION_TYPE,
// dictClass: 'string',
dictType: DICT_TYPE.LOCATION_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
@ -325,7 +325,7 @@ export const InspectRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '物品代码',
field: 'itemcode',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
@ -776,17 +776,6 @@ export const InspectRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
tableForm: {
type: 'Select'
}
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:false,
}
]))
@ -804,4 +793,4 @@ export const InspectRequestDetailRules = reactive({
itemCode: [
{ required: true, message: '请输入物品代码', trigger: 'blur' }
],
})
})

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

@ -84,7 +84,6 @@ import * as PurchasereceiptRequestMainApi from '@/api/wms/purchasereceiptRequest
import * as PurchasereceiptRequestDetailApi from '@/api/wms/purchasereceiptRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList'
import { SupplierdeliverRecordMain, SupplierdeliverRecordDetail} from './../../supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data'
//
defineOptions({ name: 'PurchasereceiptRequestMain' })

4
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts

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

8
src/views/wms/purchasereceiptManage/putaway/putawayJobMain/putawayJobMain.data.ts

@ -170,8 +170,8 @@ export const PutawayJobMain = useCrudSchemas(reactive<CrudSchema[]>([
},
},
{
label: '承接人用户名',
field: 'acceptUserId',
label: '承接人',
field: 'acceptUserName',
sort: 'custom',
table: {
width: 150
@ -198,8 +198,8 @@ export const PutawayJobMain = useCrudSchemas(reactive<CrudSchema[]>([
},
},
{
label: '完成人用户名',
field: 'completeUserId',
label: '完成人',
field: 'completeUserName',
sort: 'custom',
table: {
width: 150

6
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

@ -172,9 +172,9 @@
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPurchasePlanPubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPurchasePlanAccBtn({ hide: isShowMainButton(row, ['6']) }), //
defaultButtons.mainListPurchasePlanRejBtn({ hide: isShowMainButton(row, ['6']) }), //
defaultButtons.mainListPurchasePlanWitBtn({ hide: isShowMainButton(row, ['6']) }), //
defaultButtons.mainListPurchasePlanAccBtn({ hide: isShowMainButton(row, ['3']) }), //
defaultButtons.mainListPurchasePlanRejBtn({ hide: isShowMainButton(row, ['3']) }), //
defaultButtons.mainListPurchasePlanWitBtn({ hide: isShowMainButton(row, ['3']) }), //
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchase-plan-main:update' }), //
// defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchase-plan-main:delete'}), //
]

2
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue

@ -121,7 +121,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListGenerateApplicationBtn(null), //
// defaultButtons.mainListGenerateApplicationBtn(null), //
]
}

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

@ -38,7 +38,8 @@
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="false" :allSchemas="SupplierdeliverRequestMain.allSchemas"
:detailAllSchemas="SupplierdeliverRequestDetail.allSchemas" :detailAllSchemasRules="SupplierdeliverRequestDetailRules"
:detailAllSchemas="SupplierdeliverRequestDetail.allSchemas"
:detailAllSchemasRules="SupplierdeliverRequestDetailRules"
:apiCreate="SupplierdeliverRequestDetailApi.createSupplierdeliverRequestDetail"
:apiUpdate="SupplierdeliverRequestDetailApi.updateSupplierdeliverRequestDetail"
:apiPage="SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage"
@ -46,11 +47,13 @@
@searchTableSuccessDetail="searchTableSuccessDetail" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/supplierdeliver-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
<ImportForm ref="importFormRef" url="/wms/supplierdeliver-request-main/import"
:importTemplateData="importTemplateData" @success="importSuccess" :updateIsDisable="true" :coverIsDisable="true"
:mode="2" />
<!-- 打印 -->
<el-dialog v-model="dialogVisible" :title="dialogTitle" width="60%">
<point ref='pointRef' :detailListTableColumns='detailListTableColumns' />
<!-- <el-dialog v-model="dialogVisible" :title="dialogTitle" width="60%">
<Table :columns="detailListTableColumns" :data="detatableData.tableList" :loading="detatableData.loading" :pagination="{
total: detatableData.total
}" v-model:pageSize="detatableData.pageSize" v-model:currentPage="detatableData.currentPage"
@ -63,453 +66,472 @@
<el-button @click="genLabel()">生成标签</el-button>
<el-button @click="print">打印</el-button>
</el-dialog>
</el-dialog> -->
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth'
import { SupplierdeliverRequestMain, SupplierdeliverRequestMainRules, SupplierdeliverRequestDetail, SupplierdeliverRequestDetailRules } from './supplierdeliverRequestMain.data'
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain'
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
// import * as PackageApi from '@/api/wms/package'
// import * as BarbasicApi from '@/api/wms/barbasic'
//
defineOptions({ name: 'SupplierdeliverRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(SupplierdeliverRequestMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
} else {
import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth'
import { SupplierdeliverRequestMain, SupplierdeliverRequestMainRules, SupplierdeliverRequestDetail, SupplierdeliverRequestDetailRules } from './supplierdeliverRequestMain.data'
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain'
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import point from '@/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/point.vue'
// import * as PackageApi from '@/api/wms/package'
// import * as BarbasicApi from '@/api/wms/barbasic'
//
defineOptions({ name: 'SupplierdeliverRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(SupplierdeliverRequestMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
} else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: SupplierdeliverRequestMainApi.getSupplierdeliverRequestMainPage //
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: SupplierdeliverRequestMainApi.getSupplierdeliverRequestMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: 'wms:supplierdeliver-request-main:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:supplierdeliver-request-main:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierdeliver-request-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: 'wms:supplierdeliver-request-main:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:supplierdeliver-request-main:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierdeliver-request-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
}
}
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
}
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
// -
const butttondata = (row) => {
return [
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4']) }), //
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListEditBtn({ hasPermi: 'wms:supplierdeliver-request-main:update' }), //
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:supplierdeliver-request-main:delete' }), //
defaultButtons.mainListPointBtn(null), //
defaultButtons.mainListDocumentPrintBtn(null), //
//
{
label: '处理',
name: 'genRecords',
hide: isShowMainButton(row, ['3']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
},
]
}
}
// -
const butttondata = (row) => {
return [
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), //
defaultButtons.mainListDocumentPrintBtn(null), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainPurPlanOpe') { //
handleOpe(row.id)
} else if (val == 'mainPurPlanClo') {//
handleClo(row.id)
} else if (val == 'mainPlanSub') { //
handleSub(row.id)
} else if (val == 'mainPlanApp') { //
handleApp(row.id)
} else if (val == 'mainPlanTur') { //
handleTur(row.id)
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'point') { //
handlePoint(row)
} else if (val == 'documentPrint') { //
handleDocumentPrint(row.id)
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainPurPlanOpe') { //
handleOpe(row.id)
} else if (val == 'mainPurPlanClo') {//
handleClo(row.id)
} else if (val == 'mainPlanSub') { //
handleSub(row.id)
} else if (val == 'mainPlanApp') { //
handleApp(row.id)
} else if (val == 'mainPlanTur') { //
handleTur(row.id)
}else if (val == 'genRecords') { //
genRecords(row.id)
}else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'point') { //
handlePoint(row)
} else if (val == 'documentPrint') { //
handleDocumentPrint(row.id)
}
}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type: string, row?: number) => {
tableData.value = [] //
formRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await SupplierdeliverRequestMainApi.deleteSupplierdeliverRequestMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} 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 () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await SupplierdeliverRequestMainApi.exportSupplierdeliverRequestMain(setSearchParams)
download.excel(data, '供应商发货申请主.xls')
} catch {
} finally {
exportLoading.value = false
/** 详情操作 */
const detailRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => {
detailRef.value.openDetail(row, titleName, titleValue)
}
}
//
const { tableObject: detatableData, tableMethods: detatableMethods } = useTable({
getListApi: SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage
})
const { getList: getDetailList } = detatableMethods
const detailTableColumns = ref(SupplierdeliverRequestDetail.allSchemas.tableColumns)
const detailListTableColumns = detailTableColumns.value.filter(item => item.label != '操作' && item.label != '创建者' && item.label != '创建时间' && item.label != '最后更新者' && item.label != '最后更新时间')
const dialogVisible = ref(false)
const isShow = ref(false)
const dialogTitle = ref('')
const closeDialog = () => {
dialogVisible.value = false
isShow.value = false
}
/** 生成标签按钮操作 */
const genLabel = async () => {
try {
//
await message.confirm('是否为此数据生成标签?')
//
await SupplierdeliverRequestMainApi.genLabel(genLabelId.value)
///
const formRef = ref()
const openForm = async (type: string, row?: number) => {
tableData.value = [] //
formRef.value.open(type, row)
}
/** 删除按钮操作 */
const handleDelete = async (id : number) => {
try {
//
await message.delConfirm()
//
await SupplierdeliverRequestMainApi.deleteSupplierdeliverRequestMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} 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 genRecords = async (id : number) => {
try {
//
await message.confirm('是否处理所选中数据?')
//
await SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id)
message.success(t('处理成功!'))
//
await getList()
} catch { }
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await SupplierdeliverRequestMainApi.exportSupplierdeliverRequestMain(setSearchParams)
download.excel(data, '供应商发货申请主.xls')
} catch {
} finally {
exportLoading.value = false
}
}
const detailTableColumns = ref(SupplierdeliverRequestDetail.allSchemas.tableColumns)
const detailListTableColumns = detailTableColumns.value.filter(item => item.label != '操作' && item.label != '创建者' && item.label != '创建时间' && item.label != '最后更新者' && item.label != '最后更新时间')
const dialogVisible = ref(false)
const isShow = ref(false)
const dialogTitle = ref('')
const closeDialog = () => {
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 = {
masterId: row.id,
}
await getDetailList()
dialogVisible.value = true
dialogTitle.value = row.number + '单据号'
genLabelId.value = row.number
}
const print = async () => {
//
// const packageArray:any= ref([])
// let packageObject = {
// itemCode: '',
// itemName: '',
// itemDesc1: '',
// itemDesc2: '',
// batch: '',
// altBatch: '',
// produceDate: '',
// validityDays: '',
// expireDate: '',
// uom: '',
// qty: '',
// altUom: '',
// altQty: '',
// convertRate: '',
// stdPackQty: '',
// stdPackUnit: '',
// toWarehouseCode: '',
// toDockCode: '',
// toLocationCode: '',
// supplierCode: '',
// supplierItemCode: '',
// poNumber: '',
// poLine: '',
// rpNumber: '',
// asnNumber: '',
// }
// //
// await SupplierdeliverRequestMainApi.getSupplierdeliverRequestMainPage({
// number: detatableData.tableList[0].number
// }).then(res => {
// detatableData.tableList.forEach(item => {
// packageObject.itemCode=item.itemCode
// packageObject.itemName=item.itemName
// packageObject.itemDesc1=item.itemDesc1
// packageObject.itemDesc2=item.itemDesc2
// packageObject.batch=item.batch
// packageObject.altBatch=item.altBatch
// packageObject.produceDate=item.produceDate
// packageObject.expireDate=item.expireDate
// packageObject.uom=item.uom
// packageObject.qty=item.qty
// packageObject.stdPackQty=item.stdPackQty
// packageObject.stdPackUnit=item.stdPackUnit
// packageObject.convertRate=item.convertRate
// packageObject.poNumber=item.poNumber
// packageObject.poLine=item.poLine
// packageObject.supplierCode=res.list[0].supplierCode
// packageObject.rpNumber=res.list[0].ppNumber
// packageArray.value.push(packageObject)
// })
// })
// const barBasicArray:any =ref([])
// let barBasicObject = {
// type: '',
// template: '',
// status: '',
// relateNumber: '',
// barcodeString: '',
// printTimes: '',
// lastPrintTime: '',
// lastPrintUserId: '',
// lastPrintUserName: '',
// }
// //
// await PackageApi.createPackage(JSON.parse(JSON.stringify(packageArray.value))).then(res => {
// res.list.forEach(item => {
// barBasicObject.type = 'PurchaseLabel'
// barBasicObject.relateNumber = item.number
// barBasicObject.status = 'NEW'
// barBasicArray.value.push(barBasicObject)
// })
// })
// await BarbasicApi.createBarbasic(JSON.parse(JSON.stringify(barBasicArray.value)))
window.open(src.value + '&number=' + detatableData.tableList[0].number)
}
//
const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken())
const handleDocumentPrint = async (id) => {
window.open(documentSrc.value + '&id=' + id)
}
/**
* tableForm方法
*/
const tableFormKeys = {}
SupplierdeliverRequestDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
await SupplierdeliverRequestMainApi.createSupplierdeliverRequestMain(data)
message.success(t('common.createSuccess'))
} else {
await SupplierdeliverRequestMainApi.updateSupplierdeliverRequestMain(data)
message.success(t('common.updateSuccess'))
/** 生成标签按钮操作 */
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 pointRef = ref()
const handlePoint = async (row) => {
pointRef.value.openPoint(row.id)
// console.log(tableObject.params);
// dialogVisible.value = true
// dialogTitle.value = row.number + ''
// genLabelId.value = row.number
}
const print = async () => {
//
// const packageArray:any= ref([])
// let packageObject = {
// itemCode: '',
// itemName: '',
// itemDesc1: '',
// itemDesc2: '',
// batch: '',
// altBatch: '',
// produceDate: '',
// validityDays: '',
// expireDate: '',
// uom: '',
// qty: '',
// altUom: '',
// altQty: '',
// convertRate: '',
// stdPackQty: '',
// stdPackUnit: '',
// toWarehouseCode: '',
// toDockCode: '',
// toLocationCode: '',
// supplierCode: '',
// supplierItemCode: '',
// poNumber: '',
// poLine: '',
// rpNumber: '',
// asnNumber: '',
// }
// //
// await SupplierdeliverRequestMainApi.getSupplierdeliverRequestMainPage({
// number: detatableData.tableList[0].number
// }).then(res => {
// detatableData.tableList.forEach(item => {
// packageObject.itemCode=item.itemCode
// packageObject.itemName=item.itemName
// packageObject.itemDesc1=item.itemDesc1
// packageObject.itemDesc2=item.itemDesc2
// packageObject.batch=item.batch
// packageObject.altBatch=item.altBatch
// packageObject.produceDate=item.produceDate
// packageObject.expireDate=item.expireDate
// packageObject.uom=item.uom
// packageObject.qty=item.qty
// packageObject.stdPackQty=item.stdPackQty
// packageObject.stdPackUnit=item.stdPackUnit
// packageObject.convertRate=item.convertRate
// packageObject.poNumber=item.poNumber
// packageObject.poLine=item.poLine
// packageObject.supplierCode=res.list[0].supplierCode
// packageObject.rpNumber=res.list[0].ppNumber
// packageArray.value.push(packageObject)
// })
// })
// const barBasicArray:any =ref([])
// let barBasicObject = {
// type: '',
// template: '',
// status: '',
// relateNumber: '',
// barcodeString: '',
// printTimes: '',
// lastPrintTime: '',
// lastPrintUserId: '',
// lastPrintUserName: '',
// }
// //
// await PackageApi.createPackage(JSON.parse(JSON.stringify(packageArray.value))).then(res => {
// res.list.forEach(item => {
// barBasicObject.type = 'PurchaseLabel'
// barBasicObject.relateNumber = item.number
// barBasicObject.status = 'NEW'
// barBasicArray.value.push(barBasicObject)
// })
// })
// await BarbasicApi.createBarbasic(JSON.parse(JSON.stringify(barBasicArray.value)))
window.open(src.value + '&number=' + detatableData.tableList[0].number)
}
//
const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken())
const handleDocumentPrint = async (id) => {
window.open(documentSrc.value + '&id=' + id)
}
/**
* tableForm方法
*/
const tableFormKeys = {}
SupplierdeliverRequestDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
await SupplierdeliverRequestMainApi.createSupplierdeliverRequestMain(data)
message.success(t('common.createSuccess'))
} else {
await SupplierdeliverRequestMainApi.updateSupplierdeliverRequestMain(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
}
formRef.value.dialogVisible = false
//
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '供应商发货申请主导入模版.xls'
})
//
const importSuccess = () => {
getList()
} finally {
formRef.value.formLoading = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '供应商发货申请主导入模版.xls'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await SupplierdeliverRequestMainApi.importTemplate()
})
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await SupplierdeliverRequestMainApi.importTemplate()
})
</script>

98
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/point.vue

@ -0,0 +1,98 @@
<template>
<!-- 打印 -->
<el-dialog v-model="dialogVisiblePoint" :title="dialogTitle" width="60%">
<Table :columns="detailListTableColumns" :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 #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>
<script setup lang="ts">
import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth'
import { SupplierdeliverRequestMain, SupplierdeliverRequestMainRules, SupplierdeliverRequestDetail, SupplierdeliverRequestDetailRules } from './supplierdeliverRequestMain.data'
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain'
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
// import * as PackageApi from '@/api/wms/package'
// import * as BarbasicApi from '@/api/wms/barbasic'
const props = defineProps({
//
detailListTableColumns: {
type: Array,
required: true,
default: null
},
})
//
defineOptions({ name: 'SupplierdeliverRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(SupplierdeliverRequestMain.allSchemas.tableColumns)
const dialogVisiblePoint = ref(false)
const { tableObject, tableMethods } = useTable({
getListApi: SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage //
})
const dialogVisible = ref(false)
const isShow = ref(false)
const dialogTitle = ref('')
const closeDialog = () => {
dialogVisiblePoint.value = false
isShow.value = false
}
// const print = async () => {
// window.open(src.value + '&number=' + detatableData.tableList[0].number)
// }
/** 生成标签按钮操作 */
const genLabel = async () => {
try {
//
await message.confirm('是否为此数据生成标签?')
//
await SupplierdeliverRequestMainApi.genLabel(genLabelId.value)
dialogVisible.value = false
isShow.value = false
message.success(t('生成标签成功!'))
dialogVisiblePoint.value = false
isShow.value = false
//
await getList()
} catch { }
}
//
const { getList, setSearchParams } = tableMethods
const genLabelId = ref();
const openPoint = async (masterId)=>{
tableObject.params = {
masterId:masterId,
}
dialogVisiblePoint.value = true
genLabelId.value = masterId
getList()
}
defineExpose({ openPoint }) // open
/** 初始化 **/
onMounted(async () => {
})
</script>
Loading…
Cancel
Save