فهرست منبع

店内调出,库存为0时,添加按钮置灰

chenrui 3 سال پیش
والد
کامیت
0a931617a9
1فایلهای تغییر یافته به همراه8 افزوده شده و 2 حذف شده
  1. 8 2
      src/views/allocationManagement/storeTransferOut/edit.vue

+ 8 - 2
src/views/allocationManagement/storeTransferOut/edit.vue

@@ -92,7 +92,13 @@
               bordered>
               <!-- 操作 -->
               <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="storeTransferOutEdit-add-btn">添加</a-button>
+                <a-button
+                  size="small"
+                  :disabled="record.currentQty==0"
+                  type="primary"
+                  class="button-primary"
+                  @click="handleAdd(record)"
+                  id="storeTransferOutEdit-add-btn">添加</a-button>
               </template>
             </s-table>
           </a-collapse-panel>
@@ -235,7 +241,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        return productQuery(Object.assign(parameter, this.queryParam)).then(res => {
+        return productQuery(Object.assign(parameter, this.queryParam, { 'currentQtyFlag': 0 })).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {