Browse Source

Merge remote-tracking branch 'origin/master_hella' into master_hella

master_hella_20240701
gaojs 5 months ago
parent
commit
26992200b3
  1. 5
      src/api/qms/inspectionTemplate/index.ts
  2. 13
      src/api/wms/purchasereceiptRecordDetail/index.ts
  3. 11
      src/api/wms/purchasereceiptRecordMain/index.ts
  4. 29
      src/views/qms/inspectionTemplate/index.vue
  5. 2
      src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts
  6. 1
      src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue
  7. 331
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/index.vue
  8. 1979
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/purchasereceiptRecordMain.data.ts

5
src/api/qms/inspectionTemplate/index.ts

@ -37,3 +37,8 @@ export const enableInspectionTemplate = async (id: number) => {
export const disableInspectionTemplate = async (id: number) => {
return await request.disable({ url: `/qms/programme-template/disable?id=` + id })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/qms/programme-template/get-import-template' })
}

13
src/api/wms/purchasereceiptRecordDetail/index.ts

@ -61,6 +61,19 @@ export const getPurchasereceiptRecordDetailPage = async (params) => {
}
}
// 查询采购拒收记录
export const getPurchasereceiptRecordDetailRefusePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchasereceipt-record-detail/seniorRefuse', data })
} else {
return await request.get({ url: `/wms/purchasereceipt-record-detail/pageRefuse`, params })
}
}
// 查询备件收货记录子列表
export const getPurchasereceiptRecordDetailPageSpare = async (params) => {
if (params.isSearch) {

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

@ -89,6 +89,17 @@ export const exportPurchasereceiptRecordMain = async (params) => {
}
}
// 导出采购收货记录主 Excel
export const exportPurchasereceiptRecordRefuseMain = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchasereceipt-record-main/export-excel-senior-refuse`, data })
} else {
return await request.download({ url: `/wms/purchasereceipt-record-main/export-excel-refuse`, params })
}
}
// 导出备件收货记录
export const exportSparereceiptRecordMain = async (params) => {
if (params.isSearch) {

29
src/views/qms/inspectionTemplate/index.vue

@ -56,7 +56,15 @@
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/agv-locationrelation/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm
ref="importFormRef"
url="/qms/programme-template/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
:coverIsDisable="true"
:mode="2"
/>
</template>
<script setup lang="ts">
@ -94,7 +102,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'qms:programme-template:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:agv-locationrelation:import'}), //
defaultButtons.defaultImportBtn({hasPermi:'qms:programme-template:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'wms:agv-locationrelation:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -220,9 +228,26 @@ const searchFormClick = (searchData) => {
getList() //
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '检验方案导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await InspectionProcessPageApi.importTemplate()
})
</script>

2
src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts

@ -254,7 +254,7 @@ export const AreaRules = reactive({
{ validate: validateYS, message: '请输入正确的代码', trigger: 'blur' }
],
name: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ required: true, max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }

1
src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue

@ -70,6 +70,7 @@
:apiPage="CountadjustRequestDetailApi.getCountadjustRequestDetailPage"
:apiDelete="CountadjustRequestDetailApi.deleteCountadjustRequestDetail"
fromeWhere="countadjustRequest"
:detailButtonIsShowAdd="false"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>

331
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/index.vue

@ -0,0 +1,331 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="[...PurchasereceiptRecordMain.allSchemas.searchSchema,...PurchasereceiptRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="PurchasereceiptRecordMain.allSchemas"
:detailAllSchemas="PurchasereceiptRecordDetail.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
@success="getList"
:rules="PurchasereceiptRecordMainRules"
:formAllSchemas="PurchasereceiptRecordMain.allSchemas"
:tableAllSchemas="PurchasereceiptRecordDetail.allSchemas"
:tableFormRules="PurchasereceiptRecordDetailRules"
:isBusiness="true"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="PurchasereceiptRecordMain.allSchemas"
:detailAllSchemas="detailAllSchemas"
:detailAllSchemasRules="PurchasereceiptRecordDetailRules"
:apiPage="apiPage"
:tabs="PurchasereceiptRequestTabsList"
@changeTabs="changeTabs"
:buttondataTable="buttondataTable"
@tableFormButton="tableFormButton"
/>
<!-- 记录子包装弹窗 -->
<BasicForm
ref="detailParenPackingRef"
@success="getList"
:tableAllSchemas="PurchasereceiptRecordDetailPackingNumber.allSchemas"
:tableFormRules="PurchasereceiptRecordDetailRules"
:tableData="packingDetatableData.tableList"
:isBusiness="true"
:isShowButton="false"
:isShowReduceButton="false"
:isShowFooterButtton="false"
/>
<!-- 缺货子包装弹窗 -->
<BasicForm
ref="outStockDetailParenPackingRef"
@success="getList"
:tableAllSchemas="PurchasereceiptRecordDetailPackingNumber.allSchemas"
:tableFormRules="PurchasereceiptRecordDetailRules"
:tableData="outStockPackingDetatableData.tableList"
:isBusiness="true"
:isShowButton="false"
:isShowReduceButton="false"
:isShowFooterButtton="false"
/>
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
width="90%"
append-to-body
destroy-on-close
>
<iframe height="600px" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { PurchasereceiptRecordMain,
PurchasereceiptRecordMainRules,
PurchasereceiptRecordDetail,
PurchasereceiptRecordDetailRules,
PurchasereceiptRecordDetailPackingNumber } from './purchasereceiptRecordMain.data'
import * as PurchasereceiptRecordMainApi from '@/api/wms/purchasereceiptRecordMain'
import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { getReportUrl } from '@/utils/systemParam'
//
defineOptions({ name: 'PurchasereceiptRecordRefuseMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const apiPage = ref(routeName.value.includes('SCP')?PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageSCP:PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailRefusePage)
const tableColumns = ref([...PurchasereceiptRecordMain.allSchemas.tableColumns,...PurchasereceiptRecordDetail.allSchemas.tableMainColumns])
const detailAllSchemas = ref(PurchasereceiptRecordDetail.allSchemas)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: routeName.value.includes('SCP')?PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageSCP:PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailRefusePage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:'wms:purchasereceipt-record-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
getList()
}
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),//
defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),//
defaultButtons.mainListPlanCheckQualityReportBtn({}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'putawayRequest') { //
handleCreatePutawayRequest(row.number)
}else if(val == 'inspectRequest'){//
handleCreateInspectRequest(row.number)
}else if(val == 'mainPlanCheckQualityReport'){
//
checkQualityReport(row)
}
}
//
const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row)=>{
showQualityReport.value = true
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}
/** 生成采购上架申请按钮操作 */
const handleCreatePutawayRequest = async (number:string) => {
try{
await message.confirm(t('ts.确认生成上架申请吗?'))
tableObject.loading = true
await PurchasereceiptRecordMainApi.createPutawayRequest(number)
message.success(t('ts.上架申请生成成功'))
await getList()
}catch{}finally{
tableObject.loading = false
}
}
/** 生成到货检验申请按钮操作 */
const handleCreateInspectRequest = async (number:string) => {
try{
await message.confirm(t('ts.确认生成到货检验申请吗?'))
tableObject.loading = true
await PurchasereceiptRecordMainApi.createInspectRequest(number)
message.success(t('ts.到货检验申请生成成功'))
await getList()
}catch{}finally{
tableObject.loading = false
}
}
//
const detailParenPackingRef = ref()
const { tableObject: packingDetatableData, tableMethods: packDetatableMethods } = useTable({
getListApi: PurchasereceiptRecordDetailApi.queryPurchaseceiptChildPackingNumber
})
const { getList:queryDetailList } = packDetatableMethods
//
const outStockDetailParenPackingRef = ref()
const { tableObject: outStockPackingDetatableData, tableMethods: outStockPackDetatableMethods } = useTable({
getListApi: PurchasereceiptRecordDetailApi.queryPurchaseshortageChildPackingNumber
})
const { getList:queryOutStockDetailList } = outStockPackDetatableMethods
//
const { wsCache } = useCache()
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue,'recordPurchasereceiptMain')
}
// table
const buttondataTable = ref([{
label: t('ts.查看其他包装规格'),
name: 'viewParentPickingNumber',
hide: false,
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
}])
const tabeKey = ref("receiptDetail");
//
const tableFormButton = async (val , row) => {
if (val == 'viewParentPickingNumber' && tabeKey.value == 'receiptDetail') { //
packingDetatableData.params = {
masterId:row.masterId,
parentPackingNumber:row.packingNumber
}
await queryDetailList()
detailParenPackingRef.value.open('create', row, null,'viewDetail')//
}
if (val == 'viewParentPickingNumber' && tabeKey.value == 'scarceGoodsDetail') { //
outStockPackingDetatableData.params = {
masterId:row.masterId,
parentPackingNumber:row.packingNumber
}
await queryOutStockDetailList()
outStockDetailParenPackingRef.value.open('create', row, null,'viewDetail')//
}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
if(routeName.value.includes('SCP')){
const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMainSCP(tableObject.params)
download.excel(data, `${t('ts.采购收货记录主')}.xlsx`)
}else{
const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordRefuseMain(tableObject.params)
download.excel(data, `${t('ts.采购收货记录主')}.xlsx`)
}
} catch {
} finally {
exportLoading.value = false
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
// tabs
const changeTabs = (data) =>{
if(data.prop == 'receiptDetail'){
console.log(data)
apiPage.value = routeName.value.includes('SCP')?PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageSCP:PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage
detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas
tabeKey.value = 'receiptDetail'
}else if(data.prop == 'scarceGoodsDetail'){
apiPage.value = PurchasereceiptRecordDetailApi.getScarceGoodsDetailPage
detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas
tabeKey.value = 'scarceGoodsDetail'
}
}
/** 初始化 **/
onMounted(async () => {
getList()
})
</script>

1979
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/purchasereceiptRecordMain.data.ts

File diff suppressed because it is too large
Loading…
Cancel
Save