采购部采购样式

This commit is contained in:
bryan sun
2019-11-06 17:01:47 +08:00
parent 4b718ff6ed
commit bcecdb9b19
16 changed files with 1114 additions and 601 deletions

View File

@@ -9,103 +9,104 @@
<el-button :disabled="审批未通过===true" size="small" type="primary" style="float: right" @click="inputPassword()">领料确认</el-button>
</div>
</el-card>
<div style="width: 26%;float: left;margin-right: 16px">
<div style="width: 27%;float: left;margin-right: 16px">
<el-card>
<el-table :data="pickListTable1" :row-class-name="tableRowClassName" class="shenpi" highlight-current-row border size="mini" width="100%" height="730px" @row-click="clickList">
<el-table-column prop="领料单编号" label="领料单编号" align="center" min-width="100px">
<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="100px">
<template slot-scope="scope">
{{ scope.row.领料单编号 }}
</template>
</el-table-column>
<el-table-column label="领料人" prop="领料人" align="center" min-width="90px">
<el-table-column label="领料人" prop="领料人" show-overflow-tooltip align="center" min-width="60px">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="备注" prop="备注" align="center" min-width="130px">
<el-table-column label="备注" prop="备注" show-overflow-tooltip align="center" min-width="90px">
<template slot-scope="scope">
{{ scope.row.领料单备注 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="float:left;margin: 10px 0;">
<div class="block" style="float:left;">
<el-pagination
:current-page="pageCurrent3"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize3"
:total="total3"
layout="total, sizes, prev, pager, next"
layout="total"
@size-change="handleSizeChange3"
@current-change="handleCurrentChange3"/>
</div>
</el-card>
</div>
<div style="width: 72.5%;float: left">
<div style="width: 70%;float: left">
<el-card>
<el-table :data="pickListTable2" highlight-current-row stripe border style="width: 100%;" size="mini" height="780">
<el-table-column label="名称" prop="名称" align="center" min-width="100">
<el-table :data="pickListTable2" :row-class-name="tableRowClassName1" highlight-current-row border style="width: 100%;" size="mini" height="570" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="45"/>
<el-table-column label="名称" show-overflow-tooltip prop="名称" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" prop="图号或型号" align="center" min-width="100" show-overflow-tooltip>
<el-table-column label="图号或型号" prop="图号或型号" align="center" min-width="90" 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" min-width="130" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.规格 || '—' }}
</template>
</el-table-column>
<el-table-column label="领用" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.总数量 }}
</template>
</el-table-column>
<el-table-column label="出库" align="center" min-width="120">
<template slot-scope="scope">
<el-input-number :disabled="Number(scope.row.总数量) <= Number(scope.row.出库数量1) || scope.row.货位存量1 === null" :max="scope.row.货位存量1" v-model="scope.row.出库数量" size="mini" style="width: 100%"/>
</template>
</el-table-column>
<el-table-column label="备件" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.备件数量 }}
</template>
</el-table-column>
<el-table-column label="库存" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.货位存量1 }}
</template>
</el-table-column>
<el-table-column label="已领" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.出库数量1 }}
</template>
</el-table-column>
<el-table-column v-if="true" label="备料" align="center" width="60">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否备料确认)===1" size="mini" type="success">已备</el-tag>
<el-tag v-else type="warning" size="mini">未备</el-tag>
</template>
</el-table-column>
<!-- <el-table-column v-if="true" label="领料" align="center" width="60">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag v-if="(Number(scope.row.总数量) <= Number(scope.row.出库数量1)) || Number(scope.row.是否领料确认) === 1" type="success" size="mini">已领</el-tag>-->
<!-- <el-tag v-else-if="Number(scope.row.总数量) > Number(scope.row.出库数量1) && Number(scope.row.出库数量1) > 0" type="primary" size="mini">未完</el-tag>-->
<!-- <el-tag v-else-if="Number(scope.row.出库数量1) === 0" type="warning" size="mini">未领</el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="机床图号" prop="机床图号" align="center" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" min-width="70">
<el-table-column label="组号" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="领用数" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.总数量 }}
</template>
</el-table-column>
<el-table-column label="备件数" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.备件数量 }}
</template>
</el-table-column>
<el-table-column label="库存数" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.货位存量1 }}
</template>
</el-table-column>
<el-table-column label="已领数" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.出库数量1 }}
</template>
</el-table-column>
<el-table-column label="出库数" align="center" min-width="120">
<template slot-scope="scope">
<el-input-number :disabled="Number(scope.row.总数量) <= Number(scope.row.出库数量1)" v-model="scope.row.出库数量" size="mini" style="width: 100%"/>
</template>
</el-table-column>
<el-table-column v-if="true" label="备料确认" align="center" width="90">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否备料确认)===1" size="mini" type="success">已备料</el-tag>
<el-tag v-else type="warning" size="mini">未备料</el-tag>
</template>
</el-table-column>
<el-table-column v-if="true" label="领料确认" align="center" width="90">
<template slot-scope="scope">
<el-tag v-if="(Number(scope.row.总数量) <= Number(scope.row.出库数量1)) || Number(scope.row.是否领料确认) === 1" type="success" size="mini">已领料</el-tag>
<el-tag v-else-if="Number(scope.row.总数量) > Number(scope.row.出库数量1) && Number(scope.row.出库数量1) > 0" type="primary" size="mini">未领完</el-tag>
<el-tag v-else-if="Number(scope.row.出库数量1) === 0" type="warning" size="mini">未领料</el-tag>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
@@ -237,6 +238,7 @@ export default {
name: 'MaterialOut',
data() {
return {
multipleSelection1: [],
multipleSelection: [],
pickingListNum: '', // 领料单流水号
pickingPersonNum: '', // 领料人流水号
@@ -244,7 +246,7 @@ export default {
pickingListNumberShow: '',
pickListTable1: [],
pageCurrent3: 1,
pageSize3: 40,
pageSize3: 10000,
total3: 0,
pickListTable2: [],
StockNumberTable: [],
@@ -430,6 +432,8 @@ export default {
},
// 领料确认
inputPassword() {
this.form3.outTypeValue = ''
this.form3.password = ''
this.dialogFormVisible3 = true
},
selectable(row, index) { // 控制某行是否可选
@@ -518,16 +522,27 @@ export default {
})
},
tableRowClassName({ row }) {
if (parseInt(row.是否审批) === 1) {
if (parseInt(row.是否审批) === 0) {
return 'shenpi-row'
} else {
return ''
}
},
tableRowClassName1({ row }) {
if (parseInt(row.出库数量1) === 0) {
return 'weilingliao-row'
} else if (parseInt(row.总数量) > parseInt(row.出库数量1) && parseInt(row.出库数量1)) {
return 'weilingwan-row'
} else {
return ''
}
},
// 多选
handleSelectionChange(val) {
console.log(val)
this.SELECTION = val
this.multipleSelection1 = []
val.map(v => {
this.multipleSelection1.push(v.领料单明细流水号)
})
},
// 提交领料确认
pickConfirm1() {
@@ -602,4 +617,10 @@ export default {
.el-table .shenpi-row {
background: #9BD7FC !important;
}
.el-table .weilingliao-row {
background: #D8DDE6 !important;
}
.el-table .weilingwan-row {
background: #E9F0F9 !important;
}
</style>