Browse Source

修改安平BUG问题

caojunjie 4 years ago
parent
commit
8d8d5a0874

+ 1 - 0
src/api/purchaseIssue/index.js

@@ -5,6 +5,7 @@ export function listQuery(query) {
   return request({
     url: '/anpin/stockControl/list',
     method: 'get',
+    timeout:150000,
     params:query
   })
 }

+ 1 - 0
src/api/warehouse/inStock.js

@@ -5,6 +5,7 @@ export function listInStock(query) {
   return request({
     url: '/anpin/stockControl/list',
     method: 'get',
+    timeout:150000,
     params: query
   })
 }

+ 1 - 2
src/combination/MainForm.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-form label-width="88px" ref="form" :model="form" style="display:flex;flex-wrap: wrap">
-          <el-form-item :label="item.name" v-for="(item,index) in searchdata" :key="item.index":label-width="item.labelSize + 'px'" :rules="[item.rules]" :prop="item.label" v-if="(index+1) <= inDex">
+          <el-form-item :label="item.name" v-for="(item,index) in searchdata" :key="item.index" :label-width="item.labelSize + 'px'" :rules="[item.rules]" :prop="item.label" v-if="(index+1) <= inDex">
             <el-select v-if="item.form == 1" filterable @change="changeWarehouse" :disabled="item.disabled" clearable v-model="form[item.label]" :style="{ width: item.width + 'px' }">
               <el-option v-for="(item,index) in item.data"
               :key="index"
@@ -71,7 +71,6 @@ export default {
         }
       })
     },
-
     changeMoney(){
       if(parseInt(this.form.last) < parseInt(this.form.first)){
         this.$message.error("第二个金额不能小于第一个金额,请重新输入")

+ 4 - 0
src/combination/formComponent.vue

@@ -73,6 +73,10 @@ export default {
     returnToForm(){
       this.$emit('returnToForm', this.form)
     },
+    assignmentTime(formLi){
+      console.log(formLi)
+      this.$set(this,'form',formLi)
+    },
     spellNumbers(name){
       this.form[name] = [this.number,this.numBer]
     },

+ 1 - 1
src/utils/request.js

@@ -10,7 +10,7 @@ const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分
   baseURL: process.env.VUE_APP_BASE_API,
   // 超时
-  timeout: 10000
+  timeout: 100000
 })
 // request拦截器
 service.interceptors.request.use(config => {

+ 12 - 4
src/views/purchaseIssue/index.vue

@@ -202,6 +202,7 @@ import {
 } from '@/api/purchaseIssue/index'
 import Cookies from 'js-cookie'
 import Global from '@/layout/components/global'
+import moment from 'moment'
 
 export default {
   name: 'index',
@@ -621,7 +622,7 @@ export default {
           label: 'timeInterval',
           name: '出库日期',
           inputType: 3,
-          width: 200,
+          width: 300,
           labelSize: '80',
           rules: [{ required: false, message: ' ' }]
         }, {
@@ -787,6 +788,8 @@ export default {
       userId: Cookies.get('userName')
     }
     this.getRow(data)
+    let y = moment(Date.parse(new Date())).format('YYYY-MM-DD')
+    this.$set(this.formDataList,'timeInterval',[ y + ' 00:00:00', y + ' 23:59:59'])
     this.query(this.formDataList)
     productName().then(res => {
       console.log(res)
@@ -1126,6 +1129,9 @@ export default {
           this.pageDisplay = true
           this.isItHidden = true
           this.inDex = 4
+          let y = moment(Date.parse(new Date())).format('YYYY-MM-DD')
+          this.$set(this.formDataList,'timeInterval',[ y + ' 00:00:00', y + ' 23:59:59'])
+          this.$refs.avatar.assignmentTime(this.formDataList)
         }
         if (list) {
           this.$refs.avatar.form = list.warehouseBills
@@ -1362,9 +1368,9 @@ export default {
         } else {
           submit(formData).then(res => {
             if (res.code == 200) {
-              if (res) {
-                this.$refs.avatar.form = res.data.warehouseBills
-              }
+              // if (res) {
+              //   this.$refs.avatar.form = res.data.warehouseBills
+              // }
               this.contentList = res.data.tWarehousebillsCntrs
               this.$message.success('保存成功')
             }
@@ -1719,11 +1725,13 @@ export default {
     },
     //表单验证通过执行搜索
     submitForm() {
+      console.log(this.formDataList.timeInterval)
       let list = this.formDataList
       this.formDataList = this.$refs.avatar.form
       this.formDataList.fBilltype = list.fBilltype
       this.formDataList.pageSize = list.pageSize
       this.formDataList.pageNum = list.pageNum
+      this.formDataList.timeInterval = list.timeInterval
       this.query(this.formDataList)
     },
     //点击刷新会调用此方法

+ 13 - 6
src/views/purchaseRequest/index.vue

@@ -203,6 +203,7 @@ import {
 } from '@/api/purchaseRequest/index'
 import Cookies from 'js-cookie'
 import Global from '@/layout/components/global'
+import moment from 'moment'
 export default {
   name: 'index',
   data() {
@@ -804,6 +805,8 @@ export default {
       tableName: this.queryList.tableName,
       userId: Cookies.get('userName')
     }
+    let y = moment(Date.parse(new Date())).format('YYYY-MM-DD')
+    this.$set(this.formDataList,'timeInterval',[ y + ' 00:00:00', y + ' 23:59:59'])
     this.getRow(data)
     this.query(this.formDataList)
     productName().then(res => {
@@ -872,7 +875,7 @@ export default {
       for(let item in this.contentList){
         for(let li in this.listData.fFeeid){
           if(this.contentList[item].fFeeid == this.listData.fFeeid[li].value){
-            console.log("111")
+            // console.log("111")
             this.$set(this.contentList[item],'fFeeunitid',this.listData.fFeeid[li].fFeeunitid)
             this.$set(this.contentList[item],'fCurrencyName',this.listData.fFeeid[li].fCurrency)
           }
@@ -893,7 +896,7 @@ export default {
         }
         this.viewMethod(scope)
       }else{
-        console.log("111")
+        // console.log("111")
         this.pageDisplay = true
       }
     },
@@ -1027,6 +1030,7 @@ export default {
     getRow(data,list,add,i) {
       console.log(data,list,add)
       select(data).then((res) => {
+        this.$refs.avatar.form = {}
         if (data.tableName === '采购申请详情') {
           if (res.data.length != 0) {
             this.purchaseList.columnList = res.data.filter((e) => e.checked == 0)
@@ -1061,8 +1065,10 @@ export default {
           this.pageDisplay = true
           this.isItHidden = true
           this.inDex = 4
+          let y = moment(Date.parse(new Date())).format('YYYY-MM-DD')
+          this.$set(this.formDataList,'timeInterval',[ y + ' 00:00:00', y + ' 23:59:59'])
+          this.$refs.avatar.assignmentTime(this.formDataList)
         }
-        this.$refs.avatar.form = {}
         if (list){
           this.$refs.avatar.form = list.warehouseBills
           this.contentList = list.tWarehousebillsfees
@@ -1257,9 +1263,9 @@ export default {
         }else {
           submit(formData).then(res => {
             if (res.code == 200) {
-              if(res){
-                this.$refs.avatar.form = res.data.warehouseBills
-              }
+              // if(res){
+              //   this.$refs.avatar.form = res.data.warehouseBills
+              // }
               this.contentList = res.data.tWarehousebillsCntrs
               this.$message.success('保存成功')
             }
@@ -1656,6 +1662,7 @@ export default {
       this.formDataList.fBilltype = list.fBilltype
       this.formDataList.pageSize = list.pageSize
       this.formDataList.pageNum = list.pageNum
+      this.formDataList.timeInterval = list.timeInterval
       this.query(this.formDataList)
     },
     //点击刷新会调用此方法

+ 1 - 1
src/views/reportAnalysis/inventoryAccount.vue

@@ -54,7 +54,7 @@ export default {
   name: 'inventoryAccount',
   data(){
     return{
-      tatolLabel:['起初数量','期初金额'],
+      tatolLabel:['期初数量','期初单价','期初金额','入库数量','入库金额','出库数量','出库金额','结余数量','结余单价','结余金额'],
       dataList:{
         fCorpid:[],
         feeName:[],

+ 10 - 8
src/views/warehouse/inStock/index.vue

@@ -166,7 +166,7 @@ import {
 } from '@/api/warehouse/inStock'
 import Cookies from 'js-cookie'
 import { getliable } from '@/api/project'
-
+import moment from 'moment'
 export default {
   name: 'inStock',
   data() {
@@ -884,6 +884,8 @@ export default {
     }
   },
   created() {
+    let y = moment(Date.parse(new Date())).format('YYYY-MM-DD')
+    this.$set(this.queryParms,'timeInterval',[ y + ' 00:00:00', y + ' 23:59:59'])
     //获取登陆人
     queryUserVal().then((response) => {
       this.lander = response.user.userName
@@ -893,12 +895,12 @@ export default {
       userId: Cookies.get('userName')
     }
     this.getRow(data)
-    let list = {
-      fBilltype: 'RK',
-      pageNum: 1,
-      pageSize: 10
-    }
-    this.query(list)
+    // let list = {
+    //   fBilltype: 'RK',
+    //   pageNum: 1,
+    //   pageSize: 10
+    // }
+    // this.query(list)
     this.getList()
     this.selectMethods()
   },
@@ -1183,7 +1185,7 @@ export default {
             this.setRowList = this.$options.data().listStyle
           }
           this.isItHidden = true
-          this.inDex = 4
+          // this.inDex = 4
         }
         if (list) {
           this.detailForm = list.warehouseBills

+ 10 - 7
src/views/warehouse/outStock/index.vue

@@ -156,6 +156,7 @@ import { listInStock, addSave, getSave, getArea,
 import Cookies from 'js-cookie'
 import { getliable } from '@/api/project'
 import { queryItem } from '@/api/purchaseRequest'
+import moment from 'moment'
 export default {
   name: 'inStock',
   data(){
@@ -875,6 +876,8 @@ export default {
     }
   },
   created() {
+    let y = moment(Date.parse(new Date())).format('YYYY-MM-DD')
+    this.$set(this.queryParms,'timeInterval',[ y + ' 00:00:00', y + ' 23:59:59'])
     //获取登陆人
     queryUserVal().then((response) => {
       this.lander = response.user.userName
@@ -884,12 +887,12 @@ export default {
       userId: Cookies.get("userName"),
     };
     this.getRow(data)
-    let list = {
-      fBilltype:'CK',
-      pageNum: 1,
-      pageSize: 10,
-    }
-    this.query(list)
+    // let list = {
+    //   fBilltype:'CK',
+    //   pageNum: 1,
+    //   pageSize: 10,
+    // }
+    // this.query(list)
     this.getList()
     this.selectMethods()
   },
@@ -1186,7 +1189,7 @@ export default {
             this.setRowList = this.$options.data().listStyle
           }
           this.isItHidden = true
-          this.inDex = 4
+          // this.inDex = 4
         }
         if(list){
           this.detailForm = list.warehouseBills

+ 2 - 3
vue.config.js

@@ -34,10 +34,9 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://192.168.1.143:9020`,
-        
+        // target: `http://192.168.1.143:9020`,
         // target: `http://localhost:8080`,
-        // target: `https://ap.tubaosoft.com/prod-api/`,
+        target: `https://ap.tubaosoft.com/prod-api/`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''