|
@@ -129,7 +129,7 @@
|
|
|
</div>
|
|
|
<div>
|
|
|
<span style="margin-right: 10px;" v-if="selNums">已选{{ selNums }}项</span>
|
|
|
- <a-button type="default" style="margin-right: 10px;" class="button-info" @click="openPlSetReason">批量设置退货原因</a-button>
|
|
|
+ <a-button v-if="editGoodFlag" type="default" style="margin-right: 10px;" class="button-info" @click="openPlSetReason">批量设置退货原因</a-button>
|
|
|
<a-button
|
|
|
type="primary"
|
|
|
id="purchaseReturnEdit-import-btn"
|
|
@@ -335,31 +335,38 @@ export default {
|
|
|
goodFlag () {
|
|
|
return this.detailData && this.detailData.goodFlag || ''
|
|
|
},
|
|
|
+ editGoodFlag () {
|
|
|
+ return this.detailData && this.detailData.goodFlag == 'DEFECTIVE_PRODUCT_RETURN'
|
|
|
+ },
|
|
|
columns () {
|
|
|
const arr = [
|
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
|
{ title: '产品编码', dataIndex: 'code', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品名称', dataIndex: 'name', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '产品名称', dataIndex: 'name', width: this.editGoodFlag ? '20%':'30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '20%', align: 'center' },
|
|
|
{ title: '单位', dataIndex: 'unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '申请退货数量', scopedSlots: { customRender: 'returnQty' }, width: '10%', align: 'center' },
|
|
|
- { title: '退货原因', scopedSlots: { customRender: 'returnReason' }, width: '10%', align: 'center' },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
|
+ { title: '申请退货数量', scopedSlots: { customRender: 'returnQty' }, width: '10%', align: 'center' }
|
|
|
]
|
|
|
+ if(this.editGoodFlag){
|
|
|
+ arr.push({ title: '退货原因', scopedSlots: { customRender: 'returnReason' }, width: '10%', align: 'center' })
|
|
|
+ }
|
|
|
+ arr.push({ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' })
|
|
|
return arr
|
|
|
},
|
|
|
chooseColumns () {
|
|
|
const arr = [
|
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
|
{ title: '产品编码', dataIndex: 'product.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品名称', dataIndex: 'product.name', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '产品名称', dataIndex: 'product.name', width: this.editGoodFlag ? '20%':'30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '17%', align: 'center' },
|
|
|
{ title: '单位', dataIndex: 'product.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '申请退货数量', scopedSlots: { customRender: 'qty' }, width: '10%', align: 'center' },
|
|
|
- { title: '退货原因', scopedSlots: { customRender: 'returnReason' }, width: '10%', align: 'center' },
|
|
|
- { title: '备注', scopedSlots: { customRender: 'returnRemarks' }, width: '10%', align: 'center' },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
|
+ { title: '申请退货数量', scopedSlots: { customRender: 'qty' }, width: '10%', align: 'center' }
|
|
|
]
|
|
|
+ if(this.editGoodFlag){
|
|
|
+ arr.push({ title: '退货原因', scopedSlots: { customRender: 'returnReason' }, width: '10%', align: 'center' })
|
|
|
+ }
|
|
|
+ arr.push({ title: '备注', scopedSlots: { customRender: 'returnRemarks' }, width: '10%', align: 'center' })
|
|
|
+ arr.push({ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' })
|
|
|
return arr
|
|
|
}
|
|
|
},
|