供需平衡表
This commit is contained in:
		
							parent
							
								
									affa833aaa
								
							
						
					
					
						commit
						eb29f39b54
					
				| 
						 | 
					@ -646,7 +646,6 @@ export const getDetailsListApi = data => {
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
// 领料记录添加备注
 | 
					// 领料记录添加备注
 | 
				
			||||||
export function addRemarkApi(data) {
 | 
					export function addRemarkApi(data) {
 | 
				
			||||||
  return request({
 | 
					  return request({
 | 
				
			||||||
| 
						 | 
					@ -656,7 +655,6 @@ export function addRemarkApi(data) {
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
// 总站点退料-列表
 | 
					// 总站点退料-列表
 | 
				
			||||||
export const getBackTotalListApi = data => {
 | 
					export const getBackTotalListApi = data => {
 | 
				
			||||||
  return request({
 | 
					  return request({
 | 
				
			||||||
| 
						 | 
					@ -926,3 +924,30 @@ export function directUpdateApi(data) {
 | 
				
			||||||
    data
 | 
					    data
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 供需平衡表-列表
 | 
				
			||||||
 | 
					export function getDemandAndSupplyApi(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/material/material_maMachine/getDemandAndSupply',
 | 
				
			||||||
 | 
					    method: 'get',
 | 
				
			||||||
 | 
					    params: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 供需平衡表-合计
 | 
				
			||||||
 | 
					export function getDemandAndSupplyNoPageApi(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/material/material_maMachine/getDemandAndSupplyNoPage',
 | 
				
			||||||
 | 
					    method: 'get',
 | 
				
			||||||
 | 
					    params: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 供需平衡表-在用
 | 
				
			||||||
 | 
					export function getUseDemandAndSupplyApi(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/material/material_maMachine/getUseDemandAndSupply',
 | 
				
			||||||
 | 
					    method: 'get',
 | 
				
			||||||
 | 
					    params: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -81,15 +81,15 @@
 | 
				
			||||||
          <el-option label="安全工器具" :value="2" />
 | 
					          <el-option label="安全工器具" :value="2" />
 | 
				
			||||||
        </el-select>
 | 
					        </el-select>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
      <el-form-item label="计量单位" prop="unitName">
 | 
					      <el-form-item label="计量单位" prop="unitValue">
 | 
				
			||||||
        <el-select
 | 
					        <el-select
 | 
				
			||||||
          v-model="queryParams.unitName"
 | 
					          v-model="queryParams.unitValue"
 | 
				
			||||||
          placeholder="请选择计量单位"
 | 
					          placeholder="请选择计量单位"
 | 
				
			||||||
          clearable
 | 
					          clearable
 | 
				
			||||||
          filterable
 | 
					          filterable
 | 
				
			||||||
          style="width: 240px"
 | 
					          style="width: 240px"
 | 
				
			||||||
        >
 | 
					        >
 | 
				
			||||||
          <el-option v-for="item in unitNameList" :key="item.value" :label="item.label" :value="item.label" />
 | 
					          <el-option v-for="item in unitNameList" :key="item.value" :label="item.label" :value="item.value" />
 | 
				
			||||||
        </el-select>
 | 
					        </el-select>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
      <el-form-item label="关键字" prop="keyWord">
 | 
					      <el-form-item label="关键字" prop="keyWord">
 | 
				
			||||||
| 
						 | 
					@ -129,7 +129,7 @@
 | 
				
			||||||
        :width="column.width"
 | 
					        :width="column.width"
 | 
				
			||||||
        align="center"
 | 
					        align="center"
 | 
				
			||||||
      >
 | 
					      >
 | 
				
			||||||
        <template v-slot="{ row, $index }" v-if="column.prop === 'storeNum'">
 | 
					        <template v-slot="{ row }" v-if="column.prop === 'storeNum'">
 | 
				
			||||||
          <!-- 当 manageType 为 '编码' 时,使用可点击的 span -->
 | 
					          <!-- 当 manageType 为 '编码' 时,使用可点击的 span -->
 | 
				
			||||||
          <!-- <span
 | 
					          <!-- <span
 | 
				
			||||||
            class="clickText"
 | 
					            class="clickText"
 | 
				
			||||||
| 
						 | 
					@ -142,12 +142,12 @@
 | 
				
			||||||
          <span>{{ row.storeNum }}</span>
 | 
					          <span>{{ row.storeNum }}</span>
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <template v-slot="{ row }" v-else-if="column.prop === 'usNum'">
 | 
					        <template v-slot="{ row, $index }" v-else-if="column.prop === 'useNum'">
 | 
				
			||||||
          <span v-if="row.usNum > 0 && $index != 0" class="clickText" @click="openUserRecords(row)">
 | 
					          <span v-if="row.useNum > 0 && $index != 0" class="clickText" @click="openUserRecords(row)">
 | 
				
			||||||
            {{ row.usNum }}
 | 
					            {{ row.useNum }}
 | 
				
			||||||
          </span>
 | 
					          </span>
 | 
				
			||||||
          <!-- 否则,直接显示数字 -->
 | 
					          <!-- 否则,直接显示数字 -->
 | 
				
			||||||
          <span v-else>{{ row.usNum }}</span>
 | 
					          <span v-else>{{ row.useNum }}</span>
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
    </el-table>
 | 
					    </el-table>
 | 
				
			||||||
| 
						 | 
					@ -224,7 +224,7 @@
 | 
				
			||||||
        </el-form-item>
 | 
					        </el-form-item>
 | 
				
			||||||
      </el-form>
 | 
					      </el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <el-table v-loading="loading" :data="useRecordList">
 | 
					      <el-table v-loading="isDlgLoading" :data="useRecordList">
 | 
				
			||||||
        <el-table-column
 | 
					        <el-table-column
 | 
				
			||||||
          label="序号"
 | 
					          label="序号"
 | 
				
			||||||
          align="center"
 | 
					          align="center"
 | 
				
			||||||
| 
						 | 
					@ -232,13 +232,13 @@
 | 
				
			||||||
          type="index"
 | 
					          type="index"
 | 
				
			||||||
          :index="indexContinuation(dialogUseQuery.pageNum, dialogUseQuery.pageSize)"
 | 
					          :index="indexContinuation(dialogUseQuery.pageNum, dialogUseQuery.pageSize)"
 | 
				
			||||||
        ></el-table-column>
 | 
					        ></el-table-column>
 | 
				
			||||||
        <el-table-column label="分包单位" align="center" prop="subUnit" :show-overflow-tooltip="true" />
 | 
					        <el-table-column label="分包单位" align="center" prop="subUnitName" :show-overflow-tooltip="true" />
 | 
				
			||||||
        <el-table-column label="班组名称" align="center" prop="teamName" :show-overflow-tooltip="true" />
 | 
					        <el-table-column label="班组名称" align="center" prop="teamName" :show-overflow-tooltip="true" />
 | 
				
			||||||
        <el-table-column label="物资名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
 | 
					        <el-table-column label="物资名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
 | 
				
			||||||
        <el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
 | 
					        <el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
 | 
				
			||||||
        <el-table-column label="领用数量" align="center" prop="leaseNum" :show-overflow-tooltip="true" />
 | 
					        <el-table-column label="领用数量" align="center" prop="leaseNum" :show-overflow-tooltip="true" />
 | 
				
			||||||
        <el-table-column label="退料数量" align="center" prop="backNum" :show-overflow-tooltip="true" />
 | 
					        <el-table-column label="退料数量" align="center" prop="backNum" :show-overflow-tooltip="true" />
 | 
				
			||||||
        <el-table-column label="在用数量" align="center" prop="usNum" :show-overflow-tooltip="true" />
 | 
					        <el-table-column label="在用数量" align="center" prop="useNum" :show-overflow-tooltip="true" />
 | 
				
			||||||
      </el-table>
 | 
					      </el-table>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <pagination
 | 
					      <pagination
 | 
				
			||||||
| 
						 | 
					@ -260,10 +260,12 @@ import {
 | 
				
			||||||
  getTeamList,
 | 
					  getTeamList,
 | 
				
			||||||
  getSubUnitList,
 | 
					  getSubUnitList,
 | 
				
			||||||
  getStorageInfoListApi,
 | 
					  getStorageInfoListApi,
 | 
				
			||||||
  getUserRecordListApi,
 | 
					  getUseDemandAndSupplyApi,
 | 
				
			||||||
  getStoreNumAndUseListApi,
 | 
					  getDemandAndSupplyApi,
 | 
				
			||||||
  getRetainedEquipmentListNoPageApi
 | 
					  getDemandAndSupplyNoPageApi
 | 
				
			||||||
} from '@/api/materialsStation'
 | 
					} from '@/api/materialsStation'
 | 
				
			||||||
 | 
					import { getDeviceType } from '@/api/ma/device'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: '',
 | 
					  name: '',
 | 
				
			||||||
  dicts: [],
 | 
					  dicts: [],
 | 
				
			||||||
| 
						 | 
					@ -271,6 +273,7 @@ export default {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      // 遮罩层
 | 
					      // 遮罩层
 | 
				
			||||||
      loading: false,
 | 
					      loading: false,
 | 
				
			||||||
 | 
					      isDlgLoading: false,
 | 
				
			||||||
      // 选中数组
 | 
					      // 选中数组
 | 
				
			||||||
      ids: [],
 | 
					      ids: [],
 | 
				
			||||||
      // 弹出层标题
 | 
					      // 弹出层标题
 | 
				
			||||||
| 
						 | 
					@ -287,11 +290,11 @@ export default {
 | 
				
			||||||
        { label: '工程名称', prop: 'proName', showTooltip: false },
 | 
					        { label: '工程名称', prop: 'proName', showTooltip: false },
 | 
				
			||||||
        { label: '物资名称', prop: 'typeName' },
 | 
					        { label: '物资名称', prop: 'typeName' },
 | 
				
			||||||
        { label: '规格型号', prop: 'typeModelName' },
 | 
					        { label: '规格型号', prop: 'typeModelName' },
 | 
				
			||||||
        { label: '计量单位', prop: 'unitName' },
 | 
					        { label: '计量单位', prop: 'unit' },
 | 
				
			||||||
        { label: '业务需求数量', prop: 'num' },
 | 
					        { label: '业务需求数量', prop: 'businessNum' },
 | 
				
			||||||
        { label: '实际供应数量', prop: 'num' },
 | 
					        { label: '实际供应数量', prop: 'supplyNum' },
 | 
				
			||||||
        { label: '在库数量', prop: 'storeNum' },
 | 
					        { label: '在库数量', prop: 'storeNum' },
 | 
				
			||||||
        { label: '在用数量', prop: 'usNum' }
 | 
					        { label: '在用数量', prop: 'useNum' }
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      // 主表格数据
 | 
					      // 主表格数据
 | 
				
			||||||
      tableList: [],
 | 
					      tableList: [],
 | 
				
			||||||
| 
						 | 
					@ -305,7 +308,8 @@ export default {
 | 
				
			||||||
        subUnitName: null,
 | 
					        subUnitName: null,
 | 
				
			||||||
        typeName: null, //物资名称
 | 
					        typeName: null, //物资名称
 | 
				
			||||||
        typeModelName: null, //规格型号
 | 
					        typeModelName: null, //规格型号
 | 
				
			||||||
        jiJuType: null // 机具类型 (1施工机具 2安全工器具)
 | 
					        jiJuType: null, // 机具类型 (1施工机具 2安全工器具)
 | 
				
			||||||
 | 
					        unitValue: null
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      impUnitOptions: [], // 分公司下拉
 | 
					      impUnitOptions: [], // 分公司下拉
 | 
				
			||||||
      departOptions: [], // 项目部下拉
 | 
					      departOptions: [], // 项目部下拉
 | 
				
			||||||
| 
						 | 
					@ -344,6 +348,11 @@ export default {
 | 
				
			||||||
    this.queryParams.proId = query.proId || ''
 | 
					    this.queryParams.proId = query.proId || ''
 | 
				
			||||||
    this.queryParams.proCenter = query.proCenter || ''
 | 
					    this.queryParams.proCenter = query.proCenter || ''
 | 
				
			||||||
    this.getList()
 | 
					    this.getList()
 | 
				
			||||||
 | 
					    this.getImpUnitOptions()
 | 
				
			||||||
 | 
					    this.handleDepartChange()
 | 
				
			||||||
 | 
					    this.getSubUnitList()
 | 
				
			||||||
 | 
					    this.getDeviceType()
 | 
				
			||||||
 | 
					    this.handleImpUnitChange()
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    /** 获取分公司下拉 */
 | 
					    /** 获取分公司下拉 */
 | 
				
			||||||
| 
						 | 
					@ -512,46 +521,24 @@ export default {
 | 
				
			||||||
    // 获取列表
 | 
					    // 获取列表
 | 
				
			||||||
    async getList() {
 | 
					    async getList() {
 | 
				
			||||||
      this.loading = true
 | 
					      this.loading = true
 | 
				
			||||||
      const params = {
 | 
					 | 
				
			||||||
        proId: this.queryParams.proId || '',
 | 
					 | 
				
			||||||
        proCenter: this.queryParams.proCenter || '',
 | 
					 | 
				
			||||||
        keyWord: this.queryParams.keyWord,
 | 
					 | 
				
			||||||
        typeName: this.queryParams.typeName,
 | 
					 | 
				
			||||||
        typeModelName: this.queryParams.typeModelName,
 | 
					 | 
				
			||||||
        pageSize: this.queryParams.pageSize,
 | 
					 | 
				
			||||||
        pageNum: this.queryParams.pageNum
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      try {
 | 
					      try {
 | 
				
			||||||
        const res = await getStoreNumAndUseListApi(params)
 | 
					        const params = {
 | 
				
			||||||
        this.tableList = res.data.rows || []
 | 
					          ...this.queryParams
 | 
				
			||||||
        console.log('🚀 ~ getList ~ this.tableList:', this.tableList)
 | 
					 | 
				
			||||||
        this.total = res.data.total || 0
 | 
					 | 
				
			||||||
        let param = {
 | 
					 | 
				
			||||||
          proId: this.queryParams.proId || '',
 | 
					 | 
				
			||||||
          proCenter: this.queryParams.proCenter || '',
 | 
					 | 
				
			||||||
          keyWord: this.queryParams.keyWord,
 | 
					 | 
				
			||||||
          typeName: this.queryParams.typeName,
 | 
					 | 
				
			||||||
          typeModelName: this.queryParams.typeModelName
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        const response = await getRetainedEquipmentListNoPageApi(param)
 | 
					        const res = await getDemandAndSupplyApi(params)
 | 
				
			||||||
 | 
					        this.tableList = res.data.rows || []
 | 
				
			||||||
 | 
					        this.total = res.data.total || 0
 | 
				
			||||||
 | 
					        const response = await getDemandAndSupplyNoPageApi(params)
 | 
				
			||||||
        let obj = {
 | 
					        let obj = {
 | 
				
			||||||
          // storeNum manageType usNum  repairNum inputNum repairInputNum allNum
 | 
					          ...response.data,
 | 
				
			||||||
          storeNum: response.data.storeNum || 0,
 | 
					          // businessNum: response.data.businessNum || response.data.totalBusinessNum,
 | 
				
			||||||
          usNum: response.data.usNum || 0,
 | 
					          // supplyNum: response.data.supplyNum,
 | 
				
			||||||
          repairNum: response.data.repairNum || 0,
 | 
					          // storeNum: response.data.storeNum,
 | 
				
			||||||
          inputNum: response.data.inputNum || 0,
 | 
					          // useNum: response.data.useNum
 | 
				
			||||||
          repairInputNum: response.data.repairInputNum || 0,
 | 
					 | 
				
			||||||
          pendingScrapNum: response.data.pendingScrapNum || 0,
 | 
					 | 
				
			||||||
          scrapNum: response.data.scrapNum || 0,
 | 
					 | 
				
			||||||
          allNum: response.data.allNum || 0,
 | 
					 | 
				
			||||||
          totalPrice: response.data.totalPrice || 0,
 | 
					 | 
				
			||||||
          fiveReplacementRate: response.data.fiveReplacementRate || 0,
 | 
					 | 
				
			||||||
          tenReplacementRate: response.data.tenReplacementRate || 0,
 | 
					 | 
				
			||||||
          tenPlusReplacementRate: response.data.tenPlusReplacementRate || 0,
 | 
					 | 
				
			||||||
          manageType: response.data.manageType || ''
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        this.tableList.unshift(obj)
 | 
					        this.tableList.unshift(obj)
 | 
				
			||||||
        console.log(this.tableList)
 | 
					
 | 
				
			||||||
 | 
					        console.log('🚀 ~ getList ~ this.tableList:', this.tableList)
 | 
				
			||||||
        this.loading = false
 | 
					        this.loading = false
 | 
				
			||||||
      } catch (error) {
 | 
					      } catch (error) {
 | 
				
			||||||
        this.loading = false
 | 
					        this.loading = false
 | 
				
			||||||
| 
						 | 
					@ -559,7 +546,7 @@ export default {
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    indexContinuationForTable(num, size) {
 | 
					    indexContinuationForTable(num, size) {
 | 
				
			||||||
      let number = (num - 1) * size
 | 
					      let number = (num - 1) * size
 | 
				
			||||||
      console.log(number)
 | 
					      console.log('🚀 ~ indexContinuationForTable ~ number:', number)
 | 
				
			||||||
      if (number == 0) {
 | 
					      if (number == 0) {
 | 
				
			||||||
        return '合计'
 | 
					        return '合计'
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
| 
						 | 
					@ -571,14 +558,14 @@ export default {
 | 
				
			||||||
    // 注意列数和行数从 0 开始
 | 
					    // 注意列数和行数从 0 开始
 | 
				
			||||||
    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
 | 
					    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
 | 
				
			||||||
      if (rowIndex === 0 && columnIndex == 0) {
 | 
					      if (rowIndex === 0 && columnIndex == 0) {
 | 
				
			||||||
        let rowspan = 1
 | 
					        let rowspan = 1 // 合并行数
 | 
				
			||||||
        let colspan = 6
 | 
					        let colspan = 5 // 合并列数
 | 
				
			||||||
        return { rowspan, colspan }
 | 
					        return { rowspan, colspan }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      // 解决偏移的重要代码
 | 
					      // 解决偏移的重要代码
 | 
				
			||||||
      // 重点在 else if 判断必须加因为合并单元格数据会出现偏移、
 | 
					      // 重点在 else if 判断必须加因为合并单元格数据会出现偏移、
 | 
				
			||||||
      // 否则如果是 第二行 的 第二列 那么隐藏原有第二行 的 第二列的数据使他隐藏
 | 
					      // 否则如果是 第二行 的 第二列 那么隐藏原有第二行 的 第二列的数据使他隐藏
 | 
				
			||||||
      else if (rowIndex === 0 && columnIndex < 6) {
 | 
					      else if (rowIndex === 0 && columnIndex < 5) {
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
          rowspan: 0,
 | 
					          rowspan: 0,
 | 
				
			||||||
          colspan: 0
 | 
					          colspan: 0
 | 
				
			||||||
| 
						 | 
					@ -598,11 +585,11 @@ export default {
 | 
				
			||||||
    /** 导出按钮操作 */
 | 
					    /** 导出按钮操作 */
 | 
				
			||||||
    handleExport() {
 | 
					    handleExport() {
 | 
				
			||||||
      this.download(
 | 
					      this.download(
 | 
				
			||||||
        'material/material_maMachine/exportStoreNumAndUseList',
 | 
					        'material/material_maMachine/exportDemandAndSupply',
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          ...this.queryParams
 | 
					          ...this.queryParams
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        `站内库存查询_${new Date().getTime()}.xlsx`
 | 
					        `材料站供需平衡表_${new Date().getTime()}.xlsx`
 | 
				
			||||||
      )
 | 
					      )
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //查看在库编码数据
 | 
					    //查看在库编码数据
 | 
				
			||||||
| 
						 | 
					@ -643,9 +630,13 @@ export default {
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 查询在用设备列表 */
 | 
					    /** 查询在用设备列表 */
 | 
				
			||||||
    getUserRecords() {
 | 
					    getUserRecords() {
 | 
				
			||||||
      getUserRecordListApi(this.dialogUseQuery).then(response => {
 | 
					      this.isDlgLoading = true
 | 
				
			||||||
 | 
					      getUseDemandAndSupplyApi(this.dialogUseQuery).then(response => {
 | 
				
			||||||
 | 
					        this.isDlgLoading = false
 | 
				
			||||||
        this.useRecordList = response.data.rows
 | 
					        this.useRecordList = response.data.rows
 | 
				
			||||||
        this.dialogUserTotal = response.data.total
 | 
					        this.dialogUserTotal = response.data.total
 | 
				
			||||||
 | 
					      }).catch(() => {
 | 
				
			||||||
 | 
					        this.isDlgLoading = false
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 搜索在用按钮操作 */
 | 
					    /** 搜索在用按钮操作 */
 | 
				
			||||||
| 
						 | 
					@ -655,9 +646,9 @@ export default {
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleDialogUserExport() {
 | 
					    handleDialogUserExport() {
 | 
				
			||||||
      this.download(
 | 
					      this.download(
 | 
				
			||||||
        'material/material_maMachine/exportUserRecordList',
 | 
					        'material/material_maMachine/exportUseDemandAndSupply',
 | 
				
			||||||
        { ...this.dialogUseQuery },
 | 
					        { ...this.dialogUseQuery },
 | 
				
			||||||
        `站内库存查询_在用设备_${new Date().getTime()}.xlsx`
 | 
					        `材料站供需平衡表_在用设备_${new Date().getTime()}.xlsx`
 | 
				
			||||||
      )
 | 
					      )
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -157,13 +157,13 @@
 | 
				
			||||||
          >
 | 
					          >
 | 
				
			||||||
            {{ scope.row.preNum > 0 ? scope.row.preNum : '添加编码' }}
 | 
					            {{ scope.row.preNum > 0 ? scope.row.preNum : '添加编码' }}
 | 
				
			||||||
          </span>
 | 
					          </span>
 | 
				
			||||||
          <el-input
 | 
					          <el-input-number
 | 
				
			||||||
            v-if="scope.row.manageType == 1"
 | 
					            v-if="scope.row.manageType == 1"
 | 
				
			||||||
            v-model.number="scope.row.preNum"
 | 
					            v-model.number="scope.row.preNum"
 | 
				
			||||||
 | 
					            controls-position="right"
 | 
				
			||||||
            placeholder="退料数量"
 | 
					            placeholder="退料数量"
 | 
				
			||||||
            type="number"
 | 
					            :min="0"
 | 
				
			||||||
            min="1"
 | 
					            :precision="scope.row.unitValue == 1 ? 3 : 0"
 | 
				
			||||||
            clearable
 | 
					 | 
				
			||||||
            @input="checkNum(scope.row)"
 | 
					            @input="checkNum(scope.row)"
 | 
				
			||||||
            style="width: 100%"
 | 
					            style="width: 100%"
 | 
				
			||||||
          />
 | 
					          />
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -165,19 +165,19 @@
 | 
				
			||||||
      <el-table-column align="center" label="在用数量" prop="useNum" />
 | 
					      <el-table-column align="center" label="在用数量" prop="useNum" />
 | 
				
			||||||
      <el-table-column label="预领数量" prop="preNum" align="center">
 | 
					      <el-table-column label="预领数量" prop="preNum" align="center">
 | 
				
			||||||
        <template v-slot="scope">
 | 
					        <template v-slot="scope">
 | 
				
			||||||
          <el-input
 | 
					          <el-input-number
 | 
				
			||||||
            v-model.number="scope.row.preNum"
 | 
					            v-model.number="scope.row.preNum"
 | 
				
			||||||
            controls-position="right"
 | 
					            controls-position="right"
 | 
				
			||||||
            type="number"
 | 
					 | 
				
			||||||
            style="width: 100%"
 | 
					            style="width: 100%"
 | 
				
			||||||
            :min="1"
 | 
					            :min="0"
 | 
				
			||||||
            @input="
 | 
					            :precision="scope.row.unitValue == 1 ? 3 : 0"
 | 
				
			||||||
 | 
					            @change="
 | 
				
			||||||
              v =>
 | 
					              v =>
 | 
				
			||||||
                scope.row.unitValue == 1
 | 
					                scope.row.unitValue == 1
 | 
				
			||||||
                  ? (scope.row.preNum = Number(v.replace(/[^\d.]/g, '')))
 | 
					                  ? (scope.row.preNum = Number(String(v).replace(/[^\d.]/g, '')))
 | 
				
			||||||
                  : (scope.row.preNum = Number(v.replace(/[^\d]/g, '')))
 | 
					                  : (scope.row.preNum = Number(String(v).replace(/[^\d]/g, '')))
 | 
				
			||||||
            "
 | 
					            "
 | 
				
			||||||
          ></el-input>
 | 
					          ></el-input-number>
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="管理模式" prop="manageType" align="center">
 | 
					      <el-table-column label="管理模式" prop="manageType" align="center">
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue