ljlong_2630 1 week ago
parent
commit
72f1c565bd
  1. 5
      src/api/wms/supplierdeliverRecordMain/index.ts
  2. 5
      src/api/wms/supplierdeliverRequestMain/index.ts
  3. 25
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  4. 195
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue
  5. 11
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  6. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts
  7. 2
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

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

@ -81,6 +81,11 @@ export const importTemplate = () => {
return request.download({ url: '/wms/supplierdeliver-record-main/get-import-template' }) return request.download({ url: '/wms/supplierdeliver-record-main/get-import-template' })
} }
// 打印发货单前查询物料的状态,从而确定使用哪个积木模版
export const getItemStatus = async (id) => {
return await request.post({ url: `/wms/supplierdeliver-record-main/getItemStatus?id=` + id })
}
// 创建采购申请 // 创建采购申请
export const createPurchasereceiptRequest = async (number:string) => { export const createPurchasereceiptRequest = async (number:string) => {
return await request.post({ url: `/wms/supplierdeliver-record-main/createPurchasereceiptRequest?number=`+number }) return await request.post({ url: `/wms/supplierdeliver-record-main/createPurchasereceiptRequest?number=`+number })

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

@ -126,6 +126,11 @@ export const deleteOldLabels = async (id) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/deleteOldLabels?id=` + id }) return await request.post({ url: `/wms/supplierdeliver-request-main/deleteOldLabels?id=` + id })
} }
// 打印发货单前查询物料的状态,从而确定使用哪个积木模版
export const getItemStatus = async (id) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/getItemStatus?id=` + id })
}
// 查看履历表 // 查看履历表
export const querySupplierResume = (asnNumber:string) => { export const querySupplierResume = (asnNumber:string) => {
return request.get({ url: `/wms/supplierdeliver-request-main/querySupplierResume?asnNumber=` + asnNumber }) return request.get({ url: `/wms/supplierdeliver-request-main/querySupplierResume?asnNumber=` + asnNumber })

25
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue

@ -266,13 +266,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}).then((res) => { }).then((res) => {
fromManagementPrecision.value = res[0].ManagementPrecision fromManagementPrecision.value = res[0].ManagementPrecision
}) })
// if (fromManagementPrecision.value == 'BY_QUANTITY') { if (fromManagementPrecision.value == 'BY_QUANTITY') {
// newRow['batchFormItemType'] = 'FormDate' newRow['batchFormItemType'] = 'FormDate'
// newRow['disabled_batch'] = false newRow['disabled_batch'] = false
// } else { newRow['batch'] = formatDate(new Date(),'YYYYMMDD')
// newRow['batchFormItemType'] = '' } else {
// newRow['disabled_batch'] = true newRow['batchFormItemType'] = ''
// } newRow['disabled_batch'] = true
}
if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode'])){ if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode'])){
messageItemCodes.push(item['itemCode']) messageItemCodes.push(item['itemCode'])
@ -548,6 +549,14 @@ const buttonTableClick = async (val, row) => {
masterId:row.masterId masterId:row.masterId
} }
await getDetailList() await getDetailList()
console.log(22,detatableData)
detatableData.tableList.forEach(item => {
if (!item.batch) {
item.batch=formatDate(new Date(),'YYYYMMDD')
}
})
// //
// dialogVisible.value = true // dialogVisible.value = true
detatableData.tableList.map((item) => { detatableData.tableList.map((item) => {
@ -894,7 +903,7 @@ const handlePoint = async (row) => {
const searchTableRef = ref() const searchTableRef = ref()
const labelPrint = async (row) => { const labelPrint = async (row) => {
tableObject.loading = true tableObject.loading = true
const defaultParams = {'moduleName':'productreceipt_predict','recordNumber':row.number} const defaultParams = {'moduleName':'productreceipt_predict','recordNumber':row.number,batch:row.batch}
const {tableObject:tableObjectPrint ,tableMethods} = useTable({ const {tableObject:tableObjectPrint ,tableMethods} = useTable({
defaultParams, defaultParams,
getListApi: PackageApi.getLabelDetailPage // getListApi: PackageApi.getLabelDetailPage //

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

@ -1,7 +1,14 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="[...SupplierdeliverRecordMain.allSchemas.searchSchema,...SupplierdeliverRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> <Search
:schema="[
...SupplierdeliverRecordMain.allSchemas.searchSchema,
...SupplierdeliverRecordDetail.allSchemas.searchSchema
]"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -17,7 +24,8 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table v-clientTable <Table
v-clientTable
:columns="tableColumns" :columns="tableColumns"
:data="tableObject.tableList" :data="tableObject.tableList"
:loading="tableObject.loading" :loading="tableObject.loading"
@ -28,13 +36,16 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #number="{row}"> <template #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row,$index }"> <template #action="{ row, $index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase
:Butttondata="butttondata(row, $index)"
@button-base-click="buttonTableClick($event, row)"
/>
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -53,35 +64,41 @@
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail
ref="detailRef" ref="detailRef"
:annexTable="[{ :annexTable="[
{
label: '质检明细', label: '质检明细',
prop: 'uploadFile', prop: 'uploadFile',
hasPermi:'wms:supplierdeliver-request-main:uploadCheck', hasPermi: 'wms:supplierdeliver-request-main:uploadCheck',
tableName:'SupplierdeliverInspectionDetail', tableName: 'SupplierdeliverInspectionDetail',
hasSubDetail:true, // hasSubDetail: true, //
showPreview:true, // showPreview: true, //
showDownload:true, showDownload: true,
hiddenDelete:true, hiddenDelete: true,
hiddenUpload:true, hiddenUpload: true,
align:'left', align: 'left',
queryParams:[{ queryParams: [
queryField:'tableId', {
rowField:'annexMasterId', queryField: 'tableId',
}], rowField: 'annexMasterId'
}
],
// //
subDetailTableData:{ subDetailTableData: {
queryParams:[{ queryParams: [
queryField:'masterId', {
rowField:'annexMasterId', queryField: 'masterId',
}], // rowField: 'annexMasterId'
getSubList:SupplierdeliverInspectionDetailApi.getSupplierdeliverInspectionDetailPage,// }
tableColumns:SupplierdeliverInspectionDetail.allSchemas.tableColumns, ], //
tableList:[],// getSubList: SupplierdeliverInspectionDetailApi.getSupplierdeliverInspectionDetailPage, //
total:1, tableColumns: SupplierdeliverInspectionDetail.allSchemas.tableColumns,
pageSize:10, tableList: [], //
currentPage:1, total: 1,
pageSize: 10,
currentPage: 1
}
} }
}]" ]"
:isBasic="false" :isBasic="false"
:allSchemas="SupplierdeliverRecordMain.allSchemas" :allSchemas="SupplierdeliverRecordMain.allSchemas"
:detailAllSchemas="SupplierdeliverRecordDetail.allSchemas" :detailAllSchemas="SupplierdeliverRecordDetail.allSchemas"
@ -103,15 +120,22 @@
:isShowReduceButton="false" :isShowReduceButton="false"
:isShowFooterButtton="false" :isShowFooterButtton="false"
/> />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import * as SupplierdeliverInspectionDetailApi from '@/api/wms/supplierdeliverInspectionDetail' import * as SupplierdeliverInspectionDetailApi from '@/api/wms/supplierdeliverInspectionDetail'
import {   SupplierdeliverInspectionDetail,SupplierdeliverInspectionDetailRules} from '../supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data' import {
import { SupplierdeliverRecordMain,SupplierdeliverRecordMainRules, SupplierdeliverInspectionDetail,
SupplierdeliverRecordDetail,SupplierdeliverRecordDetailRules,SupplierdeliverRecordDetailPickingNumer } from './supplierdeliverRecordMain.data' SupplierdeliverInspectionDetailRules
} from '../supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data'
import {
SupplierdeliverRecordMain,
SupplierdeliverRecordMainRules,
SupplierdeliverRecordDetail,
SupplierdeliverRecordDetailRules,
SupplierdeliverRecordDetailPickingNumer
} from './supplierdeliverRecordMain.data'
import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain' import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain'
import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail' import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail'
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail'
@ -121,6 +145,8 @@ import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { getJmreportBaseUrl } from '@/utils/systemParam' import { getJmreportBaseUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading' import { usePageLoading } from '@/hooks/web/usePageLoading'
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain'
import { SupplierdeliverRequestMainRules } from '../supplierdeliverRequestMain/supplierdeliverRequestMain.data'
const { loadStart, loadDone } = usePageLoading() const { loadStart, loadDone } = usePageLoading()
// //
defineOptions({ name: 'SupplierdeliverRecordMain' }) defineOptions({ name: 'SupplierdeliverRecordMain' })
@ -131,7 +157,10 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref([...SupplierdeliverRecordMain.allSchemas.tableColumns,...SupplierdeliverRecordDetail.allSchemas.tableMainColumns]) const tableColumns = ref([
...SupplierdeliverRecordMain.allSchemas.tableColumns,
...SupplierdeliverRecordDetail.allSchemas.tableMainColumns
])
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -147,10 +176,10 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:'wms:supplierdeliver-record-main:export'}), // defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierdeliver-record-main:export' }), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null) //
// { // {
// label: '', // label: '',
// name: 'zdy', // name: 'zdy',
@ -163,95 +192,116 @@ const HeadButttondata = [
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'export') { // if (val == 'export') {
//
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') {
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { //
if (tableObject.params.filters && tableObject.params.filters.length > 0) {
searchFormClick({ searchFormClick({
filters: tableObject.params.filters filters: tableObject.params.filters
}) })
} else { } else {
getList() getList()
} }
} else if (val == 'filtrate') { // } else if (val == 'filtrate') {
} else { // //
} else {
//
console.log('其他按钮', item) console.log('其他按钮', item)
} }
} }
// - // -
const butttondata = (row,$index) => { const butttondata = (row, $index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 const findIndex = row['masterId']
if(findIndex>-1&&findIndex<$index){ ? tableObject.tableList.findIndex((item) => item['masterId'] == row['masterId'])
: -1
if (findIndex > -1 && findIndex < $index) {
return [] return []
} }
return [ return [
defaultButtons.mainListGenerateApplicationBtn({hasPermi:'wms:supplierdeliver-record-main:createPurchasereceiptRequest',hide:!row.purchasereceiptRequestFlag}), // defaultButtons.mainListGenerateApplicationBtn({
hasPermi: 'wms:supplierdeliver-record-main:createPurchasereceiptRequest',
hide: !row.purchasereceiptRequestFlag
}), //
defaultButtons.mainListDocumentPrintBtn({}) // defaultButtons.mainListDocumentPrintBtn({}) //
] ]
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if(val == 'generateApplication'){ if (val == 'generateApplication') {
handlerCreatePurchasereceiptRequest(row.number) handlerCreatePurchasereceiptRequest(row.number)
}else if (val == 'documentPrint') { } else if (val == 'documentPrint') {
// //
handleDocumentPrint(row.masterId) handleDocumentPrint(row.masterId)
} }
} }
/** 生成采购收货申请按钮操作 */ /** 生成采购收货申请按钮操作 */
const handlerCreatePurchasereceiptRequest = async (number:string) => { const handlerCreatePurchasereceiptRequest = async (number: string) => {
try{ try {
await message.confirm(t('ts.确认生成采购申请吗?')) await message.confirm(t('ts.确认生成采购申请吗?'))
tableObject.loading = true tableObject.loading = true
await SupplierdeliverRecordMainApi.createPurchasereceiptRequest(number) await SupplierdeliverRecordMainApi.createPurchasereceiptRequest(number)
message.success(t('ts.采购申请生成成功')) message.success(t('ts.采购申请生成成功'))
await getList() await getList()
}catch{}finally{ } catch {
} finally {
tableObject.loading = false tableObject.loading = false
} }
} }
// //
const BASE_URL = getJmreportBaseUrl() const BASE_URL = getJmreportBaseUrl()
//const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken()) //
const documentSrc = ref(BASE_URL + '/jmreport/view/1019060741381099520?token=' + getAccessToken()) const documentSrc = ref(BASE_URL + '/jmreport/view/1019060741381099520?token=' + getAccessToken())
//
const documentSrc2 = ref(BASE_URL + '/jmreport/view/1019406772438372352?token=' + getAccessToken())
const handleDocumentPrint = async (id) => { const handleDocumentPrint = async (id) => {
await SupplierdeliverRecordMainApi.getItemStatus(id).then(async (res) => {
if (res) {
//
window.open(documentSrc2.value + '&id=' + id)
} else {
window.open(documentSrc.value + '&id=' + id) window.open(documentSrc.value + '&id=' + id)
}
})
} }
// //
const detailParenPackingRef = ref() const detailParenPackingRef = ref()
const { tableObject: detatableData, tableMethods: detatableMethods } = useTable({ const { tableObject: detatableData, tableMethods: detatableMethods } = useTable({
getListApi: SupplierdeliverRecordDetailApi.queryChildPickingNumber getListApi: SupplierdeliverRecordDetailApi.queryChildPickingNumber
}) })
const { getList:getDetailList } = detatableMethods const { getList: getDetailList } = detatableMethods
// //
const { wsCache } = useCache() const { wsCache } = useCache()
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any) => { const openDetail = async (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name const departmentCode = wsCache
.get(CACHE_KEY.DEPT)
.find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
//masterId //masterId
const { tableObject: requestTableObject, tableMethods:requestTableMethods } = useTable({ const { tableObject: requestTableObject, tableMethods: requestTableMethods } = useTable({
getListApi: SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage // getListApi: SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage //
}) })
const { getList:requestGetList } = requestTableMethods const { getList: requestGetList } = requestTableMethods
requestTableObject.params.number = row.requestNumber requestTableObject.params.number = row.requestNumber
await requestGetList() await requestGetList()
if(requestTableObject.tableList.length>0){ if (requestTableObject.tableList.length > 0) {
row.annexMasterId = requestTableObject.tableList[0].masterId row.annexMasterId = requestTableObject.tableList[0].masterId
detailRef.value.openDetail(row, titleName, titleValue,'recordSupplierdeliverMain') detailRef.value.openDetail(row, titleName, titleValue, 'recordSupplierdeliverMain')
} }
} }
// table // table
const buttondataTable = ref([{ const buttondataTable = ref([
{
label: t('ts.查看其他包装规格'), label: t('ts.查看其他包装规格'),
name: 'viewParentPickingNumber', name: 'viewParentPickingNumber',
hide: false, hide: false,
@ -259,19 +309,20 @@ const buttondataTable = ref([{
icon: '', icon: '',
color: '', color: '',
hasPermi: '', hasPermi: '',
link: true, // link: true //
}]) }
])
// //
const tableFormButton = async (val , row) => { const tableFormButton = async (val, row) => {
if (val == 'viewParentPickingNumber') { // if (val == 'viewParentPickingNumber') {
//
detatableData.params = { detatableData.params = {
masterId:row.masterId, masterId: row.masterId,
parentPackingNumber:row.packingNumber parentPackingNumber: row.packingNumber
} }
await getDetailList() await getDetailList()
detailParenPackingRef.value.open('create', row, null,'viewDetail')// detailParenPackingRef.value.open('create', row, null, 'viewDetail') //
} }
} }
@ -283,7 +334,9 @@ const handleExport = async () => {
// //
loadStart() loadStart()
const excelTitle = ref(route.meta.title) const excelTitle = ref(route.meta.title)
const data = await SupplierdeliverRecordMainApi.exportSupplierdeliverRecordMain(tableObject.params) const data = await SupplierdeliverRecordMainApi.exportSupplierdeliverRecordMain(
tableObject.params
)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
@ -300,8 +353,6 @@ const searchFormClick = (searchData) => {
getList() // getList() //
} }
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

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

@ -1238,10 +1238,19 @@ const print = async () => {
} }
// //
// const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken()) //
const documentSrc = ref(BASE_URL + '/jmreport/view/1019060741381099520?token=' + getAccessToken()) const documentSrc = ref(BASE_URL + '/jmreport/view/1019060741381099520?token=' + getAccessToken())
//
const documentSrc2 = ref(BASE_URL + '/jmreport/view/1019406772438372352?token=' + getAccessToken())
const handleDocumentPrint = async (id) => { const handleDocumentPrint = async (id) => {
await SupplierdeliverRequestMainApi.getItemStatus(id).then(async (res) => {
if (res) {
//
window.open(documentSrc2.value + '&id=' + id)
} else {
window.open(documentSrc.value + '&id=' + id) window.open(documentSrc.value + '&id=' + id)
}
})
} }
/** /**

2
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

@ -1831,7 +1831,7 @@ export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[
}, },
tableForm: { tableForm: {
type: 'InputNumber', type: 'InputNumber',
precision: 0, precision: 6,
min:0 min:0
} }
}, },

2
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -2302,7 +2302,7 @@ export const ClaimDetails = useCrudSchemas(reactive<CrudSchema[]>([
}, },
{ {
label: '索赔金额', label: '索赔金额',
field: 'claimQty', field: 'claimAmount',
table: { table: {
width: 150 width: 150
}, },

Loading…
Cancel
Save