文档413V1

This commit is contained in:
liulujia1
2020-04-14 18:15:46 +08:00
parent 3c41f63911
commit ec2394249c
5 changed files with 62 additions and 15 deletions

View File

@@ -68,3 +68,29 @@ export function formatTime(time, option) {
)
}
}
function zeroFill(i) {
if (i >= 0 && i <= 9) {
return '0' + i
} else {
return i
}
}
export function getNowDAY() { // 默认显示今天
// 获取当前时间
const date = new Date()
const month = zeroFill(date.getMonth() + 1)
const day = zeroFill(date.getDate())
const time = date.getFullYear() + '-' + month + '-' + day
return time
}
export function get90DAY() { // 3个月显示今天
var Data = new Date()
Data.setTime(Data.getTime() - 3600 * 1000 * 24 * 90)
const month = zeroFill(Data.getMonth() + 1)
const day = zeroFill(Data.getDate())
const time = Data.getFullYear() + '-' + month + '-' + day
return time
}

View File

@@ -21,7 +21,7 @@
:value="item.value"/>
</el-select>
<el-input v-model="Name" placeholder="物料名称、规格、型号" clearable style="width: 200px" size="small"/>
<el-button size="small" type="primary" plain icon="el-icon-search" style="margin: 0 0 0 10px" @click="pageCurrent0=1;pageSize0=300;pageCurrent1=1;pageSize1=300;pageCurrent2=1;pageSize2=300;pageCurrent4=1;pageSize4=20;searchTable()">查询</el-button>
<el-button size="small" type="primary" plain icon="el-icon-search" style="margin: 0 0 0 10px" @click="pageCurrent0=1;pageSize0=10;pageCurrent1=1;pageSize1=10;pageCurrent2=1;pageSize2=10;pageCurrent4=1;pageSize4=10;searchTable()">查询</el-button>
<el-switch
v-model="PickingValue"
active-color="#13ce66"
@@ -33,7 +33,7 @@
</div>
<el-tabs v-model="PartType" type="card" @tab-click="searchTable()">
<el-tab-pane label="标准件" name="标准件">
<el-table v-loading="loading0" ref="multipleTable" :data="tableData0" size="mini" style="max-height: 600px;width: 867px" height="500px" border stripe @selection-change="handleSelectionChange">
<el-table v-loading="loading0" ref="multipleTable" :data="tableData0" size="mini" style="max-height: 600px;width: 867px" height="320px" border stripe @selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" align="center" width="43"/>
<el-table-column align="center" prop="机床图号" label="机床图号" width="120" show-overflow-tooltip>
<template slot-scope="scope">
@@ -89,7 +89,7 @@
</div>
</el-tab-pane>
<el-tab-pane label="外购件" name="外购件">
<el-table v-loading="loading1" ref="multipleTable" :data="tableData1" size="mini" style="max-height: 600px;width: 867px" height="500px" border stripe @selection-change="handleSelectionChange">
<el-table v-loading="loading1" ref="multipleTable" :data="tableData1" size="mini" style="max-height: 600px;width: 867px" height="320px" border stripe @selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" align="center" width="43"/>
<el-table-column align="center" prop="机床图号" label="机床图号" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
@@ -145,7 +145,7 @@
</div>
</el-tab-pane>
<el-tab-pane label="基本件" name="基本件">
<el-table v-loading="loading2" ref="multipleTable" :data="tableData2" size="mini" style="max-height: 600px;width: 976px" height="500px" border stripe @selection-change="handleSelectionChange">
<el-table v-loading="loading2" ref="multipleTable" :data="tableData2" size="mini" style="max-height: 600px;width: 976px" height="320px" border stripe @selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" align="center" width="42"/>
<el-table-column align="center" prop="机床图号" label="机床图号" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
@@ -206,7 +206,7 @@
</div>
</el-tab-pane>
<el-tab-pane label="离线采购件" name="离线采购件">
<el-table v-loading="listLoading" :data="tableDataBasic" highlight-current-row size="mini" border stripe style="width: 823px;" height="500px" @selection-change="handleSelectionChange1">
<el-table v-loading="listLoading" :data="tableDataBasic" highlight-current-row size="mini" border stripe style="width: 823px;" height="355px" @selection-change="handleSelectionChange1">
<el-table-column :selectable="selectable1" type="selection" align="center" width="42"/>
<el-table-column label="物料名称" prop="物料名称" align="center" width="153" show-overflow-tooltip>
<template slot-scope="scope">
@@ -422,16 +422,19 @@
import { initPickPerson, initMachineProject, searchgroup, searchTable, searchList, createList, dropList, selectIntoList, searchListDetail, dropListDetail, searchListDetailMX, searchPart, IntoMateerial } from '@/api/Inventory/CreatePickingList'
import request from '@/utils/request'
import { mapGetters } from 'vuex'
import { getNowDAY, get90DAY } from '@/utils/index'
export default {
name: 'CreatePickingList',
data() {
// var getNowDAY;
return {
createList_disable: false,
selectInto_disable: false,
审批情况: '',
peopleName: '',
ListMX: '',
startTime: '',
startTime: [get90DAY(), getNowDAY()],
// startTime: [],
PartType: '基本件',
machineNumberValue: '',
machineNumber: [],
@@ -453,20 +456,20 @@ export default {
tableData1: [],
tableData2: [],
pageCurrent0: 1,
pageSize0: 300,
pageSize0: 10,
total0: 0,
pageCurrent1: 1,
pageSize1: 300,
pageSize1: 10,
total1: 0,
pageCurrent2: 1,
pageSize2: 300,
pageSize2: 10,
total2: 0,
pickListTable1: [],
pageCurrent3: 1,
pageSize3: 20,
pageSize3: 10,
total3: 0,
pageCurrent4: 1,
pageSize4: 20,
pageSize4: 10,
total4: 0,
pickListTable2: [],
dialogFormVisible1: false,
@@ -505,6 +508,8 @@ export default {
mounted() {
this.fetchData()
this.searchList()
console.log(getNowDAY(), get90DAY(), 'time')
// this.startTime = [get90DAY(). getNowDAY()]
},
methods: {
// 审批通过

View File

@@ -24,7 +24,7 @@
<el-button type="distribution" icon="el-icon-edit" size="small" @click="addMaterial()">新增</el-button>
</el-row>
</div>
<el-table v-loading="loading" :data="tableData1" stripe highlight-current-row border height="550px" style="width: 865px" size="mini">
<el-table v-loading="loading" :data="tableData1" stripe highlight-current-row border height="550px" style="width: 1040px" size="mini">
<el-table-column label="名称" prop="物料名称" align="center" width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 }}
@@ -64,6 +64,16 @@
<span v-else>{{ scope.row.货位存量 }}</span>
</template>
</el-table-column>
<el-table-column label="盘点人" prop="盘点人" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.盘点人 }}
</template>
</el-table-column>
<el-table-column label="盘点时间" prop="盘点时间" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.盘点时间 | formatTime }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button v-if="scope.row.changeValue" type="mini" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit(scope.row)">确定</el-button>
@@ -306,12 +316,14 @@ export default {
data: {
type: '2',
name: `库存管理_库存盘点_物料货位数量_修改数据`,
param: `货位存量=${row.货位存量}&物料流水号=${row.物料流水号}&货位流水号=${row.货位流水号}&物料来源=${row.物料来源}`
param: `货位存量=${row.货位存量}&物料流水号=${row.物料流水号}&货位流水号=${row.货位流水号}&物料来源=${row.物料来源}&盘点人编号=${this.$store.state.user.id}`
}
}
request(param).then(res => {
if (res.data[0].result === '1') {
this.$message.success('操作成功')
// 查询
this.searchMaterial()
row.changeValue = false
} else {
this.$message.error('操作失败')

View File

@@ -20,7 +20,7 @@
<el-button :disabled="审批未通过===true" size="small" style="margin-left: 100px" type="distribution" @click="inputPassword()">领料确认</el-button>
</div>
</el-card>
<div style="width: 21%;float: left;margin-right: 10px">
<div style="width: 25%;float: left;margin-right: 10px">
<el-card>
<el-table :data="pickListTable1" :row-class-name="tableRowClassName" class="shenpi" highlight-current-row border size="mini" width="100%" height="570px" @row-click="clickList">
<el-table-column prop="领料单编号" label="领料单编号" show-overflow-tooltip align="center" width="95px">
@@ -33,7 +33,7 @@
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="备注" prop="备注" show-overflow-tooltip align="center" min-width="70px">
<el-table-column label="备注" prop="备注" show-overflow-tooltip align="center" min-width="140px">
<template slot-scope="scope">
{{ scope.row.领料单备注 }}
</template>

View File

@@ -171,6 +171,10 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (this.pickListTable2.length === 0) {
this.$message.error('空领料单,不能审批!')
return
}
const param = {
url: '',
method: 'post',