|
@ -21,8 +21,8 @@ |
|
|
<span>{{ row.number }}</span> |
|
|
<span>{{ row.number }}</span> |
|
|
</el-button> |
|
|
</el-button> |
|
|
</template> |
|
|
</template> |
|
|
<template #action="{ row }" > |
|
|
<template #action="{ row }"> |
|
|
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event, row)"/> |
|
|
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event, row)" /> |
|
|
</template> |
|
|
</template> |
|
|
</Table> |
|
|
</Table> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
@ -103,23 +103,14 @@ |
|
|
if (type == 'tableForm') { |
|
|
if (type == 'tableForm') { |
|
|
// 明细查询页赋值 |
|
|
// 明细查询页赋值 |
|
|
row[formField] = val[0][searchField] |
|
|
row[formField] = val[0][searchField] |
|
|
|
|
|
if (formField == 'poNumber') { |
|
|
|
|
|
row['itemCode'] = val[0]['itemCode'] |
|
|
|
|
|
row['poLine'] = val[0]['poLine'] |
|
|
|
|
|
row['uom'] = val[0]['uom'] |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
setV[formField] = val[0][searchField] |
|
|
setV[formField] = val[0][searchField] |
|
|
|
|
|
|
|
|
if(formField=='ppNumber'){ |
|
|
|
|
|
// 获取子表数据 getBomDisassemble |
|
|
|
|
|
PurchasePlanDetailApi.getPurchasePlanDetailList({ |
|
|
|
|
|
number: val[0]['number']}).then(res => { |
|
|
|
|
|
if (res) tableData.value = res; |
|
|
|
|
|
tableData.value.forEach(item=>{ |
|
|
|
|
|
item.batch = item.toBatch |
|
|
|
|
|
item.qty = 1 |
|
|
|
|
|
}) |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -189,7 +180,7 @@ |
|
|
const butttondata = (row) => { |
|
|
const butttondata = (row) => { |
|
|
return [ |
|
|
return [ |
|
|
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), // 打开 |
|
|
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), // 打开 |
|
|
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4']) }), // 关闭 |
|
|
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4']) }), // 关闭 |
|
|
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), // 提交审批 |
|
|
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), // 提交审批 |
|
|
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), // 审批通过 |
|
|
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), // 审批通过 |
|
|
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), // 驳回按钮 |
|
|
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), // 驳回按钮 |
|
@ -205,8 +196,8 @@ |
|
|
hasPermi: '', |
|
|
hasPermi: '', |
|
|
link: true, // 文本展现按钮 |
|
|
link: true, // 文本展现按钮 |
|
|
}, |
|
|
}, |
|
|
defaultButtons.mainListPointBtn(null), // 标签打印 |
|
|
defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3']) }), // 标签打印 |
|
|
defaultButtons.mainListDocumentPrintBtn(null), // 单据打印 |
|
|
defaultButtons.mainListDocumentPrintBtn({ hide: isShowMainButton(row, ['3']) }), // 单据打印 |
|
|
// 生成记录 |
|
|
// 生成记录 |
|
|
{ |
|
|
{ |
|
|
label: '处理', |
|
|
label: '处理', |
|
@ -233,9 +224,9 @@ |
|
|
handleApp(row.id) |
|
|
handleApp(row.id) |
|
|
} else if (val == 'mainPlanTur') { // 驳回按钮 |
|
|
} else if (val == 'mainPlanTur') { // 驳回按钮 |
|
|
handleTur(row.id) |
|
|
handleTur(row.id) |
|
|
}else if (val == 'genRecords') { // 处理 |
|
|
} else if (val == 'genRecords') { // 处理 |
|
|
genRecords(row.id) |
|
|
genRecords(row.id) |
|
|
}else if (val == 'edit') { // 编辑 |
|
|
} else if (val == 'edit') { // 编辑 |
|
|
openForm('update', row) |
|
|
openForm('update', row) |
|
|
} else if (val == 'delete') { // 删除 |
|
|
} else if (val == 'delete') { // 删除 |
|
|
handleDelete(row.id) |
|
|
handleDelete(row.id) |
|
@ -247,15 +238,15 @@ |
|
|
handleDocumentPrint(row.id) |
|
|
handleDocumentPrint(row.id) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 详情操作 */ |
|
|
/** 详情操作 */ |
|
|
const detailRef = ref() |
|
|
const detailRef = ref() |
|
|
const openDetail = (row : any, titleName : any, titleValue : any) => { |
|
|
const openDetail = (row : any, titleName : any, titleValue : any) => { |
|
|
detailRef.value.openDetail(row, titleName, titleValue) |
|
|
detailRef.value.openDetail(row, titleName, titleValue) |
|
|
} |
|
|
} |
|
|
//添加/修改操作 |
|
|
//添加/修改操作 |
|
|
const formRef = ref() |
|
|
const formRef = ref() |
|
|
const openForm = async (type: string, row?: number) => { |
|
|
const openForm = async (type : string, row ?: number) => { |
|
|
tableData.value = [] // 重置明细数据 |
|
|
tableData.value = [] // 重置明细数据 |
|
|
formRef.value.open(type, row) |
|
|
formRef.value.open(type, row) |
|
|
} |
|
|
} |
|
@ -337,7 +328,7 @@ |
|
|
await getList() |
|
|
await getList() |
|
|
} catch { } |
|
|
} catch { } |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 处理按钮操作 */ |
|
|
/** 处理按钮操作 */ |
|
|
const genRecords = async (id : number) => { |
|
|
const genRecords = async (id : number) => { |
|
|
try { |
|
|
try { |
|
@ -394,7 +385,7 @@ |
|
|
|
|
|
|
|
|
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
|
|
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
|
|
const src = ref(BASE_URL + '/jmreport/view/897700407827668992?token=' + getAccessToken()) |
|
|
const src = ref(BASE_URL + '/jmreport/view/897700407827668992?token=' + getAccessToken()) |
|
|
|
|
|
|
|
|
const genLabelId = ref(); |
|
|
const genLabelId = ref(); |
|
|
// 生成标签 |
|
|
// 生成标签 |
|
|
const pointRef = ref() |
|
|
const pointRef = ref() |
|
@ -404,7 +395,7 @@ |
|
|
} |
|
|
} |
|
|
// 标签打印 |
|
|
// 标签打印 |
|
|
const labelPrint = async (row) => { |
|
|
const labelPrint = async (row) => { |
|
|
window.open(src.value+'&asn_number='+row.asnNumber) |
|
|
window.open(src.value + '&asn_number=' + row.asnNumber) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const print = async () => { |
|
|
const print = async () => { |
|
|