Jelajahi Sumber

Merge branch 'deploy_0804' of jianguan-web/qpls-md-html into master

陈瑞 3 tahun lalu
induk
melakukan
492036945d

+ 8 - 0
package-lock.json

@@ -16902,6 +16902,14 @@
         "videojs-hotkeys": "^0.2.20"
       }
     },
+    "vue2.0-zoom": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/vue2.0-zoom/-/vue2.0-zoom-2.1.1.tgz",
+      "integrity": "sha512-6j1WFwjpRxnfHNSjBV5RwPQONCVhA7hydp3pZvVQYbwxaKCKxQfuHkuJK4qsQ4kfozSzV4zTSEJGOyMzZ59Zgw==",
+      "requires": {
+        "vue": "^2.0"
+      }
+    },
     "vuex": {
       "version": "3.1.1",
       "resolved": "https://registry.npmjs.org/vuex/-/vuex-3.1.1.tgz",

+ 1 - 0
package.json

@@ -39,6 +39,7 @@
     "vue-router": "^3.1.2",
     "vue-svg-component-runtime": "^1.0.1",
     "vue-video-player": "^5.0.2",
+    "vue2.0-zoom": "^2.1.1",
     "vuex": "^3.1.1",
     "wangeditor": "^3.1.1"
   },

+ 20 - 0
src/api/purchaseReturn.js

@@ -102,3 +102,23 @@ export const purchaseReturnOutStockBill = (params) => {
     method: 'post'
   })
 }
+// 采购退货详情  打印
+export const purchaseReturnDetailPrint = params => {
+  const data = {
+    url: `/purchaseReturn/print/${params.sn}/${params.type}`,
+    method: 'get'
+  }
+  // 喷墨打印
+  if (params.type == 'INK') {
+    data.responseType = 'blob'
+  }
+  return axios.request(data)
+}
+// 采购退货 详情  导出
+export const purchaseReturnDetailExport = params => {
+  return axios.request({
+    url: `/purchaseReturn/excel/${params.sn}`,
+    method: 'get',
+    responseType: 'blob'
+  })
+}

+ 20 - 0
src/api/sparePartsRet.js

@@ -107,3 +107,23 @@ export const sparePartsRetDetail = (params) => {
     method: 'get'
   })
 }
+// 散件退货详情  打印
+export const sparePartsRetDetailPrint = params => {
+  const data = {
+    url: `/sparePartsRet/print/${params.sn}/${params.type}`,
+    method: 'get'
+  }
+  // 喷墨打印
+  if (params.type == 'INK') {
+    data.responseType = 'blob'
+  }
+  return axios.request(data)
+}
+// 散件退货详情  导出
+export const sparePartsRetDetailExport = params => {
+  return axios.request({
+    url: `/sparePartsRet/excel/${params.sn}`,
+    method: 'get',
+    responseType: 'blob'
+  })
+}

+ 25 - 13
src/components/MultiTab/MultiTab.vue

@@ -153,27 +153,37 @@ export default {
   watch: {
     '$route': function (newVal, oldVal) {
       if (newVal.name == oldVal.name) { return }
-      console.log(newVal, oldVal)
+      // console.log(newVal, oldVal, this.pages)
       // 解决页面地址相同参数不同时打开多个页签问题(例 详情页id或sn不同时)
       const index = this.tabsList.indexOf(newVal.name)
+
       // 是否时同一个父级菜单下的页面
       const mnlen = newVal.matched.length < 3
-      const molen = oldVal.matched.length < 3
-      const hasChildren = newVal.matched[mnlen ? 1 : 2].name == oldVal.matched[molen ? 1 : 2].name
-      // console.log(newVal.matched[mnlen ? 1 : 2].name, oldVal.matched[molen ? 1 : 2].name, hasChildren)
+      const newMatched = newVal.matched[mnlen ? 1 : 2]
+
+      // 是否已存在同级菜单
+      const hasEqChild = this.pages.find(item => {
+        const alen = item.matched.length < 3
+        return item.matched[alen ? 1 : 2].name == newMatched.name
+      })
+      // console.log(hasEqChild, 'hasEqChild')
+      const oldMenu = hasEqChild || oldVal
+      const molen = oldMenu.matched.length < 3
+      const oldMatched = oldMenu.matched[molen ? 1 : 2]
+      const hasChildren = newMatched.name == oldMatched.name
 
       if (index < 0) { // 不存在
-        console.log(1, '不存在')
+        // console.log(1, hasChildren, '不存在')
         // 判断是否是新增,编辑,详情页
         const na = newVal.meta.title.indexOf('详情') >= 0
         const nb = newVal.meta.title.indexOf('新增') >= 0
         const nc = newVal.meta.title.indexOf('编辑') >= 0
-        const oa = oldVal.meta.title.indexOf('详情') >= 0
-        const ob = oldVal.meta.title.indexOf('新增') >= 0
-        const oc = oldVal.meta.title.indexOf('编辑') >= 0
+        const oa = oldMenu.meta.title.indexOf('详情') >= 0
+        const ob = oldMenu.meta.title.indexOf('新增') >= 0
+        const oc = oldMenu.meta.title.indexOf('编辑') >= 0
         if ((na || nb || nc || oa || ob || oc) && hasChildren) {
           // 替换当前页签
-          this.replaceTab(newVal, oldVal)
+          this.replaceTab(newVal, oldMenu)
           // 从列表打开新增,编辑
           this.$store.state.app.isNewTab = na || nb || nc
           // 从编辑,新增返回列表,刷新列表
@@ -194,17 +204,19 @@ export default {
             this.$warning({
               title: '提示',
               content: '您当前打开窗口太多,请关闭一些,窗口不能超过' + this.maxTabNums + '个',
-              onOk () {
-                _this.$router.go(-1)
-              }
+              onOk () {}
             })
+            _this.$router.go(-1)
           }
         }
       } else { // 已存在
-        console.log(1, '已存在')
         this.pages.splice(index, 1, newVal)
         this.tabsList.splice(index, 1, newVal.name)
         this.$store.state.app.isNewTab = false
+        if (hasEqChild) {
+          this.$store.state.app.updateList = hasEqChild.name == oldVal.name
+        }
+        // console.log(1, this.$store.state.app.updateList, '已存在')
         this.activeKey = newVal.name
       }
     },

+ 6 - 11
src/views/allocationManagement/chainTransferIn/list.vue

@@ -7,7 +7,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="入库时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate ref="rangeDate" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -122,7 +122,6 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { allocLinkagePutList, allocLinkagePutAudit } from '@/api/allocLinkagePut'
 import { getTenantList } from '@/api/allocLinkageOut'
-import getDate from '@/libs/getDate.js'
 export default {
   components: { STable, VSelect, rangeDate },
   data () {
@@ -130,13 +129,9 @@ export default {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0,
-      time: [
-        getDate.getCurrMonthDays().starttime,
-        getDate.getCurrMonthDays().endtime
-      ],
       queryParam: { //  查询条件
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
+        beginDate: '',
+        endDate: '',
         outTenantSn: undefined, //  调出对象
         allocationType: undefined, //  调拨产品类型
         state: undefined, //  业务状态
@@ -183,9 +178,9 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
       this.queryParam.outTenantSn = undefined
       this.queryParam.allocationType = undefined
       this.queryParam.state = undefined

+ 23 - 2
src/views/bulkManagement/bulkReturnGoods/detailModal.vue

@@ -9,6 +9,9 @@
     @cancle="isShow = false"
     :width="960">
     <a-spin :spinning="spinning" tip="Loading...">
+      <a-card size="small" v-if="$hasPermissions('B_sparePartsRetPrint')" :bordered="false" class="bulkReturnGoodsDetail-cont">
+        <div style="float:right"><Print :disabled="dataSource.length==0" @handlePrint="handlePrint"></Print></div>
+      </a-card>
       <a-card size="small" :bordered="false" class="bulkReturnGoodsDetail-cont">
         <a-descriptions size="small">
           <a-descriptions-item label="散件退货单号">{{ (basicInfoData&&basicInfoData.sparePartsReturnNo) || '--' }}</a-descriptions-item>
@@ -49,10 +52,12 @@
 
 <script>
 import { STable } from '@/components'
-import { sparePartsRetDetail, sparePartsRetDetailList, sparePartsRetDetailCount } from '@/api/sparePartsRet'
+import Print from '@/views/common/print.vue'
+import { hdPrint } from '@/libs/JGPrint'
+import { sparePartsRetDetail, sparePartsRetDetailList, sparePartsRetDetailCount, sparePartsRetDetailPrint, sparePartsRetDetailExport } from '@/api/sparePartsRet'
 export default {
   name: 'BulkReturnGoodsDetailModal',
-  components: { STable },
+  components: { STable, Print },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -71,6 +76,7 @@ export default {
     return {
       spinning: false,
       isShow: this.openModal, //  是否打开弹框
+      dataSource: [],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -82,6 +88,7 @@ export default {
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
           }
+          this.dataSource = data.list
           this.disabled = false
           return data
         })
@@ -121,6 +128,20 @@ export default {
     }
   },
   methods: {
+    // 打印预览/快捷打印
+    handlePrint (type, printerType) {
+      const _this = this
+      _this.spinning = true
+      let url = sparePartsRetDetailPrint
+      const params = { sn: this.basicInfoData.sparePartsReturnSn }
+      if (type == 'export') { //  导出
+        url = sparePartsRetDetailExport
+      }
+      // 打印或导出
+      hdPrint(printerType, type, url, params, this.basicInfoData && this.basicInfoData.isGrab == 1 ? '散件退货单(抓单)' : '散件退货单(不抓单)', function () {
+        _this.spinning = false
+      })
+    },
     // 详情
     getDetail () {
       sparePartsRetDetail({ sn: this.itemSn }).then(res => {

+ 32 - 2
src/views/bulkManagement/bulkReturnGoods/edit.vue

@@ -6,6 +6,10 @@
         <template slot="subTitle">
           <a id="bulkReturnGoodsEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra" v-if="$hasPermissions('B_sparePartsRetPrint')">
+          <Print :disabled="localDataSource.length==0" @handlePrint="handlePrint"></Print>
+        </template>
       </a-page-header>
       <!-- 选择产品 -->
       <a-card size="small" :bordered="false" class="bulkReturnGoodsEdit-cont">
@@ -181,10 +185,20 @@
 
 <script>
 import { STable, VSelect } from '@/components'
+import Print from '@/views/common/print.vue'
+import { hdPrint } from '@/libs/JGPrint'
 import { warehouseAllList } from '@/api/warehouse'
-import { sparePartsRetDetailList, stockDetailProductList, sparePartsRetDetailSave, sparePartsRetDetailCount, sparePartsRetDetailDel, sparePartsRetSubmit } from '@/api/sparePartsRet'
+import {
+  sparePartsRetDetailList,
+  stockDetailProductList,
+  sparePartsRetDetailSave,
+  sparePartsRetDetailCount,
+  sparePartsRetDetailDel,
+  sparePartsRetSubmit,
+  sparePartsRetDetailPrint,
+  sparePartsRetDetailExport } from '@/api/sparePartsRet'
 export default {
-  components: { STable, VSelect },
+  components: { STable, VSelect, Print },
   data () {
     return {
       spinning: false,
@@ -194,6 +208,7 @@ export default {
         warehouseSn: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
+      dataSource: [],
       // 表头
       columns: [
         { title: '产品编码', dataIndex: 'productCode', width: '19%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -215,6 +230,7 @@ export default {
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
           }
+          this.dataSource = data.list
           this.disabled = false
           return data
         })
@@ -260,6 +276,20 @@ export default {
     }
   },
   methods: {
+    // 打印预览/快捷打印
+    handlePrint (type, printerType) {
+      const _this = this
+      _this.spinning = true
+      let url = sparePartsRetDetailPrint
+      const params = { sn: this.$route.params.sn }
+      if (type == 'export') { //  导出
+        url = sparePartsRetDetailExport
+      }
+      // 打印或导出
+      hdPrint(printerType, type, url, params, '散件退货单(不抓单)', function () {
+        _this.spinning = false
+      })
+    },
     // 合计
     getDetailCount (params) {
       sparePartsRetDetailCount(params).then(res => {

+ 31 - 2
src/views/bulkManagement/bulkReturnGoods/grabEdit.vue

@@ -6,6 +6,10 @@
         <template slot="subTitle">
           <a id="bulkReturnGoodsEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra" v-if="$hasPermissions('B_sparePartsRetPrint')">
+          <Print :disabled="localDataSource.length==0" @handlePrint="handlePrint"></Print>
+        </template>
       </a-page-header>
       <!-- 选择产品 -->
       <a-card size="small" :bordered="false" class="bulkReturnGoodsEdit-cont">
@@ -172,11 +176,20 @@
 
 <script>
 import { STable, VSelect } from '@/components'
+import Print from '@/views/common/print.vue'
+import { hdPrint } from '@/libs/JGPrint'
 import { warehouseAllList } from '@/api/warehouse'
 import { sparePartsPurDetailFinishList } from '@/api/sparePartsPur'
-import { sparePartsRetDetailList, sparePartsRetDetailSave, sparePartsRetDetailCount, sparePartsRetDetailDel, sparePartsRetSubmit } from '@/api/sparePartsRet'
+import {
+  sparePartsRetDetailList,
+  sparePartsRetDetailSave,
+  sparePartsRetDetailCount,
+  sparePartsRetDetailDel,
+  sparePartsRetSubmit,
+  sparePartsRetDetailPrint,
+  sparePartsRetDetailExport } from '@/api/sparePartsRet'
 export default {
-  components: { STable, VSelect },
+  components: { STable, VSelect, Print },
   data () {
     return {
       spinning: false,
@@ -186,6 +199,7 @@ export default {
         sparePartsPurchaseNo: ''
       },
       disabled: false, //  查询、重置按钮是否可操作
+      dataSource: [],
       // 表头
       columns: [
         { title: '散件入库单号', dataIndex: 'sparePartsPurchaseNo', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -210,6 +224,7 @@ export default {
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
           }
+          this.dataSource = data.list
           this.disabled = false
           return data
         })
@@ -253,6 +268,20 @@ export default {
     }
   },
   methods: {
+    // 打印预览/快捷打印
+    handlePrint (type, printerType) {
+      const _this = this
+      _this.spinning = true
+      let url = sparePartsRetDetailPrint
+      const params = { sn: this.$route.params.sn }
+      if (type == 'export') { //  导出
+        url = sparePartsRetDetailExport
+      }
+      // 打印或导出
+      hdPrint(printerType, type, url, params, '散件退货单(抓单)', function () {
+        _this.spinning = false
+      })
+    },
     // 合计
     getDetailCount () {
       sparePartsRetDetailCount(Object.assign(this.chooseQueryParam, { sparePartsReturnSn: this.$route.params.sn })).then(res => {

+ 53 - 8
src/views/productManagement/newProduct/detail.vue

@@ -30,11 +30,16 @@
             </div>
           </div>
         </div>
-        <div class="productImg" v-if="detailsData && detailsData.productMsg">
-          <a-carousel arrows>
-            <div slot="prevArrow" slot-scope="props" class="custom-slick-arrow" style="left: 10px;zIndex: 1"><a-icon type="left-circle" /></div>
-            <div slot="nextArrow" slot-scope="props" class="custom-slick-arrow" style="right: 10px"><a-icon type="right-circle" /></div>
-            <div><img :src="detailsData.productMsg" /></div>
+        <div class="productImg" v-if="detailsData && detailsData.productPicList && detailsData.productPicList.length>0">
+          <a-carousel arrows dots-class="slick-dots slick-thumb">
+            <a slot="customPaging" slot-scope="props">
+              <img :src="detailsData.productPicList[props.i].imageUrl" />
+            </a>
+            <div slot="prevArrow" slot-scope="props" class="custom-slick-arrow" style="left: 10px;zIndex: 1"><a-icon type="left-circle" style="color: #314659;" /></div>
+            <div slot="nextArrow" slot-scope="props" class="custom-slick-arrow" style="right: 10px"><a-icon type="right-circle" style="color: #314659;" /></div>
+            <div v-for="(item, index) in detailsData.productPicList" :key="index">
+              <img-zoom :src="item.imageUrl" width="100%" height="100%" :bigsrc="item.imageUrl" :configs="configs"></img-zoom>
+            </div>
           </a-carousel>
         </div>
       </div>
@@ -43,9 +48,11 @@
 </template>
 
 <script>
+import imgZoom from 'vue2.0-zoom'
 import { productDetail } from '@/api/product.js'
 export default {
   name: 'ProductInfoDetail',
+  components: { imgZoom },
   computed: {
     productTypeName () {
       const productTypeName1 = this.detailsData && this.detailsData.productTypeName1 ? this.detailsData.productTypeName1 : ''
@@ -58,7 +65,15 @@ export default {
     return {
       itemId: null,
       detailsData: null, //  详情数据
-      prevPageInfo: null
+      prevPageInfo: null,
+      configs: {
+        width: 600,
+        height: 350,
+        maskWidth: 80,
+        maskHeight: 80,
+        maskColor: 'red',
+        maskOpacity: 0.2
+      }
     }
   },
   methods: {
@@ -100,11 +115,13 @@ export default {
 </script>
 
 <style lang="less">
+#_magnifier_layer{
+  left: 500px!important;
+}
 /* For demo */
 .ant-carousel .slick-slide {
   text-align: center;
   overflow: hidden;
-  border: 1px solid #eee;
   display: flex;
   justify-content: center;
   align-items: center;
@@ -126,12 +143,40 @@ export default {
   width: 100%;
   max-height: 100%;
 }
+
+.ant-carousel{
+  border: 1px solid #e8e8e8;
+}
+.ant-carousel .slick-dots {
+  height: auto;
+}
+.ant-carousel .slick-slide img {
+  border: 5px solid #fff;
+  display: block;
+  margin: auto;
+  max-width: 90%;
+}
+.ant-carousel .slick-thumb {
+  bottom: -40px;
+}
+.ant-carousel .slick-thumb li {
+  width: 40px;
+  height: 35px;
+}
+.ant-carousel .slick-thumb li img {
+  width: 100%;
+  height: 100%;
+  filter: grayscale(100%);
+}
+.ant-carousel .slick-thumb li.slick-active img {
+  filter: grayscale(0%);
+}
 .newProductDetail-back {
   margin-bottom: 10px;
 }
 .newProductDetail-modal {
   background-color: #fff;
-  padding: 15px;
+  padding: 15px 15px 55px;
   h4 {
     font-size: 18px;
   }

+ 24 - 2
src/views/purchasingManagement/purchaseReturn/detail.vue

@@ -12,6 +12,10 @@
           id="purchaseReturnDetail-edit-btn"
           @click.stop="handleEdit">编辑</a-button>
       </template>
+      <!-- 操作区,位于 title 行的行尾 -->
+      <template slot="extra" v-if="$hasPermissions('B_purchaseReturnPrint')">
+        <Print :disabled="dataSource.length==0" @handlePrint="handlePrint"></Print>
+      </template>
     </a-page-header>
     <!-- 基础信息 -->
     <a-card size="small" :bordered="false" class="purchaseReturnDetail-cont">
@@ -52,10 +56,12 @@
 
 <script>
 import { STable, VSelect } from '@/components'
+import Print from '@/views/common/print.vue'
+import { hdPrint } from '@/libs/JGPrint'
 import { getOperationalPrecision } from '@/libs/tools.js'
-import { purchaseReturnDetailSn, purchaseReturnDetailList } from '@/api/purchaseReturn'
+import { purchaseReturnDetailSn, purchaseReturnDetailList, purchaseReturnDetailPrint, purchaseReturnDetailExport } from '@/api/purchaseReturn'
 export default {
-  components: { STable, VSelect },
+  components: { STable, VSelect, Print },
   props: {
     outBizSn: { //  有值则为弹框,无值则为页面
       type: [Number, String],
@@ -78,6 +84,7 @@ export default {
         { title: '退货金额小计', dataIndex: 'purchaseReturnAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '退货原因', dataIndex: 'remarks', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
       ],
+      dataSource: [],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -90,6 +97,7 @@ export default {
             data.list[i].purchaseReturnAmount = getOperationalPrecision(data.list[i].cost, data.list[i].qty)
           }
           this.disabled = false
+          this.dataSource = data.list
           return data
         })
       },
@@ -102,6 +110,20 @@ export default {
     }
   },
   methods: {
+    // 打印预览/快捷打印
+    handlePrint (type, printerType) {
+      const _this = this
+      _this.spinning = true
+      let url = purchaseReturnDetailPrint
+      const params = { sn: this.$route.params.sn }
+      if (type == 'export') { //  导出
+        url = purchaseReturnDetailExport
+      }
+      // 打印或导出
+      hdPrint(printerType, type, url, params, '采购退货单', function () {
+        _this.spinning = false
+      })
+    },
     //  返回列表
     handleBack () {
       this.$router.push({ path: '/purchasingManagement/purchaseReturn/list', query: { closeLastOldTab: true } })

+ 32 - 2
src/views/purchasingManagement/purchaseReturn/edit.vue

@@ -7,6 +7,10 @@
           <a id="purchaseReturnEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
           <span style="margin: 0 15px;color: #666;">供应商名称:{{ $route.params.name || '--' }}</span>
         </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra" v-if="$hasPermissions('B_purchaseReturnPrint')">
+          <Print :disabled="dataSource.length==0" @handlePrint="handlePrint"></Print>
+        </template>
       </a-page-header>
       <!-- 选择产品 -->
       <a-card size="small" :bordered="false" class="purchaseReturnEdit-cont">
@@ -153,9 +157,19 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-import { purchaseReturnPurchaseBillDetailList, purchaseReturnDetailList, purchaseReturnDetailSave, purchaseReturnDetailDel, purchaseReturnSubmit, purchaseReturnDelAll } from '@/api/purchaseReturn'
+import Print from '@/views/common/print.vue'
+import { hdPrint } from '@/libs/JGPrint'
+import {
+  purchaseReturnPurchaseBillDetailList,
+  purchaseReturnDetailList,
+  purchaseReturnDetailSave,
+  purchaseReturnDetailDel,
+  purchaseReturnSubmit,
+  purchaseReturnDelAll,
+  purchaseReturnDetailPrint,
+  purchaseReturnDetailExport } from '@/api/purchaseReturn'
 export default {
-  components: { STable, VSelect },
+  components: { STable, VSelect, Print },
   data () {
     return {
       spinning: false,
@@ -164,6 +178,7 @@ export default {
         productCode: '',
         productName: ''
       },
+      dataSource: [],
       disabled: false, //  查询、重置按钮是否可操作
       advanced: false, // 高级搜索 展开/关闭
       // 表头
@@ -191,6 +206,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.dataSource = data.list
           return data
         })
       },
@@ -226,6 +242,20 @@ export default {
     }
   },
   methods: {
+    // 打印预览/快捷打印
+    handlePrint (type, printerType) {
+      const _this = this
+      _this.spinning = true
+      let url = purchaseReturnDetailPrint
+      const params = { sn: this.$route.params.sn }
+      if (type == 'export') { //  导出
+        url = purchaseReturnDetailExport
+      }
+      // 打印或导出
+      hdPrint(printerType, type, url, params, '采购退货单', function () {
+        _this.spinning = false
+      })
+    },
     //  重置
     resetSearchForm () {
       this.queryParam.purchaseBillNo = ''