chenrui vor 11 Monaten
Ursprung
Commit
67cabdf375

+ 4 - 3
src/views/purchasingManagement/purchaseReceipt/detailModal.vue

@@ -27,7 +27,7 @@
       <a-alert type="info" style="margin:10px 0">
         <div slot="message">
           采购数量 <strong>{{ (statisticsObj&&(statisticsObj.productTotalQty || statisticsObj.productTotalQty==0)) ? statisticsObj.productTotalQty : '--' }}</strong> ,
-          <span v-if="$hasPermissions('B_sparePartsDetail_costPrice')">采购金额 <strong>{{ (statisticsObj&&(statisticsObj.productTotalCost || statisticsObj.productTotalCost==0)) ? toThousands(statisticsObj.productTotalCost) : '--' }}</strong></span>
+          <span v-if="$hasPermissions('B_purchaseReceiptDetail_costPrice')">采购金额 <strong>{{ (statisticsObj&&(statisticsObj.productTotalCost || statisticsObj.productTotalCost==0)) ? toThousands(statisticsObj.productTotalCost) : '--' }}</strong></span>
         </div>
       </a-alert>
       <!-- 列表 -->
@@ -50,7 +50,7 @@
             <a-button
               size="small"
               type="link"
-              v-if="$hasPermissions('B_purchaseReturnEdit')"
+              v-if="$hasPermissions('B_purchaseReceiptCode')"
               @click="handleCheck(record)"
               class="button-info"
               id="detail-edit-btn">
@@ -61,7 +61,7 @@
           <a-button
             size="small"
             type="link"
-            v-if="$hasPermissions('B_purchaseReturnEdit')&&record.traceCodeQty*1===record.productQty*1"
+            v-if="$hasPermissions('B_purchaseReceiptCode')&&record.traceCodeQty*1===record.productQty*1"
             @click="handleCheck(record)"
             class="button-info"
             id="detail-edit-btn">查看</a-button>
@@ -156,6 +156,7 @@ export default {
       this.openUniqueCodeModal = true
     },
     closeUniqueCodeModal () {
+      this.itemUniqueCodeData = null
       this.openUniqueCodeModal = false
     },
     // 获取基础信息

+ 9 - 7
src/views/purchasingManagement/purchaseReceipt/edit.vue

@@ -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) : '--' } })
       }

+ 3 - 3
src/views/purchasingManagement/purchaseReceipt/list.vue

@@ -83,8 +83,8 @@
           总单数:<strong>{{ totalData&&(totalData.totalRecord || totalData.totalRecord==0) ? totalData.totalRecord : '--' }}</strong>;
           总款数:<strong>{{ totalData&&(totalData.productTotalCategory || totalData.productTotalCategory==0) ? totalData.productTotalCategory : '--' }}</strong>;
           总采购数量:<strong>{{ totalData&&(totalData.productTotalQty || totalData.productTotalQty==0) ? totalData.productTotalQty : '--' }}</strong>;
-          <span>总采购金额:<strong>{{ totalData&&(totalData.productTotalCost || totalData.productTotalCost==0) ? toThousands(totalData.productTotalCost) : '--' }}</strong>;</span>
-          <span>已完结金额:<strong>{{ totalData&&(totalData.finishProductTotalCost || totalData.finishProductTotalCost==0) ? toThousands(totalData.finishProductTotalCost) : '--' }}</strong>;</span>
+          <span v-if="$hasPermissions('M_purchaseReceiptList_costPrice')">总采购金额:<strong>{{ totalData&&(totalData.productTotalCost || totalData.productTotalCost==0) ? toThousands(totalData.productTotalCost) : '--' }}</strong>;</span>
+          <span v-if="$hasPermissions('M_purchaseReceiptList_costPrice')">已完结金额:<strong>{{ totalData&&(totalData.finishProductTotalCost || totalData.finishProductTotalCost==0) ? toThousands(totalData.finishProductTotalCost) : '--' }}</strong>;</span>
         </div>
         <!-- 列表 -->
         <s-table
@@ -120,7 +120,7 @@
               type="link"
               @click="handleEdit(record)"
               class="button-info"
-              v-if="$hasPermissions('B_purchaseReceiptEdit') && (record.state ==='WAIT_SUBMIT'||record.state ==='WAIT_AUDIT'||record.state ==='REJECT') && (!record.thirdpartyBizState)"
+              v-if="$hasPermissions('M_purchaseReceiptEdit') && (record.state ==='WAIT_SUBMIT'||record.state ==='WAIT_AUDIT'||record.state ==='REJECT') && (!record.thirdpartyBizState)"
               id="purchaseReceiptList-edit-btn">编辑</a-button>
             <a-button
               size="small"