|
@@ -18,7 +18,7 @@
|
|
|
<a-card size="small" :bordered="false" class="purchaseReceiptEdit-cont" v-show="showDetail">
|
|
|
<div slot="title">
|
|
|
<span>基础信息</span>
|
|
|
- <div style="cursor:pointer;color: #00aaff;float:right;" id="purchaseReceiptEdit-btn" @click.stop="handleEditBase" v-if="!(detailsData&&detailsData.supplierName)">
|
|
|
+ <div style="cursor:pointer;color: #00aaff;float:right;" id="purchaseReceiptEdit-btn" @click.stop="handleEditBase" v-if="$hasPermissions('B_purchaseReturnEdit_basicInfo')&&!(detailsData&&detailsData.supplierName)">
|
|
|
<a-icon type="edit" /> 编辑基础信息
|
|
|
</div>
|
|
|
</div>
|
|
@@ -53,19 +53,19 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="showBtn">
|
|
|
- <a-button id="purchaseReceiptEdit-add" type="primary" class="button-warning" @click="handleAddEdit">新增产品</a-button>
|
|
|
- <a-button id="purchaseReceiptEdit-ex" class="button-warning" @click="handleImport">导入产品</a-button>
|
|
|
+ <a-button id="purchaseReceiptEdit-add" v-if="$hasPermissions('B_purchaseReceiptEdit_add')" type="primary" class="button-warning" @click="handleAddEdit">新增产品</a-button>
|
|
|
+ <a-button id="purchaseReceiptEdit-ex" v-if="$hasPermissions('B_purchaseReceiptEdit_import')" class="button-warning" @click="handleImport">导入产品</a-button>
|
|
|
<a-button
|
|
|
- v-if="$hasPermissions('B_sparePartsBatchAudit')"
|
|
|
id="purchaseReceiptEdit-queryQty"
|
|
|
type="primary"
|
|
|
class="button-warning"
|
|
|
:loading="loading"
|
|
|
+ v-if="$hasPermissions('B_purchaseReceiptEdit_thirdQty')"
|
|
|
@click="handleThirdQty">第三方库存</a-button>
|
|
|
<a-alert type="info">
|
|
|
<div slot="message" class="total-bar">
|
|
|
<span>采购数量:{{ statisticsObj && (statisticsObj.productTotalQty || statisticsObj.productTotalQty == 0) ? statisticsObj.productTotalQty : '--' }};</span>
|
|
|
- <span v-if="$hasPermissions('B_purchaseReturnEdit_costPrice')">采购金额:{{ (statisticsObj && (statisticsObj.productTotalCost || statisticsObj.productTotalCost == 0) )? statisticsObj.productTotalCost : '--' }};</span>
|
|
|
+ <span v-if="$hasPermissions('M_purchaseReceiptEdit_costPrice')">采购金额:{{ (statisticsObj && (statisticsObj.productTotalCost || statisticsObj.productTotalCost == 0) )? statisticsObj.productTotalCost : '--' }};</span>
|
|
|
</div>
|
|
|
</a-alert>
|
|
|
</div>
|
|
@@ -83,7 +83,7 @@
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
- v-if="$hasPermissions('B_purchaseReturnEdit')"
|
|
|
+ v-if="$hasPermissions('B_purchaseReturnEdit_edit')"
|
|
|
@click="handleAddEdit(record)"
|
|
|
class="button-info"
|
|
|
id="purchaseReceiptEdit-edit-btn">编辑</a-button>
|
|
@@ -92,6 +92,7 @@
|
|
|
type="link"
|
|
|
:loading="delLoading"
|
|
|
class="button-error"
|
|
|
+ v-if="$hasPermissions('B_purchaseReturnEdit_del')"
|
|
|
@click="handleDel(record)"
|
|
|
id="purchaseReceiptEdit-del-btn">删除</a-button>
|
|
|
</template>
|
|
@@ -105,6 +106,7 @@
|
|
|
:disabled="spinning"
|
|
|
type="primary"
|
|
|
class="button-primary"
|
|
|
+ v-if="$hasPermissions('B_purchaseReturnEdit_submit')"
|
|
|
@click="handleSubmit"
|
|
|
id="purchaseReceiptEdit-submit">提交</a-button>
|
|
|
</div>
|
|
@@ -203,7 +205,7 @@ export default {
|
|
|
// { title: '采购金额', dataIndex: 'subtotal', width: '8%', align: 'right', customRender: function (text) { return text || text == 0 ? _this.toThousands(text, 2) : '--' } },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
|
]
|
|
|
- if (this.$hasPermissions('B_purchaseReceiptEdit_costPrice')) {
|
|
|
+ if (this.$hasPermissions('M_purchaseReceiptEdit_costPrice')) {
|
|
|
arr.splice(6, 0, { title: '采购单价', dataIndex: 'productCost', width: '8%', align: 'right', customRender: function (text) { return text || text == 0 ? _this.toThousands(text, 2) : '--' } })
|
|
|
arr.splice(7, 0, { title: '采购金额', dataIndex: 'subtotal', width: '8%', align: 'right', customRender: function (text) { return text || text == 0 ? _this.toThousands(text, 2) : '--' } })
|
|
|
}
|