Browse Source

bug 修复

lilei 4 năm trước cách đây
mục cha
commit
aa77033a63

+ 5 - 0
src/views/common/editInput.js

@@ -6,6 +6,7 @@ const EditableCell = {
         </span>
         <div class="editable-cell-input-wrapper">
           <a-input-number 
+          :size="size"
           :min="min" 
           :max="max" 
           :value="value" 
@@ -41,6 +42,10 @@ const EditableCell = {
       type: [Number],
       default: 999999
     },
+    size: {
+      type: String,
+      default: 'default'
+    },
     punit: {
       type: String,
       default: ''

+ 10 - 6
src/views/salesManagement/salesQuery/edit.vue

@@ -89,6 +89,7 @@
         <!-- 售价 -->
         <template slot="price" slot-scope="text, record">
           <editable-cell
+            size="small"
             :text="record.price"
             id="salesEdit-price"
             :max="999999"
@@ -100,6 +101,7 @@
         <!-- 销售数量 -->
         <template slot="salesNums" slot-scope="text, record">
           <editable-cell
+            size="small"
             :text="record.qty"
             id="salesEdit-salesNums"
             :max="999999"
@@ -164,11 +166,11 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '产品编码', dataIndex: 'dealerProductEntity.code', scopedSlots: { customRender: 'productCode' }, width: 140, align: 'center', sorter: true },
-        { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center' },
-        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: 140, align: 'center' },
-        { title: '品牌', dataIndex: 'dealerProductEntity.productBrandName', width: 100, align: 'center', sorter: true },
-        { title: '仓库', dataIndex: 'warehouseEntity.name', width: 100, align: 'center', sorter: true },
-        { title: '仓位', dataIndex: 'warehouseLocationEntity.name', width: 100, align: 'center' },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'dealerProductEntity.productBrandName', width: 100, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseEntity.name', width: 100, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
+        { title: '仓位', dataIndex: 'warehouseLocationEntity.name', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '售价', scopedSlots: { customRender: 'price' }, width: 150, align: 'center' },
         { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: 150, align: 'center' },
         { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
@@ -337,7 +339,9 @@ export default {
       salesDetailInsert({
         buyerSn: this.detailData.buyerSn,
         productSn: row.productSn,
-        price: row.dealerProduct.cityPrice,
+        // productCode: row.productCode,
+        // productOrigCode: row.productOrigCode,
+        price: row.salePrice,
         qty: row.salesNums,
         salesBillSn: this.detailData.salesBillSn,
         salesBillNo: this.detailData.salesBillNo,

+ 9 - 7
src/views/salesManagement/salesQuery/queryPart.vue

@@ -108,6 +108,7 @@
         <div @dblclick.stop>
           <a-input-number
+            size="small"
             v-model="record.salePrice"
             :precision="2"
             :min="0"
@@ -119,6 +120,7 @@
       <template slot="nums" slot-scope="text, record">
         <div @dblclick.stop>
           <a-input-number
+            size="small"
             v-model="record.salesNums"
             :precision="0"
             :min="0"
@@ -223,13 +225,13 @@ export default {
       warehouseList: [], // 仓库列表
       columnsBak: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center', sorter: true },
-        { title: '产品名称', dataIndex: 'productName', width: 200, align: 'center' },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center' },
-        { title: '品牌', dataIndex: 'brandName', width: 100, align: 'center', sorter: true },
-        { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center', sorter: true },
-        { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center' },
-        { title: '库存数量', dataIndex: 'currentQty', width: 100, align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'brandName', width: 100, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '库存数量', dataIndex: 'currentQty', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '成本价', dataIndex: 'putCost', width: 100, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
         { title: '市级价', dataIndex: 'dealerProduct.cityPrice', width: 100, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },