lilei 2 лет назад
Родитель
Сommit
e3c2325f65

+ 1 - 1
public/version.json

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

+ 2 - 2
src/libs/JGPrint.js

@@ -200,6 +200,7 @@ export const pdfPrint = function (data,index){
   const dlen = data.length
   // 打印进入队列开始
   store.commit('SET_printLoading',true)
+  console.log(store.state.app.printTaskName)
   LODOP.PRINT_INIT(store.state.app.printTaskName + (dlen>1 ? ('第'+(index+1)+'页') : ''))
   //这个语句设置网络共享打印机连接不通时是否提示一下
   LODOP.SET_PRINT_MODE("TRYLINKPRINTER_NOALERT",true);
@@ -292,11 +293,11 @@ export const jGPrint = function (data, type, printerType, taskName) {
       })
       return
     }
+    store.commit('SET_printTaskName', taskName)
     // pdf 打印预览
     if (type == 'preview') { 
       store.commit('SET_pdfPrintList', data.data)
       store.commit('SET_showPdfPrint', data.data)
-      store.commit('SET_printTaskName', taskName)
     } else if (type == 'print') { //  pdf 打印
       // 选择打印机
       const printDefNeedle = store.state.app.printDefNeedle
@@ -310,7 +311,6 @@ export const jGPrint = function (data, type, printerType, taskName) {
       }else{
         // 没有设置默认打印机时,请选择打印机
         store.commit('SET_pdfPrintList', data.data)
-        store.commit('SET_printTaskName', taskName)
         store.commit('SET_printUseing', 1)
         store.commit('SET_showSelectPrint', true)
       }

+ 82 - 84
src/views/common/printPanel.vue

@@ -1,95 +1,93 @@
 <template>
-    <div class="print-page-header">
-        <a-popover :placement="position" v-model="hovered" trigger="hover">
-            <template slot="content">
-                <div style="padding:10px;">
-                    <span>打印方式:</span>
-                    <a-radio-group key="4" id="print-printerType" v-model="printerType">
-                        <a-radio value="NEEDLE">针式</a-radio>
-                        <a-radio value="INK">喷墨</a-radio>
-                    </a-radio-group>
-                </div>
-                <slot name="extendCons"></slot>
-                <div style="padding:10px;">
-                    <a-button 
-                    key="1" 
-                    id="print-preview-btn" 
-                    type="primary"
-                    ghost
-                    :loading="$store.state.app.printLoading" 
-                    :disabled="disabled" 
-                    @click="handlePrint('preview')">
-                        打印预览
-                    </a-button>
-                    <a-button
-                        key="2"
-                        type="primary"
-                        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>
-                </div>
-                <a-divider style="margin:5px 0;" v-if="showExport"/>
-                <div style="padding:10px;" v-if="showExport">
-                  <a-button
-                        key="3"
-                        type="primary"
-                        class="button-warning"
-                        :loading="$store.state.app.printLoading"
-                        id="print-export-btn"
-                        style="margin-left:0;"
-                        :disabled="disabled"
-                        @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-popover>
+  <div class="print-page-header">
+    <a-popover :placement="position" v-model="hovered" trigger="hover">
+      <template slot="content">
+        <div style="padding:10px;">
+          <span>打印方式:</span>
+          <a-radio-group key="4" id="print-printerType" v-model="printerType">
+            <a-radio value="NEEDLE">针式</a-radio>
+            <a-radio value="INK">喷墨</a-radio>
+          </a-radio-group>
+        </div>
+        <slot name="extendCons"></slot>
+        <div style="padding:10px;">
+          <a-button
+            key="1"
+            id="print-preview-btn"
+            type="primary"
+            ghost
+            :loading="$store.state.app.printLoading"
+            :disabled="disabled"
+            @click="handlePrint('preview')">
+            打印预览
+          </a-button>
+          <a-button
+            key="2"
+            type="primary"
+            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>
+        </div>
+        <a-divider style="margin:5px 0;" v-if="showExport"/>
+        <div style="padding:10px;" v-if="showExport">
+          <a-button
+            key="3"
+            type="primary"
+            class="button-warning"
+            :loading="$store.state.app.printLoading"
+            id="print-export-btn"
+            style="margin-left:0;"
+            :disabled="disabled"
+            @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-popover>
 
-      <!-- 打印 -->
-      <div id="print"></div>
-    </div>
-  </template>
-  
-  <script>
-  export default {
-    name: 'PrintPanel',
-    props: {
-      disabled: {
-        type: Boolean,
-        default: false
-      },
-      showExport: {
-        type: Boolean,
-        default: true
-      },
-      position: {
-        type: String,
-        default: 'bottom'
-      }
+    <!-- 打印 -->
+    <div id="print"></div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'PrintPanel',
+  props: {
+    disabled: {
+      type: Boolean,
+      default: false
     },
-    data () {
-      return {
-        hovered: false,
-        printerType: 'NEEDLE' // 打印机类型
-      }
+    showExport: {
+      type: Boolean,
+      default: true
     },
-    methods: {
-      handlePrint (type) {
-        this.$store.dispatch('TogglePrintSettingType', this.printerType)
-        this.$emit('handlePrint', type, this.printerType)
-        // this.hovered = false
-      }
+    position: {
+      type: String,
+      default: 'bottom'
+    }
+  },
+  data () {
+    return {
+      hovered: false,
+      printerType: 'NEEDLE' // 打印机类型
+    }
+  },
+  methods: {
+    handlePrint (type) {
+      this.$store.dispatch('TogglePrintSettingType', this.printerType)
+      this.$emit('handlePrint', type, this.printerType)
     }
   }
-  </script>
-  
+}
+</script>
+
   <style lang="less">
     .print-page-header{
       display: inline-block;
     }
   </style>
-  

+ 89 - 81
src/views/purchasingManagement/purchaseOrderNew/edit.vue

@@ -32,7 +32,7 @@
               </a-menu-item>
             </a-menu>
             <a-button type="link" class="button-default"> <a-icon type="unordered-list" />  更多</a-button>
-          </a-dropdown> 
+          </a-dropdown>
         </div>
       </template>
     </a-page-header>
@@ -96,18 +96,18 @@
           </div>
           <!-- 列表 -->
           <a-spin :spinning="spinning" tip="Loading...">
-          <ve-table
-            border-y
-            :border-around="false"
-            :max-height="tableHeight"
-            :row-style-option="{clickHighlight: true}"
-            :cellSelectionOption="{enable: false}"
-            :virtual-scroll-option="{enable: true}"
-            :columns="chooseColumns"
-            :table-data="localDataSource"
-            row-key-field-name="id"
-          />
-        </a-spin>
+            <ve-table
+              border-y
+              :border-around="false"
+              :max-height="tableHeight"
+              :row-style-option="{clickHighlight: true}"
+              :cellSelectionOption="{enable: false}"
+              :virtual-scroll-option="{enable: true}"
+              :columns="chooseColumns"
+              :table-data="localDataSource"
+              row-key-field-name="id"
+            />
+          </a-spin>
         </div>
         <div class="choosed-table" v-else>
           <div v-if="!spinning&&localDataSource.length==0">
@@ -167,7 +167,7 @@
     <outStockModal :openModal="openOutStockModal" :paramsData="paramsData" @close="openOutStockModal=false" @ok="hanldeOkOutStock" />
     <!-- 购物车 -->
     <shopingCatModal :showModal="openShopCatModal" :paramsData="paramsData" @close="openShopCatModal=false" @ok="getOrderDetail(false, true)"></shopingCatModal>
-    
+
   </div>
 </template>
 
@@ -187,8 +187,8 @@ import PrintPanel from '@/views/common/printPanel.vue'
 import { hdPrint } from '@/libs/JGPrint'
 const shopingCatModal = () => import(/* webpackChunkName: "shopingCatModal" */ '@/views/common/shopingCatModal.vue')
 const qtyComp = {
-        name: "qtyComp",
-        template: `
+  name: 'qtyComp',
+  template: `
         <a-input-number
               size="small"
               v-model="row.qty"
@@ -199,16 +199,16 @@ const qtyComp = {
               style="width: 100%;"
               placeholder="请输入" />
     `,
-        props: {
-            row: Object,
-            column: Object,
-            rowIndex: Number,
-            that: Object
-        },
-    };
+  props: {
+    row: Object,
+    column: Object,
+    rowIndex: Number,
+    that: Object
+  }
+}
 const actionComp = {
-        name: "actionComp",
-        template: `
+  name: 'actionComp',
+  template: `
         <a-button
           size="small"
           type="link"
@@ -217,13 +217,13 @@ const actionComp = {
           @click="that.handleDel(row)"
           >删除</a-button>
     `,
-        props: {
-            row: Object,
-            column: Object,
-            rowIndex: Number,
-            that: Object
-        },
-    };
+  props: {
+    row: Object,
+    column: Object,
+    rowIndex: Number,
+    that: Object
+  }
+}
 
 export default {
   name: 'PurchaseEdit',
@@ -264,62 +264,70 @@ export default {
     chooseColumns () {
       const _this = this
       const arr = [
-        { title: '序号', key: "a", field: 'no', width: '5%', align: 'center', operationColumn: false },
-        { title: '产品编码',key: "b", field: 'productCode', width: '10%', align: 'center', operationColumn: false},
-        { title: '产品名称',key: "c", field: 'productName', width: '25%', align: 'center', operationColumn: false,ellipsis: {showTitle: true} },
-        { title: '可用库存',key: "j", field: 'currentStockQty', width: '10%', align: 'center', operationColumn: false},
-        { title: '采购数量',key: "d", width: '10%', align: 'center', operationColumn: false, 
-        renderBodyCell: ({ row, column, rowIndex }, h) => {
+        { title: '序号', key: 'a', field: 'no', width: '5%', align: 'center', operationColumn: false },
+        { title: '产品编码', key: 'b', field: 'productCode', width: '10%', align: 'center', operationColumn: false },
+        { title: '产品名称', key: 'c', field: 'productName', width: '25%', align: 'center', operationColumn: false, ellipsis: { showTitle: true } },
+        { title: '可用库存', key: 'j', field: 'currentStockQty', width: '10%', align: 'center', operationColumn: false },
+        { title: '采购数量',
+          key: 'd',
+          width: '10%',
+          align: 'center',
+          operationColumn: false,
+          renderBodyCell: ({ row, column, rowIndex }, h) => {
             return <qtyComp row={row} column={column} rowIndex={rowIndex} that={_this} />
-        }},
-        { title: '单位',key: "e", field: 'productUnit', width: '10%', align: 'center', operationColumn: false },
-        { title: '操作',key: "f", width: '10%', align: 'center', operationColumn: false,
-        renderBodyCell: ({ row, column, rowIndex }, h) => {
+          } },
+        { title: '单位', key: 'e', field: 'productUnit', width: '10%', align: 'center', operationColumn: false },
+        { title: '操作',
+          key: 'f',
+          width: '10%',
+          align: 'center',
+          operationColumn: false,
+          renderBodyCell: ({ row, column, rowIndex }, h) => {
             return <actionComp row={row} column={column} rowIndex={rowIndex} that={_this} />
-        }}
+          } }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
-        arr.splice(4, 0, { title: '采购单价',key: "h", field: 'discountedPriceText', width: '10%', align: 'right', operationColumn: false})
-        arr.splice(6, 0, { title: '采购金额',key: "i", field: 'discountedAmountText', width: '10%', align: 'right', operationColumn: false})
+        arr.splice(4, 0, { title: '采购单价', key: 'h', field: 'discountedPriceText', width: '10%', align: 'right', operationColumn: false })
+        arr.splice(6, 0, { title: '采购金额', key: 'i', field: 'discountedAmountText', width: '10%', align: 'right', operationColumn: false })
       }
       return arr
     }
   },
   methods: {
-    handleActions(e){
-      if(e.key == 1){
-        this.openGuideModal=true
+    handleActions (e) {
+      if (e.key == 1) {
+        this.openGuideModal = true
       }
-      if(e.key == 2){
+      if (e.key == 2) {
         this.handleOutStock()
       }
-      if(e.key == 3){
+      if (e.key == 3) {
         this.hanldCart()
       }
     },
-    getTableData(){
-        this.disabled = true
-        this.spinning = true
-        // 查询总计
-        const params = Object.assign({ pageNo: 1, pageSize: 10000 }, this.productForm, { purchaseBillSn: this.$route.params.sn })
-        purchaseDetailList(params).then(res => {
-          const data = res.data
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            const row = data.list[i]
-            row.no = no + i + 1
-            row.qtyBackups = row.qty
-            row.productCode = row.dealerProductEntity.code || '--'
-            row.productName = row.dealerProductEntity.name || '--'
-            row.productUnit = row.dealerProductEntity.unit || '--'
-            row.discountedPriceText = (row.discountedPrice||row.discountedPrice==0)?this.toThousands(row.discountedPrice, 2):'--'
-            row.discountedAmountText = (row.discountedAmount||row.discountedAmount==0)?this.toThousands(row.discountedAmount, 2):'--'
-            row.currentStockQty = (row.currentStockQty||row.currentStockQty==0)?row.currentStockQty:'--'
-          }
-          this.localDataSource = data.list
-          this.disabled = false
-          this.spinning = false
-        })
+    getTableData () {
+      this.disabled = true
+      this.spinning = true
+      // 查询总计
+      const params = Object.assign({ pageNo: 1, pageSize: 10000 }, this.productForm, { purchaseBillSn: this.$route.params.sn })
+      purchaseDetailList(params).then(res => {
+        const data = res.data
+        const no = (data.pageNo - 1) * data.pageSize
+        for (var i = 0; i < data.list.length; i++) {
+          const row = data.list[i]
+          row.no = no + i + 1
+          row.qtyBackups = row.qty
+          row.productCode = row.dealerProductEntity.code || '--'
+          row.productName = row.dealerProductEntity.name || '--'
+          row.productUnit = row.dealerProductEntity.unit || '--'
+          row.discountedPriceText = (row.discountedPrice || row.discountedPrice == 0) ? this.toThousands(row.discountedPrice, 2) : '--'
+          row.discountedAmountText = (row.discountedAmount || row.discountedAmount == 0) ? this.toThousands(row.discountedAmount, 2) : '--'
+          row.currentStockQty = (row.currentStockQty || row.currentStockQty == 0) ? row.currentStockQty : '--'
+        }
+        this.localDataSource = data.list
+        this.disabled = false
+        this.spinning = false
+      })
     },
     // 获取采购单基本信息
     getOrderDetail (noRefashTable, isReset, flag) {
@@ -496,7 +504,7 @@ export default {
         _this.openChooseProduct = false
         _this.openOutStockModal = false
       }
-      _this.$store.state.app.printLoading = true
+      _this.spinning = true
       let url = purchaseDetailPrint
       let params = { sn: this.$route.params.sn, type: printerType }
       if (type == 'export') { //  导出
@@ -505,7 +513,7 @@ export default {
       }
       // 打印或导出
       hdPrint(printerType, type, url, params, '采购单', function () {
-        _this.$store.state.app.printLoading = false
+        _this.spinning = false
         _this.$refs.printBox.hovered = false
       })
     },
@@ -527,10 +535,10 @@ export default {
     isShowBisiceInfo (newValue, oldValue) {
       this.setTableH()
     },
-    showSearch(newValue, oldValue){
-      if(this.isShowBisiceInfo){
+    showSearch (newValue, oldValue) {
+      if (this.isShowBisiceInfo) {
         this.isShowBisiceInfo = false
-      }else{
+      } else {
         this.setTableH()
       }
     },
@@ -562,12 +570,12 @@ export default {
     position: relative;
     height: 100%;
     box-sizing: border-box;
-    
+
     .choosedList-cont{
       position: relative;
       background-color: #fff;
       height: calc(100% - 60px);
     }
-     
+
   }
-</style>
+</style>

+ 99 - 99
src/views/salesManagement/salesQueryNew/detail.vue

@@ -25,104 +25,104 @@
           </div>
         </template>
       </a-page-header>
-    <div class="sales-detail-body">
-      <!-- 基础信息 -->
-      <a-card size="small" :bordered="false" class="salesDetail-cont" v-show="isShowBisiceInfo">
-        <a-descriptions size="small" :column="3">
-          <div slot="title">基础信息</div>
-          <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerNameCurrent?detailData.buyerName?detailData.buyerName==detailData.buyerNameCurrent?detailData.buyerNameCurrent:detailData.buyerNameCurrent+'('+detailData.buyerName+')':detailData.buyerNameCurrent:'--' }}</a-descriptions-item>
-          <a-descriptions-item label="客户地址" :span="2">
-            <div v-if="detailData&&(detailData.shippingAddressProvinceName || detailData.shippingAddressCityName || detailData.shippingAddressCountyName || detailData.shippingAddress)">
-              {{ detailData&&detailData.shippingAddressProvinceName || '' }}
-              {{ detailData&&detailData.shippingAddressCityName || '' }}
-              {{ detailData&&detailData.shippingAddressCountyName || '' }}
-              {{ detailData&&detailData.shippingAddress || '' }}
-            </div>
-            <span v-else>--</span>
-          </a-descriptions-item>
-          <a-descriptions-item label="收款方式">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="联系电话">{{ detailData&&detailData.consigneeTel || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="备注">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="销售单号">{{ detailData&&detailData.salesBillNo || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="制单人">{{ detailData&&detailData.operatorName || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="业务员">{{ detailData&&detailData.salesManName || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="来源">{{ detailData&&detailData.sourceTypeDictValue || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="下级采购单号" v-if="detailData&&detailData.sourceType=='PURCHASE'">{{ detailData&&detailData.purchaseBillNo || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="财务状态">{{ detailData&&detailData.financialStatusDictValue || '--' }}</a-descriptions-item>
-        </a-descriptions>
-      </a-card>
-      <a-card size="small" :bordered="false" class="pages-wrap">
-        <!-- alert -->
-        <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom:10px;">
-          <div>
-            总款数:<strong>{{ detailData&&(detailData.totalCategory || detailData.totalCategory==0) ? detailData.totalCategory : '--' }}</strong>;
-            总数量:<strong>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}</strong>;
-            总赠品数量:<strong>{{ detailData&&(detailData.giftQty || detailData.giftQty==0) ? detailData.giftQty : '--' }}</strong>;
-            急件总款数:<strong>{{ detailData&&(detailData.oosCategory || detailData.oosCategory==0) ? detailData.oosCategory : '--' }}</strong>;
-            急件总数量:<strong>{{ detailData&&(detailData.oosQty || detailData.oosQty==0) ? detailData.oosQty : '--' }}</strong>;<br/>
-            总售价:<strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? toThousands(detailData.totalAmount) : '--' }}</strong>;
-            <template v-if="showCost">
-              总成本:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</strong>;
-              总毛利:<strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? toThousands(detailData.grossProfit) : '--' }}</strong>;
-            </template>
-            折后总售价:<strong>{{ detailData&&(detailData.discountedAmount || detailData.discountedAmount==0) ? toThousands(detailData.discountedAmount) : '--' }}</strong>;
-            折扣:<strong>{{ detailData&&(detailData.discountRate || detailData.discountRate==0) ? detailData.discountRate+'%' : '--' }}</strong>;
-            折扣金额:<strong>{{ detailData&&(detailData.discountAmount || detailData.discountAmount==0) ? toThousands(detailData.discountAmount) : '--' }}</strong>;
-          </div>
-          <div>
-            <a-checkbox v-model="showCost" v-if="$hasPermissions('M_ShowAllCost')" id="salesQuery-cost">成本价</a-checkbox>
-          </div>
-        </div>
-        <!-- 列表 -->
-        <s-table
-          class="sTable"
-          ref="table"
-          size="small"
-          :rowKey="(record) => record.id"
-          :columns="columns"
-          :data="loadData"
-          :defaultLoadData="false"
-          bordered>
-          <div slot="costTitle">
-            <a-tooltip placement="top">
-              <template slot="title">
-                系统中不同批次的产品,成本价可能不同,此值是按照实际出库批次的成本计算得到。
+      <div class="sales-detail-body">
+        <!-- 基础信息 -->
+        <a-card size="small" :bordered="false" class="salesDetail-cont" v-show="isShowBisiceInfo">
+          <a-descriptions size="small" :column="3">
+            <div slot="title">基础信息</div>
+            <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerNameCurrent?detailData.buyerName?detailData.buyerName==detailData.buyerNameCurrent?detailData.buyerNameCurrent:detailData.buyerNameCurrent+'('+detailData.buyerName+')':detailData.buyerNameCurrent:'--' }}</a-descriptions-item>
+            <a-descriptions-item label="客户地址" :span="2">
+              <div v-if="detailData&&(detailData.shippingAddressProvinceName || detailData.shippingAddressCityName || detailData.shippingAddressCountyName || detailData.shippingAddress)">
+                {{ detailData&&detailData.shippingAddressProvinceName || '' }}
+                {{ detailData&&detailData.shippingAddressCityName || '' }}
+                {{ detailData&&detailData.shippingAddressCountyName || '' }}
+                {{ detailData&&detailData.shippingAddress || '' }}
+              </div>
+              <span v-else>--</span>
+            </a-descriptions-item>
+            <a-descriptions-item label="收款方式">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="联系电话">{{ detailData&&detailData.consigneeTel || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="备注">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="销售单号">{{ detailData&&detailData.salesBillNo || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="制单人">{{ detailData&&detailData.operatorName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="业务员">{{ detailData&&detailData.salesManName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="来源">{{ detailData&&detailData.sourceTypeDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="下级采购单号" v-if="detailData&&detailData.sourceType=='PURCHASE'">{{ detailData&&detailData.purchaseBillNo || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="财务状态">{{ detailData&&detailData.financialStatusDictValue || '--' }}</a-descriptions-item>
+          </a-descriptions>
+        </a-card>
+        <a-card size="small" :bordered="false" class="pages-wrap">
+          <!-- alert -->
+          <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom:10px;">
+            <div>
+              总款数:<strong>{{ detailData&&(detailData.totalCategory || detailData.totalCategory==0) ? detailData.totalCategory : '--' }}</strong>;
+              总数量:<strong>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}</strong>;
+              总赠品数量:<strong>{{ detailData&&(detailData.giftQty || detailData.giftQty==0) ? detailData.giftQty : '--' }}</strong>;
+              急件总款数:<strong>{{ detailData&&(detailData.oosCategory || detailData.oosCategory==0) ? detailData.oosCategory : '--' }}</strong>;
+              急件总数量:<strong>{{ detailData&&(detailData.oosQty || detailData.oosQty==0) ? detailData.oosQty : '--' }}</strong>;<br/>
+              总售价:<strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? toThousands(detailData.totalAmount) : '--' }}</strong>;
+              <template v-if="showCost">
+                总成本:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</strong>;
+                总毛利:<strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? toThousands(detailData.grossProfit) : '--' }}</strong>;
               </template>
-              <span style="margin-right: 5px;">实际总成本</span> <a-icon type="question-circle" />
-            </a-tooltip>
+              折后总售价:<strong>{{ detailData&&(detailData.discountedAmount || detailData.discountedAmount==0) ? toThousands(detailData.discountedAmount) : '--' }}</strong>;
+              折扣:<strong>{{ detailData&&(detailData.discountRate || detailData.discountRate==0) ? detailData.discountRate+'%' : '--' }}</strong>;
+              折扣金额:<strong>{{ detailData&&(detailData.discountAmount || detailData.discountAmount==0) ? toThousands(detailData.discountAmount) : '--' }}</strong>;
+            </div>
+            <div>
+              <a-checkbox v-model="showCost" v-if="$hasPermissions('M_ShowAllCost')" id="salesQuery-cost">成本价</a-checkbox>
+            </div>
           </div>
-          <!-- 产品编码 -->
-          <template slot="productCode" slot-scope="text, record">
-            <div v-if="detailData">
-              <div v-if="isOwerEdit">
-                <a-badge count="急" v-if="record.oosFlag == 1">
-                  <div style="padding-right: 15px;">{{ text }}</div>
-                </a-badge>
-                <span v-else>{{ text }}</span>
-              </div>
-              <div v-else>
-                <a-badge count="急" v-if="isAudit&&record.oosFlag == 1">
-                  <div style="padding-right: 15px;">{{ text }}</div>
-                </a-badge>
-                <a-badge count="缺" v-else-if="!isAudit&&(!record.currentStockQty || record.currentStockQty < record.qty)">
-                  <div style="padding-right: 15px;">{{ text }}</div>
-                </a-badge>
-                <span v-else>{{ text }}</span>
-              </div>
+          <!-- 列表 -->
+          <s-table
+            class="sTable"
+            ref="table"
+            size="small"
+            :rowKey="(record) => record.id"
+            :columns="columns"
+            :data="loadData"
+            :defaultLoadData="false"
+            bordered>
+            <div slot="costTitle">
+              <a-tooltip placement="top">
+                <template slot="title">
+                  系统中不同批次的产品,成本价可能不同,此值是按照实际出库批次的成本计算得到。
+                </template>
+                <span style="margin-right: 5px;">实际总成本</span> <a-icon type="question-circle" />
+              </a-tooltip>
             </div>
-          </template>
-          <!-- 操作 -->
-          <template slot="action" slot-scope="text, record">
-            <a-button size="small" type="link" v-if="record.oosFlag == 0" class="button-primary" @click="handleViewDetail(record)">出库明细</a-button>
-            <span v-else>--</span>
-          </template>
-        </s-table>
-      </a-card>
-    </div>
+            <!-- 产品编码 -->
+            <template slot="productCode" slot-scope="text, record">
+              <div v-if="detailData">
+                <div v-if="isOwerEdit">
+                  <a-badge count="急" v-if="record.oosFlag == 1">
+                    <div style="padding-right: 15px;">{{ text }}</div>
+                  </a-badge>
+                  <span v-else>{{ text }}</span>
+                </div>
+                <div v-else>
+                  <a-badge count="急" v-if="isAudit&&record.oosFlag == 1">
+                    <div style="padding-right: 15px;">{{ text }}</div>
+                  </a-badge>
+                  <a-badge count="缺" v-else-if="!isAudit&&(!record.currentStockQty || record.currentStockQty < record.qty)">
+                    <div style="padding-right: 15px;">{{ text }}</div>
+                  </a-badge>
+                  <span v-else>{{ text }}</span>
+                </div>
+              </div>
+            </template>
+            <!-- 操作 -->
+            <template slot="action" slot-scope="text, record">
+              <a-button size="small" type="link" v-if="record.oosFlag == 0" class="button-primary" @click="handleViewDetail(record)">出库明细</a-button>
+              <span v-else>--</span>
+            </template>
+          </s-table>
+        </a-card>
+      </div>
     </a-spin>
-     <!-- 出入库明细 -->
-     <outInDetialModal ref="outInDetialModal" outBizType="SALES" :openModal="showOutInModal" @close="showOutInModal=false"></outInDetialModal>
+    <!-- 出入库明细 -->
+    <outInDetialModal ref="outInDetialModal" outBizType="SALES" :openModal="showOutInModal" @close="showOutInModal=false"></outInDetialModal>
   </div>
 </template>
 
@@ -157,7 +157,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        return salesDetailList(Object.assign(parameter, { orderBy: "sales_bill_detail.CREATE_DATE desc", salesBillSn: this.outBizSn || this.$route.params.sn })).then(res => {
+        return salesDetailList(Object.assign(parameter, { orderBy: 'sales_bill_detail.CREATE_DATE desc', salesBillSn: this.outBizSn || this.$route.params.sn })).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -202,7 +202,7 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '11%', scopedSlots: { customRender: 'productCode' }, align: 'center' },
-        { title: '产品名称', dataIndex: 'productName', width: '11%', align: 'center', customRender: function (text) { return text || '--' },ellipsis: true },
+        { title: '产品名称', dataIndex: 'productName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productOrigCode', width: '9%', align: 'center', customRender: function (text) { return text && text != ' ' ? text : '--' } },
         { title: '售价', dataIndex: 'price', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '折后售价', dataIndex: 'discountedPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
@@ -236,7 +236,7 @@ export default {
     // 打印预览/快捷打印
     handlePrint (type, printerType) {
       const _this = this
-      _this.$store.state.app.printLoading = true
+      _this.spinning = true
       let url = salesDetailPrint
       const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0 }
       if (type == 'export') { //  导出
@@ -244,7 +244,7 @@ export default {
       }
       // 打印或导出
       hdPrint(printerType, type, url, params, '销售单', function () {
-        _this.$store.state.app.printLoading = false
+        _this.spinning = false
       })
     },
     //  返回
@@ -335,6 +335,6 @@ export default {
           color:#f12929;
         }
     }
-    
+
   }
 </style>

+ 4 - 4
src/views/salesManagement/salesQueryNew/edit.vue

@@ -457,7 +457,7 @@ export default {
     // 打印预览/快捷打印
     handlePrint (type, printerType) {
       const _this = this
-      _this.$store.state.app.printLoading = true
+      _this.spinning = true
       let url = salesDetailPrint
       const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0 }
       if (type == 'export') { //  导出
@@ -465,7 +465,7 @@ export default {
       }
       // 打印或导出
       hdPrint(printerType, type, url, params, '销售单', function () {
-        _this.$store.state.app.printLoading = false
+        _this.spinning = false
         _this.$refs.printBox.hovered = false
       })
     },
@@ -792,8 +792,8 @@ export default {
         if (res.status == 200) {
           vm.detailData = res.data
           vm.discountAmountBak = vm.detailData.discountAmount
-          if(res.data.delFlag == 1){
-            vm.$message.info("该销售单已删除")
+          if (res.data.delFlag == 1) {
+            vm.$message.info('该销售单已删除')
             vm.handleBack()
             return false
           }