Przeglądaj źródła

提交销售出库打印以及项目管理部分字段修改

caojunjie 4 lat temu
rodzic
commit
56075c6f58

+ 1 - 1
src/views/project/index.vue

@@ -135,7 +135,7 @@ export default {
         },
         {
           span:6,
-          label: 'fPerson',
+          label: 'personName',
           name:"责任人",
           form:1,
           width:200,

+ 2 - 2
src/views/project/index1.vue

@@ -661,14 +661,14 @@ export default {
         },
         {
           surface: "4",
-          label: "fPerson",
+          label: "personName",
           name: "责任人",
           checked: 0,
           width: 100,
         },
         {
           surface: "5",
-          label: "fStatus",
+          label: "fStatusName",
           name: "状态",
           checked: 0,
           width: 100,

+ 232 - 190
src/views/purchaseIssue/index.vue

@@ -36,7 +36,8 @@
         :page-size="this.formDataList.pageSize"
         background
         layout="sizes, prev, pager, next"
-        :total="total">
+        :total="total"
+      >
       </el-pagination>
     </div>
     <div v-else class="app-container">
@@ -86,69 +87,69 @@
       ref="ApprovalComments"
       @refreshDataList="returnData"
     ></approval-comments>
-<!--    <el-dialog-->
-<!--      title="打印采购"-->
-<!--      :visible.sync="dialogVisible"-->
-<!--      :fullscreen="true"-->
-<!--      style="padding: 0;margin:0"-->
-<!--      width="70%">-->
-<!--      <div ref="print">-->
-<!--        <table class="table table-striped table-bordered" align="center" valign="center">-->
-<!--          <tr>-->
-<!--            <td style="font-size: 24px;font-weight:bold" class="column" colspan="6">采购表</td>-->
-<!--          </tr>-->
-<!--          <tr>-->
-<!--            <td class="column" style="width: 10%;">项目</td>-->
-<!--            <td class="column" style="width: 25%;">{{formList.projectName}}</td>-->
-<!--            <td class="column" style="width: 10%;">供应商</td>-->
-<!--            <td class="column" style="width: 25%;">{{ formList.corpName }}</td>-->
-<!--            <td class="column" style="width: 25%;" colspan="2">日期:{{formList.fBsdate}}</td>-->
-<!--          </tr>-->
-<!--        </table>-->
-<!--        <table class="table table-striped table-bordered" align="center" valign="center">-->
-<!--          <tr>-->
-<!--            <td class="column" style="width: 15%;border-top: none;">品名</td>-->
-<!--            <td class="column" style="width: 15%;border-top: none;">单价</td>-->
-<!--            <td class="column" style="width: 15%;border-top: none;">采购计划(斤)</td>-->
-<!--            <td class="column" style="width: 15%;border-top: none;">实际重量(斤)</td>-->
-<!--            <td class="column" style="width: 15%;border-top: none;">金额</td>-->
-<!--            <td class="column" style="width: 20%;border-top: none;">备注</td>-->
-<!--          </tr>-->
-<!--          <tr v-for="(item,index) in this.contentList" :key="index">-->
-<!--            <td class="column">{{item.feeName}}</td>-->
-<!--            <td class="column">{{item.fUnitprice}}</td>-->
-<!--            <td class="column">{{item.fPurchase}}</td>-->
-<!--            <td class="column">{{item.fQty}}</td>-->
-<!--            <td class="column">{{item.fAmount}}</td>-->
-<!--            <td class="column">{{item.remark}}</td>-->
-<!--          </tr>-->
-<!--        </table>-->
-<!--        <table class="table table-striped table-bordered" align="center" valign="center">-->
-<!--          <tr>-->
-<!--            <td colspan="6" style="border-top: none;" class="column"></td>-->
-<!--          </tr>-->
-<!--          <tr>-->
-<!--            <td class="column" style="width: 25%;">采购人签字</td>-->
-<!--            <td class="column" style="width: 25%;">厨房主管签字</td>-->
-<!--            <td class="column" style="width: 25%;">验收人签字</td>-->
-<!--            <td class="column" style="width: 25%;">主管签字</td>-->
-<!--          </tr>-->
-<!--          <tr>-->
-<!--            <td class="column" style="width: 25%;height: 37px;"></td>-->
-<!--            <td class="column" style="width: 25%;"></td>-->
-<!--            <td class="column" style="width: 25%;"></td>-->
-<!--            <td class="column" style="width: 25%;"></td>-->
-<!--          </tr>-->
+
+    <el-dialog
+      title="打印打印"
+      :visible.sync="dialogVisible"
+      :fullscreen="true"
+      style="padding: 0;margin:0"
+      width="70%"
+    >
+      <div ref="print">
+        <h1 style="text-align: center;font-weight:bold">开票公司</h1>
+        <div style="display: flex;justify-content: space-between;margin-bottom: 20px">
+          <div style="width: 200px;height: 20px;font-size: 14px;">客户项目:{{projectName}}</div>
+          <div style="width: 200px;height: 20px;font-size: 14px;">编号:{{formList.fBillno}}</div>
+          <div style="width: 200px;height: 20px;font-size: 14px;">录入人:{{formList.createBy}}</div>
+          <div style="width: 200px;height: 20px;font-size: 14px;">公司电话:{{formList.fsbuTel}}</div>
+          <div style="width: 200px;height: 20px;font-size: 14px;">出库日期:{{formList.fBsdate}}</div>
+        </div>
+        <table class="table table-striped table-bordered" align="center" valign="center">
+          <tr>
+            <td class="column" style="width: 5%;">行号</td>
+            <td class="column" style="width: 20%;">物料名称</td>
+            <td class="column" style="width: 10%;">规格型号</td>
+            <td class="column" style="width: 5%;">单位</td>
+            <td class="column" style="width: 10%;">重量</td>
+            <td class="column" style="width: 10%;">单价</td>
+            <td class="column" style="width: 10%;">金额</td>
+            <td class="column" style="width: 10%;">备注</td>
+          </tr>
+          <tr v-for="(item,index) in contentList" :key="index">
+            <td class="column">{{ index+1 }}</td>
+            <td class="column">{{ item.feeName }}</td>
+            <td class="column"></td>
+            <td class="column">{{item.fFeeunitName}}</td>
+            <td class="column">{{ item.fQty }}</td>
+            <td class="column">{{ item.fUnitprice }}</td>
+            <td class="column">{{ item.fAmount }}</td>
+            <td class="column">{{ item.remark }}</td>
+          </tr>
 <!--          <tr>-->
-<!--            <td colspan="4" style="border-top: none;font-weight:bold;text-align: right;padding-right: 10%;font-size: 16px;" class="column">{{ formList.fsbuName }}</td>-->
+<!--            <td class="column" colspan="2">大写金额:</td>-->
+<!--            <td class="column" colspan="2" style="text-align: left">100亿元</td>-->
+<!--            <td class="column">总金额:</td>-->
+<!--            <td class="column" colspan="3">{{formList.fMoney}}</td>-->
 <!--          </tr>-->
-<!--        </table>-->
-<!--      </div>-->
-<!--      <span slot="footer" class="dialog-footer">-->
-<!--    <el-button @click="dialogVisible = false">取 消</el-button>-->
-<!--    <el-button type="primary" @click="Printing">打印</el-button>-->
-<!--  </span>-->
-<!--    </el-dialog>-->
+        </table>
+        <table class="table table-striped table-bordered" align="center" valign="center">
+          <tr>
+            <td class="column" colspan="2" style="border-top: none;width: 10%;">大写总金额:</td>
+            <td class="column" colspan="2" style="text-align: left;border-top: none;width: 40%;"></td>
+            <td class="column" style="border-top: none; width: 10%;">小写总金额:</td>
+            <td class="column" colspan="3" style="border-top: none;text-align: left;width: 30%;">{{formList.fMoney}}</td>
+          </tr>
+        </table>
+        <div style="display: flex;justify-content: space-between;margin-top: 20px">
+          <div style="width: 200px;height: 20px;font-size: 14px;">发货人:</div>
+          <div style="width: 200px;height: 20px;font-size: 14px;">收货:</div>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+    <el-button @click="dialogVisible = false">取 消</el-button>
+    <el-button type="primary" @click="Printing">打印</el-button>
+  </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -166,7 +167,7 @@ import {
   warehouse,
   listDelete,
   tableDeleteQuery,
-  confirmDeletion, pleaseCheck, revoke, queryUserVal, getName,revokeBill
+  confirmDeletion, pleaseCheck, revoke, queryUserVal, getName, revokeBill
 } from '@/api/purchaseIssue/index'
 import Cookies from 'js-cookie'
 
@@ -174,36 +175,37 @@ export default {
   name: 'index',
   data() {
     return {
-      before:'',
-      hasPermi:{
-        lookup:['anpin:stockControl:query'],
-        disappear:['anpin:stockControl:remove']
+      before: '',
+      hasPermi: {
+        lookup: ['anpin:stockControl:query'],
+        disappear: ['anpin:stockControl:remove']
       },
       addOrUpdateVisib: false,
       addOrUpdateVisible: false,
-      total:0,
-      formDataList:{
+      total: 0,
+      formDataList: {
         fBilltype: 'XS',
-        pageSize:10,
-        pageNum:1,
+        pageSize: 10,
+        pageNum: 1
       },
-      formList:{},
-      tatolLabel:['金额'],
+      formList: {},
+      tatolLabel: ['金额'],
       dialogVisible: false,
       listData: {
         fFeeid: [],
         fFeeunitid: [],
-        fStltypeid: [],
+        fStltypeid: []
       },
-      setTimeout:'',
+      setTimeout: '',
       searchWhether: true,
       pageDisplay: true,
+      projectName:'',
       dataList: {
         fGoodsid: [],
         fSbu: [],
         fWarehouseid: [],
         fCorpid: [],
-        fMarketTypid:[]
+        fMarketTypid: []
       },
       contentList: [],
       inDex: 4,
@@ -253,7 +255,7 @@ export default {
           checked: 0,
           width: 100,
           onabort: ''
-        },{
+        }, {
           surface: '7',
           label: 'createBy',
           name: '申请人',
@@ -291,7 +293,7 @@ export default {
           checked: 0,
           width: 100,
           onabort: ''
-        },{
+        }, {
           surface: '12',
           label: 'operation',
           name: '操作',
@@ -346,7 +348,7 @@ export default {
           onabort: '',
           disabled: false,
           changeable: 2
-        },{
+        }, {
           surface: '6',
           label: 'fFeeunitid',
           name: '计量单位',
@@ -364,7 +366,7 @@ export default {
           onabort: 'this.value=this.value.replace(/[^\\-?\\d.]/g,"").replace(/^(\\-)*(\\d+)\\.(\\d\\d).*$/, "$1$2.$3")',
           disabled: false,
           changeable: 2
-        },  {
+        }, {
           surface: '8',
           label: 'remark',
           name: '备注',
@@ -426,7 +428,7 @@ export default {
           icon: 'el-icon-edit',
           name: '新增',
           disabled: false,
-          hasPermi:['anpin:stockControl:anPingApply']
+          hasPermi: ['anpin:stockControl:anPingApply']
         },
         // {
         //   type:'warning',
@@ -441,14 +443,14 @@ export default {
           icon: 'el-icon-upload2',
           name: '导出',
           disabled: false,
-          hasPermi:['anpin:stockControl:export']
+          hasPermi: ['anpin:stockControl:export']
         }, {
           type: 'success',
           size: 'mini',
           icon: 'el-icon-c-scale-to-original',
           name: '复制新增',
           disabled: false,
-          hasPermi:['anpin:stockControl:generateReceipts']
+          hasPermi: ['anpin:stockControl:generateReceipts']
         }
       ],
       contentButton: [
@@ -505,6 +507,13 @@ export default {
           name: '申请发票',
           disabled: false
         },
+        {
+          type: 'primary',
+          size: 'mini',
+          icon: 'el-icon-edit-outline',
+          name: '打印',
+          disabled: false
+        }
       ],
       formOption: [
         {
@@ -559,7 +568,7 @@ export default {
       ],
       contentOption: [
         {
-          index:'1',
+          index: '1',
           span: 6,
           label: 'fBillno',
           name: '系统编号',
@@ -569,7 +578,7 @@ export default {
           disabled: true,
           rules: [{ required: false, message: ' ' }]
         }, {
-          index:'2',
+          index: '2',
           span: 6,
           label: 'fGoodsid',
           name: '项目名称',
@@ -579,7 +588,7 @@ export default {
           disabled: true,
           rules: [{ required: true, message: ' ' }]
         }, {
-          index:'5',
+          index: '5',
           span: 6,
           label: 'corpsName',
           name: '客户名称',
@@ -590,7 +599,7 @@ export default {
           rules: [{ required: false, message: ' ' }]
         },
         {
-          index:'3',
+          index: '3',
           span: 6,
           label: 'fMarketTypid',
           name: '出库类别',
@@ -601,7 +610,7 @@ export default {
           rules: [{ required: false, message: ' ' }]
         },
         {
-          index:'4',
+          index: '4',
           span: 6,
           label: 'fStudentsWeight',
           name: '人数',
@@ -613,7 +622,7 @@ export default {
           rules: [{ required: true, message: ' ' }]
         },
         {
-          index:'6',
+          index: '6',
           span: 6,
           label: 'fWarehouseid',
           name: '仓库',
@@ -623,7 +632,7 @@ export default {
           labelSize: '80',
           rules: [{ required: true, message: ' ' }]
         }, {
-          index:'7',
+          index: '7',
           span: 6,
           label: 'fBsdate',
           name: '出库日期',
@@ -645,7 +654,7 @@ export default {
         //   rules: [{ required: false, message: ' ' }]
         // },
         {
-          index:'9',
+          index: '9',
           span: 6,
           label: 'fSbu',
           name: '开票公司',
@@ -655,7 +664,7 @@ export default {
           labelSize: '80',
           rules: [{ required: true, message: ' ' }]
         }, {
-          index:'10',
+          index: '10',
           span: 6,
           label: 'remark',
           name: '备注',
@@ -667,13 +676,13 @@ export default {
         }
       ]
     }
-  },activated(){
+  }, activated() {
     this.homePage()
   },
   created() {
     //获取登陆人
     queryUserVal().then((response) => {
-      this.lander = response.user.userName;
+      this.lander = response.user.userName
     })
     let data = {
       tableName: this.queryList.tableName,
@@ -741,25 +750,25 @@ export default {
     this.fCompany(2)
   },
   methods: {
-    change(scope){
-      for(let item in this.contentList){
-        for(let li in this.listData.fFeeid){
-          if(this.contentList[item].fFeeid == this.listData.fFeeid[li].value){
-            this.$set(this.contentList[item],'fFeeunitid',this.listData.fFeeid[li].fFeeunitid)
+    change(scope) {
+      for (let item in this.contentList) {
+        for (let li in this.listData.fFeeid) {
+          if (this.contentList[item].fFeeid == this.listData.fFeeid[li].value) {
+            this.$set(this.contentList[item], 'fFeeunitid', this.listData.fFeeid[li].fFeeunitid)
           }
         }
       }
     },
-    homePage(){
+    homePage() {
       let date = this.$route.query
-      if (this.$route.query.list){
+      if (this.$route.query.list) {
         console.log(this.$route.query.list)
         // this.contentButton = this.$options.data().contentButton
         // this.contentButton.push(JSON.parse(this.$route.query.list))
         console.log(this.contentButton)
         let scope = {
-          row:{
-            fId:JSON.parse(this.$route.query.data).billId
+          row: {
+            fId: JSON.parse(this.$route.query.data).billId
           }
         }
         this.viewMethod(scope)
@@ -767,39 +776,39 @@ export default {
     },
     // 查看审批流
     getDataList() {
-      this.addOrUpdateVisible = false;
+      this.addOrUpdateVisible = false
     },
     returnData() {
-      this.addOrUpdateVisib = false;
-      this.open = false;
-      this.cancelTwo();
+      this.addOrUpdateVisib = false
+      this.open = false
+      this.cancelTwo()
     },
     addOrUpdateHandle() {
-      this.addOrUpdateVisible = true;
+      this.addOrUpdateVisible = true
       this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(this.$refs.avatar.form.fId,550);
-      });
+        this.$refs.addOrUpdate.init(this.$refs.avatar.form.fId, 550)
+      })
     },
     //首页审批跳转关闭返回首页
     cancelTwo() {
       this.open = false
       let view = {
-        fullPath: "/purchaseIssue",
-        hash: "",
+        fullPath: '/purchaseIssue',
+        hash: '',
         matched: Array(2),
         meta: Object,
-        name: "PurchaseIssue",
+        name: 'PurchaseIssue',
         params: Object,
-        path: "/purchaseIssue",
+        path: '/purchaseIssue',
         query: Object,
-        title: "销售出库"
+        title: '销售出库'
       }
       this.$router.push({ path: '/index' })
       this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
-          if (this.isActive(view)) {
-            this.toLastView(visitedViews, view)
-          }
-        })
+        if (this.isActive(view)) {
+          this.toLastView(visitedViews, view)
+        }
+      })
       Global.$emit('removeCache', 'closeSelectedTag', view)
     },
 
@@ -847,7 +856,7 @@ export default {
       })
     },
     //查询列数据
-    getRow(data,list) {
+    getRow(data, list) {
       select(data).then((res) => {
         if (data.tableName === '销售出库详情') {
           if (res.data.length != 0) {
@@ -881,12 +890,12 @@ export default {
           this.inDex = 4
         }
         this.$refs.avatar.form = {}
-        if (list){
+        if (list) {
           this.$refs.avatar.form = list.warehouseBills
           this.contentList = list.tWarehousebillsfees
           this.contentButton = this.$options.data().contentButton
           console.log(this.$route.query.list)
-          if(this.$route.query.list){
+          if (this.$route.query.list) {
             this.contentButton.push(JSON.parse(this.$route.query.list))
           }
           let data = {
@@ -897,7 +906,7 @@ export default {
             console.log(response)
             if (response.data.length != 0) {
               this.before = response.data[0].userName
-              if(this.$refs.avatar.form.fBillstatus == 6 && this.before == this.lander){
+              if (this.$refs.avatar.form.fBillstatus == 6 && this.before == this.lander) {
                 console.log(this.contentButton)
                 this.contentButton.push({
                   type: 'warning',
@@ -909,7 +918,7 @@ export default {
               }
             }
           })
-          if(this.$refs.avatar.form.fBillstatus == 4){
+          if (this.$refs.avatar.form.fBillstatus == 4) {
             this.contentButton.push({
               type: 'danger',
               size: 'mini',
@@ -918,35 +927,35 @@ export default {
               disabled: false
             })
           }
-          if(this.$refs.avatar.form.fBillstatus > 3){
+          if (this.$refs.avatar.form.fBillstatus > 3) {
             console.log(this.contentButton)
             this.contentButton.push({
               type: 'primary',
-                size: 'mini',
+              size: 'mini',
               icon: 'el-icon-edit-outline',
               name: '查看审批',
               disabled: false
             })
           }
           let operator = this.$refs.avatar.form.createBy
-          for(let li in this.contentButton){
-            if(this.$refs.avatar.form.fBillstatus < 4){
-              if(this.contentButton[li].name == '返回列表' || this.contentButton[li].name == '修改'){
+          for (let li in this.contentButton) {
+            if (this.$refs.avatar.form.fBillstatus < 4) {
+              if (this.contentButton[li].name == '返回列表' || this.contentButton[li].name == '修改'||this.contentButton[li].name === '打印') {
                 this.contentButton[li].disabled = false
-              }else {
+              } else {
                 this.contentButton[li].disabled = true
               }
-            }else{
-              if(this.contentButton[li].name == '返回列表' || this.contentButton[li].name == '申请发票' || this.contentButton[li].name == '修改' ||this.contentButton[li].name == '查看审批' || this.contentButton[li].name == '撤销出库'){
+            } else {
+              if (this.contentButton[li].name == '返回列表' || this.contentButton[li].name == '申请发票'||this.contentButton[li].name === '打印' || this.contentButton[li].name == '修改' || this.contentButton[li].name == '查看审批' || this.contentButton[li].name == '撤销出库') {
                 this.contentButton[li].disabled = false
-              }else {
+              } else {
                 this.contentButton[li].disabled = true
               }
             }
-            if(this.$refs.avatar.form.fBillstatus == 6 ){
+            if (this.$refs.avatar.form.fBillstatus == 6) {
               this.contentButton[li].disabled = false
             }
-            if(this.contentButton[li].name == '撤销审批' && this.lander === operator){
+            if (this.contentButton[li].name == '撤销审批' && this.lander === operator) {
               this.contentButton[li].disabled = false
             }
           }
@@ -965,12 +974,12 @@ export default {
             tableName: this.purchaseList.tableName,
             userId: Cookies.get('userName')
           }
-          let list ={
-            warehouseBills:res.data.warehouseBills,
-            tWarehousebillsfees:res.data.tWarehousebillsfees
+          let list = {
+            warehouseBills: res.data.warehouseBills,
+            tWarehousebillsfees: res.data.tWarehousebillsfees
           }
           this.$refs.avatar.form = {}
-          this.getRow(data,list)
+          this.getRow(data, list)
           //   for(let li in this.contentButton){
           //     if(this.contentButton[li].name == '返回列表' || this.contentButton[li].name == '修改' ||this.contentButton[li].name == '申请发票' || this.contentButton[li].name == '查看审批'){
           //       this.contentButton[li].disabled = false
@@ -982,7 +991,7 @@ export default {
       })
     },
     //请核
-    writeOff(){
+    writeOff() {
       let formData = new window.FormData()
       formData.append('tWarehousebills', JSON.stringify(this.$refs.avatar.form))
       formData.append('tWarehousebillsfees', JSON.stringify(this.contentList))
@@ -996,27 +1005,27 @@ export default {
           this.contentStyle.forEach(item => item.disabled = true)
           this.contentButton = this.$options.data().contentButton
           this.contentButton.push({
-              type: 'danger',
-              size: 'mini',
-              icon: 'el-icon-refresh-left',
-              name: '撤销审批',
-              disabled: false
-            })
-            this.contentButton.push({
-              type: 'primary',
-              size: 'mini',
-              icon: 'el-icon-edit-outline',
-              name: '查看审批',
-              disabled: false
-            })
+            type: 'danger',
+            size: 'mini',
+            icon: 'el-icon-refresh-left',
+            name: '撤销审批',
+            disabled: false
+          })
+          this.contentButton.push({
+            type: 'primary',
+            size: 'mini',
+            icon: 'el-icon-edit-outline',
+            name: '查看审批',
+            disabled: false
+          })
           let operator = this.$refs.avatar.form.createBy
-          for(let li in this.contentButton){
-            if(this.contentButton[li].name == '返回列表' || this.contentButton[li].name == '申请发票' || this.contentButton[li].name == '查看审批'){
+          for (let li in this.contentButton) {
+            if (this.contentButton[li].name == '打印'||this.contentButton[li].name == '返回列表' || this.contentButton[li].name == '申请发票' || this.contentButton[li].name == '查看审批') {
               this.contentButton[li].disabled = false
-            }else {
+            } else {
               this.contentButton[li].disabled = true
             }
-            if(this.contentButton[li].name == '撤销审批' && this.lander === operator){
+            if (this.contentButton[li].name == '撤销审批' && this.lander === operator) {
               this.contentButton[li].disabled = false
             }
           }
@@ -1053,16 +1062,16 @@ export default {
     selectionbox(selection) {
     },
     addOrUpdateHand() {
-      this.addOrUpdateVisib = true;
+      this.addOrUpdateVisib = true
       this.$nextTick(() => {
-        this.$refs.ApprovalComments.init(this.$refs.avatar.form.fId,550);
-      });
+        this.$refs.ApprovalComments.init(this.$refs.avatar.form.fId, 550)
+      })
     },
     //详情内容保存
     submitAndSave(item) {
       let formData = new window.FormData()
       this.$refs.avatar.form.fMoney = 0
-      for(let li in this.contentList){
+      for (let li in this.contentList) {
         this.$refs.avatar.form.fMoney += Number(this.contentList[li].fAmount)
       }
       this.dataList.fGoodsid.forEach(item => {
@@ -1078,9 +1087,9 @@ export default {
           this.$message.success('保存成功')
           this.$refs.avatar.form = res.data.warehouseBills
           this.contentList = res.data.tWarehousebillsCntrs
-          if (item == 1){
+          if (item == 1) {
             this.dialogVisible = true
-          }else if(item == 2){
+          } else if (item == 2) {
             this.$refs.avatar.form = {}
             this.pageDisplay = true
           }
@@ -1099,7 +1108,7 @@ export default {
       }
     },
     //确认打印
-    Printing(){
+    Printing() {
       this.$print(this.$refs.print)
     },
     //所以按钮
@@ -1139,14 +1148,14 @@ export default {
         //   }
         //   break
         case '修改':
-          this.contentButton.forEach(item =>{
-            if (this.$refs.avatar.form.fBillstatus >= 4){
-              if (item.name === '返回列表' || item.name === '修改' || item.name === '申请发票' || item.name === '查看审批' || item.name === '审批'){
+          this.contentButton.forEach(item => {
+            if (this.$refs.avatar.form.fBillstatus >= 4) {
+              if (item.name === '返回列表' || item.name === '修改' || item.name === '申请发票' || item.name === '查看审批' || item.name === '审批'|| item.name === '打印' || item.name === '撤销审批') {
                 item.disabled = false
-              }else {
+              } else {
                 item.disabled = true
               }
-            }else {
+            } else {
               item.disabled = false
               this.contentStyle.forEach(item => item.disabled = false)
               this.contentOption.forEach(item => {
@@ -1172,7 +1181,7 @@ export default {
             createTime: '',
             createBy: Cookies.get('userName'),
             fReviewDate: '',
-            operation: '',
+            operation: ''
           })
           break
         case '返回列表':
@@ -1183,10 +1192,10 @@ export default {
             }
             this.getRow(data)
             this.query(this.formDataList)
-          } else if(this.$route.query.data){
+          } else if (this.$route.query.data) {
             this.cancelTwo()
-            this.$router.push({path:'/index'})
-          }else {
+            this.$router.push({ path: '/index' })
+          } else {
             this.$confirm('当前数据未保存是否保存?', '提示', {
               confirmButtonText: '保存',
               cancelButtonText: '取消',
@@ -1204,10 +1213,10 @@ export default {
           }
           break
         case '请核':
-          if (this.$refs.avatar.form.fBillstatus < 4){
+          if (this.$refs.avatar.form.fBillstatus < 4) {
             this.$refs.avatar.submitForm('check')
-          }else{
-            this.$message.error("请先保存")
+          } else {
+            this.$message.error('请先保存')
           }
           break
         case '查看审批':
@@ -1222,32 +1231,64 @@ export default {
         case '撤销出库':
           this.revocationOfApproval(2)
           break
+        case '打印':
+          console.log(this.listData.fFeeid,this.contentList)
+          this.formList.createBy = Cookies.get('userName')
+          for(let ul in this.dataList.fGoodsid){
+            if (this.$refs.avatar.form.fGoodsid == this.dataList.fGoodsid[ul].value){
+              this.projectName = this.dataList.fGoodsid[ul].label
+            }
+          }
+          for (let item in this.contentList){
+            for (let li in this.listData.fFeeid){
+              if (this.contentList[item].fFeeid == this.listData.fFeeid[li].value){
+                this.contentList[item].feeName = this.listData.fFeeid[li].label
+              }
+            }
+            for(let i in this.listData.fFeeunitid){
+              if (this.contentList[item].fFeeunitid == this.listData.fFeeunitid[i].value){
+                this.contentList[item].fFeeunitName = this.listData.fFeeunitid[i].label
+              }
+            }
+          }
+
+          console.log('11111')
+          if (!this.$refs.avatar.form.fId){
+            this.$message.error('未保存,不允许打印');
+          }else if (this.$refs.avatar.form.fBillstatus >= 4){
+            this.formList = this.$refs.avatar.form
+            this.dialogVisible = true
+          }else {
+            this.formList = this.$refs.avatar.form
+            this.submitAndSave(1)
+          }
+          break
         default:
           this.$message.error('该按钮暂无功能')
       }
     },
     //撤销审批
-    revocationOfApproval(res){
-      if(res == 1){
+    revocationOfApproval(res) {
+      if (res == 1) {
         let data = {
           id: this.$refs.avatar.form.fId,
           actId: 550,
-          billId: this.$refs.avatar.form.fId,
-        };
-        revoke(data).then(res=>{
-          if(res.code == 200){
-            this.$message.success("撤销成功");
+          billId: this.$refs.avatar.form.fId
+        }
+        revoke(data).then(res => {
+          if (res.code == 200) {
+            this.$message.success('撤销成功')
             this.getList()
             this.pageDisplay = true
           }
         })
-      }else if(res == 2){
-        let data ={
-          fId:this.$refs.avatar.form.fId
+      } else if (res == 2) {
+        let data = {
+          fId: this.$refs.avatar.form.fId
         }
-        revokeBill(data).then(res=>{
-          if(res.code == 200){
-            this.$message.success("撤销成功");
+        revokeBill(data).then(res => {
+          if (res.code == 200) {
+            this.$message.success('撤销成功')
             this.getList()
             this.pageDisplay = true
           }
@@ -1330,7 +1371,8 @@ export default {
 .column {
   border: 1px solid #000;
 }
-.app-container >>> .el-form-item{
+
+.app-container >>> .el-form-item {
   margin-bottom: 0;
 }
 </style>