添加采购单审核操作
This commit is contained in:
parent
86a90e42f4
commit
f01d8e7349
|
|
@ -65,7 +65,7 @@
|
|||
<NuInvoicingCgdMainModal ref="registerModal" @success="handleSuccess"></NuInvoicingCgdMainModal>
|
||||
<!-- 入库单 -->
|
||||
<NuInvoicingCgdRkdModal ref="rkdModal" @success="handleSuccess"></NuInvoicingCgdRkdModal>
|
||||
<!-- 入库单 -->
|
||||
<!-- 详情 -->
|
||||
<NuInvoicingCgdDetailModal ref="detailModal" @success="handleSuccess"></NuInvoicingCgdDetailModal>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -101,7 +101,11 @@
|
|||
:loading="loading"
|
||||
@change="handleTableChange"
|
||||
>
|
||||
<template #bodyCell="{ column, text }">
|
||||
<template #bodyCell="{ column, text, record }">
|
||||
|
||||
<template v-if="column.dataIndex === 'purchaseQuantity'">
|
||||
<a-input-number :value="text" placeholder="请购数量" min="0" max="999" @change="(value) => handleQgslChange(record, 'purchaseQuantity', value)" />
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-spin>
|
||||
|
|
@ -180,6 +184,23 @@
|
|||
});
|
||||
|
||||
|
||||
const handleQgslChange = (record, field, value) => {
|
||||
// 更新当前行的数据
|
||||
record[field] = value;
|
||||
if(!value){
|
||||
record[field] = 0;
|
||||
}
|
||||
if(parseInt(record.wlUpperLimit) < value){
|
||||
record[field] = record.wlUpperLimit;
|
||||
}
|
||||
|
||||
// 方法2:更好的方式是更新整个 dataSource(推荐)
|
||||
const index = dataSource.value.findIndex(item => item.id === record.id);
|
||||
if (index !== -1) {
|
||||
dataSource.value[index] = { ...record };
|
||||
dataSource.value = [...dataSource.value]; // 创建新数组触发响应式更新
|
||||
}
|
||||
};
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
|
|
@ -257,6 +278,7 @@
|
|||
if(model.status == '3'){
|
||||
model.cgdType = '9'
|
||||
}
|
||||
model.cgdInfoList = dataSource.value;
|
||||
console.log("🚀 ~ submitForm ~ model:", model)
|
||||
await auditInfo(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue