lilei 11 месяцев назад
Родитель
Сommit
2349cdb4c0

+ 7 - 3
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -118,7 +118,8 @@ export default {
       showTableHead: true, // 是否显示表格头部
       colspanNums: 13, // 单元格合并列数
       hasOutStockOfActive: false,
-      simpleImage: Empty.PRESENTED_IMAGE_SIMPLE // 空图片
+      simpleImage: Empty.PRESENTED_IMAGE_SIMPLE, // 空图片
+      showStockCol: false
     }
   },
   computed: {
@@ -236,9 +237,12 @@ export default {
       }
       //  审核,需用到库存
       if (this.showStock) {
-        this.colspanNums = this.colspanNums + 2
+        this.colspanNums = this.colspanNums + 1
         arr.push({ title: '库存', field: 'stockQty', width: 80, key: 'm', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
-        arr.push({ title: '第三方库存', field: 'stockQty', width: 80, key: 'mm', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
+        if (this.showStockCol) {
+          this.colspanNums = this.colspanNums + 1
+          arr.push({ title: '第三方库存', field: 'stockQty', width: 80, key: 'mm', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
+        }
       }
       this.colspanNums = this.colspanNums + 3
       arr = arr.concat([

+ 1 - 1
src/views/salesManagement/salesQueryNew/comps/productList.vue

@@ -66,7 +66,6 @@
           <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" :id="'salesEdit-refresh-'+id">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" :id="'salesEdit-reset-'+id">重置</a-button>
-            <a-button type="primary" style="margin-left: 15px" class="button-info" :id="'salesEdit-updateStock-'+id">第三方库存</a-button>
           </a-col>
         </a-row>
       </a-form>
@@ -84,6 +83,7 @@
             class="button-info"
             @click="showSearchBox=!showSearchBox" ><a-icon :type="showSearchBox?'close':'search'"/> 筛选</a-button>
           <!-- // 操作按钮 -->
+          <a-button type="link" class="button-info" id="salesEdit-updateStock"><a-icon type="search"/>第三方库存</a-button>
           <a-dropdown>
             <a-menu slot="overlay" @click="handleMenuClick" :id="'salesEdit-menu-'+id">
               <a-menu-item key="3" :disabled="disablePromo" :id="'salesEdit-menu-3'+id">

+ 1 - 1
src/views/salesManagement/salesQueryNew/comps/productNormalList.vue

@@ -32,7 +32,6 @@
           <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesEdit-reset">重置</a-button>
-            <a-button type="primary" style="margin-left: 15px" class="button-info" id="salesEdit-updateStock">第三方库存</a-button>
           </a-col>
         </a-row>
       </a-form>
@@ -44,6 +43,7 @@
           <span v-if="selectTotal" style="margin-right:5px;">已选{{ selectTotal }}项</span>
         </a-col>
         <a-col :md="16" :sm="24" style="text-align:right;">
+          <a-button type="link" class="button-info" id="salesEdit-updateStock"><a-icon type="search"/>第三方库存</a-button>
           <a-dropdown>
             <a-menu slot="overlay" @click="handleMenuClick">
               <a-menu-item key="3" id="salesEdit-pl-3">

+ 5 - 1
src/views/salesManagement/salesQueryNew/detail.vue

@@ -128,12 +128,12 @@
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
                     <a-button type="primary" @click="searchTable" :disabled="disabled" id="salesDetail-refresh">查询</a-button>
                     <a-button style="margin-left: 5px" @click="resetSearchForm" id="salesDetail-reset">重置</a-button>
-                    <a-button v-if="showStock" type="primary" style="margin-left: 15px" class="button-info" id="salesDetail-updateStock">第三方库存</a-button>
                   </a-col>
                 </a-row>
               </a-form>
             </div>
             <div>
+              <a-button id="salesDetail-updateStock" v-if="showStock" @click="getThreeStock" type="link" class="button-info">第三方库存</a-button>
               <a-button id="salesDetail-stockOut" v-if="detailData && (detailData.billStatus == 'WAIT_AUDIT' || detailData.billStatus == 'HQ_CHANGE')" type="link" @click="openStockOut">缺货明细</a-button>
               <a-checkbox id="salesDetail-cityPrice" v-model="isCityPrice" v-if="$hasPermissions(authCode + '_cityPrice')"><span style="display: inline-block;margin-top: 1px;">市级价</span></a-checkbox>
             </div>
@@ -333,6 +333,10 @@ export default {
     searchTable () {
       this.$refs.productList.searchTable()
     },
+    // 查询第三方库存
+    getThreeStock () {
+      this.$refs.productList.showStockCol = true
+    },
     // 详情
     getDetail () {
       salesDetailBySn({ salesBillSn: this.bizSn || this.$route.params.sn }).then(res => {