Browse Source

修改bug

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

+ 16 - 16
src/views/purchasingManagement/purchaseOrder/detail.vue

@@ -74,6 +74,12 @@
               :data="loadData"
               :defaultLoadData="false"
               bordered>
+              <!-- 产品编码 -->
+              <template slot="code" slot-scope="text, record">
+                <span>{{ record.dealerProductEntity.code }}</span>
+                <a-badge v-if="record.promotionFlag && record.promotionFlag=='GIFT'" count="促" :number-style="{ backgroundColor: '#52c41a', zoom:'86%',marginLeft:'8px' }"></a-badge>
+                <a-badge v-if="record.promotionFlag && record.promotionFlag=='DISCOUNT'" count="特" :number-style="{ backgroundColor: '#faad14', zoom:'86%',marginLeft:'8px' }"></a-badge>
+              </template>
               <!-- 采购数量 -->
               <template slot="origqty" slot-scope="text, record">
                 <div>{{ text }}</div>
@@ -83,6 +89,16 @@
               <template slot="outOfStockNum" slot-scope="text, record">
                 <span>{{ record.outOfStockNum }}</span>
               </template>
+              <!-- 采购单价 -->
+              <template slot="unitPrice" slot-scope="text, record">
+                <span v-if="record.promotionFlag && (record.promotionFlag=='GIFT' || record.promotionFlag=='DISCOUNT')">{{ record.discountedPrice||record.discountedPrice==0? toThousands(record.discountedPrice): '--' }}{{ record.origPrice ? '(' + toThousands(record.origPrice) + ')' : '' }}</span>
+                <span v-else>{{ toThousands(record.discountedPrice) }}</span>
+              </template>
+              <!-- 采购金额 -->
+              <template slot="amount" slot-scope="text, record">
+                <span v-if="record.promotionFlag && (record.promotionFlag=='GIFT' || record.promotionFlag=='DISCOUNT')">{{ record.discountedAmount||record.discountedAmount==0?toThousands(record.discountedAmount) : '--' }}{{ record.origPrice ? '(' + toThousands(record.origPrice) + ')' : '' }}</span>
+                <span v-else>{{ toThousands(record.discountedAmount) }}</span>
+              </template>
             </s-table>
           </a-collapse-panel>
         </a-collapse>
@@ -107,12 +123,6 @@
               :data="loadData"
               :scroll="{ x: 1060 }"
               bordered>
-              <!-- 产品编码 -->
-              <template slot="code" slot-scope="text, record">
-                <span>{{ record.dealerProductEntity.code }}</span>
-                <a-badge v-if="record.promotionFlag && record.promotionFlag=='GIFT'" count="促" :number-style="{ backgroundColor: '#52c41a', zoom:'86%',marginLeft:'8px' }"></a-badge>
-                <a-badge v-if="record.promotionFlag && record.promotionFlag=='DISCOUNT'" count="特" :number-style="{ backgroundColor: '#faad14', zoom:'86%',marginLeft:'8px' }"></a-badge>
-              </template>
               <!-- 采购数量 -->
               <template slot="origqty" slot-scope="text, record">
                 <div>{{ text }}</div>
@@ -122,16 +132,6 @@
               <template slot="outOfStockNum" slot-scope="text, record">
                 <span>{{ record.outOfStockNum }}</span>
               </template>
-              <!-- 采购单价 -->
-              <template slot="unitPrice" slot-scope="text, record">
-                <span v-if="record.promotionFlag && (record.promotionFlag=='GIFT' || record.promotionFlag=='DISCOUNT')">{{ record.discountedPrice? toThousands(record.discountedPrice): '--' }}{{ record.origPrice ? '(' + toThousands(record.origPrice) + ')' : '' }}</span>
-                <span v-else>{{ toThousands(record.discountedPrice) }}</span>
-              </template>
-              <!-- 采购金额 -->
-              <template slot="amount" slot-scope="text, record">
-                <span v-if="record.promotionFlag && (record.promotionFlag=='GIFT' || record.promotionFlag=='DISCOUNT')">{{ record.discountedAmount?toThousands(record.discountedAmount) : '--' }}{{ record.origPrice ? '(' + toThousands(record.origPrice) + ')' : '' }}</span>
-                <span v-else>{{ toThousands(record.discountedAmount) }}</span>
-              </template>
             </s-table>
           </a-collapse-panel>
         </a-collapse>

+ 4 - 4
src/views/purchasingManagement/purchaseOrderNew/detail.vue

@@ -95,13 +95,13 @@
           </template>
           <!-- 采购单价 -->
           <template slot="unitPrice" slot-scope="text, record">
-            <span v-if="record.promotionFlag && (record.promotionFlag=='GIFT' || record.promotionFlag=='DISCOUNT')">{{ record.discountedPrice? toThousands(record.discountedPrice): '--' }}{{ record.origPrice ? '(' + toThousands(record.origPrice) + ')' : '' }}</span>
-            <span v-else>{{ toThousands(record.discountedPrice) }}</span>
+            <span v-if="record.promotionFlag && (record.promotionFlag=='GIFT' || record.promotionFlag=='DISCOUNT')">{{ record.discountedPrice||record.discountedPrice==0? toThousands(record.discountedPrice): '--' }}{{ record.origPrice ? '(' + toThousands(record.origPrice) + ')' : '' }}</span>
+            <span v-else>{{ toThousands(record.discountedPrice||0) }}</span>
           </template>
           <!-- 采购金额 -->
           <template slot="amount" slot-scope="text, record">
-            <span v-if="record.promotionFlag && (record.promotionFlag=='GIFT' || record.promotionFlag=='DISCOUNT')">{{ record.discountedAmount?toThousands(record.discountedAmount) : '--' }}{{ record.origPrice ? '(' + toThousands(record.origPrice) + ')' : '' }}</span>
-            <span v-else>{{ toThousands(record.discountedAmount) }}</span>
+            <span v-if="record.promotionFlag && (record.promotionFlag=='GIFT' || record.promotionFlag=='DISCOUNT')">{{ record.discountedAmount||record.discountedAmount==0?toThousands(record.discountedAmount) : '--' }}{{ record.origPrice ? '(' + toThousands(record.origPrice) + ')' : '' }}</span>
+            <span v-else>{{ toThousands(record.discountedAmount||0) }}</span>
           </template>
         </s-table>
       </a-card>

+ 3 - 3
src/views/purchasingManagement/signWarehousing/stockOrderDetail.vue

@@ -84,8 +84,8 @@
           </template>
           <!-- 采购单价 -->
           <template slot="unitPrice" slot-scope="text, record">
-           <span v-if="record.promotionFlag && (record.promotionFlag=='GIFT' || record.promotionFlag=='DISCOUNT')">{{record.discountedPrice? toThousands(record.discountedPrice): '--'}}{{record.origPrice ? '(' + toThousands(record.origPrice) + ')' : ''}}</span>
-           <span v-else>{{toThousands(record.discountedPrice)}}</span>
+            <span v-if="record.promotionFlag && (record.promotionFlag=='GIFT' || record.promotionFlag=='DISCOUNT')">{{ (record.discountedPrice||record.discountedPrice==0)? toThousands(record.discountedPrice): '--' }}{{ record.origPrice ? '(' + toThousands(record.origPrice) + ')' : '' }}</span>
+            <span v-else>{{ toThousands(record.discountedPrice) }}</span>
           </template>
         </s-table>
       </a-card>
@@ -146,7 +146,7 @@ export default {
         { title: '本次入库数量', dataIndex: 'realPutQty', width: '9%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
-        arr.splice(4, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '10%', align: 'right', scopedSlots: { customRender: 'unitPrice' }})
+        arr.splice(4, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '10%', align: 'right', scopedSlots: { customRender: 'unitPrice' } })
         arr.splice(8, 0, { title: '本次发货金额', dataIndex: 'discountedAmount', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
         arr.splice(10, 0, { title: '本次入库金额', dataIndex: 'realPutAmount', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
       }