chenfang 11 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. 30
      src/api/wms/unplannedissueRequestMain/index.ts
  7. 59
      src/components/BasicForm/src/BasicForm.vue
  8. 78
      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. 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. 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) => { 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) => { 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)

78
src/components/Detail/src/Detail.vue

@ -67,8 +67,9 @@
:data="tableObjectRef.tableList" :data="tableObjectRef.tableList"
:allList="allList" :allList="allList"
:countScopeType="countScopeType" :countScopeType="countScopeType"
:key="updateKey"
> >
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase <ButtonBase
:Butttondata="buttondata" :Butttondata="buttondata"
@button-base-click="buttonTableClick($event, row)" @button-base-click="buttonTableClick($event, row)"
@ -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)
@ -324,18 +342,27 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
getFileList() getFileList()
getChangeRecordList() getChangeRecordList()
// //
if(routeName.value.indexOf('Job') > -1){ if (routeName.value.indexOf('Job') > -1) {
HeadButttondata.value = [ HeadButttondata.value = [
defaultButtons.defaultFilterBtn(null) // defaultButtons.defaultFilterBtn(null) //
] ]
}else{ } else {
HeadButttondata.value = [ HeadButttondata.value = [
defaultButtons.defaultAddBtn({ defaultButtons.defaultAddBtn({
hide: isShowMainButton(row, ['1']) hide: isShowMainButton(row, ['1'])
}), // }), //
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,25 +509,27 @@ 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 //
}) })
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters
? searchData.filters ? searchData.filters
: [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }] : [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }]
} }
detailAllSchemasRef.value = props.detailAllSchemas detailAllSchemasRef.value = props.detailAllSchemas
tableObjectRef.value = tableObject tableObjectRef.value = tableObject
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,10 +538,13 @@ const searchFormClick = (searchData) => {
// } // }
// getList() // // getList() //
} }
//
const selectChangeDetail = (field, val) => {
emit('selectChangeDetail', field, val)
}
// //
watch( watch(
() =>props.apiPage, () => props.apiPage,
() => { () => {
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage // getListApi: 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: '操作',

123
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') {
@ -570,7 +691,7 @@ const getItembasicAllList = async () => {
// //
const getWarehouseAllList = async () => { const getWarehouseAllList = async () => {
await WarehouseApi.getWarehouseList({ available: 'TRUE' }).then((res) => { await WarehouseApi.getWarehouseList({ available: 'TRUE' }).then((res) => {
allList.value.warehouseAllList = res.map((element) => { allList.value.warehouseAllList = res.map((element) => {
return { return {
value: element.code, value: element.code,
label: element.name label: element.name

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), //
] ]
} }

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