chenfang 11 months ago
parent
commit
a8104f73f1
  1. 6
      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. 30
      src/api/wms/unplannedissueRequestMain/index.ts
  7. 59
      src/components/BasicForm/src/BasicForm.vue
  8. 58
      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. 121
      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. 17
      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. 76
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  23. 98
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/point.vue

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

@ -17,8 +17,14 @@ export interface CountPlanDetailVO {
// 查询盘点计划子列表 // 查询盘点计划子列表
export const getCountPlanDetailPage = async (params) => { export const getCountPlanDetailPage = async (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 }) return await request.get({ url: `/wms/count-plan-detail/page`, params })
} }
}
// 查询盘点计划子详情 // 查询盘点计划子详情
export const getCountPlanDetail = async (id: number) => { export const getCountPlanDetail = async (id: number) => {

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

@ -92,5 +92,5 @@ export const importTemplate = () => {
// 关闭检验任务主 // 关闭检验任务主
export const closeInspectJobMain = (id: number) => { 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) => { 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) => { 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) => { export const genLabel = async (id) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/genLabel?id=` + 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 // 导出供应商发货申请主 Excel
export const exportSupplierdeliverRequestMain = async (params) => { export const exportSupplierdeliverRequestMain = async (params) => {
return await request.download({ url: `/wms/supplierdeliver-request-main/export-excel`, params }) return await request.download({ url: `/wms/supplierdeliver-request-main/export-excel`, params })

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

@ -67,3 +67,33 @@ export const exportUnplannedissueRequestMain = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/unplannedissue-request-main/get-import-template' }) 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" v-model="formSchema.type"
placeholder="选择盘点类型" placeholder="选择盘点类型"
@change="selectChange('type', $event)" @change="selectChange('type', $event)"
v-if="!isDetail"
> >
<el-option <el-option
v-for="dict in getStrDictOptions(DICT_TYPE.COUNT_TYPE)" v-for="dict in getStrDictOptions(DICT_TYPE.COUNT_TYPE)"
@ -29,6 +30,34 @@
:value="dict.value" :value="dict.value"
/> />
</el-select> </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> </template>
</Form> </Form>
<div class="table" v-if="isBusiness && formType == 'create' && fromeWhere != 'countPlan'"> <div class="table" v-if="isBusiness && formType == 'create' && fromeWhere != 'countPlan'">
@ -165,11 +194,30 @@ const props = defineProps({
required: false, required: false,
default: '' default: ''
}, },
//
countScopeType: { countScopeType: {
type: Array, type: Array,
required: false, required: false,
default: null 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() // const { t } = useI18n() //
@ -184,7 +232,7 @@ const formRef = ref() // 表单 Ref
const formSchema = ref(props.formAllSchemas?.formSchema) const formSchema = ref(props.formAllSchemas?.formSchema)
const tableAllSchemas = ref(props.tableAllSchemas) const tableAllSchemas = ref(props.tableAllSchemas)
const tableFormRules = ref(props.tableFormRules) const tableFormRules = ref(props.tableFormRules)
console.log('tableAllSchemas', tableAllSchemas.value) console.log('fromeWhere', props.fromeWhere)
/** 弹层操作 */ /** 弹层操作 */
// formField form // formField form
@ -377,6 +425,7 @@ const emit = defineEmits([
'opensearchTable', 'opensearchTable',
'submitForm', 'submitForm',
'selectChange', 'selectChange',
'selectChangeDetail',
'tableFormChange' 'tableFormChange'
]) ])
// //
@ -431,6 +480,12 @@ const inpuFocus = (headerItem, row, index) => {
const selectChange = (field, val) => { const selectChange = (field, val) => {
emit('selectChange', field, val) emit('selectChange', field, val)
} }
//
const selectChangeDetail = (field, val,formSchema) => {
formSchema.value = ''
emit('selectChangeDetail', field, val)
}
const tableFormChange = (field, val, row) => { const tableFormChange = (field, val, row) => {
emit('tableFormChange', field, val, row) emit('tableFormChange', field, val, row)

58
src/components/Detail/src/Detail.vue

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

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

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

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

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

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

@ -83,7 +83,11 @@
:allList="allList" :allList="allList"
:countScopeType="getStrDictOptions(DICT_TYPE.COUNT_SCOPE_TYPE)" :countScopeType="getStrDictOptions(DICT_TYPE.COUNT_SCOPE_TYPE)"
:Echo="Echo" :Echo="Echo"
@selectChangeDetail="selectChangeDetail"
fromeWhere="countPlan" fromeWhere="countPlan"
:formTypeDetail="formTypeDetail"
:countPlanAllList="countPlanAllList"
@detailOpenForm="detailOpenForm"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -326,6 +330,63 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
getLocationAllList() getLocationAllList()
detailRef.value.openDetail(row, titleName, titleValue) 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) => { 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) => { const tableFormChange = async (field, val, row) => {
if (field == 'type') { if (field == 'type') {

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

@ -174,9 +174,9 @@ const isShowMainButton = (row,val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({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 UnplannedissueRequestMainApi from '@/api/wms/unplannedissueRequestMain'
import * as UnplannedissueRequestDetailApi from '@/api/wms/unplannedissueRequestDetail' import * as UnplannedissueRequestDetailApi from '@/api/wms/unplannedissueRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as TransferissueRequestMainApi from "@/api/wms/transferissueRequestMain";
// //
defineOptions({ name: 'UnplannedissueRequestMain' }) defineOptions({ name: 'UnplannedissueRequestMain' })
@ -190,13 +191,14 @@ const isShowMainButton = (row,val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:unplannedissue-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:unplannedissue-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedissue-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:unplannedissue-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:unplannedissue-request-main:agree'}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:unplannedissue-request-main:update'}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:unplannedissue-request-main:handle'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:unplannedissue-request-main:delete'}), // 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) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭') console.log('列表-操作按钮事件-关闭')
handleClose(row.id)
} else if (val == 'mainReAdd') { // } else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加') console.log('列表-操作按钮事件-重新添加')
handleReAdd(row.id)
} else if (val == 'mainSubmit') { // } else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批') console.log('列表-操作按钮事件-提交审批')
handleSubmit(row.id)
} else if (val == 'mainTurnDown') { // } else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回') console.log('列表-操作按钮事件-驳回')
handleRefused(row.id)
} else if (val == 'mainApprove') { // } else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过') console.log('列表-操作按钮事件-审批通过')
handleAgree(row.id)
} else if (val == 'mainHandle') { //
handleHandle(row.id)
} else if (val == 'edit') { // } else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } 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 formRef = ref()
const openForm =async (type: string, row?: number) => { 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: '承接人用户名', label: '承接人',
field: 'acceptUserId', field: 'acceptUserName',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -205,8 +205,8 @@ export const InspectJobMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '完成人用户名', label: '完成人',
field: 'completeUserId', field: 'completeUserName',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

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

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

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

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

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 PurchasereceiptRequestDetailApi from '@/api/wms/purchasereceiptRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList' import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList'
import { SupplierdeliverRecordMain, SupplierdeliverRecordDetail} from './../../supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data'
// //
defineOptions({ name: 'PurchasereceiptRequestMain' }) defineOptions({ name: 'PurchasereceiptRequestMain' })

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

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

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

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

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

@ -172,9 +172,9 @@
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), // defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1']) }), // defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPurchasePlanPubBtn({ hide: isShowMainButton(row, ['1']) }), // defaultButtons.mainListPurchasePlanPubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPurchasePlanAccBtn({ hide: isShowMainButton(row, ['6']) }), // defaultButtons.mainListPurchasePlanAccBtn({ hide: isShowMainButton(row, ['3']) }), //
defaultButtons.mainListPurchasePlanRejBtn({ hide: isShowMainButton(row, ['6']) }), // defaultButtons.mainListPurchasePlanRejBtn({ hide: isShowMainButton(row, ['3']) }), //
defaultButtons.mainListPurchasePlanWitBtn({ hide: isShowMainButton(row, ['6']) }), // defaultButtons.mainListPurchasePlanWitBtn({ hide: isShowMainButton(row, ['3']) }), //
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchase-plan-main:update' }), // defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchase-plan-main:update' }), //
// defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchase-plan-main:delete'}), // // 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) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListGenerateApplicationBtn(null), // // defaultButtons.mainListGenerateApplicationBtn(null), //
] ]
} }

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

@ -38,7 +38,8 @@
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="false" :allSchemas="SupplierdeliverRequestMain.allSchemas" <Detail ref="detailRef" :isBasic="false" :allSchemas="SupplierdeliverRequestMain.allSchemas"
:detailAllSchemas="SupplierdeliverRequestDetail.allSchemas" :detailAllSchemasRules="SupplierdeliverRequestDetailRules" :detailAllSchemas="SupplierdeliverRequestDetail.allSchemas"
:detailAllSchemasRules="SupplierdeliverRequestDetailRules"
:apiCreate="SupplierdeliverRequestDetailApi.createSupplierdeliverRequestDetail" :apiCreate="SupplierdeliverRequestDetailApi.createSupplierdeliverRequestDetail"
:apiUpdate="SupplierdeliverRequestDetailApi.updateSupplierdeliverRequestDetail" :apiUpdate="SupplierdeliverRequestDetailApi.updateSupplierdeliverRequestDetail"
:apiPage="SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage" :apiPage="SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage"
@ -46,11 +47,13 @@
@searchTableSuccessDetail="searchTableSuccessDetail" /> @searchTableSuccessDetail="searchTableSuccessDetail" />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/supplierdeliver-request-main/import" :importTemplateData="importTemplateData" <ImportForm ref="importFormRef" url="/wms/supplierdeliver-request-main/import"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> :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="{ <Table :columns="detailListTableColumns" :data="detatableData.tableList" :loading="detatableData.loading" :pagination="{
total: detatableData.total total: detatableData.total
}" v-model:pageSize="detatableData.pageSize" v-model:currentPage="detatableData.currentPage" }" v-model:pageSize="detatableData.pageSize" v-model:currentPage="detatableData.currentPage"
@ -63,7 +66,7 @@
<el-button @click="genLabel()">生成标签</el-button> <el-button @click="genLabel()">生成标签</el-button>
<el-button @click="print">打印</el-button> <el-button @click="print">打印</el-button>
</el-dialog> </el-dialog> -->
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -73,6 +76,7 @@ import { SupplierdeliverRequestMain, SupplierdeliverRequestMainRules, Supplierde
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain' import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain'
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' 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 PackageApi from '@/api/wms/package'
// import * as BarbasicApi from '@/api/wms/barbasic' // import * as BarbasicApi from '@/api/wms/barbasic'
@ -170,7 +174,7 @@ const isShowMainButton = (row, val) => {
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), // defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '3', '4']) }), // defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4']) }), //
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), // defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), // defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), // defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
@ -178,6 +182,17 @@ const butttondata = (row) => {
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:supplierdeliver-request-main:delete' }), // defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:supplierdeliver-request-main:delete' }), //
defaultButtons.mainListPointBtn(null), // defaultButtons.mainListPointBtn(null), //
defaultButtons.mainListDocumentPrintBtn(null), // defaultButtons.mainListDocumentPrintBtn(null), //
//
{
label: '处理',
name: 'genRecords',
hide: isShowMainButton(row, ['3']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
},
] ]
} }
@ -193,6 +208,8 @@ const buttonTableClick = async (val, row) => {
handleApp(row.id) handleApp(row.id)
} else if (val == 'mainPlanTur') { // } else if (val == 'mainPlanTur') { //
handleTur(row.id) handleTur(row.id)
}else if (val == 'genRecords') { //
genRecords(row.id)
}else if (val == 'edit') { // }else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
@ -204,18 +221,17 @@ const buttonTableClick = async (val, row) => {
} }
} }
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type: string, row?: number) => {
tableData.value = [] //
formRef.value.open(type, row)
}
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => { const openDetail = (row : any, titleName : any, titleValue : any) => {
detailRef.value.openDetail(row, titleName, titleValue) detailRef.value.openDetail(row, titleName, titleValue)
} }
///
const formRef = ref()
const openForm = async (type: string, row?: number) => {
tableData.value = [] //
formRef.value.open(type, row)
}
/** 删除按钮操作 */ /** 删除按钮操作 */
const handleDelete = async (id : number) => { const handleDelete = async (id : number) => {
@ -295,6 +311,19 @@ const handleTur = async (id: number) => {
} catch { } } 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 exportLoading = ref(false) //
const handleExport = async () => { const handleExport = async () => {
@ -311,13 +340,6 @@ const handleExport = async () => {
} }
} }
//
const { tableObject: detatableData, tableMethods: detatableMethods } = useTable({
getListApi: SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage
})
const { getList: getDetailList } = detatableMethods
const detailTableColumns = ref(SupplierdeliverRequestDetail.allSchemas.tableColumns) const detailTableColumns = ref(SupplierdeliverRequestDetail.allSchemas.tableColumns)
const detailListTableColumns = detailTableColumns.value.filter(item => item.label != '操作' && item.label != '创建者' && item.label != '创建时间' && item.label != '最后更新者' && item.label != '最后更新时间') const detailListTableColumns = detailTableColumns.value.filter(item => item.label != '操作' && item.label != '创建者' && item.label != '创建时间' && item.label != '最后更新者' && item.label != '最后更新时间')
const dialogVisible = ref(false) const dialogVisible = ref(false)
@ -347,14 +369,14 @@ const BASE_URL = 'http://dev.ccwin-in.com:25110'
const src = ref(BASE_URL + '/jmreport/view/881303562245316608?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/881303562245316608?token=' + getAccessToken())
const genLabelId = ref(); const genLabelId = ref();
// //
const pointRef = ref()
const handlePoint = async (row) => { const handlePoint = async (row) => {
tableObject.params = {
masterId: row.id, pointRef.value.openPoint(row.id)
} // console.log(tableObject.params);
await getDetailList() // dialogVisible.value = true
dialogVisible.value = true // dialogTitle.value = row.number + ''
dialogTitle.value = row.number + '单据号' // genLabelId.value = row.number
genLabelId.value = row.number
} }
const print = async () => { const print = async () => {

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