Переглянути джерело

Merge branch 'master' of git.echepei.com:wengyuwen/anpinjingyuan-ui

caojunjie 4 роки тому
батько
коміт
9310cf0cf2

+ 3 - 5
src/api/reportAnalysis/profitGeneralLedger.js

@@ -9,13 +9,11 @@ export function queryData(query) {
   })
 }
 // 查询项目名称
-export function queryItem(query) {
+export function queryItem(data) {
   return request({
-    url: '/anpin/project/projectName',
+    url: '/basicdata/corps/getCorpName',
     method: 'post',
-    data: {
-      projectName:query
-    }
+    data: data
   })
 }
 // 导出数据

+ 25 - 1
src/views/purchaseIssue/index.vue

@@ -332,8 +332,16 @@ export default {
           checked: 0,
           width: 100,
           onabort: ''
-        }, {
+        },
+        {
           surface: '13',
+          label: 'fPrintLog',
+          name: '打印日志',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        }, {
+          surface: '14',
           label: 'operation',
           name: '操作',
           checked: 0,
@@ -1062,6 +1070,22 @@ export default {
     query(data) {
       listQuery(data).then(res => {
         this.tableData = res.rows
+        this.tableData.forEach(item=>{
+          console.log(item.fPrint)
+          console.log(item.fPrintLog)
+          if(item.fPrint && item.fPrintLog){
+            item.fPrintLog = item.fPrint + ',' + item.fPrintLog
+          }else if(item.fPrint || item.fPrintLog == null){
+            item.fPrintLog = item.fPrint
+          }else if(item.fPrint==null || item.fPrintLog){
+            item.fPrintLog = item.fPrintLog
+          }else{
+            item.fPrintLog = ''
+          }
+          // item.fPrintLog = item.fPrint == null && item.fPrintLog == null ? '' :
+          //   item.fPrint && item.fPrintLog == null? item.fPrint : item.fPrint && item.fPrintLog? item.fPrint + ',' + item.fPrintLog :item.fPrintLog
+        })
+        console.log(this.tableData)
         this.total = res.total
       })
     },

+ 10 - 0
src/views/purchaseRequest/index.vue

@@ -335,6 +335,16 @@ export default {
           onabort: ''
         },{
           surface: '11',
+          label: 'fCreateLog',
+          name: '生成日志',
+          checked: 0,
+          width: 160,
+          fixed:'right',
+          operation: '1',
+          onabort: ''
+        },
+        {
+          surface: '12',
           label: 'operation',
           name: '操作',
           checked: 0,

+ 5 - 4
src/views/reportAnalysis/profitGeneralLedger.vue

@@ -3,7 +3,7 @@
     <el-form :model="queryParams" :rules="rules" ref="rules" :inline="true" v-show="showSearch" label-width="68px">
       <el-row>
 
-          <el-form-item label="客户项目" prop="fGoodsid">
+          <el-form-item label="客户" prop="fGoodsid">
             <el-select
               v-model="queryParams.fGoodsid"
               filterable
@@ -16,7 +16,7 @@
               <el-option
                 v-for="(item, index) in projectOption"
                 :key="index"
-                :label="item.projectName"
+                :label="item.fName"
                 :value="item.fId"
               ></el-option>
             </el-select>
@@ -332,8 +332,9 @@ export default {
     this.getDicts("data_cost_attribute").then((response) => {
       this.fFeetypeOptions = response.data;
     });
-    queryItem().then(res=>{
-      console.log(res.data)
+    let queryParams = {fTypeid:3 }
+    queryItem(queryParams).then(res=>{
+      console.log(res)
       this.projectOption = res.data
     })
   },

+ 229 - 106
src/views/warehouse/inStock/index.vue

@@ -43,8 +43,6 @@
     </div>
     <div v-if="MainTable == true">
       <el-breadcrumb separator="/" style="display:flex;align-items: center;margin-bottom: 10px">
-        <el-breadcrumb-item>仓库入库</el-breadcrumb-item>
-        <el-breadcrumb-item>仓库入库详情页</el-breadcrumb-item>
         <el-breadcrumb-item>
           <el-button plain size="mini" type="danger" icon="el-icon-arrow-left" @click="backRules">
             返回列表
@@ -811,6 +809,13 @@ export default {
           name:'刷新',
           disabled:false,
           res:1
+        },
+        {
+          type: 'info',
+          size: 'mini',
+          icon: 'el-icon-edit-outline',
+          name: '生成出库单',
+          disabled: false
         }
       ],
       confirmButton:[
@@ -1113,10 +1118,14 @@ export default {
     },
     handleQuery(){
       this.$refs.MainForm.hide()
+      console.log(this.queryParms)
       this.getList();
     },
     resetQuery(){
-      this.queryParms = {}
+      this.queryParms = {
+        pageNum: 1,
+        pageSize: this.queryParms.pageSize
+      }
       this.getList();
     },
     //查询列数据
@@ -1129,7 +1138,6 @@ export default {
             this.setRowList = res.data
             this.detailList.columnList = this.detailList.columnList.filter((e) => e.checked == 0);
             // this.waitFor = true
-            console.log("000")
           }else {
             // this.waitFor = true
             this.$set(this.detailList,'columnList',this.$options.data().detailStyle)
@@ -1138,14 +1146,8 @@ export default {
           this.isItHidden = false
           this.inDex = this.detailOption.length
           if (iem === undefined){
-            console.log("111")
-            this.detailList.columnList.forEach(item => item.disabled = true)
-          }else if(iem == 1){
-            for(let li in this.detailList.columnList){
-              if(!this.detailList.columnList[li].doNot){
-                this.detailList.columnList[li].disabled = false
-              }
-            }
+            this.detailList.columnList.forEach(item => item.disabled = false)
+            this.detailButton.forEach(item => item.disabled = false)
           }
         }else {
           if (res.data.length != 0) {
@@ -1163,7 +1165,6 @@ export default {
           this.inDex = 4
         }
         if(list){
-          console.log("333")
           this.detailForm = list.warehouseBills
           this.detailData = list.tWarehousebillsfees
           this.$set(this.detailForm,'fStorekeeper',JSON.parse(this.detailForm.fStorekeeper))
@@ -1182,25 +1183,32 @@ export default {
               disabled: false
             })
           }
-          for(let li in this.detailButton){
-            if(this.detailForm.fBillstatus == '6'){
-              if(this.detailButton[li].name == '录入明细' || this.detailButton[li].name == '保存' ||
-                this.detailButton[li].name == '入库确认' || this.detailButton[li].name == '刷新' || this.detailButton[li].name == '修改'){
-                this.detailButton[li].disabled = true
+          if(iem === undefined){
+              this.detailButton.forEach(item => item.disabled = false)
+              this.detailForm.fBillstatus = 2
+              this.detailForm.fBillno = ''
+              this.detailForm.fId = ''
+              this.detailList.columnList.forEach(item => item.fId='')
+              this.detailButton = this.$options.data().detailButton
+          }else if(iem == 1){
+              if(this.detailForm.fBillstatus >= '4') {
+                for(let li in this.detailButton ){
+                  if(this.detailButton[li].name == '录入明细' || this.detailButton[li].name == '保存' ||
+                    this.detailButton[li].name == '入库确认' || this.detailButton[li].name == '刷新' || this.detailButton[li].name == '修改'){
+                    this.detailButton[li].disabled = true
+                  }
+                }
+              this.detailList.columnList.forEach(item => item.disabled=true)
               }else{
-                this.detailButton[li].disabled = false
-              }
-            } else {
-              if (iem === undefined){
-                if(this.detailButton[li].name == '录入明细' || this.detailButton[li].name == '保存' ||
-                  this.detailButton[li].name == '入库确认' || this.detailButton[li].name == '刷新'){
-                  this.detailButton[li].disabled = true
-                }else{
-                  this.detailButton[li].disabled = false
+                for(let li in this.detailButton ){
+                  if(this.detailButton[li].name == '录入明细' || this.detailButton[li].name == '保存' ||
+                    this.detailButton[li].name == '入库确认' || this.detailButton[li].name == '刷新'){
+                    this.detailButton[li].disabled = true
+                  }
                 }
+                this.detailList.columnList.forEach(item => item.disabled=true)
               }
             }
-          }
         }
       });
     },
@@ -1224,9 +1232,49 @@ export default {
         for(let item in this.detailOption){
           this.detailOption[item].disabled = true
         }
-
+        getSave(fId).then(res=>{
+          if(res.code == 200){
+            let data = {
+              tableName: this.detailList.tableName,
+              userId: Cookies.get('userName')
+            }
+            let list ={
+              warehouseBills:res.data.warehouseBills,
+              tWarehousebillsfees:res.data.tWarehousebillsfees
+            }
+            this.getRow(data,list,1)
+          }
+          if(res.data.warehouseBills){
+            getArea(res.data.warehouseBills.fWarehouseid).then(res=>{
+              if(res.code == 200){
+                this.listData.fWarehouseid = []
+                for(let item in res.data){
+                  this.listData.fWarehouseid.push({
+                    label:res.data[item].fWarehouseInformation,
+                    value:res.data[item].id
+                  })
+                }
+              }
+            })
+          }
+          // if(){
+          //   let data = {
+          //     fId: this.$refs.avatar.form.fId
+          //   }
+          //   revokeBill(data).then(res => {
+          //     if (res.code == 200) {
+          //       this.$message.success('撤销成功')
+          //       this.getList()
+          //       this.pageDisplay = true
+          //     }
+          //   })
+          // }
+          this.MainTable = true
+          this.inDex = this.detailOption.length
+        })
       }else if(res){
-        fId = this.copyeId
+        console.log(res)
+        fId = res
         this.detailButton.forEach(item => item.disabled = false)
         this.detailList.columnList.forEach(item => {
           if(!item.doNot){
@@ -1238,49 +1286,89 @@ export default {
             item.disabled = false
           }
         })
+        getSave(fId).then(res=>{
+          if(res.code == 200){
+            let data = {
+              tableName: this.detailList.tableName,
+              userId: Cookies.get('userName')
+            }
+            let list ={
+              warehouseBills:res.data.warehouseBills,
+              tWarehousebillsfees:res.data.tWarehousebillsfees
+            }
+            this.getRow(data,list,iem)
+          }
+          if(res.data.warehouseBills){
+            getArea(res.data.warehouseBills.fWarehouseid).then(res=>{
+              if(res.code == 200){
+                this.listData.fWarehouseid = []
+                for(let item in res.data){
+                  this.listData.fWarehouseid.push({
+                    label:res.data[item].fWarehouseInformation,
+                    value:res.data[item].id
+                  })
+                }
+              }
+            })
+          }
+          // if(){
+          //   let data = {
+          //     fId: this.$refs.avatar.form.fId
+          //   }
+          //   revokeBill(data).then(res => {
+          //     if (res.code == 200) {
+          //       this.$message.success('撤销成功')
+          //       this.getList()
+          //       this.pageDisplay = true
+          //     }
+          //   })
+          // }
+          this.MainTable = true
+          this.inDex = this.detailOption.length
+        })
       } else{
          fId = this.ids
-      }
-      getSave(fId).then(res=>{
-        if(res.code == 200){
-          let data = {
-            tableName: this.detailList.tableName,
-            userId: Cookies.get('userName')
-          }
-          let list ={
-            warehouseBills:res.data.warehouseBills,
-            tWarehousebillsfees:res.data.tWarehousebillsfees
+        getSave(fId).then(res=>{
+          if(res.code == 200){
+            let data = {
+              tableName: this.detailList.tableName,
+              userId: Cookies.get('userName')
+            }
+            let list ={
+              warehouseBills:res.data.warehouseBills,
+              tWarehousebillsfees:res.data.tWarehousebillsfees
+            }
+            this.getRow(data,list,1)
           }
-          this.getRow(data,list,iem)
-        }
-        if(res.data.warehouseBills){
-          getArea(res.data.warehouseBills.fWarehouseid).then(res=>{
-            if(res.code == 200){
-              this.listData.fWarehouseid = []
-              for(let item in res.data){
-                this.listData.fWarehouseid.push({
-                  label:res.data[item].fWarehouseInformation,
-                  value:res.data[item].id
-                })
+          if(res.data.warehouseBills){
+            getArea(res.data.warehouseBills.fWarehouseid).then(res=>{
+              if(res.code == 200){
+                this.listData.fWarehouseid = []
+                for(let item in res.data){
+                  this.listData.fWarehouseid.push({
+                    label:res.data[item].fWarehouseInformation,
+                    value:res.data[item].id
+                  })
+                }
               }
-            }
-          })
-        }
-        // if(){
-        //   let data = {
-        //     fId: this.$refs.avatar.form.fId
-        //   }
-        //   revokeBill(data).then(res => {
-        //     if (res.code == 200) {
-        //       this.$message.success('撤销成功')
-        //       this.getList()
-        //       this.pageDisplay = true
-        //     }
-        //   })
-        // }
-        this.MainTable = true
-        this.inDex = this.detailOption.length
-      })
+            })
+          }
+          // if(){
+          //   let data = {
+          //     fId: this.$refs.avatar.form.fId
+          //   }
+          //   revokeBill(data).then(res => {
+          //     if (res.code == 200) {
+          //       this.$message.success('撤销成功')
+          //       this.getList()
+          //       this.pageDisplay = true
+          //     }
+          //   })
+          // }
+          this.MainTable = true
+          this.inDex = this.detailOption.length
+        })
+      }
     },
     //修改
     modification(scope){
@@ -1435,36 +1523,40 @@ export default {
               }
               this.getList();
               if(i == 2){
-                let data ={
-                  fBilltype:'RK',
-                  fId:this.detailForm.fId
-                }
-                copyNew(data).then(res=>{
-                  if(res.code == 200) {
-                    this.$message.success("操作成功")
-                    this.copyeId = res.data
-                    this.getList()
-                    this.viewMethod(null,1,2)
-                  }
-                })
+
+                // let data ={
+                //   fBilltype:'RK',
+                //   fId:this.detailForm.fId
+                // }
+                // copyNew(data).then(res=>{
+                //   if(res.code == 200) {
+                //     this.$message.success("操作成功")
+                //     this.copyeId = res.data
+                //     this.getList()
+                //     this.viewMethod(null,1,2)
+                //   }
+                // })
               }else{
                 this.$message.success("保存成功")
               }
             }
           })
             } else if(i == 2 && this.detailForm.fBillstatus > 3 ){
-                let data = {
-                  fBilltype:'RK',
-                  fId:this.detailForm.fId
-                }
-                copyNew(data).then(res=>{
-                  if(res.code == 200) {
-                    this.$message.success("操作成功")
-                    this.copyeId = res.data
-                    this.getList()
-                    this.viewMethod(null,1,2)
-                  }
-                })
+                // let data = {
+                //   fBilltype:'RK',
+                //   fId:this.detailForm.fId
+                // }
+                // copyNew(data).then(res=>{
+                //   if(res.code == 200) {
+                //     this.$message.success("操作成功")
+                //     this.copyeId = res.data
+                //     this.getList()
+                //     this.viewMethod(null,1,2)
+                    this.detailForm.fId = ''
+                    this.detailForm.fBillno = ''
+                    this.detailList.columnList.forEach(item => item.fId='')
+                //   }
+                // })
               }
               if(i == 1){
                 this.isItHidden = true
@@ -1638,6 +1730,19 @@ export default {
             })
           }
           break
+        case '生成出库单':
+          let listd = {
+            fId:this.detailForm.fId,
+            fBilltype:'CK'
+          }
+          copyNew(listd).then(res=>{
+            this.$message({
+              message: '生成成功',
+              type: 'success',
+              showClose:true
+            });
+          })
+          break
         case '撤销入库':
           let data = {
             fId:this.detailForm.fId,
@@ -1652,21 +1757,39 @@ export default {
           })
           break
         case '复制新增':
-            let formDate = {
-              fBilltype:'RK',
-              fId:this.selection[0].fId
-            }
-            copyNew(formDate).then(res=>{
-              if(res.code == 200) {
-                this.$message.success("操作成功")
-                this.copyeId = res.data
-                this.getList()
-                this.viewMethod(null,1)
-              }
-            })
+            let fId = this.selection[0].fId
+            // copyNew(formDate).then(res=>{
+            //   if(res.code == 200) {
+            //     this.$message.success("操作成功")
+            //     this.copyeId = res.data
+            //     this.getList()
+                this.viewMethod(null,fId)
+
+            //   }
+            // })
           break
         case '复制新单':
-          this.$refs.detailForm.saveRules('2')
+          // this.$refs.detailForm.saveRules('2')
+          if(this.detailForm.fId){
+            this.detailForm.fId = ''
+            this.detailForm.fBillno = ''
+            this.detailForm.fBillstatus = 2
+            this.detailList.columnList.forEach(item => item.fId='')
+            this.detailList.columnList.forEach(item => item.disabled=false)
+            this.detailButton = this.$options.data().detailButton
+            for(let item in this.detailOption){
+              if(!this.detailOption[item].doNot){
+                this.detailOption[item].disabled = false
+              }
+            }
+            for(let li in this.detailButton){
+              this.detailButton[li].disabled = false
+            }
+            this.$message.success("新增成功")
+
+          }else{
+            this.$message.error("数据未保存,请先保存")
+          }
           break
         case '打印':
           this.formList = this.detailForm

+ 273 - 120
src/views/warehouse/outStock/index.vue

@@ -43,8 +43,6 @@
     </div>
     <div v-if="MainTable == true">
       <el-breadcrumb separator="/" style="display:flex;align-items: center;margin-bottom: 10px">
-        <el-breadcrumb-item>仓库出库</el-breadcrumb-item>
-        <el-breadcrumb-item>仓库出库详情页</el-breadcrumb-item>
         <el-breadcrumb-item>
           <el-button plain size="mini" type="danger" icon="el-icon-arrow-left" @click="backRules">
             返回列表
@@ -157,6 +155,7 @@ import { listInStock, addSave, getSave, getArea,
   queryUserVal} from '@/api/warehouse/inStock'
 import Cookies from 'js-cookie'
 import { getliable } from '@/api/project'
+import { queryItem } from '@/api/purchaseRequest'
 export default {
   name: 'inStock',
   data(){
@@ -339,27 +338,35 @@ export default {
         },
         {
           surface: "4",
+          label: "projectName",
+          name: "项目名称",
+          checked: 0,
+          width: 200,
+          operation:1
+        },
+        {
+          surface: "5",
           label: "corpName",
           name: "供应商",
           checked: 0,
           width: 200,
           operation:1
         },{
-          surface: "5",
+          surface: "6",
           label: "fMoney",
           name: "金额",
           checked: 0,
           width: 200,
           operation:1
         },{
-          surface: "6",
+          surface: "7",
           label: "createTime",
           name: "制单日期",
           checked: 0,
           width: 200,
           operation:1
         },{
-          surface: "7",
+          surface: "8",
           label: "fBsdate",
           name: "出库日期",
           checked: 0,
@@ -367,43 +374,44 @@ export default {
           operation:1
         },
         {
-          surface: "8",
+          surface: "9",
           label: "createBy",
           name: "申请人",
           checked: 0,
           width: 200,
           operation:1
         },{
-          surface: "9",
+          surface: "10",
           label: "fBillstatusName",
           name: "状态",
           checked: 0,
           width: 200,
           operation:1
         },{
-          surface: "10",
+          surface: "11",
           label: "fReviewDate",
           name: "审核日期",
           checked: 0,
           width: 200,
           operation:1,
         },
+        // {
+        //   surface: "12",
+        //   label: "projectName",
+        //   name: "项目名称",
+        //   checked: 0,
+        //   width: 200,
+        //   operation:1
+        // },
         {
-          surface: "11",
-          label: "projectName",
-          name: "项目名称",
-          checked: 0,
-          width: 200,
-          operation:1
-        },{
-          surface: "12",
+          surface: "13",
           label: "remark",
           name: "备注",
           checked: 0,
           width: 200,
           operation:1
         },{
-          surface: "13",
+          surface: "14",
           label: "fMaterial2",
           name: "操作",
           checked: 0,
@@ -609,9 +617,20 @@ export default {
           rules:'',
           disabled:true,
           doNot:'1'
+        },{
+          index:'2',
+          span:6,
+          label: 'fGoodsid',
+          name:"项目名称",
+          form:1,
+          width:200,
+          labelSize:'80',
+          rules:{ required: true, message: ' ', trigger: 'blur' },
+          data:[],
+          disabled:false
         },
         {
-          index:'2',
+          index:'3',
           span:6,
           label: 'fCorpid',
           name:"供应商",
@@ -623,7 +642,7 @@ export default {
           disabled:false
         },
         {
-          index:'3',
+          index:'4',
           span:6,
           label: 'fStorekeeper',
           name:"库管员",
@@ -635,7 +654,7 @@ export default {
           disabled:false
         },
         {
-          index:'4',
+          index:'5',
           span:6,
           label: 'fPurchase',
           name:"采购人",
@@ -647,7 +666,7 @@ export default {
           disabled:false
         },
         {
-          index:'5',
+          index:'6',
           span:6,
           label: 'fWarehouseid',
           name:"仓库",
@@ -658,7 +677,7 @@ export default {
           data:[],
           disabled:false
         }, {
-          index:'6',
+          index:'7',
           span:6,
           label: 'fSbu',
           name:"开票公司",
@@ -670,7 +689,7 @@ export default {
           disabled:false
         },
         {
-          index:'7',
+          index:'8',
           span:6,
           label: 'fBsdate',
           name:"出库日期",
@@ -681,7 +700,7 @@ export default {
           disabled:false
         },
         {
-          index:'8',
+          index:'9',
           span:6,
           label: 'remark',
           name:"备注",
@@ -954,7 +973,6 @@ export default {
             }
           })
         }
-
         if(this.formOption[li].name == '供应商'){
           let queryParams = { pageNum: 1, fTypeid: 1}
           getustomer(queryParams).then(res => {
@@ -968,6 +986,7 @@ export default {
         }
         if(this.formOption[li].name == '品名'){
           getGoodName().then(res => {
+            console.log(res)
             for(let item in res.rows){
               this.formOption[li].data.push({
                 label:res.rows[item].fName,
@@ -994,6 +1013,18 @@ export default {
             }
           })
         }
+        if(this.detailOption[li].name == '项目名称'){
+          queryItem().then(res => {
+            console.log(res)
+            for(let item in res.data){
+              this.detailOption[li].data.push({
+                label:res.data[item].projectName,
+                value:res.data[item].fId,
+              })
+            }
+            console.log(this.formOption[li].data)
+          })
+        }
         if(this.detailOption[li].name == '供应商'){
           //获取供应商
           let queryParams = { pageNum: 1, fTypeid: 1}
@@ -1109,10 +1140,14 @@ export default {
     },
     handleQuery(){
       this.$refs.MainForm.hide()
+      console.log(this.queryParms)
       this.getList();
     },
     resetQuery(){
-      this.queryParms = {}
+      this.queryParms = {
+        pageNum: 1,
+        pageSize: this.queryParms.pageSize
+      }
       this.getList();
     },
     //查询列数据
@@ -1133,13 +1168,8 @@ export default {
           this.isItHidden = false
           this.inDex = this.detailOption.length
           if (iem === undefined){
-            this.detailList.columnList.forEach(item => item.disabled = true)
-          }else if(iem == 1){
-            for(let li in this.detailList.columnList){
-              if(!this.detailList.columnList[li].doNot){
-                this.detailList.columnList[li].disabled = false
-              }
-            }
+            this.detailList.columnList.forEach(item => item.disabled = false)
+            this.detailButton.forEach(item => item.disabled = false)
           }
         }else {
           if (res.data.length != 0) {
@@ -1166,6 +1196,7 @@ export default {
           }
           this.detailButton = this.$options.data().detailButton
           if(this.lander == this.detailForm.createBy && this.detailForm.fBillstatus == 6){
+            console.log(this.detailForm.createBy)
             this.detailButton.push({
               type: 'danger',
               size: 'mini',
@@ -1174,23 +1205,30 @@ export default {
               disabled: false
             })
           }
-          for(let li in this.detailButton){
-            if(this.detailForm.fBillstatus == '6'){
-              if(this.detailButton[li].name == '录入明细' || this.detailButton[li].name == '保存' ||
-                this.detailButton[li].name == '出库确认' || this.detailButton[li].name == '刷新' || this.detailButton[li].name == '修改'){
-                this.detailButton[li].disabled = true
-              }else{
-                this.detailButton[li].disabled = false
+          if(iem === undefined){
+            this.detailButton.forEach(item => item.disabled = false)
+            this.detailForm.fBillstatus = 2
+            this.detailForm.fBillno = ''
+            this.detailForm.fId = ''
+            this.detailList.columnList.forEach(item => item.fId='')
+            this.detailButton = this.$options.data().detailButton
+          }else if(iem == 1){
+            if(this.detailForm.fBillstatus >= '4') {
+              for(let li in this.detailButton ){
+                if(this.detailButton[li].name == '录入明细' || this.detailButton[li].name == '保存' ||
+                  this.detailButton[li].name == '出库确认' || this.detailButton[li].name == '刷新' || this.detailButton[li].name == '修改'){
+                  this.detailButton[li].disabled = true
+                }
               }
-            } else {
-              if (iem === undefined){
+              this.detailList.columnList.forEach(item => item.disabled=true)
+            }else{
+              for(let li in this.detailButton ){
                 if(this.detailButton[li].name == '录入明细' || this.detailButton[li].name == '保存' ||
                   this.detailButton[li].name == '出库确认' || this.detailButton[li].name == '刷新'){
                   this.detailButton[li].disabled = true
-                }else{
-                  this.detailButton[li].disabled = false
                 }
               }
+              this.detailList.columnList.forEach(item => item.disabled=true)
             }
           }
         }
@@ -1216,9 +1254,49 @@ export default {
         for(let item in this.detailOption){
           this.detailOption[item].disabled = true
         }
-
+        getSave(fId).then(res=>{
+          if(res.code == 200){
+            let data = {
+              tableName: this.detailList.tableName,
+              userId: Cookies.get('userName')
+            }
+            let list ={
+              warehouseBills:res.data.warehouseBills,
+              tWarehousebillsfees:res.data.tWarehousebillsfees
+            }
+            this.getRow(data,list,1)
+          }
+          if(res.data.warehouseBills){
+            getArea(res.data.warehouseBills.fWarehouseid).then(res=>{
+              if(res.code == 200){
+                this.listData.fWarehouseid = []
+                for(let item in res.data){
+                  this.listData.fWarehouseid.push({
+                    label:res.data[item].fWarehouseInformation,
+                    value:res.data[item].id
+                  })
+                }
+              }
+            })
+          }
+          // if(){
+          //   let data = {
+          //     fId: this.$refs.avatar.form.fId
+          //   }
+          //   revokeBill(data).then(res => {
+          //     if (res.code == 200) {
+          //       this.$message.success('撤销成功')
+          //       this.getList()
+          //       this.pageDisplay = true
+          //     }
+          //   })
+          // }
+          this.MainTable = true
+          this.inDex = this.detailOption.length
+        })
       }else if(res){
-        fId = this.copyeId
+        console.log(res)
+        fId = res
         this.detailButton.forEach(item => item.disabled = false)
         this.detailList.columnList.forEach(item => {
           if(!item.doNot){
@@ -1230,37 +1308,89 @@ export default {
             item.disabled = false
           }
         })
+        getSave(fId).then(res=>{
+          if(res.code == 200){
+            let data = {
+              tableName: this.detailList.tableName,
+              userId: Cookies.get('userName')
+            }
+            let list ={
+              warehouseBills:res.data.warehouseBills,
+              tWarehousebillsfees:res.data.tWarehousebillsfees
+            }
+            this.getRow(data,list,iem)
+          }
+          if(res.data.warehouseBills){
+            getArea(res.data.warehouseBills.fWarehouseid).then(res=>{
+              if(res.code == 200){
+                this.listData.fWarehouseid = []
+                for(let item in res.data){
+                  this.listData.fWarehouseid.push({
+                    label:res.data[item].fWarehouseInformation,
+                    value:res.data[item].id
+                  })
+                }
+              }
+            })
+          }
+          // if(){
+          //   let data = {
+          //     fId: this.$refs.avatar.form.fId
+          //   }
+          //   revokeBill(data).then(res => {
+          //     if (res.code == 200) {
+          //       this.$message.success('撤销成功')
+          //       this.getList()
+          //       this.pageDisplay = true
+          //     }
+          //   })
+          // }
+          this.MainTable = true
+          this.inDex = this.detailOption.length
+        })
       } else{
         fId = this.ids
-      }
-      getSave(fId).then(res=>{
-        if(res.code == 200){
-          let data = {
-            tableName: this.detailList.tableName,
-            userId: Cookies.get('userName')
-          }
-          let list ={
-            warehouseBills:res.data.warehouseBills,
-            tWarehousebillsfees:res.data.tWarehousebillsfees
+        getSave(fId).then(res=>{
+          if(res.code == 200){
+            let data = {
+              tableName: this.detailList.tableName,
+              userId: Cookies.get('userName')
+            }
+            let list ={
+              warehouseBills:res.data.warehouseBills,
+              tWarehousebillsfees:res.data.tWarehousebillsfees
+            }
+            this.getRow(data,list,1)
           }
-          this.getRow(data,list,iem)
-        }
-        if(res.data.warehouseBills){
-          getArea(res.data.warehouseBills.fWarehouseid).then(res=>{
-            if(res.code == 200){
-              this.listData.fWarehouseid = []
-              for(let item in res.data){
-                this.listData.fWarehouseid.push({
-                  label:res.data[item].fWarehouseInformation,
-                  value:res.data[item].id
-                })
+          if(res.data.warehouseBills){
+            getArea(res.data.warehouseBills.fWarehouseid).then(res=>{
+              if(res.code == 200){
+                this.listData.fWarehouseid = []
+                for(let item in res.data){
+                  this.listData.fWarehouseid.push({
+                    label:res.data[item].fWarehouseInformation,
+                    value:res.data[item].id
+                  })
+                }
               }
-            }
-          })
-        }
-        this.MainTable = true
-        this.inDex = this.detailOption.length
-      })
+            })
+          }
+          // if(){
+          //   let data = {
+          //     fId: this.$refs.avatar.form.fId
+          //   }
+          //   revokeBill(data).then(res => {
+          //     if (res.code == 200) {
+          //       this.$message.success('撤销成功')
+          //       this.getList()
+          //       this.pageDisplay = true
+          //     }
+          //   })
+          // }
+          this.MainTable = true
+          this.inDex = this.detailOption.length
+        })
+      }
     },
     //修改
     modification(scope){
@@ -1415,36 +1545,40 @@ export default {
               }
               this.getList();
               if(i == 2){
-                let data ={
-                  fBilltype:'CK',
-                  fId:this.detailForm.fId
-                }
-                copyNew(data).then(res=>{
-                  if(res.code == 200) {
-                    this.$message.success("操作成功")
-                    this.copyeId = res.data
-                    this.getList()
-                    this.viewMethod(null,1,2)
-                  }
-                })
+
+                // let data ={
+                //   fBilltype:'CK',
+                //   fId:this.detailForm.fId
+                // }
+                // copyNew(data).then(res=>{
+                //   if(res.code == 200) {
+                //     this.$message.success("操作成功")
+                //     this.copyeId = res.data
+                //     this.getList()
+                //     this.viewMethod(null,1,2)
+                //   }
+                // })
               }else{
                 this.$message.success("保存成功")
               }
             }
           })
         } else if(i == 2 && this.detailForm.fBillstatus > 3 ){
-          let data = {
-            fBilltype:'CK',
-            fId:this.detailForm.fId
-          }
-          copyNew(data).then(res=>{
-            if(res.code == 200) {
-              this.$message.success("操作成功")
-              this.copyeId = res.data
-              this.getList()
-              this.viewMethod(null,1,2)
-            }
-          })
+          // let data = {
+          //   fBilltype:'CK',
+          //   fId:this.detailForm.fId
+          // }
+          // copyNew(data).then(res=>{
+          //   if(res.code == 200) {
+          //     this.$message.success("操作成功")
+          //     this.copyeId = res.data
+          //     this.getList()
+          //     this.viewMethod(null,1,2)
+          this.detailForm.fId = ''
+          this.detailForm.fBillno = ''
+          this.detailList.columnList.forEach(item => item.fId='')
+          //   }
+          // })
         }
         if(i == 1){
           this.isItHidden = true
@@ -1596,23 +1730,11 @@ export default {
                   disabled: false
                 })
               }
+
             })
 
           }
           break
-        case '撤销出库':
-          let data = {
-            fId:this.detailForm.fId,
-            fBilltype:'CK'
-          }
-          revokeBill(data).then(res=>{
-            if(res.code == 200){
-              this.$message.success("撤销成功")
-              this.getList()
-              this.MainTable = false
-            }
-          })
-          break
         case '刷新':
           if(this.detailForm.fId){
             getSave(this.detailForm.fId).then(res=>{
@@ -1630,22 +1752,53 @@ export default {
             })
           }
           break
-        case '复制新增':
-          let formDate = {
-            fBilltype:'CK',
-            fId:this.selection[0].fId
+        case '撤销出库':
+          let data = {
+            fId:this.detailForm.fId,
+            fBilltype:'CK'
           }
-          copyNew(formDate).then(res=>{
-            if(res.code == 200) {
-              this.$message.success("操作成功")
-              this.copyeId = res.data
+          revokeBill(data).then(res=>{
+            if(res.code == 200){
+              this.$message.success("撤销成功")
               this.getList()
-              this.viewMethod(null,1)
+              this.MainTable = false
             }
           })
           break
+        case '复制新增':
+          let fId = this.selection[0].fId
+          // copyNew(formDate).then(res=>{
+          //   if(res.code == 200) {
+          //     this.$message.success("操作成功")
+          //     this.copyeId = res.data
+          //     this.getList()
+          this.viewMethod(null,fId)
+
+          //   }
+          // })
+          break
         case '复制新单':
-          this.$refs.detailForm.saveRules('2')
+          // this.$refs.detailForm.saveRules('2')
+          if(this.detailForm.fId){
+            this.detailForm.fId = ''
+            this.detailForm.fBillno = ''
+            this.detailForm.fBillstatus = 2
+            this.detailList.columnList.forEach(item => item.fId='')
+            this.detailList.columnList.forEach(item => item.disabled=false)
+            this.detailButton = this.$options.data().detailButton
+            for(let item in this.detailOption){
+              if(!this.detailOption[item].doNot){
+                this.detailOption[item].disabled = false
+              }
+            }
+            for(let li in this.detailButton){
+              this.detailButton[li].disabled = false
+            }
+            this.$message.success("新增成功")
+
+          }else{
+            this.$message.error("数据未保存,请先保存")
+          }
           break
         case '打印':
           this.formList = this.detailForm