浏览代码

【修改】bug

howie 3 年之前
父节点
当前提交
edea0f8d8d
共有 3 个文件被更改,包括 38 次插入28 次删除
  1. 11 0
      src/api/policy_list.js
  2. 7 27
      src/views/finance/components/design/preview.vue
  3. 20 1
      src/views/sales_policy/policy_list.vue

+ 11 - 0
src/api/policy_list.js

@@ -44,6 +44,17 @@ export function cloneList(params) {
 }
 
 
+//弃审
+export function setAbandon(params) {
+  return request({
+    url: "/policy/abandon",
+    method: "post",
+    params,
+  });
+}
+
+
+
 //物料列表
 export function getK3List(params) {
   return request({

+ 7 - 27
src/views/finance/components/design/preview.vue

@@ -3,7 +3,7 @@
     @cancel="hideModal" :width="350 + 'mm'">
     <div :spinning="spinning" style="min-height: 100px">
       <div id="preview_content" ref="printDom">
-
+              444444
       </div>
     </div>
     <template slot="title">
@@ -54,7 +54,6 @@ export default {
     hideModal() {
       this.visible = false
       this.waitShowPrinter = false
-      this.$parent.initPrint()
       // console.log(this.$parent);
     },
     show(hiprintTemplate, printData, width = '210') {
@@ -62,7 +61,8 @@ export default {
       this.spinning = true
       this.width = width
       this.hiprintTemplate = hiprintTemplate
-      this.printData = printData
+      printData.addPrintHtml({ options: { width: 140, height: 35, top: 180, left: 20, content:this.$refs.printData } });
+
       setTimeout(() => {
         // eslint-disable-next-line no-undef
         $('#preview_content').html(hiprintTemplate.getHtml(printData))
@@ -70,28 +70,8 @@ export default {
       }, 500)
     },
     print() {
-       
-      this.hiprintTemplate.print(this.printData, {}, {
-        callback: () => {
-          addPrint()
-          this.hiprintTemplate = {}
-          this.$parent.getList()
-          this.$parent.tableSelection =[]
-        }
-      })
-      this.hiprintTemplate.on('printSuccess', function (data) {
-        console.log('打印完成')
-          //  addPrint()
-          this.hiprintTemplate = {}
-          this.$parent.getList()
-          this.$parent.tableSelection =[]
-      })
-      // this.hiprintTemplate.on('printError', function (data) {
-      //   console.log('打印失败')
-      //   this.hiprintTemplate = {}
-      //     this.$parent.getList()
-      //     this.$parent.tableSelection =[]
-      // })
+     this.hiprintTemplate.print({});
+
       setTimeout(()=>{
         this.hideModal()
       },2000)
@@ -138,8 +118,8 @@ export default {
 }
 
 @media print {
-   
-/*    
+
+/*
   td {
     border: none !important;
   } */

+ 20 - 1
src/views/sales_policy/policy_list.vue

@@ -279,6 +279,18 @@
                 size="mini"
               >删除</el-button>
             </el-popconfirm>
+            <el-popconfirm
+              v-if="scope.row.examineStatus == 'OK' "
+              style="margin-left: 10px"
+              title="弃审吗?"
+              @onConfirm="hanleAbandon(scope.row.id)"
+            >
+              <el-button
+                slot="reference"
+                type="text"
+                size="mini"
+              >弃审</el-button>
+            </el-popconfirm>
           </template>
         </el-table-column>
         <el-table-column label="状态" width="120" align="left">
@@ -383,7 +395,8 @@ import {
   getList,
   getpolicySubmit,
   getTypeList,
-  toExamine
+  toExamine,
+  setAbandon
 } from '@/api/policy_list'
 import Minxin from '@/mixin'
 import { downloadFiles, handleImport } from '@/utils/util'
@@ -537,6 +550,12 @@ export default {
         this.typeList = res.data.records
       })
     },
+    hanleAbandon(id){
+      setAbandon({policyId:id}).then(res=>{
+        this.$successMsg('弃审成功')
+          this.getList()
+      })
+    },
     hanleDelete(id) {
       this.hanleDeleteAllPromise(id).then((ids) => {
         deletePolicy({