Browse Source

新样式

lilei 2 years ago
parent
commit
9fab9e8d53

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1677234171618
+  "version": 1677461372729
 }

+ 11 - 4
src/views/common/printPanel.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="print-page-header">
-        <a-popover placement="bottom">
+        <a-popover :placement="position">
             <template slot="content">
                 <div style="padding:10px;">
                     <span>打印方式:</span>
@@ -9,6 +9,7 @@
                         <a-radio value="INK">喷墨</a-radio>
                     </a-radio-group>
                 </div>
+                <slot name="extendCons"></slot>
                 <div style="padding:10px;">
                     <a-button 
                     key="3" 
@@ -24,13 +25,14 @@
                         key="2"
                         size="small"
                         type="primary"
-                        style="margin-left: 5px;"
+                        style="margin-left: 10px;margin-right: 10px;"
                         id="print-print-btn"
                         :disabled="disabled"
                         :loading="$store.state.app.printLoading"
                         @click="handlePrint('print')">
                         {{ $store.state.app.printLoading?'打印中...':'快捷打印' }}
                     </a-button>
+                    <a-divider type="vertical" />
                     <a-button
                         key="1"
                         size="small"
@@ -40,10 +42,11 @@
                         id="print-export-btn"
                         v-if="showExport"
                         :disabled="disabled"
-                        @click="handlePrint('export')">导出Excel</a-button>         
+                        @click="handlePrint('export')">导出Excel</a-button>
+                    <slot name="extendButtons"></slot>         
                 </div>
             </template>
-            <a-button type="link" class="button-default"><a-icon type="printer" /> 打印 </a-button>
+            <a-button type="link" class="button-default"><a-icon type="printer" /> 打印导出 </a-button>
         </a-popover>
 
       <!-- 打印 -->
@@ -62,6 +65,10 @@
       showExport: {
         type: Boolean,
         default: true
+      },
+      position: {
+        type: String,
+        default: 'bottom'
       }
     },
     data () {

+ 78 - 115
src/views/purchasingManagement/purchaseOrderNew/detail.vue

@@ -1,19 +1,27 @@
 <template>
   <div class="purchaseOrderDetail-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-page-header :ghost="false" :backIcon="false" @back="handleBack" class="purchaseOrderDetail-cont" :style="{ padding: !outBizSn ? '16px 24px' : '0px 24px' }">
-        <!-- 自定义的二级文字标题 -->
-        <template slot="subTitle">
-          <a id="purchaseOrderDetail-back-btn" href="javascript:;" @click="handleBack" v-if="!outBizSn"><a-icon type="left" /> 返回列表</a>
-          <span class="billno">单号:{{ detail&&detail.purchaseBillNo }}</span>
-          <a-tag color="blue" v-if="detail&&detail.billStatusDictValue">{{ detail&&detail.billStatusDictValue }}</a-tag>
-          <a-tag color="orange" v-if="detail&&detail.financialStatusDictValue">{{ detail&&detail.financialStatusDictValue }}</a-tag>
-          <span class="billno" v-if="detail&&detail.purchaseBillNoSource" style="font-size: 14px;margin: 0;">(原:{{ detail&&detail.purchaseBillNoSource }})</span>
-        </template>
-        <!-- 操作区,位于 title 行的行尾 -->
-        <template slot="extra">
-          <Print v-if="$hasPermissions('B_purchasePrint')" :disabled="localDataSource.length==0" @handlePrint="handlePrint"></Print>
-          <a-button
+      <a-page-header :ghost="false" :backIcon="false" class="purchaseOrderDetail-cont" :style="{ padding: !outBizSn ? '16px 24px' : '0px 24px' }">
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <span class="billno">单号:{{ detail&&detail.purchaseBillNo }}</span>
+        <a-tag color="blue" v-if="detail&&detail.billStatusDictValue">{{ detail&&detail.billStatusDictValue }}</a-tag>
+        <a-tag color="orange" v-if="detail&&detail.financialStatusDictValue">{{ detail&&detail.financialStatusDictValue }}</a-tag>
+        <span v-if="detail&&detail.purchaseBillNoSource" style="font-size: 14px;margin: 0 10px;">(原:{{ detail&&detail.purchaseBillNoSource }})</span>
+
+        <a-button type="link" class="button-default" @click="isShowBisiceInfo=!isShowBisiceInfo" style="margin-left:10px;vertical-align:middle;">
+          <a-icon :type="isShowBisiceInfo ? 'eye-invisible' : 'eye'"/>
+          查看信息
+        </a-button>
+        <a-button id="purchaseNewOrderEdit-back-btn" type="link" @click="handleBack" class="button-default"> <a-icon type="rollback" /> 返回列表</a-button>
+      </template>
+      <!-- 操作区,位于 title 行的行尾 -->
+      <template slot="extra">
+        <div style="margin-top: 5px;">
+          <PrintPanel position="bottomRight" v-if="$hasPermissions('B_purchasePrint')" :disabled="localDataSource.length==0" @handlePrint="handlePrint">
+            <a-button
+            slot="extendButtons"
+            size="small"
             key="1"
             v-if="$hasPermissions('B_purchaseExportProduct') && (detail&&(detail.billStatus=='AUDIT_PASS' || detail.billStatus=='CANCEL' || detail.billStatus=='WAIT_PUT_WAREHOUSE' || detail.billStatus=='WAIT_PUT_WAREHOUSE_AUDIT' || detail.billStatus=='FINISH'))"
             type="primary"
@@ -21,49 +29,46 @@
             id="purchaseOrderDetail-export-btn"
             :disabled="localDataSource.length==0"
             @click="handleExportProduct()">导出审核订单产品</a-button>
-        </template>
-      </a-page-header>
+          </PrintPanel>
+        </div>
+      </template>
+    </a-page-header>
+
       <!-- 基础信息 -->
-      <a-card size="small" :bordered="false" class="purchaseOrderDetail-cont">
-        <a-collapse :activeKey="['1']">
-          <a-collapse-panel key="1" header="基础信息">
-            <a-descriptions :column="3">
-              <a-descriptions-item label="供应商">{{ (detail&&detail.purchaseTargetName) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="支付方式">{{ (detail&&detail.settleStyleSnDictValue) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="采购员工" v-if="detail&&detail.purchaseBillSource=='PURCHASE'">{{ detail&&detail.operatorName || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="收货人">{{ detail&&detail.consigneeName || '--' }}<span v-if="detail&&detail.consigneeTel">({{ detail&&detail.consigneeTel }})</span></a-descriptions-item>
-              <a-descriptions-item label="收货地址">
-                <div v-if="detail&&(detail.shippingAddressProvinceName || detail.shippingAddressCityName || detail.shippingAddressCountyName || detail.shippingAddress)">
-                  {{ detail&&detail.shippingAddressProvinceName || '' }}
-                  {{ detail&&detail.shippingAddressCityName || '' }}
-                  {{ detail&&detail.shippingAddressCountyName || '' }}
-                  {{ detail&&detail.shippingAddress || '' }}
-                </div>
-                <span v-else>--</span>
-              </a-descriptions-item>
-              <a-descriptions-item label="备注">{{ (detail&&detail.remarks) || '--' }}</a-descriptions-item>
-            </a-descriptions>
-          </a-collapse-panel>
-        </a-collapse>
+      <a-card size="small" :bordered="false" class="purchaseOrderDetail-cont" v-show="isShowBisiceInfo">
+        <a-descriptions :column="3" size="small">
+          <div slot="title">基础信息</div>
+          <a-descriptions-item label="供应商">{{ (detail&&detail.purchaseTargetName) || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="支付方式">{{ (detail&&detail.settleStyleSnDictValue) || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="采购员工" v-if="detail&&detail.purchaseBillSource=='PURCHASE'">{{ detail&&detail.operatorName || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="收货人">{{ detail&&detail.consigneeName || '--' }}<span v-if="detail&&detail.consigneeTel">({{ detail&&detail.consigneeTel }})</span></a-descriptions-item>
+          <a-descriptions-item label="收货地址">
+            <div v-if="detail&&(detail.shippingAddressProvinceName || detail.shippingAddressCityName || detail.shippingAddressCountyName || detail.shippingAddress)">
+              {{ detail&&detail.shippingAddressProvinceName || '' }}
+              {{ detail&&detail.shippingAddressCityName || '' }}
+              {{ detail&&detail.shippingAddressCountyName || '' }}
+              {{ detail&&detail.shippingAddress || '' }}
+            </div>
+            <span v-else>--</span>
+          </a-descriptions-item>
+          <a-descriptions-item label="备注">{{ (detail&&detail.remarks) || '--' }}</a-descriptions-item>
+        </a-descriptions>
       </a-card>
       <!-- 产品详情 -->
       <a-card size="small" :bordered="false" class="purchaseOrderDetail-cont">
-        <a-collapse :activeKey="['1']">
-          <a-collapse-panel key="1" header="产品详情">
+          <div slot="title" style="font-size:14px;"><strong>产品详情</strong></div>
             <!-- 总计 -->
-            <a-alert type="info" style="margin-bottom:10px">
-              <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.totalPushedQty || detail.totalPushedQty==0) ? detail.totalPushedQty : '--' }}</strong>,
-                已取消数量:<strong>{{ detail && (detail.totalCancelQty || detail.totalCancelQty==0) ? detail.totalCancelQty : '--' }}</strong>,
-                <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>
-                </div>
+            <div class="alert-message">
+              产品款数:<strong>{{ detail && (detail.totalCategory || detail.totalCategory==0) ? detail.totalCategory : '--' }}</strong>,
+              采购数量合计:<strong>{{ detail && (detail.totalQty || detail.totalQty==0) ? detail.totalQty : '--' }}</strong>,
+              审核订单数量:<strong>{{ detail && (detail.totalPushedQty || detail.totalPushedQty==0) ? detail.totalPushedQty : '--' }}</strong>,
+              已取消数量:<strong>{{ detail && (detail.totalCancelQty || detail.totalCancelQty==0) ? detail.totalCancelQty : '--' }}</strong>,
+              <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>
               </div>
-            </a-alert>
+            </div>
             <!-- 列表 -->
             <s-table
               class="sTable"
@@ -84,58 +89,6 @@
                 <span>{{ record.outOfStockNum }}</span>
               </template>
             </s-table>
-          </a-collapse-panel>
-        </a-collapse>
-      </a-card>
-      <!-- 促销品详情 -->
-      <a-card size="small" v-if="false" :bordered="false" class="purchaseOrderDetail-cont">
-        <a-collapse :activeKey="['1']">
-          <a-collapse-panel key="1" header="促销品详情">
-            <!-- 总计 -->
-            <a-alert type="info" style="margin-bottom:10px">
-              <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.totalAmount || detail.totalAmount==0) ? toThousands(detail.totalAmount,2) : '--' }}</strong></div>
-            </a-alert>
-            <!-- 列表 -->
-            <s-table
-              class="sTable"
-              ref="table-1"
-              size="small"
-              :rowKey="(record) => record.id"
-              :columns="columns"
-              :data="loadData"
-              :scroll="{ x: 1060 }"
-              bordered>
-              <!-- 采购数量 -->
-              <template slot="origqty" slot-scope="text, record">
-                <div>{{ text }}</div>
-                <div v-if="record.origqty">原采购数量:{{ record.origqty }}</div>
-              </template>
-              <!-- 已取消数量 -->
-              <template slot="outOfStockNum" slot-scope="text, record">
-                <span>{{ record.outOfStockNum }}</span>
-              </template>
-            </s-table>
-          </a-collapse-panel>
-        </a-collapse>
-      </a-card>
-      <!-- 单据记录 -->
-      <a-card size="small" v-if="false" :bordered="false" class="purchaseOrderDetail-cont">
-        <a-collapse :activeKey="['1']">
-          <a-collapse-panel key="1" header="单据记录">
-            <a-timeline class="timeline-box">
-              <a-timeline-item>2021-02-01 15:22:38   王凯   审核通过</a-timeline-item>
-              <a-timeline-item>
-                <p>2021-02-01 15:22:38   王凯   审核通过</p>
-                <p class="auxiliary-txt">产品编号JA-11076P的采购数量,由【10】修改为【5】</p>
-                <p class="auxiliary-txt">产品编号JA-11076P的采购数量,由【10】修改为【5】</p>
-              </a-timeline-item>
-              <a-timeline-item>Technical testing 2015-09-01</a-timeline-item>
-              <a-timeline-item>Network problems being solved 2015-09-01</a-timeline-item>
-            </a-timeline>
-          </a-collapse-panel>
-        </a-collapse>
       </a-card>
     </a-spin>
   </div>
@@ -146,11 +99,11 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { purchaseDetailBySn, purchaseDetailPrint, purchaseDetailExport, purchaseExportDetail } from '@/api/purchase'
 import { purchaseDetailList } from '@/api/purchaseDetail'
-import Print from '@/views/common/print.vue'
+import PrintPanel from '@/views/common/printPanel.vue'
 import { hdPrint, downloadExcel } from '@/libs/JGPrint'
 export default {
   name: 'PurchaseDetail',
-  components: { STable, VSelect, Print },
+  components: { STable, VSelect, PrintPanel },
   mixins: [commonMixin],
   props: {
     outBizSn: { //  有值则为弹框,无值则为页面
@@ -161,6 +114,7 @@ export default {
   data () {
     return {
       spinning: false,
+      isShowBisiceInfo: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -284,20 +238,29 @@ export default {
 </script>
 
 <style lang="less">
-  .purchaseOrderDetail-cont{
-    margin-bottom: 10px;
-    .timeline-box{
-      margin-top: 30px;
-      .auxiliary-txt{
-        color: #808695;
-      }
-    }
-  }
   .purchaseOrderDetail-wrap{
     .billno{
+      margin: 0 10px 0 0;
       font-size: 16px;
-      font-weight: bold;
-      margin: 0 15px;
+      font-weight: 600;
+      display: inline-block;
+      vertical-align: middle;
+      color: #333;
+    }
+    .purchaseOrderDetail-cont{
+      margin-bottom: 10px;
+      .timeline-box{
+        margin-top: 30px;
+        .auxiliary-txt{
+          color: #808695;
+        }
+      }
+    }
+    .alert-message{
+      margin-bottom: 10px;
+      strong{
+        color: #f12929;
+      }
     }
   }
 </style>

+ 1 - 1
src/views/purchasingManagement/purchaseOrderNew/edit.vue

@@ -31,7 +31,7 @@
                 <a-icon type="shopping" /> 购物车
               </a-menu-item>
             </a-menu>
-            <a-button type="link" class="button-default"> <a-icon type="down" />  更多操作</a-button>
+            <a-button type="link" class="button-default"> <a-icon type="unordered-list" />  更多操作</a-button>
           </a-dropdown> 
         </div>
       </template>