瀏覽代碼

单价 促销特价标识

chenrui 1 年之前
父節點
當前提交
ae3ef1ee97

+ 12 - 5
src/views/purchasingManagement/purchaseOrderNew/detail.vue

@@ -64,7 +64,8 @@
           <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
             采购金额合计:<strong>{{ detail && (detail.discountedAmount || detail.discountedAmount==0) ? toThousands(detail.discountedAmount,2) : '--' }}</strong>,
             审核订单金额:<strong>{{ detail && (detail.totalPushedAmount || detail.totalPushedAmount==0) ? toThousands(detail.totalPushedAmount,2) : '--' }}</strong>,
-            已取消金额:<strong>{{ detail && (detail.totalCancelAmount || detail.totalCancelAmount==0) ? toThousands(detail.totalCancelAmount,2) : '--' }}</strong>
+            已取消金额:<strong>{{ detail && (detail.totalCancelAmount || detail.totalCancelAmount==0) ? toThousands(detail.totalCancelAmount,2) : '--' }}</strong>,
+            优惠金额:<strong>{{ detail && (detail.discountAmount || detail.discountAmount==0) ? toThousands(detail.discountAmount,2) : '--' }}</strong>
           </div>
         </div>
         <!-- 列表 -->
@@ -140,7 +141,7 @@ export default {
       const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '10%', align: 'center', scopedSlots: { customRender: 'code' } },
         { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -152,8 +153,8 @@ export default {
         { title: '已取消数量', dataIndex: 'cancelQty', width: '7%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
-        arr.splice(5, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
-        arr.splice(6, 0, { title: '采购金额', dataIndex: 'discountedAmount', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+        arr.splice(5, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '11%', align: 'right', customRender: function (text, record) { return ((text || text == 0) ? _this.toThousands(text, 2) + (record.origPrice ? '(' + _this.toThousands(record.origPrice) + ')' : '') : '--') } })
+        arr.splice(6, 0, { title: '采购金额', dataIndex: 'discountedAmount', width: '11%', align: 'right', customRender: function (text, record) { return ((text || text == 0) ? _this.toThousands(text, 2) + (record.totalOrigAmount ? '(' + _this.toThousands(record.totalOrigAmount) + ')' : '') : '--') } })
         arr.splice(8, 0, { title: '审核订单金额', dataIndex: 'pushedAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
       }
       return arr
@@ -172,7 +173,13 @@ export default {
     getDetail () {
       purchaseDetailBySn({ sn: this.outBizSn || this.$route.params.sn }).then(res => {
         if (res.status == 200) {
-          this.detail = res.data
+          const dataInfo = res.data
+          if (dataInfo.totalOrigAmount && dataInfo.totalAmount) {
+            dataInfo.discountAmount = dataInfo.totalOrigAmount - dataInfo.totalAmount
+          } else {
+            dataInfo.discountAmount = null
+          }
+          this.detail = dataInfo
         } else {
           this.detail = null
         }

+ 7 - 6
src/views/purchasingManagement/purchaseOrderNew/list.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="purchaseNewOrderList-wrap jg-page-wrap">
     <a-card size="small" :bordered="false" class="table-page-search-wrapper">
-        <!-- 搜索条件 -->
+      <!-- 搜索条件 -->
       <div ref="tableSearch">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row type="flex" justify="start" :gutter="15">
@@ -100,7 +100,8 @@
           <template slot="purchaseBillNo" slot-scope="text, record">
             <span class="table-td-link" v-if="$hasPermissions('B_purchaseDetail')" @click="handleDetail(record)">{{ record.purchaseBillNo }}</span>
             <span v-else>{{ record.purchaseBillNo }}</span>
-            <a-badge count="改" :offset="[10,0]" v-if="record.billStatus=='HQ_CHANGE'||record.billStatus=='SUPERIOR_CHANGE'"></a-badge>
+            <a-badge v-if="record.promotionFlag && record.promotionFlag==1" count="促" :number-style="{ backgroundColor: '#52c41a', zoom:'86%',marginLeft:'8px' }"></a-badge>
+            <a-badge count="改" v-if="record.billStatus=='HQ_CHANGE'||record.billStatus=='SUPERIOR_CHANGE'" :number-style="{ zoom:'86%',marginLeft:'8px' }"></a-badge>
           </template>
           <!-- 审核 -->
           <template slot="audit" slot-scope="text, record">
@@ -135,8 +136,8 @@
       </a-spin>
       <!-- 选择基本信息弹框 -->
       <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
-  </a-card>
-  </div> 
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -385,5 +386,5 @@ export default {
 }
 </script>
 <style lang="less">
-   
-</style>
+
+</style>

+ 8 - 2
src/views/purchasingManagement/purchaseOutOfStock/detailModal.vue

@@ -39,6 +39,12 @@
         :data="loadData"
         :scroll="{ y: 500 }"
         bordered>
+        <!-- 产品编码 -->
+        <template slot="code" slot-scope="text, record">
+          <span>{{ record.productCode }}</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>
       </s-table>
       <div class="btn-cont">
         <a-button id="inventoryQueryDetail-detail-modal-back" @click="isShow = false">返回列表</a-button>
@@ -75,12 +81,12 @@ export default {
       const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', scopedSlots: { customRender: 'code' }, width: '12%', align: 'center' },
         { title: '产品名称', dataIndex: 'productName', width: '17%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '原厂编码', dataIndex: 'origCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'unit', width: '10%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '缺货数量', dataIndex: 'qty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单价', dataIndex: 'price', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '单价', dataIndex: 'price', width: '11%', align: 'right', customRender: function (text, record) { return ((text || text == 0) ? _this.toThousands(text) + (record.origPrice ? '(' + _this.toThousands(record.origPrice) + ')' : '') : '--') } },
         { title: '缺货金额', dataIndex: 'totalAmount', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ]
       return arr

+ 6 - 1
src/views/purchasingManagement/purchaseOutOfStock/list.vue

@@ -68,6 +68,11 @@
         :scroll="{ y: tableHeight }"
         :defaultLoadData="false"
         bordered>
+        <!-- 创建时间 -->
+        <template slot="createDate" slot-scope="text, record">
+          <span>{{ record.createDate }}</span>
+          <a-badge v-if="record.promotionFlag && record.promotionFlag==1" count="促" :number-style="{ backgroundColor: '#52c41a', zoom:'86%',marginLeft:'8px' }"></a-badge>
+        </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
@@ -143,7 +148,7 @@ export default {
       const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '创建时间', dataIndex: 'createDate', scopedSlots: { customRender: 'createDate' }, width: '14%', align: 'center' },
         { title: '采购单号', dataIndex: 'purchaseBillNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '供应商', dataIndex: 'purchaseTargetName', width: '18%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '缺货款数', dataIndex: 'totalCategory', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },

+ 9 - 3
src/views/purchasingManagement/signWarehousing/edit.vue

@@ -40,6 +40,12 @@
           :tableId="item.receivingBillSn"
           :index="bindex"
           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, index">
             <div>{{ text }}</div>
@@ -160,7 +166,7 @@ export default {
       const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', scopedSlots: { customRender: 'code' }, width: '12%', align: 'center' },
         { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '17%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '采购数量', dataIndex: 'qty', width: '6%', align: 'center', scopedSlots: { customRender: 'origqty' } },
@@ -170,8 +176,8 @@ export default {
         { title: '仓库仓位', scopedSlots: { customRender: 'warehousePosition' }, width: '14%', align: 'center' }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
-        arr.splice(4, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
-        arr.splice(8, 0, { title: '本次发货金额', dataIndex: 'discountedAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+        arr.splice(4, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '6%', align: 'right', customRender: function (text, record) { return ((text || text == 0) ? _this.toThousands(text, 2) + (record.origPrice ? '(' + _this.toThousands(record.origPrice) + ')' : '') : '--') } })
+        arr.splice(8, 0, { title: '本次发货金额', dataIndex: 'discountedAmount', width: '8%', align: 'right', customRender: function (text, record) { return ((text || text == 0) ? _this.toThousands(text, 2) + (record.totalOrigAmount ? '(' + _this.toThousands(record.totalOrigAmount) + ')' : '') : '--') } })
         arr.splice(10, 0, { title: '本次入库金额', dataIndex: 'realPutAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
       }
       return arr

+ 1 - 0
src/views/purchasingManagement/signWarehousing/list.vue

@@ -60,6 +60,7 @@
         <template slot="purchaseBillNo" slot-scope="text, record">
           <span class="table-td-link" v-if="$hasPermissions('B_purchaseDetail')" @click="handleDetail(record)">{{ record.purchaseBillNo || '--' }}</span>
           <span v-else>{{ record.purchaseBillNo || '--' }}</span>
+          <a-badge v-if="record.promotionFlag && record.promotionFlag==1" count="促" :number-style="{ backgroundColor: '#52c41a', zoom:'86%',marginLeft:'8px' }"></a-badge>
         </template>
         <!-- 发货单号 -->
         <template slot="sendBillNo" slot-scope="text, record">

+ 11 - 5
src/views/purchasingManagement/signWarehousing/stockOrderDetail.vue

@@ -54,7 +54,7 @@
             <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">本次发货金额合计:<strong>{{ detail && (detail.totalPutAmount || detail.totalPutAmount==0) ? toThousands(detail.totalPutAmount, 2) : '--' }}</strong>,</div>
             本次入库数量合计:<strong>{{ detail && (detail.totalRealPutQty || detail.totalRealPutQty==0) ? detail.totalRealPutQty : '--' }}</strong>
             <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">,
-            本次入库金额合计:<strong>{{ detail && (detail.totalRealPutAmount || detail.totalRealPutAmount==0) ? toThousands(detail.totalRealPutAmount, 2) : '--' }}</strong>
+              本次入库金额合计:<strong>{{ detail && (detail.totalRealPutAmount || detail.totalRealPutAmount==0) ? toThousands(detail.totalRealPutAmount, 2) : '--' }}</strong>
             </div>
           </div>
         </a-alert>
@@ -68,6 +68,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="qty" slot-scope="text, record">
             <div>{{ record.qty }}</div>
@@ -126,16 +132,16 @@ export default {
       const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', scopedSlots: { customRender: 'code' }, width: '15%', align: 'center' },
         { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '14%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '采购数量', width: '6%', align: 'center', scopedSlots: { customRender: 'qty' } },
         { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '本次发货数量', dataIndex: 'putQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '本次入库数量', dataIndex: 'realPutQty', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { 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: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+        arr.splice(4, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '10%', align: 'right', customRender: function (text,record) { return ((text || text == 0) ? (_this.toThousands(text, 2) + (record.origPrice ? '(' + _this.toThousands(record.origPrice) + ')' : ''))  : '--') } })
         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) : '--') } })
       }