Pārlūkot izejas kodu

bug修复 双击添加产品

chenrui 4 gadi atpakaļ
vecāks
revīzija
f55556207d

+ 11 - 0
src/views/allocationManagement/storeTransferOut/edit.vue

@@ -85,6 +85,7 @@
             size="small"
             :rowKey="(record) => record.stockSn+record.productSn+record.warehouseSn+record.warehouseLocationSn"
             :columns="columns"
+            :customRow="handleClickRow"
             :data="loadData"
             :scroll="{ x: 1080, y: 300 }"
             bordered>
@@ -277,6 +278,16 @@ export default {
       this.queryParam.productTypeSn3 = undefined
       this.$refs.table.refresh(true)
     },
+    // 双击快速添加
+    handleClickRow (record) {
+      return {
+        on: {
+          dblclick: (event) => {
+            this.handleAdd(record)
+          }
+        }
+      }
+    },
     // 已选产品  重置
     chooseResetSearchForm () {
       this.chooseQueryParam.productCode = ''

+ 14 - 3
src/views/allocationManagement/warehouseAllocation/edit.vue

@@ -113,6 +113,7 @@
             size="small"
             :rowKey="(record) => record.id"
             :columns="columns"
+            :customRow="handleClickRow"
             :loading="loading"
             :dataSource="loadData"
             :pagination="pagination"
@@ -135,6 +136,7 @@
                 <a-select-option
                   v-for="item in warehousePutLocData"
                   :key="item.warehouseLocationSn"
+                  :disabled="item.warehouseLocationSn==record.warehouseLocationSn"
                   :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
               </a-select>
             </template>
@@ -249,7 +251,7 @@
                 allowClear
                 v-model="record.putWarehouseLocationSn"
                 style="width: 100%;">
-                <a-select-option v-for="item in warehousePutLocData" :key="item.warehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
+                <a-select-option v-for="item in warehousePutLocData" :key="item.warehouseLocationSn" :disabled="item.warehouseLocationSn==record.outWarehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
               </a-select>
             </template>
             <!-- 调出数量 -->
@@ -365,7 +367,7 @@ export default {
         { title: '原厂编码', dataIndex: 'productOrigCode', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'brandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
-        { title: '调出仓位', dataIndex: 'warehouseLocationSn', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调出仓位', dataIndex: 'outWarehouseLocationName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调入仓位', dataIndex: 'putWarehouseLocationSn', width: 140, align: 'center', scopedSlots: { customRender: 'storageQuantity' } },
         { title: '单位', dataIndex: 'productUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调出数量', scopedSlots: { customRender: 'transferOutQuantity' }, width: 140, align: 'center' },
@@ -411,7 +413,16 @@ export default {
       this.queryParam.warehouseLocationSn = undefined // 调出仓位
       this.getProductList()
     },
-
+    // 双击快速添加
+    handleClickRow (record) {
+      return {
+        on: {
+          dblclick: (event) => {
+            this.handleAdd(record)
+          }
+        }
+      }
+    },
     // 已选产品重置查询
     resetChooseSearchForm () {
       this.chooseParam.productCode = ''