|
@@ -475,6 +475,7 @@ const form = ref({
|
|
|
price: [{ pa: '', pb: '' }],
|
|
|
goods: [] as any[],
|
|
|
files: [] as { file_id: string; name: string }[], // 附件
|
|
|
+ useField: ''
|
|
|
})
|
|
|
const rules = ref<FormRules>({
|
|
|
creator_userid: [{ required: true, message: '必填项', trigger: 'blur' }],
|
|
@@ -736,8 +737,10 @@ const resetGoods = function () {
|
|
|
Array.isArray(soData.value.Pkg_details) &&
|
|
|
soData.value.Pkg_details.length
|
|
|
) {
|
|
|
+ form.value.useField = 'Pkg_details'
|
|
|
form.value.goods = soData.value.Pkg_details.map((i: any) => {
|
|
|
return {
|
|
|
+ id: i.Product_Line_Id,
|
|
|
name: i.Product?.name || '',
|
|
|
desc: i.Description || '',
|
|
|
quantity: i.Quantity || 0,
|
|
@@ -745,9 +748,11 @@ const resetGoods = function () {
|
|
|
}
|
|
|
})
|
|
|
} else if (Array.isArray(soData.value.Product_Details)) {
|
|
|
+ form.value.useField = 'Product_Details'
|
|
|
form.value.goods = soData.value.Product_Details.map((i: any) => {
|
|
|
console.log('iii')
|
|
|
return {
|
|
|
+ id: i.id,
|
|
|
name: i.product.name || '',
|
|
|
desc: i.product_description || '',
|
|
|
quantity: i.quantity || 0,
|