'报表更新'
This commit is contained in:
		@@ -4,7 +4,7 @@
 | 
			
		||||
 * @Author: fzq
 | 
			
		||||
 * @Date: 2022-03-05 17:45:46
 | 
			
		||||
 * @LastEditors: fzq
 | 
			
		||||
 * @LastEditTime: 2022-03-07 09:19:34
 | 
			
		||||
 * @LastEditTime: 2022-03-16 16:11:55
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <!-- <el-dialog
 | 
			
		||||
@@ -40,7 +40,7 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import { updateSubstrate, listSubstrate } from '@/api/report-manage/report'
 | 
			
		||||
import { updateSubstrate } from '@/api/report-manage/report'
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  props: {
 | 
			
		||||
@@ -55,15 +55,18 @@ export default {
 | 
			
		||||
    return {
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: '',
 | 
			
		||||
        substrateCode: '',
 | 
			
		||||
        location: '',
 | 
			
		||||
        storeTime: '',
 | 
			
		||||
        substrateStatus: '',
 | 
			
		||||
        code: '',
 | 
			
		||||
        storageBoxId: '',
 | 
			
		||||
        storageCode: '',
 | 
			
		||||
        interCode: ''
 | 
			
		||||
        // substrateCode: '',
 | 
			
		||||
        // location: '',
 | 
			
		||||
        // storeTime: '',
 | 
			
		||||
        // substrateStatus: '',
 | 
			
		||||
        // code: '',
 | 
			
		||||
        // storageBoxId: '',
 | 
			
		||||
        // storageCode: '',
 | 
			
		||||
        // interCode: '',
 | 
			
		||||
        // id: '',
 | 
			
		||||
        // current: 1,
 | 
			
		||||
        // size: 10,
 | 
			
		||||
        // locationStorageSubID: ''
 | 
			
		||||
      },
 | 
			
		||||
      list: {
 | 
			
		||||
        id: '',
 | 
			
		||||
@@ -107,22 +110,25 @@ export default {
 | 
			
		||||
    //     })
 | 
			
		||||
    //   })
 | 
			
		||||
    // },
 | 
			
		||||
    init(id) {
 | 
			
		||||
    init(data) {
 | 
			
		||||
      // this.dataForm.id = id || ''
 | 
			
		||||
      this.dataForm.storageBoxId = this.$route.query.id
 | 
			
		||||
      this.dataForm.storageCode = this.$route.query.code
 | 
			
		||||
      // console.log(this.$route.query)
 | 
			
		||||
      // this.dataForm.id = this.$route.query.id
 | 
			
		||||
      // this.dataForm.substrateCode = this.$route.query.substrateCode
 | 
			
		||||
      // this.dataForm.locationStorageSubID = this.$route.query.locationStorageSubID
 | 
			
		||||
      this.dataForm = data
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      // console.log(this.dataForm)
 | 
			
		||||
      listSubstrate(this.dataForm).then(res => {
 | 
			
		||||
        console.log(res.data[0])
 | 
			
		||||
        this.dataForm.id = res.data[0].id
 | 
			
		||||
        this.dataForm.location = res.data[0].location
 | 
			
		||||
        this.dataForm.storeTime = res.data[0].storeTime
 | 
			
		||||
        this.dataForm.substrateCode = res.data[0].substrateCode
 | 
			
		||||
        this.dataForm.substrateStatus = res.data[0].substrateStatus
 | 
			
		||||
        this.dataForm.interCode = res.data[0].interCode
 | 
			
		||||
        // console.log(this.dataForm)
 | 
			
		||||
      })
 | 
			
		||||
      // listSubstrate(this.dataForm).then(res => {
 | 
			
		||||
      //   // console.log(res)
 | 
			
		||||
      //   this.dataForm.id = res.data[0].id
 | 
			
		||||
      //   this.dataForm.location = res.data[0].location
 | 
			
		||||
      //   this.dataForm.storeTime = res.data[0].storeTime
 | 
			
		||||
      //   this.dataForm.substrateCode = res.data[0].substrateCode
 | 
			
		||||
      //   this.dataForm.substrateStatus = res.data[0].substrateStatus
 | 
			
		||||
      //   this.dataForm.interCode = res.data[0].interCode
 | 
			
		||||
      //   // console.log(this.dataForm)
 | 
			
		||||
      // })
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmit() {
 | 
			
		||||
@@ -132,10 +138,10 @@ export default {
 | 
			
		||||
            'substrateStatus': this.dataForm.substrateStatus,
 | 
			
		||||
            'storeTime': this.dataForm.storeTime,
 | 
			
		||||
            'id': this.dataForm.id,
 | 
			
		||||
            'substrateCode': this.dataForm.substrateCode,
 | 
			
		||||
            'code': this.dataForm.substrateCode,
 | 
			
		||||
            'location': this.dataForm.location,
 | 
			
		||||
            'interCode': this.dataForm.interCode,
 | 
			
		||||
            'storageBoxId': this.dataForm.storageBoxId
 | 
			
		||||
            'storageBoxFid': this.dataForm.storageBoxFid
 | 
			
		||||
          }
 | 
			
		||||
          console.log(data)
 | 
			
		||||
          updateSubstrate(data).then(res => {
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
 * @Author: fzq
 | 
			
		||||
 * @Date: 2022-03-05 14:35:07
 | 
			
		||||
 * @LastEditors: fzq
 | 
			
		||||
 * @LastEditTime: 2022-03-05 16:44:43
 | 
			
		||||
 * @LastEditTime: 2022-03-16 16:13:58
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <span>
 | 
			
		||||
@@ -26,7 +26,8 @@ export default {
 | 
			
		||||
        name: 'viewSubstrate',
 | 
			
		||||
        query: {
 | 
			
		||||
          id: this.injectData.id,
 | 
			
		||||
          code: this.injectData.code
 | 
			
		||||
          code: this.injectData.code,
 | 
			
		||||
          locationStorageSubID: this.injectData.locationStorageSubID
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
 * @Author: fzq
 | 
			
		||||
 * @Date: 2022-03-05 15:55:45
 | 
			
		||||
 * @LastEditors: fzq
 | 
			
		||||
 * @LastEditTime: 2022-03-11 11:08:53
 | 
			
		||||
 * @LastEditTime: 2022-03-16 16:09:15
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="app-container">
 | 
			
		||||
@@ -29,7 +29,7 @@
 | 
			
		||||
        @clickBtn="handleClick"
 | 
			
		||||
      />
 | 
			
		||||
    </base-table>
 | 
			
		||||
    <edit-substrate v-if="addOrUpdateVisible" :id="listQuery.id" ref="addOrUpdate" @refreshDataList="getList" />
 | 
			
		||||
    <edit-substrate v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getList" />
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
@@ -104,7 +104,7 @@ export default {
 | 
			
		||||
    return {
 | 
			
		||||
      addOrUpdateVisible: false,
 | 
			
		||||
      num: '',
 | 
			
		||||
      storageCode: this.$t('module.basicData.visual.TipsBefore'),
 | 
			
		||||
      storageCode: this.$t('module.basicData.visual.storageCode'),
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      trueWidth: 200,
 | 
			
		||||
      tableProps,
 | 
			
		||||
@@ -113,14 +113,17 @@ export default {
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        current: 1,
 | 
			
		||||
        size: 10,
 | 
			
		||||
        storageBoxCode: '',
 | 
			
		||||
        storageBoxId: ''
 | 
			
		||||
      }
 | 
			
		||||
        locationStorageSubID: ''
 | 
			
		||||
        // storageBoxCode: '',
 | 
			
		||||
        // storageBoxId: ''
 | 
			
		||||
      },
 | 
			
		||||
      count: 0
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
    this.listQuery.storageBoxCode = this.$route.query.code
 | 
			
		||||
    this.listQuery.storageBoxId = this.$route.query.id
 | 
			
		||||
    // this.listQuery.storageBoxId = this.$route.query.id
 | 
			
		||||
    this.listQuery.locationStorageSubID = this.$route.query.locationStorageSubID
 | 
			
		||||
    this.getList()
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
@@ -131,7 +134,7 @@ export default {
 | 
			
		||||
          cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
 | 
			
		||||
          type: 'warning'
 | 
			
		||||
        }).then(() => {
 | 
			
		||||
        //   console.log(raw.data)
 | 
			
		||||
          // console.log(raw.data)
 | 
			
		||||
          deleSubstrate(raw.data).then(response => {
 | 
			
		||||
            this.$message({
 | 
			
		||||
              message: this.$t('module.basicData.visual.success'),
 | 
			
		||||
@@ -144,16 +147,18 @@ export default {
 | 
			
		||||
          })
 | 
			
		||||
        }).catch(() => {})
 | 
			
		||||
      } else {
 | 
			
		||||
        this.addNew(raw.data.id)
 | 
			
		||||
        // this.count = raw.data._pageIndex
 | 
			
		||||
        // console.log(this.count)
 | 
			
		||||
        this.addNew(raw.data)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    getList() {
 | 
			
		||||
      this.listLoading = true
 | 
			
		||||
      this.num = this.listQuery.storageBoxCode
 | 
			
		||||
      this.listQuery.code = this.$route.query.code
 | 
			
		||||
      console.log(this.listQuery)
 | 
			
		||||
      // console.log(this.listQuery)
 | 
			
		||||
      listSubstrate(this.listQuery).then(response => {
 | 
			
		||||
        console.log(response)
 | 
			
		||||
        // console.log(response)
 | 
			
		||||
        if (response.data) {
 | 
			
		||||
          this.list = response.data
 | 
			
		||||
          console.log(this.list)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user