|
@@ -43,10 +43,25 @@
|
|
|
bordered>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
+ <a-tooltip placement="bottom" v-if="record.traceCodeQty*1!=record.productQty*1">
|
|
|
+ <template slot="title">
|
|
|
+ <span>唯一码数量与采购数量不一致</span>
|
|
|
+ </template>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ v-if="$hasPermissions('B_purchaseReturnEdit')"
|
|
|
+ @click="handleCheck(record)"
|
|
|
+ class="button-info"
|
|
|
+ id="detail-edit-btn">
|
|
|
+ 查看
|
|
|
+ <a-icon type="exclamation" style="color:#f30;" />
|
|
|
+ </a-button>
|
|
|
+ </a-tooltip>
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
- v-if="$hasPermissions('B_purchaseReturnEdit')"
|
|
|
+ v-if="$hasPermissions('B_purchaseReturnEdit')&&record.traceCodeQty*1===record.productQty*1"
|
|
|
@click="handleCheck(record)"
|
|
|
class="button-info"
|
|
|
id="detail-edit-btn">查看</a-button>
|
|
@@ -122,13 +137,13 @@ export default {
|
|
|
{ title: '产品名称', dataIndex: 'productName', width: '40%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '单位', dataIndex: 'unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '采购数量', dataIndex: 'productQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '采购单价', dataIndex: 'productCost1', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
|
|
|
- { title: '采购金额', dataIndex: 'productCost', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
|
|
|
- { title: '唯一码', dataIndex: 'action', width: '10%', align: 'center', scopedSlots: { customRender: 'action' } }
|
|
|
+ { title: '采购单价', dataIndex: 'productTotalCost', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
|
|
|
+ { title: '采购金额', dataIndex: 'productCost', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') }
|
|
|
+ // { title: '唯一码', dataIndex: 'action', width: '10%', align: 'center', scopedSlots: { customRender: 'action' } }
|
|
|
]
|
|
|
- // if (this.basicInfoData && this.basicInfoData.state && this.basicInfoData.state === 'FINISH') {
|
|
|
- // arr.push({ title: '唯一码', dataIndex: 'action', width: '10%', align: 'center', scopedSlots: { customRender: 'action' } })
|
|
|
- // }
|
|
|
+ if (this.basicInfoData && this.basicInfoData.state && this.basicInfoData.state === 'FINISH') {
|
|
|
+ arr.push({ title: '唯一码', dataIndex: 'action', width: '10%', align: 'center', scopedSlots: { customRender: 'action' } })
|
|
|
+ }
|
|
|
// if (this.$hasPermissions('B_sparePartsDetail_costPrice')) { // 成本价权限
|
|
|
// arr.splice(5, 0, { title: '入库单价', dataIndex: 'productCost', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
|
// arr.splice(6, 0, { title: '小计', dataIndex: 'subtotal', width: '12%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
@@ -138,7 +153,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
handleCheck (row) {
|
|
|
- this.itemUniqueCodeData = { purchaseNo: row.sparePartsNo, productSn: row.productSn }
|
|
|
+ this.itemUniqueCodeData = { purchaseNo: row.sparePartsNo, productCode: row.productCode, productSn: row.productSn }
|
|
|
this.openUniqueCodeModal = true
|
|
|
},
|
|
|
closeUniqueCodeModal () {
|