lilei před 3 roky
rodič
revize
38fcba30f7

+ 21 - 0
src/api/data.js

@@ -135,3 +135,24 @@ export const getArea = (params) => {
     method: 'post'
   })
 }
+
+// 打印记录-分页列表
+export const printLogQueryPage = (params) => {
+  const url = `/printLog/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 打印记录-新增
+export const printLogSave = (params) => {
+  return axios({
+    url: `/printLog/save`,
+    data: params,
+    method: 'post'
+  })
+}

+ 23 - 9
src/libs/JGPrint.js

@@ -1,6 +1,7 @@
 import confirm from 'ant-design-vue/es/modal/confirm'
 import notification from 'ant-design-vue/es/notification'
 import { getLodop } from '@/libs/LodopFuncs'
+import { printLogSave } from '@/api/data'
 import moment from 'moment'
 // 打印页签,支持批量打印
 export const JGPrintTag = function (html, width, height, data) {
@@ -84,7 +85,7 @@ export const blobToBaseByPdf = function(data,callback){
 }
 
 // 打印html
-export const jGPrint = function (data, type) {
+export const jGPrint = function (data, type, printLogParams, callback) {
     if (!data) {
       return
     }
@@ -116,6 +117,7 @@ export const jGPrint = function (data, type) {
        // 已打印
        if(Value){
          console.log('已打印,统计打印次数')
+         printLog(printLogParams,callback)
        }
     };
     LODOP.ADD_PRINT_HTM(10, 2, '98%', '100%', data)
@@ -128,7 +130,7 @@ export const jGPrint = function (data, type) {
 }
 
 // 打印
-export const printFun = function(url,params,type,taskName,callback){
+export const printFun = function(url,params,type,taskName,printLogParams,callback){
   url(params).then(res => {
     if (res.type == 'application/json') {
       var reader = new FileReader()
@@ -141,13 +143,28 @@ export const printFun = function(url,params,type,taskName,callback){
       })
       reader.readAsText(res)
     } else {
-       jGPrintPdf(res,type,taskName)
+       jGPrintPdf(res,type,taskName,printLogParams,callback)
     }
-    callback()
+  })
+}
+// 获取系统信息
+export const getSystemInfo = function (strINFOType,callback){
+     LODOP=getLodop(); 
+     if (LODOP.CVERSION) CLODOP.On_Return=function(TaskID,Value){callback(Value)}; 
+     var strResult=LODOP.GET_SYSTEM_INFO(strINFOType);
+     if (!LODOP.CVERSION) return strResult; else return "";
+ }
+// 打印记录保存
+export const printLog = function(data,callback){
+  getSystemInfo('NetworkAdapter.1.IPAddress',function(ret){
+    data.printIp =  ret
+    printLogSave(data).then(res => {
+      callback(res)
+    })
   })
 }
 // 打印pdf
-export const jGPrintPdf = function (data, type, taskName) {
+export const jGPrintPdf = function (data, type, taskName, printLogParams,callback) {
     if (!data) {
       return
     }
@@ -182,10 +199,7 @@ export const jGPrintPdf = function (data, type, taskName) {
          // 已打印
          if(Value){
            console.log('已打印,统计打印次数')
-           const page = document.getElementsByTagName('iframe')[0]
-           page.onload = function(){
-             console.log(page,page.contentWindow.document.getElementsByTagName('button'))
-           }
+           printLog(printLogParams,callback)
          }
       };
       LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', dataurl.replace('data:application/pdf;base64,', ''))

+ 6 - 33
src/views/allocationManagement/matchSendOutOrder/list.vue

@@ -84,11 +84,6 @@
           <span v-if="$hasPermissions('M_transferOut_detail')" class="link-bule" @click="handleDetail(record)">{{ record.allocateNo }}</span>
           <span v-else>{{ record.allocateNo }}</span>
         </template>
-        <!-- 起止时间 -->
-        <template slot="promoDate" slot-scope="text, record">
-          <span v-if="record.promoStartDate || record.promoEndDate">{{ record.promoStartDate }} ~ {{ record.promoEndDate }}</span>
-          <span v-else>--</span>
-        </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
@@ -177,7 +172,7 @@ export default {
         { title: '调拨类型', dataIndex: 'allocateTypeName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '对单状态', dataIndex: 'checkStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '对单人员', dataIndex: 'checkPerson', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '对单人员', dataIndex: 'checkPersonName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '对单时间', dataIndex: 'checkDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
@@ -186,8 +181,8 @@ export default {
   },
   methods: {
     custChange (val) {
-      this.form.receiverSn = val.key || ''
-      this.form.receiverName = val.name || ''
+      this.queryParam.receiverSn = val.key || ''
+      this.queryParam.receiverName = val.name || ''
     },
     //  创建时间  change
     dateChange (date) {
@@ -203,33 +198,11 @@ export default {
       this.queryParam.allocateTypeSn = undefined
       this.queryParam.state = undefined
       this.queryParam.allocateNo = ''
+      this.queryParam.receiverSn = ''
+      this.queryParam.receiverName = ''
+      this.queryParam.checkStatus = undefined
       this.$refs.table.refresh(true)
     },
-    //  基本信息  保存
-    handleOk (data) {
-      this.$router.push({ path: `/allocationManagement/transferOut/add/${data.allocateSn}/${data.dealerLevel}` })
-    },
-    //  删除
-    handleDel (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '删除后不可恢复,确定要进行删除吗?',
-        centered: true,
-        onOk () {
-          _this.spinning = true
-          allocateBillDel({ sn: row.allocateSn }).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.$refs.table.refresh()
-              _this.spinning = false
-            } else {
-              _this.spinning = false
-            }
-          })
-        }
-      })
-    },
     // 允许打印
     handleYxAudit (row) {
       const _this = this

+ 15 - 3
src/views/allocationManagement/transferOut/detail.vue

@@ -83,8 +83,6 @@
     </a-spin>
     <!-- 打印导出 -->
     <print-modal :openModal="openModal" :itemData="basicInfoData" :nowType="nowType" @ok="handleOk" @close="openModal=false" />
-    <!-- 打印 -->
-    <div id="print"></div>
   </div>
 </template>
 
@@ -208,7 +206,21 @@ export default {
       delete params.type
       _this.spinning = true
       const taskName = this.nowType == 'dbPrint' ? '调拨' : '调拨分类'
-      printFun(allocateBillDetailPrint, params, objs.isPreview ? 'preview' : 'print', taskName, () => { _this.spinning = false })
+      printFun(
+        allocateBillDetailPrint,
+        params,
+        objs.isPreview ? 'preview' : 'print',
+        taskName,
+        {
+          billType: 'ALLOCATE',
+          billSn: objs.allocateSn,
+          billNo: objs.allocateNo,
+          printType: taskName + '打印'
+        },
+        (res) => {
+          _this.$message.info(res.message)
+          _this.spinning = false
+        })
     },
     pageInit () {
       this.$refs.table.refresh(true)

+ 15 - 1
src/views/allocationManagement/transferOut/edit.vue

@@ -574,7 +574,21 @@ export default {
       delete params.type
       _this.spinning = true
       const taskName = this.nowType == 'dbPrint' ? '调拨' : '调拨分类'
-      printFun(allocateBillDetailPrint, params, objs.isPreview ? 'preview' : 'print', taskName, () => { _this.spinning = false })
+      printFun(
+        allocateBillDetailPrint,
+        params,
+        objs.isPreview ? 'preview' : 'print',
+        taskName,
+        {
+          billType: 'ALLOCATE',
+          billSn: objs.allocateSn,
+          billNo: objs.allocateNo,
+          printType: taskName + '打印'
+        },
+        (res) => {
+          _this.$message.info(res.message)
+          _this.spinning = false
+        })
     },
     // 刷新当前页面
     refashPage () {

+ 15 - 6
src/views/allocationManagement/transferOut/printModal.vue

@@ -17,9 +17,11 @@
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol"
       >
-        <a-form-model-item label="调拨单号">{{ itemData&&itemData.allocateNo || '--' }}</a-form-model-item>
-        <a-form-model-item label="客户名称">{{ itemData&&itemData.targetName || '--' }}</a-form-model-item>
-        <a-form-model-item label="产品分类" prop="id" v-if="nowType=='dbflPrint'">
+        <a-form-model-item style="margin-bottom: 0;" label="调拨单号">{{ itemData&&itemData.allocateNo || '--' }}</a-form-model-item>
+        <a-form-model-item style="margin-bottom: 0;" label="调往对象">{{ itemData&&itemData.targetName || '--' }}</a-form-model-item>
+        <a-form-model-item style="margin-bottom: 0;" label="发货编号">{{ itemData&&itemData.sendNo || '--' }}</a-form-model-item>
+        <a-form-model-item style="margin-bottom: 0;" label="收货客户名称">{{ itemData&&itemData.receiverName || '--' }}</a-form-model-item>
+        <a-form-model-item style="margin-bottom: 0;" label="产品分类" prop="id" v-if="nowType=='dbflPrint'">
           <a-select id="allocateBill-print-form" v-model="form.id" placeholder="请选择产品分类">
             <a-select-option v-for="item in typeList" :value="item.id" :key="item.id">
               <span v-if="item.id != 'all'">{{ item.productBrandName }} - {{ item.productTypeName3 }}</span>
@@ -36,8 +38,9 @@
         </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
-        <a-button id="allocateBill-print-save" @click="handleSave('preview')">打印预览</a-button>
-        <a-button type="primary" id="allocateBill-print-back" @click="handleSave('print')" style="margin-left: 15px;">快捷打印</a-button>
+        <a-button id="allocateBill-print-close" @click="handleClose('preview')">取消</a-button>
+        <a-button id="allocateBill-print-save" @click="handleSave('preview')" style="margin-left: 15px;">打印预览</a-button>
+        <a-button type="primary" id="allocateBill-print-back" @click="handleSave('print')" style="margin-left: 15px;">确定打印</a-button>
       </div>
     </a-spin>
   </a-modal>
@@ -75,7 +78,7 @@ export default {
       },
       formItemLayout: {
         labelCol: { span: 6 },
-        wrapperCol: { span: 18 }
+        wrapperCol: { span: 16 }
       },
       spinning: false,
       typeList: []
@@ -103,6 +106,7 @@ export default {
             if (item) {
               const obj = {
                 allocateSn: _this.itemData.allocateSn,
+                allocateNo: _this.itemData.allocateNo,
                 productBrandSn: item.productBrandSn,
                 productTypeSn3: item.productTypeSn3,
                 printType: 'ALLOCATE_BILL_TYPE',
@@ -113,6 +117,7 @@ export default {
           } else {
             const obj = {
               allocateSn: _this.itemData.allocateSn,
+              allocateNo: _this.itemData.allocateNo,
               printType: _this.form.priceType,
               isPreview: type == 'preview' ? 1 : 0
             }
@@ -135,6 +140,10 @@ export default {
           }
         }
       })
+    },
+    handleClose () {
+      this.$emit('close')
+      this.$refs.ruleForm.resetFields()
     }
   },
   watch: {

+ 326 - 3
src/views/allocationManagement/transfersPrint/list.vue

@@ -1,8 +1,331 @@
 <template>
+  <div class="allocateBillList-wrap">
+    <div style="background-color: #fff;margin-bottom: 5px;">
+      <a-tabs v-model="currentTab" @change="changeTab">
+        <a-tab-pane :key="1" tab="全部">
+        </a-tab-pane>
+        <a-tab-pane :key="2" tab="待打印">
+        </a-tab-pane>
+      </a-tabs>
+    </div>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 搜索条件 -->
+        <div ref="tableSearch" class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+            <a-row :gutter="15">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="创建时间">
+                  <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="调往对象">
+                  <a-input id="allocateBillList-targetName" v-model.trim="queryParam.targetName" allowClear placeholder="请输入调往对象"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="调拨类型">
+                  <AllocateType id="allocateBillList-allocateTypeSn" v-model="queryParam.allocateTypeSn"></AllocateType>
+                </a-form-item>
+              </a-col>
+              <template v-if="advanced">
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="收货客户名称">
+                    <dealerSubareaScopeList ref="receiverSn" defValKey="buyerSn" @change="custChange" v-model="queryParam.receiverSn" />
+                  </a-form-item>
+                </a-col>
+                <a-col :md="4" :sm="24">
+                  <a-form-item label="业务状态">
+                    <v-select
+                      v-model="queryParam.state"
+                      ref="state"
+                      id="allocateBillList-state"
+                      code="ALLOCATE_STATUS"
+                      placeholder="请选择业务状态"
+                      allowClear
+                    ></v-select>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="4" :sm="24">
+                  <a-form-item label="调拨单号">
+                    <a-input id="allocateBillList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="4" :sm="24">
+                  <a-form-item label="打印状态">
+                    <v-select
+                      v-model="queryParam.printState"
+                      ref="printState"
+                      id="allocateBillList-printState"
+                      code="PRINT_STATUS"
+                      placeholder="请选择打印状态"
+                      allowClear
+                    ></v-select>
+                  </a-form-item>
+                </a-col>
+              </template>
+              <a-col :md="6" :sm="24">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="allocateBillList-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="allocateBillList-reset">重置</a-button>
+                <a @click="advanced=!advanced" style="margin-left: 5px">
+                  {{ advanced ? '收起' : '展开' }}
+                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                </a>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+84.5+'px' }"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          :scroll="{ y: tableHeight }"
+          bordered>
+          <!-- 单号 -->
+          <template slot="allocateNo" slot-scope="text, record">
+            <span v-if="$hasPermissions('M_transferOut_detail')" class="link-bule" @click="handleDetail(record)">{{ record.allocateNo }}</span>
+            <span v-else>{{ record.allocateNo }}</span>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              v-if="record.printState == 'NO_PRINT'"
+              class="button-warning"
+              @click="handlePrint(record)"
+              id="allocateBillList-printState">调拨分类打印</a-button>
+            <a-button
+              size="small"
+              type="link"
+              v-else-if="record.printState == 'PRINT'"
+              class="button-warning"
+              @click="handlePrintRecord(record)"
+              id="allocateBillList-printRecord">打印记录</a-button>
+            <span v-else>--</span>
+          </template>
+        </s-table>
+      </a-spin>
+    </a-card>
+    <!-- 打印导出 -->
+    <print-modal :openModal="openModal" :itemData="itemData" nowType="dbflPrint" @ok="handleOk" @close="openModal=false" />
+    <!-- 打印记录 -->
+    <recordModal ref="recordModal" modalTit="打印记录" :openModal="showRecordModal" @cancel="showRecordModal=false"></recordModal>
+  </div>
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import printModal from '@/views/allocationManagement/transferOut/printModal.vue'
+import recordModal from './recordModal.vue'
+import { allocateBillList, allocateBillDetailPrint } from '@/api/allocateBill'
+import AllocateType from '@/views/common/allocateType.js'
+import { printFun } from '@/libs/JGPrint.js'
+export default {
+  name: 'TransferOutList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, rangeDate, AllocateType, dealerSubareaScopeList, printModal, recordModal },
+  data () {
+    return {
+      spinning: false,
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      itemData: null,
+      showRecordModal: false,
+      time: [
+        moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+      ],
+      queryParam: { //  查询条件
+        beginDate: getDate.getThreeMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
+        targetName: '', //  调往对象
+        allocateTypeSn: undefined, //  调拨类型
+        state: undefined, //  业务状态
+        allocateNo: '', //  调拨单号
+        receiverSn: undefined,
+        checkStatus: undefined,
+        printState: 'NO_PRINT'
+      },
+      currentTab: 2,
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return allocateBillList(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      visibleAudit: false,
+      auditInfo: null,
+      spinningAudit: false,
+      openModal: false //  打印弹框
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '3.5%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨单号', scopedSlots: { customRender: 'allocateNo' }, align: 'center', width: '13.5%' },
+        { title: '调往对象', dataIndex: 'targetName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '发货编号', dataIndex: 'sendNo', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '收货客户名称', dataIndex: 'receiverName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '总数量', dataIndex: 'totalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调拨类型', dataIndex: 'allocateTypeName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '打印状态', dataIndex: 'printStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '打印次数', dataIndex: 'printCount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    custChange (val) {
+      this.form.receiverSn = val.key || ''
+      this.form.receiverName = val.name || ''
+    },
+    changeTab (v) {
+      this.currentTab = v
+      this.resetSearchForm()
+    },
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate(this.time)
+      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.targetName = ''
+      this.queryParam.allocateTypeSn = undefined
+      this.queryParam.state = undefined
+      this.queryParam.allocateNo = ''
+      this.queryParam.receiverName = ''
+      this.queryParam.receiverSn = ''
+      this.queryParam.printState = this.currentTab == 2 ? 'NO_PRINT' : undefined
+      this.$refs.table.refresh(true)
+    },
+    // 分类打印
+    handlePrint (row) {
+      this.itemData = row
+      this.openModal = true
+    },
+    // 打印记录
+    handlePrintRecord (row) {
+      this.showRecordModal = true
+      this.$refs.recordModal.setData(row, {
+        billType: 'ALLOCATE',
+        billSn: row.allocateSn
+      })
+    },
+    // 确定打印
+    handleOk (objs) {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(objs))
+      delete params.type
+      _this.spinning = true
+      printFun(
+        allocateBillDetailPrint,
+        params,
+        objs.isPreview ? 'preview' : 'print',
+        '调拨分类',
+        {
+          billType: 'ALLOCATE',
+          billSn: objs.allocateSn,
+          billNo: objs.allocateNo,
+          printType: '调拨分类打印'
+        },
+        (res) => {
+          _this.spinning = false
+          if (res.status == 200) {
+            _this.$refs.table.refresh()
+          }
+          _this.$message.info(res.message)
+        })
+    },
+    //  详情
+    handleDetail (row) {
+      if (this.$hasPermissions('M_transferOut_detail')) {
+        this.$router.push({ path: `/allocationManagement/transferOut/detail/${row.allocateSn}` })
+      }
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.openModal = false
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 240
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
 </script>
-
-<style>
-</style>
+<style lang="less">
+  .allocateBillList-wrap{
+    .ant-tabs-bar{
+      margin: 0;
+    }
+  }
+</style>

+ 146 - 0
src/views/allocationManagement/transfersPrint/recordModal.vue

@@ -0,0 +1,146 @@
+<template>
+  <a-modal
+    centered
+    class="record-detail-modal"
+    :footer="null"
+    :maskClosable="false"
+    v-model="isShow"
+    :title="modalTit"
+    @cancle="isShow=false"
+    width="60%">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="common-main">
+        <a-descriptions :column="2">
+          <a-descriptions-item label="调拨单号">
+            {{ tipData&&tipData.allocateNo }}
+          </a-descriptions-item>
+          <a-descriptions-item label="调拨类型">
+            {{ tipData&&tipData.allocateTypeName }}
+          </a-descriptions-item>
+          <a-descriptions-item label="调往对象">
+            {{ tipData&&tipData.targetName }}
+          </a-descriptions-item>
+          <a-descriptions-item label="收货客户名称">
+            {{ tipData&&tipData.receiverName }}
+          </a-descriptions-item>
+        </a-descriptions>
+        <div>
+          <s-table
+            class="sTable fixPagination"
+            ref="table"
+            size="small"
+            :rowKey="(record) => record.id"
+            :columns="columns"
+            :data="loadData"
+            :defaultLoadData="false"
+            :scroll="{ y: 240 }"
+            bordered>
+          </s-table>
+        </div>
+        <div class="btn-box">
+          <a-button @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
+        </div>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { printLogQueryPage } from '@/api/data'
+export default {
+  name: 'CommonModal',
+  components: { STable, VSelect },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    modalTit: { // 弹框标题
+      type: String,
+      default: null
+    },
+    cancelText: { // 取消 按钮文字
+      type: String,
+      default: '关闭'
+    },
+    isCancel: { // 是否显示  取消 按钮
+      type: Boolean,
+      default: true
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      disabled: false,
+      spinning: false,
+      tipData: null,
+      params: null,
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '打印时间', dataIndex: 'printDate', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '打印人', dataIndex: 'printPersonName', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: 'IP', dataIndex: 'printIp', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '打印方式', dataIndex: 'printType', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return printLogQueryPage(Object.assign(parameter, this.params || {})).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  methods: {
+    setData (data, params) {
+      this.tipData = data
+      this.params = params
+      this.$nextTick(() => {
+        this.$refs.table.refresh(true)
+      })
+    },
+    // 取消
+    handleCommonCancel () {
+      this.$emit('cancel')
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('cancel')
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .record-detail-modal{
+    .common-main{
+      .btn-box{
+        text-align: center;
+        margin-top: 30px;
+        .ant-btn{
+          margin:0 10px;
+        }
+      }
+    }
+  }
+</style>

+ 0 - 2
src/views/salesManagement/stockPrint/list.vue

@@ -130,8 +130,6 @@
         <sendTypeModal ref="typePrint" :openModal="showTipModal" @ok="handlePrintOk" @close="showTipModal=false" />
         <!-- 打印记录 -->
         <recordModal modalTit="打印记录" :openModal="showRecordModal" @cancel="showRecordModal=false"></recordModal>
-        <!-- 打印 -->
-        <div id="print"></div>
       </a-spin>
     </a-card>
   </div>