文档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"/> :value="item.value"/>
</el-select> </el-select>
<el-input v-model="Name" placeholder="物料名称、规格、型号" clearable style="width: 200px" size="small"/> <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 <el-switch
v-model="PickingValue" v-model="PickingValue"
active-color="#13ce66" active-color="#13ce66"
@@ -33,7 +33,7 @@
</div> </div>
<el-tabs v-model="PartType" type="card" @tab-click="searchTable()"> <el-tabs v-model="PartType" type="card" @tab-click="searchTable()">
<el-tab-pane label="标准件" name="标准件"> <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 :selectable="selectable" type="selection" align="center" width="43"/>
<el-table-column align="center" prop="机床图号" label="机床图号" width="120" show-overflow-tooltip> <el-table-column align="center" prop="机床图号" label="机床图号" width="120" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
@@ -89,7 +89,7 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="外购件" name="外购件"> <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 :selectable="selectable" type="selection" align="center" width="43"/>
<el-table-column align="center" prop="机床图号" label="机床图号" width="120px" show-overflow-tooltip> <el-table-column align="center" prop="机床图号" label="机床图号" width="120px" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
@@ -145,7 +145,7 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="基本件" name="基本件"> <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 :selectable="selectable" type="selection" align="center" width="42"/>
<el-table-column align="center" prop="机床图号" label="机床图号" width="120px" show-overflow-tooltip> <el-table-column align="center" prop="机床图号" label="机床图号" width="120px" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
@@ -206,7 +206,7 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="离线采购件" name="离线采购件"> <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 :selectable="selectable1" type="selection" align="center" width="42"/>
<el-table-column label="物料名称" prop="物料名称" align="center" width="153" show-overflow-tooltip> <el-table-column label="物料名称" prop="物料名称" align="center" width="153" show-overflow-tooltip>
<template slot-scope="scope"> <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 { initPickPerson, initMachineProject, searchgroup, searchTable, searchList, createList, dropList, selectIntoList, searchListDetail, dropListDetail, searchListDetailMX, searchPart, IntoMateerial } from '@/api/Inventory/CreatePickingList'
import request from '@/utils/request' import request from '@/utils/request'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { getNowDAY, get90DAY } from '@/utils/index'
export default { export default {
name: 'CreatePickingList', name: 'CreatePickingList',
data() { data() {
// var getNowDAY;
return { return {
createList_disable: false, createList_disable: false,
selectInto_disable: false, selectInto_disable: false,
审批情况: '', 审批情况: '',
peopleName: '', peopleName: '',
ListMX: '', ListMX: '',
startTime: '', startTime: [get90DAY(), getNowDAY()],
// startTime: [],
PartType: '基本件', PartType: '基本件',
machineNumberValue: '', machineNumberValue: '',
machineNumber: [], machineNumber: [],
@@ -453,20 +456,20 @@ export default {
tableData1: [], tableData1: [],
tableData2: [], tableData2: [],
pageCurrent0: 1, pageCurrent0: 1,
pageSize0: 300, pageSize0: 10,
total0: 0, total0: 0,
pageCurrent1: 1, pageCurrent1: 1,
pageSize1: 300, pageSize1: 10,
total1: 0, total1: 0,
pageCurrent2: 1, pageCurrent2: 1,
pageSize2: 300, pageSize2: 10,
total2: 0, total2: 0,
pickListTable1: [], pickListTable1: [],
pageCurrent3: 1, pageCurrent3: 1,
pageSize3: 20, pageSize3: 10,
total3: 0, total3: 0,
pageCurrent4: 1, pageCurrent4: 1,
pageSize4: 20, pageSize4: 10,
total4: 0, total4: 0,
pickListTable2: [], pickListTable2: [],
dialogFormVisible1: false, dialogFormVisible1: false,
@@ -505,6 +508,8 @@ export default {
mounted() { mounted() {
this.fetchData() this.fetchData()
this.searchList() this.searchList()
console.log(getNowDAY(), get90DAY(), 'time')
// this.startTime = [get90DAY(). getNowDAY()]
}, },
methods: { methods: {
// 审批通过 // 审批通过

View File

@@ -24,7 +24,7 @@
<el-button type="distribution" icon="el-icon-edit" size="small" @click="addMaterial()">新增</el-button> <el-button type="distribution" icon="el-icon-edit" size="small" @click="addMaterial()">新增</el-button>
</el-row> </el-row>
</div> </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> <el-table-column label="名称" prop="物料名称" align="center" width="150" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料名称 }} {{ scope.row.物料名称 }}
@@ -64,6 +64,16 @@
<span v-else>{{ scope.row.货位存量 }}</span> <span v-else>{{ scope.row.货位存量 }}</span>
</template> </template>
</el-table-column> </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"> <el-table-column label="操作" align="center" width="100">
<template slot-scope="scope"> <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> <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: { data: {
type: '2', type: '2',
name: `库存管理_库存盘点_物料货位数量_修改数据`, name: `库存管理_库存盘点_物料货位数量_修改数据`,
param: `货位存量=${row.货位存量}&物料流水号=${row.物料流水号}&货位流水号=${row.货位流水号}&物料来源=${row.物料来源}` param: `货位存量=${row.货位存量}&物料流水号=${row.物料流水号}&货位流水号=${row.货位流水号}&物料来源=${row.物料来源}&盘点人编号=${this.$store.state.user.id}`
} }
} }
request(param).then(res => { request(param).then(res => {
if (res.data[0].result === '1') { if (res.data[0].result === '1') {
this.$message.success('操作成功') this.$message.success('操作成功')
// 查询
this.searchMaterial()
row.changeValue = false row.changeValue = false
} else { } else {
this.$message.error('操作失败') 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> <el-button :disabled="审批未通过===true" size="small" style="margin-left: 100px" type="distribution" @click="inputPassword()">领料确认</el-button>
</div> </div>
</el-card> </el-card>
<div style="width: 21%;float: left;margin-right: 10px"> <div style="width: 25%;float: left;margin-right: 10px">
<el-card> <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 :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"> <el-table-column prop="领料单编号" label="领料单编号" show-overflow-tooltip align="center" width="95px">
@@ -33,7 +33,7 @@
{{ scope.row.姓名 }} {{ scope.row.姓名 }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.领料单备注 }} {{ scope.row.领料单备注 }}
</template> </template>

View File

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