|
|
|
@ -32,6 +32,7 @@ |
|
|
|
:headers="headers" |
|
|
|
:contents="contents" |
|
|
|
@onInputChange="onInputChange" |
|
|
|
@onButtonClick="onButtonClick" |
|
|
|
width="100%" height="80vh"></wyb-table> |
|
|
|
</view> |
|
|
|
<view style="height: 140rpx;"></view> |
|
|
|
@ -77,6 +78,9 @@ |
|
|
|
},{ |
|
|
|
label: '非含税价', |
|
|
|
key: 'non_tax_price' |
|
|
|
},{ |
|
|
|
label: '操作', |
|
|
|
key: 'operation' |
|
|
|
}], |
|
|
|
contents: [], |
|
|
|
is_show: false, |
|
|
|
@ -149,7 +153,8 @@ |
|
|
|
number: item?.material?.m_sn || '', |
|
|
|
purchase_limit: {edit: true, value: 1}, |
|
|
|
tax_price: {edit: true, value: ''}, |
|
|
|
non_tax_price: {edit: true, value: ''} |
|
|
|
non_tax_price: {edit: true, value: ''}, |
|
|
|
operation: {button: true, key: 'delete', value: '删除'} |
|
|
|
} |
|
|
|
}) |
|
|
|
this.contents = contents; |
|
|
|
@ -165,7 +170,7 @@ |
|
|
|
let list = res.data.order || []; |
|
|
|
let canteen = res.data.canteen || []; |
|
|
|
let contents = list.map(item => { |
|
|
|
return { |
|
|
|
let obj = { |
|
|
|
name: item?.material?.m_name || '', |
|
|
|
material_id: item?.material?.id || 0, |
|
|
|
spec: item.name, |
|
|
|
@ -176,8 +181,13 @@ |
|
|
|
purchase_limit: {edit: true, value: item?.quotation?.purchase_limit || ''}, |
|
|
|
tax_price: {edit: true, value: item?.quotation?.tax_price || ''}, |
|
|
|
non_tax_price: {edit: true, value: item?.quotation?.non_tax_price || ''}, |
|
|
|
quotation_id: item?.quotation?.id || 0 |
|
|
|
quotation_id: item?.quotation?.id || 0, |
|
|
|
operation: {button: true, key: 'delete', value: '删除'} |
|
|
|
} |
|
|
|
if(item?.material?.state && item?.material?.state != '启用'){ |
|
|
|
obj.disabled = true; |
|
|
|
} |
|
|
|
return obj; |
|
|
|
}) |
|
|
|
this.contents = contents; |
|
|
|
this.getCanteenList(canteen); |
|
|
|
@ -228,6 +238,13 @@ |
|
|
|
onInputChange(event){ |
|
|
|
this.contents[event.contentIndex][event.key].value = event.detailValue; |
|
|
|
}, |
|
|
|
// table操作按钮被点击 |
|
|
|
onButtonClick(event){ |
|
|
|
if(event.content.key == 'delete'){ |
|
|
|
let contentIndex = event.lineData.contentIndex; |
|
|
|
this.contents.splice(contentIndex, 1); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 切换显示关联食堂modal |
|
|
|
switchRelation(){ |
|
|
|
if(this.type == 1) return this.$msg('编辑不可更换关联食堂哦'); |
|
|
|
|