刘璐珈
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="width: 72%">
|
||||
<el-card style="width: 100%">
|
||||
<div slot="header">
|
||||
<el-row>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable style="width: 120px" @change="machineChange">
|
||||
@@ -32,7 +32,7 @@
|
||||
</div>
|
||||
<el-tabs v-model="PartType" type="card" @tab-click="searchTable()">
|
||||
<el-tab-pane label="标准件" name="标准件">
|
||||
<el-table ref="multipleTable" :data="tableData0" size="mini" style="max-height: 600px;width: 865px" 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="500px" 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">
|
||||
@@ -88,39 +88,39 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="外购件" name="外购件">
|
||||
<el-table ref="multipleTable" :data="tableData1" size="mini" style="max-height: 500px;width: 890px" height="600px" border stripe @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
|
||||
<el-table-column align="center" prop="机床图号" label="机床图号" width="130px" show-overflow-tooltip>
|
||||
<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-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">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="组号" label="组号" width="80px">
|
||||
<el-table-column align="center" prop="组号" label="组号" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="物料名称" label="名称" width="100px" show-overflow-tooltip>
|
||||
<el-table-column align="center" prop="物料名称" label="名称" width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="型号" label="型号" min-width="130px" show-overflow-tooltip>
|
||||
<el-table-column align="center" prop="型号" label="型号" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="物料规格" label="规格" min-width="200px" show-overflow-tooltip>
|
||||
<el-table-column align="center" prop="物料规格" label="规格" width="150px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="总数量" width="60px">
|
||||
<el-table-column align="center" label="总数量" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备件数" width="60px">
|
||||
<el-table-column align="center" label="备件数" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备件总数量 }}
|
||||
</template>
|
||||
@@ -144,44 +144,44 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="基本件" name="基本件">
|
||||
<el-table ref="multipleTable" :data="tableData2" size="mini" style="max-height: 500px" height="600px" border stripe @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
|
||||
<el-table-column align="center" prop="机床图号" label="机床图号" width="130px" show-overflow-tooltip>
|
||||
<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-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">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="组号" label="组号" width="80px">
|
||||
<el-table-column align="center" prop="组号" label="组号" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="零件名称" label="名称" width="100px" show-overflow-tooltip>
|
||||
<el-table-column align="center" prop="零件名称" label="名称" width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="图号" sortable prop="零件图号" min-width="130px" show-overflow-tooltip>
|
||||
<el-table-column align="center" label="图号" sortable prop="零件图号" width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="规格" label="规格" min-width="80px">
|
||||
<el-table-column align="center" prop="规格" label="规格" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规格 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="材料" width="80px">
|
||||
<el-table-column align="center" label="材料" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="总数量" width="60px">
|
||||
<el-table-column align="center" label="总数量" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备件数" width="60px">
|
||||
<el-table-column align="center" label="备件数" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备件总数量 }}
|
||||
</template>
|
||||
@@ -205,24 +205,24 @@
|
||||
</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: 100%;" height="500px" @selection-change="handleSelectionChange1">
|
||||
<el-table-column :selectable="selectable1" type="selection" align="center" width="50"/>
|
||||
<el-table-column label="物料名称" prop="物料名称" align="center" min-width="140" show-overflow-tooltip>
|
||||
<el-table v-loading="listLoading" :data="tableDataBasic" highlight-current-row size="mini" border stripe style="width: 823px;" height="500px" @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">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" prop="物料型号" align="center" min-width="150" show-overflow-tooltip>
|
||||
<el-table-column label="物料型号" prop="物料型号" align="center" width="191" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" prop="物料规格" align="center" min-width="200" show-overflow-tooltip>
|
||||
<el-table-column label="物料规格" prop="物料规格" align="center" width="184" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存量" align="center" min-width="100px">
|
||||
<el-table-column label="库存量" align="center" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位存量 }}
|
||||
</template>
|
||||
@@ -251,6 +251,7 @@
|
||||
<div slot="header">
|
||||
<el-card>
|
||||
<el-row style="margin-top: 5px">
|
||||
<el-input v-model="pickingListPeople" clearable size="small" placeholder="制单人" style="width:100px;margin-left: 0px" />
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
size="small"
|
||||
@@ -259,23 +260,22 @@
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
style="width:250px"
|
||||
style="width:250px;margin-left: 10px"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<el-input v-model="pickingListPeople" clearable size="small" placeholder="制单人" style="width:120px;margin-left: 10px" />
|
||||
<el-button size="small" type="primary" plain icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchList()">查询</el-button>
|
||||
<el-button size="small" type="distribution" icon="el-icon-circle-plus-outline" style="margin: 0 0 0 10px" @click="createList()">创建领料单</el-button>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="为所选领料单增加物料明细" placement="top">
|
||||
<el-button size="small" type="success" plain icon="el-icon-bottom" style="margin: 0 0 5px 10px" @click="selectInto()">选入物料</el-button>
|
||||
</el-tooltip>
|
||||
<el-button :disabled="Number(审批情况)===1" size="small" plain type="danger" icon="el-icon-delete" style="margin: 0 0 0 10px" @click="dropList()">删除领料单</el-button>
|
||||
<el-button :disabled="Number(审批情况)===1" size="small" plain type="danger" icon="el-icon-delete" style="margin-right: 20px;float: right" @click="dropListDetail()">移除领料明细</el-button>
|
||||
<el-button :disabled="Number(审批情况)===1" size="small" plain type="danger" icon="el-icon-right" style="margin-right: 20px;float: right" @click="dropListDetail()">移除领料明细</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
<div style="width: 26%;float: left;margin-right: 16px">
|
||||
<div style="width: 26%;float: left;margin-right: 19px">
|
||||
<el-card>
|
||||
<el-table :data="pickListTable1" :row-class-name="tableRowClassName" class="shenpi" stripe highlight-current-row border size="mini" width="100%" height="400px" @row-click="clickList">
|
||||
<el-table v-loading="listDetailsloading" :data="pickListTable1" :row-class-name="tableRowClassName" class="shenpi" highlight-current-row border size="mini" width="100%" height="400px" @row-click="clickList">
|
||||
<el-table-column prop="领料单编号" label="领料单编号" align="center" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.领料单编号 }}
|
||||
@@ -306,7 +306,7 @@
|
||||
</div>
|
||||
<div style="width: 72.5%;float: left">
|
||||
<el-card>
|
||||
<el-table :data="pickListTable2" border style="width: 100%;" size="mini" highlight-current-row height="400px" @row-click="searchMX">
|
||||
<el-table v-loading="listDetailsloading" :data="pickListTable2" border style="width: 100%;" size="mini" highlight-current-row height="447px" @row-click="searchMX">
|
||||
<el-table-column label="序号" align="center" type="index" width="50"/>
|
||||
<el-table-column label="名称" align="center" prop="名称" min-width="100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
@@ -328,22 +328,22 @@
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center" prop="组号" min-width="70">
|
||||
<el-table-column label="组号" align="center" prop="组号" width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领用数" align="center" width="60">
|
||||
<el-table-column label="领用数" align="center" width="65">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备件数" align="center" width="60">
|
||||
<el-table-column label="备件数" align="center" width="65">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已领数" align="center" width="60">
|
||||
<el-table-column label="已领数" align="center" width="65">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库数量1 }}
|
||||
</template>
|
||||
@@ -354,7 +354,7 @@
|
||||
<!--<el-tag v-else type="warning" size="mini">未备料</el-tag>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column v-if="true" label="领料确认" align="center" prop="是否领料确认" width="75px">
|
||||
<el-table-column v-if="true" label="确认" align="center" prop="是否领料确认" width="70px">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="(Number(scope.row.总数量) <= Number(scope.row.出库数量1)) || Number(scope.row.是否领料确认) === 1" type="success" size="mini">已领完</span>
|
||||
<span v-else-if="Number(scope.row.总数量) > Number(scope.row.出库数量1) && Number(scope.row.出库数量1) > 0" type="primary" size="mini">部分领用</span>
|
||||
@@ -463,7 +463,11 @@ export default {
|
||||
total4: 0,
|
||||
pickListTable2: [],
|
||||
dialogFormVisible1: false,
|
||||
loading0: false,
|
||||
loading1: false,
|
||||
loading2: false,
|
||||
listLoading: false,
|
||||
listDetailsloading: false,
|
||||
materialSpec: '', // 物料规格
|
||||
materialModel: '', // 物料型号
|
||||
form1: {
|
||||
@@ -478,7 +482,11 @@ export default {
|
||||
pickingListNumberShow: '', // 领料单编号
|
||||
pickingListNum: '', // 领料单流水号
|
||||
multipleSelection: [],
|
||||
multipleSelection1: []
|
||||
multipleSelection1: [],
|
||||
listDetailsName: '',
|
||||
listDetailsPicnum: '',
|
||||
listDetailsSpecifications: '',
|
||||
listMachinenum: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -594,9 +602,13 @@ export default {
|
||||
this.Name ? check3 = 1 : check3 = 0
|
||||
console.log(this.PickingValue, 111)
|
||||
if (this.PickingValue === false) {
|
||||
this.loading0 = true
|
||||
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, 1, 0, this.pageCurrent0, this.pageSize0, 1).then(response => {
|
||||
this.tableData0 = response.data.rows
|
||||
this.total0 = response.data.total
|
||||
this.loading0 = false
|
||||
}).catch(() => {
|
||||
this.loading0 = false
|
||||
})
|
||||
} else {
|
||||
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, 1, 1, this.pageCurrent0, this.pageSize0, 1).then(response => {
|
||||
@@ -606,16 +618,20 @@ export default {
|
||||
}
|
||||
},
|
||||
// 外购件
|
||||
searchTable1() {
|
||||
searchTable1: function() {
|
||||
let check1, check2, check3
|
||||
this.machineNumberValue ? check1 = 1 : check1 = 0
|
||||
this.groupNumberValue ? check2 = 1 : check2 = 0
|
||||
this.Name ? check3 = 1 : check3 = 0
|
||||
console.log(this.PickingValue, 111)
|
||||
if (this.PickingValue === false) {
|
||||
this.loading1 = true
|
||||
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, 1, 0, this.pageCurrent1, this.pageSize1, 2).then(response => {
|
||||
this.tableData0 = response.data.rows
|
||||
this.total0 = response.data.total
|
||||
this.loading1 = false
|
||||
}).catch(() => {
|
||||
this.loading1 = false
|
||||
})
|
||||
} else {
|
||||
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, 1, 1, this.pageCurrent1, this.pageSize1, 2).then(response => {
|
||||
@@ -632,9 +648,13 @@ export default {
|
||||
this.Name ? check3 = 1 : check3 = 0
|
||||
console.log(this.PickingValue, 111)
|
||||
if (this.PickingValue === false) {
|
||||
this.loading2 = true
|
||||
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, 1, 0, this.pageCurrent2, this.pageSize2, 3).then(response => {
|
||||
this.tableData0 = response.data.rows
|
||||
this.total0 = response.data.total
|
||||
this.loading2 = false
|
||||
}).catch(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
} else {
|
||||
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, 1, 1, this.pageCurrent2, this.pageSize2, 3).then(response => {
|
||||
@@ -653,6 +673,8 @@ export default {
|
||||
this.tableDataBasic = response.data.rows
|
||||
this.total4 = response.data.total
|
||||
this.listLoading = false
|
||||
}).catch(() => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
searchTable02(row) {
|
||||
@@ -778,14 +800,20 @@ export default {
|
||||
},
|
||||
// 删除领料单
|
||||
dropList() {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
this.$confirm(`确定删除<p style="color: red;display: inline-block"> ${this.pickingListNumberShow}</p> 领料单吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
type: 'warning',
|
||||
dangerouslyUseHTMLString: true
|
||||
}).then(() => {
|
||||
dropList(this.pickingListNum).then(response => {
|
||||
if (Number(response.data[0].result) === 1) {
|
||||
this.$message.success('删除成功')
|
||||
this.listDetailsName = ''
|
||||
this.listDetailsPicnum = ''
|
||||
this.listDetailsSpecifications = ''
|
||||
this.listMachinenum = ''
|
||||
this.pickListTable2 = []
|
||||
this.searchList()
|
||||
} else {
|
||||
this.$message.error('数据占用')
|
||||
@@ -870,39 +898,61 @@ export default {
|
||||
},
|
||||
// 查看领料单明细
|
||||
clickList(row) {
|
||||
this.listDetailsName = ''
|
||||
this.listDetailsPicnum = ''
|
||||
this.listDetailsSpecifications = ''
|
||||
this.listMachinenum = ''
|
||||
row ? this.审批情况 = row.是否审批 : this.审批情况
|
||||
row ? this.pickingListNum = row.领料单流水号 : this.pickingListNum
|
||||
row ? this.pickingListNumberShow = row.领料单编号 : this.pickingListNumberShow
|
||||
row ? this.peopleName = row.姓名 : this.peopleName
|
||||
this.listDetailsloading = true
|
||||
searchListDetail(this.pickingListNum).then(res => {
|
||||
this.pickListTable2 = []
|
||||
this.pickListTable2 = res.data
|
||||
this.listDetailsloading = false
|
||||
}).catch(() => {
|
||||
this.listDetailsloading = false
|
||||
})
|
||||
},
|
||||
searchMX(row) {
|
||||
this.ListMX = row.领料单明细流水号
|
||||
this.listDetailsName = row.名称
|
||||
this.listDetailsPicnum = row.图号或型号
|
||||
this.listDetailsSpecifications = row.规格 ? row.规格 : '--'
|
||||
this.listMachinenum = row.机床图号
|
||||
console.log(this.listDetailsName, this.listDetailsPicnum, this.listDetailsSpecifications, this.listMachinenum, 8989)
|
||||
},
|
||||
// 删除领料单明细
|
||||
dropListDetail() {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
dropListDetail(this.ListMX).then(response => {
|
||||
if (Number(response.data[0].result) === 1) {
|
||||
this.$message.success('删除成功')
|
||||
this.searchTable()
|
||||
this.clickList()
|
||||
} else {
|
||||
this.$message.error('已领取,不可删除')
|
||||
}
|
||||
if (this.listDetailsName) {
|
||||
//
|
||||
// this.listDetailsSpecifications = row.规格 ? row.规格 : '--'
|
||||
// this.listMachinenum = row.机床图号
|
||||
this.$confirm(`确定删除</br> <p style="color: red;display: inline-block"> 领料单:${this.listDetailsName} ${' '}图号或型号:${this.listDetailsPicnum}</p><p style="color: red;display: inline-block">规格:${this.listDetailsSpecifications}${' '}机床图号:${this.listMachinenum} </p> 的明细吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
dangerouslyUseHTMLString: true
|
||||
}).then(() => {
|
||||
dropListDetail(this.ListMX).then(response => {
|
||||
if (Number(response.data[0].result) === 1) {
|
||||
this.$message.success('删除成功')
|
||||
this.searchTable()
|
||||
this.clickList()
|
||||
} else {
|
||||
this.$message.error('已领取,不可删除')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message('请先选择领料单')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user