Browse Source

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

wengyuwen 4 years ago
parent
commit
ed3405f8df

+ 0 - 1
src/combination/listComponent.vue

@@ -222,7 +222,6 @@ export default {
           }
         })
       }
-      console.log(sums)
       return sums
     },
     initData(){

+ 36 - 37
src/views/purchaseIssue/index.vue

@@ -1090,7 +1090,7 @@ export default {
       })
     },
     //查询列数据
-    getRow(data, list, add) {
+    getRow(data, list, add,i) {
       select(data).then((res) => {
         if (data.tableName === '销售出库详情') {
           if (res.data.length != 0) {
@@ -1194,12 +1194,28 @@ export default {
             }
           }
         }
+        if (i == 1) this.submitAnd()
       })
     },
+    submitAnd(){
+      this.$refs.avatar.form.fId = ''
+      this.$refs.avatar.form.fBillno = ''
+      this.contentList.forEach(item=>item.fId = '')
+      this.contentOption.forEach(item => {
+        if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
+          item.disabled = true
+        } else {
+          item.disabled = false
+        }
+      })
+      this.purchaseList.columnList.forEach(item => item.disabled = false)
+      this.contentButton.forEach(item => item.disabled = false)
+      this.contentStyle.forEach(item => item.disabled = false)
+    },
     returnToForm(row) {
     },
     //查看
-    viewMethod(scope,res) {
+    viewMethod(scope,res,i) {
       this.form = this.$refs.avatar.form
       if(res){
         this.contentButton.forEach(item => {
@@ -1229,7 +1245,7 @@ export default {
             warehouseBills: res.data.warehouseBills,
             tWarehousebillsfees: res.data.tWarehousebillsfees
           }
-          this.getRow(data, list)
+          this.getRow(data,list,'',i)
         }
       })
     },
@@ -1323,24 +1339,19 @@ export default {
             }
             this.contentList = res.data.tWarehousebillsCntrs
             if (item === 3){
-              let datae = {
-                fId:this.$refs.avatar.form.fId,
-                fBilltype:'XS'
-              }
-              copyNew(datae).then(res=> {
-                this.$message({
-                  message: '复制新单成功',
-                  type: 'success',
-                  showClose: true
-                });
-                let scope = {
-                  row: {
-                    fId: res.data
-                  }
+              this.$refs.avatar.form.fId = ''
+              this.$refs.avatar.form.fBillno = ''
+              this.contentList.forEach(item=>item.fId = '')
+              this.contentOption.forEach(item => {
+                if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
+                  item.disabled = true
+                } else {
+                  item.disabled = false
                 }
-                this.query(this.formDataList)
-                this.viewMethod(scope,res)
               })
+              this.purchaseList.columnList.forEach(item => item.disabled = false)
+              this.contentButton.forEach(item => item.disabled = false)
+              this.contentStyle.forEach(item => item.disabled = false)
             }else{
               this.$message.success('保存成功')
             }
@@ -1476,27 +1487,15 @@ export default {
         case '复制新单':
           if (row.nameTwo === '详情页'){
             this.$refs.avatar.submitForm('submit',3)
-            console.log(this.$refs.avatar.form)
           }else {
             if (this.selection.length > 0){
-              let datae = {
-                fId:this.selection[0].fId,
-                fBilltype:'XS'
-              }
-              copyNew(datae).then(res=>{
-                this.$message({
-                  message: '复制新单成功',
-                  type: 'success',
-                  showClose:true
-                });
-                let scope = {
-                  row:{
-                    fId:res.data
-                  }
+              let scope = {
+                row:{
+                  fId:this.selection[0].fId
                 }
-                this.query(this.formDataList)
-                this.viewMethod(scope,res)
-              })
+              }
+              this.query(this.formDataList)
+              this.viewMethod(scope,'',1)
             }else {
               this.$message.warning('未选择列表,请选择后再点击');
             }

+ 68 - 51
src/views/purchaseRequest/index.vue

@@ -51,17 +51,20 @@
     <div v-else class="app-container">
       <div style="display: flex;margin-bottom: 10px">
         <el-breadcrumb>
-          <el-breadcrumb-item style="font-weight: 700">采购申请</el-breadcrumb-item>
-          <el-breadcrumb-item style="font-weight: 700">采购申请详情页</el-breadcrumb-item>
-          <el-breadcrumb-item style="margin-top: -7px;">
+          <el-breadcrumb-item>
             <el-button
-              style="margin-left: 10px"
               size="mini"
               type="danger" plain
               @click="backToList"
               icon="el-icon-arrow-left">
               返回列表</el-button>
           </el-breadcrumb-item>
+          <el-breadcrumb-item style="font-weight: 700">
+            <el-button-group>
+              <el-button type="primary" size="mini" icon="el-icon-arrow-left" @click="sequence(true)">向前</el-button>
+              <el-button type="primary" size="mini" @click="sequence(true)">向后<i class="el-icon-arrow-right el-icon--right"></i></el-button>
+            </el-button-group>
+          </el-breadcrumb-item>
         </el-breadcrumb>
       </div>
       <h1 style="text-align: center;margin-top: -42px">采购申请单</h1>
@@ -111,7 +114,6 @@
       ref="ApprovalComments"
       @refreshDataList="returnData"
     ></approval-comments>
-
     <el-dialog
       title="打印采购"
       :visible.sync="dialogVisible"
@@ -177,8 +179,6 @@
     </el-dialog>
   </div>
 </template>
-
-
 <script>
 import { select } from '@/api/system/set'
 import {
@@ -589,13 +589,14 @@ export default {
           icon: 'el-icon-edit-outline',
           name: '生成销售单',
           disabled: false
-        },{
-          type: 'info',
-          size: 'mini',
-          icon: 'el-icon-edit-outline',
-          name: '生成出库单',
-          disabled: false
         }
+        // ,{
+        //   type: 'info',
+        //   size: 'mini',
+        //   icon: 'el-icon-edit-outline',
+        //   name: '生成出库单',
+        //   disabled: false
+        // }
       ],
       formOption: [
         {
@@ -923,6 +924,23 @@ export default {
       this.open = false;
       this.cancelTwo();
     },
+    sequence(res){
+      if (res === true){
+        console.log(this.$refs.avatar.form.fId)
+        let i = 0
+        for ( i ; i <= this.tableData.length;i++){
+          if (this.$refs.avatar.form.fId == this.tableData[i].fId) {
+            console.log(i)
+            console.log(this.tableData[i].fId)
+            console.log(this.tableData[--i].fId)
+            console.log(i)
+            return
+          }
+        }
+      }else {
+
+      }
+    },
     addOrUpdateHandle() {
       this.addOrUpdateVisible = true;
       this.$nextTick(() => {
@@ -1024,7 +1042,7 @@ export default {
       })
     },
     //查询列数据
-    getRow(data,list,add) {
+    getRow(data,list,add,i) {
       console.log(data,list,add)
       select(data).then((res) => {
         if (data.tableName === '采购申请详情') {
@@ -1121,13 +1139,14 @@ export default {
             }
           })
         }
+        if (i == 1) this.submitAnd()
       })
     },
     returnToForm(row) {
       console.log(row, 111)
     },
-    //查看
-    viewMethod(scope,res) {
+    //查看-列表
+    viewMethod(scope,res,i) {
       if(res){
         this.contentButton.forEach(item => {
           item.disabled = false
@@ -1156,10 +1175,25 @@ export default {
             tWarehousebillsfees:res.data.tWarehousebillsfees
           }
           // this.$refs.avatar.form = {}
-          this.getRow(data,list)
+          this.getRow(data,list,'',i)
         }
       })
     },
+    submitAnd(){
+      this.$refs.avatar.form.fId = ''
+      this.$refs.avatar.form.fBillno = ''
+      this.contentList.forEach(item=>item.fId = '')
+      this.contentOption.forEach(item => {
+        if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
+          item.disabled = true
+        } else {
+          item.disabled = false
+        }
+      })
+      this.purchaseList.columnList.forEach(item => item.disabled = false)
+      this.contentButton.forEach(item => item.disabled = false)
+      this.contentStyle.forEach(item => item.disabled = false)
+    },
     //修改
     modification(scope) {
       console.log(scope)
@@ -1221,24 +1255,19 @@ export default {
             }
             this.contentList = res.data.tWarehousebillsCntrs
             if (item === 3){
-              let datae = {
-                fId:this.$refs.avatar.form.fId,
-                fBilltype:'SQ'
-              }
-              copyNew(datae).then(res=> {
-                this.$message({
-                  message: '复制新单成功',
-                  type: 'success',
-                  showClose: true
-                });
-                let scope = {
-                  row: {
-                    fId: res.data
-                  }
+              this.$refs.avatar.form.fId = ''
+              this.$refs.avatar.form.fBillno = ''
+              this.contentList.forEach(item=>item.fId = '')
+              this.contentOption.forEach(item => {
+                if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
+                  item.disabled = true
+                } else {
+                  item.disabled = false
                 }
-                this.query(this.formDataList)
-                this.viewMethod(scope,res)
               })
+              this.purchaseList.columnList.forEach(item => item.disabled = false)
+              this.contentButton.forEach(item => item.disabled = false)
+              this.contentStyle.forEach(item => item.disabled = false)
             }else{
               this.$message.success('保存成功')
             }
@@ -1492,29 +1521,17 @@ export default {
           })
           break
         case '复制新单':
-
           if (row.nameTwo === '详情页'){
             this.$refs.avatar.submitForm('submit',3)
           }else {
             if (this.selection.length > 0){
-              let datae = {
-                fId:this.selection[0].fId,
-                fBilltype:'SQ'
-              }
-              copyNew(datae).then(res=>{
-                this.$message({
-                  message: '复制新单成功',
-                  type: 'success',
-                  showClose:true
-                });
-                let scope = {
-                  row:{
-                    fId:res.data
-                  }
+              let scope = {
+                row:{
+                  fId:this.selection[0].fId
                 }
-                this.query(this.formDataList)
-                this.viewMethod(scope)
-              })
+              }
+              this.query(this.formDataList)
+              this.viewMethod(scope,'',1)
             }else {
               this.$message.warning('未选择列表,请选择后再点击');
             }

+ 22 - 0
src/views/reportAnalysis/inoutStatistics.vue

@@ -51,6 +51,7 @@
 import { select } from '@/api/system/set'
 import{ queryData, company, productName, listExport} from '@/api/reportAnalysis/inoutStatistics'
 import Cookies from 'js-cookie'
+import { queryItem } from '@/api/purchaseRequest'
 
 export default {
   name: 'salesStatistics',
@@ -62,6 +63,7 @@ export default {
         fFeeType:[],
         fFeeid:[],
         fCorpid:[],
+        fGoodsid:[],
         fBillstatus:[{label:'全部',value:''},{label:'入账',value:'1'},{label:'未入账',value:'2'},]
       },
       tableData:[],
@@ -297,6 +299,14 @@ export default {
           width: 200,
           labelSize: '80',
           rules: [{ required: false, message: ' ' }]
+        },{
+          span: 6,
+          label: 'fGoodsid',
+          name: '项目名称',
+          inputType: 1,
+          width: 200,
+          labelSize: '80',
+          rules: [{ required: false, message: ' ' }]
         },
       ]
     }
@@ -331,6 +341,18 @@ export default {
         }
       }
     })
+    queryItem().then(res => {
+      console.log(res)
+      for (let item in res.data) {
+        this.dataList.fGoodsid.push({
+          label: res.data[item].projectName,
+          value: res.data[item].fId,
+          personNaem: res.data[item].personNaem,
+          corpsName: res.data[item].corpsName,
+          fCorpid: res.data[item].fCorpid
+        })
+      }
+    })
     let data = {
       tableName: this.queryList.tableName,
       userId: Cookies.get('userName')