Browse Source

采购索赔申请

master
陈薪名 1 year ago
parent
commit
347b8f24ee
  1. 68
      src/views/wms/purchaseclaimRequestMain/index.vue

68
src/views/wms/purchaseclaimRequestMain/index.vue

@ -21,13 +21,13 @@
total: tableObject.total total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" }" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"> v-model:sort="tableObject.sort">
<template #asnNumber="{ row }"> <template #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '物料代码', row.asnNumber)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.asnNumber }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event, row)" /> <ButtonBase :Butttondata="buttondata(row)" @button-base-click="buttonTableClick($event, row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -67,7 +67,8 @@
import download from '@/utils/download' import download from '@/utils/download'
import * as PurchaseclaimRequestMainApi from '@/api/wms/purchaseclaimRequestMain' import * as PurchaseclaimRequestMainApi from '@/api/wms/purchaseclaimRequestMain'
import * as supplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain' import * as supplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain'
import { PurchaseclaimRequestMain, PurchaseclaimRequestMainRules, PurchaseclaimRequestDetail, PurchaseclaimRequestDetailRules, SupplierdeliverRecordMain } from '@/utils/disposition/tableColumns' import * as supplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail'
import { PurchaseclaimRequestMain, PurchaseclaimRequestMainRules, PurchaseclaimRequestDetail, PurchaseclaimRequestDetailRules, SupplierdeliverRecordMain, SupplierdeliverRecordDetail } from '@/utils/disposition/tableColumns'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue' import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
@ -93,16 +94,36 @@ const searchTableParams = ref([{
searchTableTitle: '供应商发货记录', searchTableTitle: '供应商发货记录',
searchTableAllSchemas: SupplierdeliverRecordMain.allSchemas, searchTableAllSchemas: SupplierdeliverRecordMain.allSchemas,
searchTablePage: supplierdeliverRecordMainApi.getSupplierdeliverRecordMainPage searchTablePage: supplierdeliverRecordMainApi.getSupplierdeliverRecordMainPage
},{
formField: 'poNumber',
searchTableTitle: '供应商发货记录',
searchTableAllSchemas: SupplierdeliverRecordDetail.allSchemas,
searchTablePage: supplierdeliverRecordDetailApi.getSupplierdeliverRecordDetailPage
}]) }])
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => { nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
row['poLine'] = val[0]['poLine']
row['batch'] = val[0]['toBatch']
row['altBatch'] = val[0]['altBatch']
row['itemCode'] = val[0]['itemCode']
row['itemName'] = val[0]['itemName']
row['itemDesc1'] = val[0]['itemDesc1']
row['itemDesc2'] = val[0]['itemDesc2']
row['projectCode'] = val[0]['projectCode']
row['qty'] = val[0]['qty']
row['uom'] = val[0]['uom']
} else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
setV['ppNumber'] = val[0]['ppNumber'] setV['ppNumber'] = val[0]['ppNumber']
setV['supplierCode'] = val[0]['supplierCode'] setV['supplierCode'] = val[0]['supplierCode']
formRef.setValues(setV) formRef.setValues(setV)
}
}) })
} }
@ -134,7 +155,6 @@ const HeadButttondata = [
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
console.log(104, val)
if (val == 'add') { // if (val == 'add') { //
openForm('create') openForm('create')
} else if (val == 'import') { // } else if (val == 'import') { //
@ -150,14 +170,40 @@ const buttonBaseClick = (val, item) => {
} }
// - // -
const butttondata = [ const buttondata = (row) => {
defaultButtons.mainListEditBtn({ hasPermi: 'wms:purchaseclaim-request-main:update' }), // return [
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:purchaseclaim-request-main:delete' }), // 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.mainListEditBtn({ hide:isShowMainButton(row,['1']),hasPermi: 'wms:purchaseclaim-request-main:update' }), //
defaultButtons.mainListDeleteBtn({ hide:isShowMainButton(row,['1']),hasPermi: 'wms:purchaseclaim-request-main:delete' }), //
] ]
}
//
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // 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') { //
// const res = await ItempackagingApi.getItempackaging(row.id) // const res = await ItempackagingApi.getItempackaging(row.id)
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //

Loading…
Cancel
Save