Browse Source

采购索赔用例上传

master
yejiaxing 11 months ago
parent
commit
12c5c5aa91
  1. 26
      src/api/wms/purchaseclaimRequestMain/index.ts
  2. 7
      src/api/wms/supplierdeliverRecordDetail/index.ts
  3. 5
      src/api/wms/supplierinvoiceRequestMain/index.ts
  4. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  5. 30
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/purchaseclaimRecordMain.data.ts
  6. 143
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue
  7. 30
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/purchaseclaimRequestMain.data.ts
  8. 24
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

26
src/api/wms/purchaseclaimRequestMain/index.ts

@ -51,6 +51,30 @@ export const deletePurchaseclaimRequestMain = async (id: number) => {
return await request.delete({ url: `/wms/purchaseclaim-request-main/delete?id=` + id })
}
// 打开供应商发货申请主
export const opePurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/open?id=` + id })
}
// 关闭供应商发货申请主
export const cloPurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/close?id=` + id })
}
// 提交审批供应商发货申请主
export const subPurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/sub?id=` + id })
}
// 审批通过供应商发货申请主
export const appPurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/app?id=` + id })
}
// 驳回供应商发货申请主
export const rejPurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/rej?id=` + id })
}
// 处理
export const genRecordsPurchaseclaimRequestMain = async (id) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/genRecords?id=` + id })
}
// 导出采购索赔申请主 Excel
export const exportPurchaseclaimRequestMain = async (params) => {
return await request.download({ url: `/wms/purchaseclaim-request-main/export-excel`, params })
@ -59,4 +83,4 @@ export const exportPurchaseclaimRequestMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchaseclaim-request-main/get-import-template' })
}
}

7
src/api/wms/supplierdeliverRecordDetail/index.ts

@ -51,6 +51,11 @@ export const getSupplierdeliverRecordDetailPage = async (params) => {
}
}
// 查询采供应商发货记录子列表
export const getSupplierdeliverRecordDetailList = async (params) => {
return await request.get({ url: `/wms/supplierdeliver-record-detail/allList`, params })
}
// 查询供应商发货记录子详情
export const getSupplierdeliverRecordDetail = async (id: number) => {
return await request.get({ url: `/wms/supplierdeliver-record-detail/get?id=` + id })
@ -79,4 +84,4 @@ export const exportSupplierdeliverRecordDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/supplierdeliver-record-detail/get-import-template' })
}
}

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

@ -55,8 +55,3 @@ export const deleteSupplierinvoiceRequestMain = async (id: number) => {
export const exportSupplierinvoiceRequestMain = async (params) => {
return await request.download({ url: `/wms/supplierinvoice-request-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/supplierinvoice-request-main/get-import-template' })
}

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

@ -221,7 +221,7 @@
handleApp(row.id)
} else if (val == 'mainPlanTur') { //
handleTur(row.id)
}else if (val == 'genRecords') { //
}else if (val == 'genRecords') { //
genRecords(row.id)
}else if (val == 'edit') { //
openForm('update', row)

30
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/purchaseclaimRecordMain.data.ts

@ -240,14 +240,6 @@ export const PurchaseclaimRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
}
},
{
label: '替代批次',
field: 'altBatch',
sort: 'custom',
table: {
width: 150
}
},
{
label: '订单号',
field: 'poNumber',
@ -268,7 +260,6 @@ export const PurchaseclaimRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '原因',
field: 'reason',
isTable: true,
dictType: DICT_TYPE.PURCHASE_RETURN_REASON,
dictClass: 'string',
sort: 'custom',
table: {
@ -313,25 +304,6 @@ export const PurchaseclaimRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
}
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
}
},
{
label: '任务明细ID',
field: 'jobDetailId',
sort: 'custom',
table: {
width: 150
}
},
{
label: '是否可用',
field: 'available',
@ -398,4 +370,4 @@ export const PurchaseclaimRecordDetailRules = reactive({
creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})
})

143
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue

@ -55,6 +55,7 @@
import { getAccessToken } from '@/utils/auth'
import download from '@/utils/download'
import * as PurchaseclaimRequestMainApi from '@/api/wms/purchaseclaimRequestMain'
import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail'
import * as PurchaseclaimRequestDetailApi from '@/api/wms/purchaseclaimRequestDetail'
import { PurchaseclaimRequestMain, PurchaseclaimRequestMainRules, PurchaseclaimRequestDetail, PurchaseclaimRequestDetailRules } from './purchaseclaimRequestMain.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -79,10 +80,10 @@
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
row['poLine'] = val[0]['poLine']
@ -99,11 +100,10 @@
//
const setV = {}
setV[formField] = val[0][searchField]
if(formField=='asnNumber'){
// getBomDisassemble
PurchasePlanDetailApi.getPurchasePlanDetailList({
number: val[0]['asnNumber']}).then(res => {
// getSupplierdeliverRecordDetailList
SupplierdeliverRecordDetailApi.getSupplierdeliverRecordDetailList({
asnNumber: val[0]['asnNumber']}).then(res => {
if (res) tableData.value = res;
tableData.value.forEach(item=>{
item.batch = item.toBatch
@ -113,11 +113,6 @@
console.log(err)
})
}
setV['ppNumber'] = val[0]['ppNumber']
setV['supplierCode'] = val[0]['supplierCode']
formRef.setValues(setV)
@ -128,7 +123,7 @@
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
console.log(456)
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
setV['poLine'] = val[0]['poLine']
@ -189,14 +184,25 @@
// -
const buttondata = (row) => {
return [
defaultButtons.mainListCloseBtn({ hide: isShowMainButton(row, ['1', '2', '3', '4', '6']) }), //
defaultButtons.mainListReAddBtn({ hide: isShowMainButton(row, ['4', '5']) }), //
defaultButtons.mainListSubmitBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListTurnDownBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListApproveBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4']) }), //
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchaseclaim-request-main:update' }), //
defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchaseclaim-request-main:delete' }), //
defaultButtons.mainListPointBtn(null), //
//
{
label: '处理',
name: 'genRecords',
hide: isShowMainButton(row, ['3']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
},
]
}
@ -211,17 +217,19 @@
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
} else if (val == 'edit') { //
if (val == 'mainPurPlanOpe') { //
handleOpe(row.id)
} else if (val == 'mainPurPlanClo') {//
handleClo(row.id)
} else if (val == 'mainPlanSub') { //
handleSub(row.id)
} else if (val == 'mainPlanApp') { //
handleApp(row.id)
} else if (val == 'mainPlanTur') { //
handleTur(row.id)
}else if (val == 'genRecords') { //
genRecords(row.id)
}else if (val == 'edit') { //
// const res = await ItempackagingApi.getItempackaging(row.id)
openForm('update', row)
} else if (val == 'delete') { //
@ -260,6 +268,85 @@
await getList()
} catch { }
}
/** 关闭按钮操作 */
const handleClo = async (id : number) => {
try {
//
await message.confirm('是否关闭所选中数据?')
//
await PurchaseclaimRequestMainApi.cloPurchaseclaimRequestMain(id)
message.success(t('关闭成功!'))
//
await getList()
} catch { }
}
/** 打开按钮操作 */
const handleOpe = async (id : number) => {
try {
//
await message.confirm('是否打开所选中数据?')
//
await PurchaseclaimRequestMainApi.opePurchaseclaimRequestMain(id)
message.success(t('打开成功!'))
//
await getList()
} catch { }
}
/** 提交审批按钮操作 */
const handleSub = async (id : number) => {
try {
//
await message.confirm('是否提交审批所选中数据?')
//
await PurchaseclaimRequestMainApi.subPurchaseclaimRequestMain(id)
message.success(t('提交审批成功!'))
//
await getList()
} catch { }
}
/** 审批通过按钮操作 */
const handleApp = async (id : number) => {
try {
//
await message.confirm('是否审批通过所选中数据?')
//
await PurchaseclaimRequestMainApi.appPurchaseclaimRequestMain(id)
message.success(t('审批通过成功!'))
//
await getList()
} catch { }
}
/** 驳回按钮操作 */
const handleTur = async (id : number) => {
try {
//
await message.confirm('是否驳回所选中数据?')
//
await PurchaseclaimRequestMainApi.rejPurchaseclaimRequestMain(id)
message.success(t('驳回成功!'))
//
await getList()
} catch { }
}
/** 处理按钮操作 */
const genRecords = async (id : number) => {
try {
//
await message.confirm('是否处理所选中数据?')
//
await PurchaseclaimRequestMainApi.genRecordsPurchaseclaimRequestMain(id)
message.success(t('处理成功!'))
//
await getList()
} catch { }
}
/** 导出按钮操作 */
const handleExport = async () => {

30
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/purchaseclaimRequestMain.data.ts

@ -375,13 +375,6 @@ export const PurchaseclaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
},
{
label: '替代批次',
field: 'altBatch',
table: {
width: 150
},
},
{
label: '原因',
field: 'reason',
@ -436,27 +429,6 @@ export const PurchaseclaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
},
{
label: '物品描述1',
field: 'itemDesc1',
table: {
width: 150
},
},
{
label: '物品描述2',
field: 'itemDesc2',
table: {
width: 150
},
},
{
label: '项目代码',
field: 'projectCode',
table: {
width: 150
},
},
{
label: '数量',
field: 'qty',
@ -576,4 +548,4 @@ export const PurchaseclaimRequestDetailRules = reactive({
uom: [
{ required: true, message: '请输入计量单位', trigger: 'change' }
],
})
})

24
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -71,10 +71,6 @@
:apiDelete="SupplierinvoiceRequestDetailApi.deleteSupplierinvoiceRequestDetail"
:Echo="Echo"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/supplierinvoice-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
</template>
<script setup lang="ts">
@ -150,7 +146,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:supplierinvoice-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:supplierinvoice-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:supplierinvoice-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -303,23 +299,6 @@ const submitForm = async (formType, data) => {
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '供应商发票申请主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
@ -332,6 +311,5 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await SupplierinvoiceRequestMainApi.importTemplate()
})
</script>

Loading…
Cancel
Save