Browse Source

bug修复

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

+ 8 - 12
src/views/purchasingManagement/purchaseOrder/detail.vue

@@ -47,11 +47,11 @@
               产品款数:<strong>{{ detail ? ((detail.totalCategory || detail.totalCategory==0) ? detail.totalCategory : '--') : '--' }}</strong>,
               采购数量合计:<strong>{{ detail ? ((detail.totalQty || detail.totalQty==0) ? detail.totalQty : '--') : '--' }}</strong>,
               已收货数量:<strong>{{ detail ? ((detail.totalPutQty || detail.totalPutQty==0) ? detail.totalPutQty : '--') : '--' }}</strong>,
-              待收货数量:<strong>{{ receivingOty }}</strong>,
+              待收货数量:<strong>{{ detail ? ((detail.totalWaitPutQty || detail.totalWaitPutQty==0) ? detail.totalWaitPutQty : '--') : '--' }}</strong>,
               取消数量:<strong>{{ detail ? ((detail.totalCancelQty || detail.totalCancelQty==0) ? detail.totalCancelQty : '--') : '--' }}</strong>,
-              采购金额合计:¥<strong>{{ detail ? ((detail.totalAmount || detail.totalAmount==0) ? detail.totalAmount : '--') : '--' }}</strong>,
+              采购金额合计:¥<strong>{{ detail ? ((detail.discountedAmount || detail.discountedAmount==0) ? detail.discountedAmount : '--') : '--' }}</strong>,
               已收货金额:¥<strong>{{ detail ? ((detail.totalPutAmount || detail.totalPutAmount==0) ? detail.totalPutAmount : '--') : '--' }}</strong>,
-              待收货金额:¥<strong>{{ receivingAmount }}</strong>,
+              待收货金额:¥<strong>{{ detail ? ((detail.totalWaitPutAmount || detail.totalWaitPutAmount==0) ? detail.totalWaitPutAmount : '--') : '--' }}</strong>,
               取消金额:¥<strong>{{ detail ? ((detail.totalCancelAmount || detail.totalCancelAmount==0) ? detail.totalCancelAmount : '--') : '--' }}</strong>
             </div>
           </a-alert>
@@ -148,12 +148,12 @@ export default {
         { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: 220, align: 'center', customRender: function (text) { return text = ' ' ? '--' : text } },
         { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '采购单价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '采购金额', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
+        { title: '采购单价', dataIndex: 'discountedPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '采购金额', dataIndex: 'discountedAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? '¥' + text : '--') } },
         { title: '采购数量', dataIndex: 'qty', width: 100, align: 'center', scopedSlots: { customRender: 'origqty' } },
-        { title: '取消数量', dataIndex: 'cancelQty', width: 100, align: 'center', customRender: function (text) { return text || 0 } },
-        { title: '已收货数量', dataIndex: 'putQty', width: 120, align: 'center', customRender: function (text) { return text || 0 } },
-        { title: '待收货数量', dataIndex: 'receivingOty', width: 120, align: 'center', customRender: function (text) { return text || 0 } }
+        { title: '取消数量', dataIndex: 'cancelQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '已收货数量', dataIndex: 'putQty', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '待收货数量', dataIndex: 'waitPutQty', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -163,10 +163,6 @@ export default {
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
-            const qty = data.list[i].qty ? data.list[i].qty : 0
-            const putQty = data.list[i].putQty ? data.list[i].putQty : 0
-            const cancelQty = data.list[i].cancelQty ? data.list[i].cancelQty : 0
-            data.list[i].receivingOty = Number(qty) - Number(putQty) - Number(cancelQty)
           }
           this.localDataSource = data.list
           this.disabled = false

+ 5 - 5
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -146,9 +146,9 @@
           <div>
             <!-- 总计 -->
             <a-alert type="info" showIcon style="margin-bottom:15px">
-              <div slot="message">产品款数 <strong>{{ detail&&detail.totalCategory }}</strong> ,
-                采购数量合计 <strong>{{ detail&&detail.totalQty }}</strong> ,
-                采购金额合计¥<strong>{{ detail&&detail.totalAmount }}</strong></div>
+              <div slot="message">产品款数 <strong>{{ detail ? ((detail.totalCategory || detail.totalCategory==0) ? detail.totalCategory : '--') : '--' }}</strong> ,
+                采购数量合计 <strong>{{ detail ? ((detail.totalQty || detail.totalQty==0) ? detail.totalQty : '--') : '--' }}</strong> ,
+                采购金额合计¥<strong>{{ detail ? ((detail.discountedAmount || detail.discountedAmount==0) ? detail.discountedAmount : '--') : '--' }}</strong></div>
             </a-alert>
             <!-- 列表 -->
             <s-table
@@ -268,10 +268,10 @@ export default {
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 220, align: 'center', sorter: true },
         { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '采购单价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
+        { title: '采购单价', dataIndex: 'discountedPrice', width: 100, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
         { title: '采购数量', scopedSlots: { customRender: 'storageQuantity' }, width: 150, align: 'center' },
         { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '采购金额', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
+        { title: '采购金额', dataIndex: 'discountedAmount', width: 100, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象

+ 1 - 1
src/views/purchasingManagement/purchaseOrder/list.vue

@@ -161,7 +161,7 @@ export default {
         { title: '供应商', dataIndex: 'dealerName', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品款数', dataIndex: 'totalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '采购数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '采购金额(¥)', dataIndex: 'totalAmount', width: 115, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
+        { title: '采购金额(¥)', dataIndex: 'discountedAmount', width: 115, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
         { title: '业务状态', dataIndex: 'billStatus', scopedSlots: { customRender: 'billStatus' }, width: 110, align: 'center' },
         { title: '财务状态', dataIndex: 'financialStatus', scopedSlots: { customRender: 'financialStatus' }, width: 100, align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }