|
|
@ -21,13 +21,13 @@ |
|
|
|
total: tableObject.total |
|
|
|
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" |
|
|
|
v-model:sort="tableObject.sort"> |
|
|
|
<template #asnNumber="{ row }"> |
|
|
|
<el-button type="primary" link @click="openDetail(row, '物料代码', row.asnNumber)"> |
|
|
|
<span>{{ row.asnNumber }}</span> |
|
|
|
<template #number="{ row }"> |
|
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
|
|
<span>{{ row.number }}</span> |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
<template #action="{ row }"> |
|
|
|
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event, row)" /> |
|
|
|
<ButtonBase :Butttondata="buttondata(row)" @button-base-click="buttonTableClick($event, row)" /> |
|
|
|
</template> |
|
|
|
</Table> |
|
|
|
</ContentWrap> |
|
|
@ -67,7 +67,8 @@ |
|
|
|
import download from '@/utils/download' |
|
|
|
import * as PurchaseclaimRequestMainApi from '@/api/wms/purchaseclaimRequestMain' |
|
|
|
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 BasicForm from '@/components/BasicForm/src/BasicForm.vue' |
|
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
@ -93,16 +94,36 @@ const searchTableParams = ref([{ |
|
|
|
searchTableTitle: '供应商发货记录', |
|
|
|
searchTableAllSchemas: SupplierdeliverRecordMain.allSchemas, |
|
|
|
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(() => { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
setV['ppNumber'] = val[0]['ppNumber'] |
|
|
|
setV['supplierCode'] = val[0]['supplierCode'] |
|
|
|
formRef.setValues(setV) |
|
|
|
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 = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
setV['ppNumber'] = val[0]['ppNumber'] |
|
|
|
setV['supplierCode'] = val[0]['supplierCode'] |
|
|
|
formRef.setValues(setV) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
@ -134,7 +155,6 @@ const HeadButttondata = [ |
|
|
|
|
|
|
|
// 头部按钮事件 |
|
|
|
const buttonBaseClick = (val, item) => { |
|
|
|
console.log(104, val) |
|
|
|
if (val == 'add') { // 新增 |
|
|
|
openForm('create') |
|
|
|
} else if (val == 'import') { // 导入 |
|
|
@ -150,14 +170,40 @@ const buttonBaseClick = (val, item) => { |
|
|
|
} |
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = [ |
|
|
|
defaultButtons.mainListEditBtn({ hasPermi: 'wms:purchaseclaim-request-main:update' }), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:purchaseclaim-request-main:delete' }), // 删除 |
|
|
|
] |
|
|
|
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.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) => { |
|
|
|
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) |
|
|
|
openForm('update', row) |
|
|
|
} else if (val == 'delete') { // 删除 |
|
|
|