chenrui 1 год назад
Родитель
Сommit
dcab2cd95b
1 измененных файлов с 11 добавлено и 6 удалено
  1. 11 6
      src/views/purchasingManagement/purchaseReturn/queryPart.vue

+ 11 - 6
src/views/purchasingManagement/purchaseReturn/queryPart.vue

@@ -48,7 +48,7 @@
       ref="chooseTable"
       size="small"
       :rowKey="(record,i) => i"
-      :row-selection="{ columnWidth: 40}"
+      :row-selection="{ columnWidth: 40,getCheckboxProps: record => ({ props: { disabled: record.currentStockQty == 0 || record.isCheckedFlag} }) }"
       @rowSelection="rowSelectionFun"
       :columns="columns"
       :data="loadData"
@@ -63,6 +63,7 @@
             v-model="record.qty"
             :precision="0"
             :min="1"
+            :disabled="record.currentStockQty == 0"
             :max="record.currentStockQty"
             style="width: 100%;"
             placeholder="请输入"/>
@@ -154,18 +155,22 @@ export default {
         { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
         { title: '关联单号', dataIndex: 'sparePartsNo', width: '24%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'product.code', width: '24%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'product.name', width: '30%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品名称', dataIndex: 'product.name', width: '24%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '单位', dataIndex: 'product.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '批次号', dataIndex: 'sparePartsBatchNo', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '库存数量', dataIndex: 'currentStockQty', width: '9%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
-        // productQty{ title: '已退数量', dataIndex: 'returnedQty', width: '9%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
-        // { title: '最大可退数量', dataIndex: 'currentStockQty', width: '9%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
-        { title: '申请退货数量', width: '13%', align: 'center', scopedSlots: { customRender: 'qty' } },
+        { title: '入库数量', dataIndex: 'productQty', width: '9%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
+        // { title: '已退数量', dataIndex: 'returnedQty', width: '9%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
+        { title: '最大可退数量', dataIndex: 'currentStockQty', width: '9%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
+        { title: '申请退货数量', width: '10%', align: 'center', scopedSlots: { customRender: 'qty' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
       if (this.$hasPermissions('B_purchaseReturnEdit_costPrice')) {
         arr.splice(6, 0, { title: '入库单价', dataIndex: 'productCost', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } })
       }
+      if (this.queryParam.grabFlag == 1) { // 抓单
+        const pos = this.$hasPermissions('B_purchaseReturnEdit_costPrice') ? 8 : 7
+        arr.splice(pos, 0, { title: '已退数量', dataIndex: 'returnedQty', width: '9%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } })
+      }
       return arr
     },
     selNums () {