更新
This commit is contained in:
@@ -200,3 +200,16 @@ export function searchTableDetailMX(...params) {
|
||||
}
|
||||
})
|
||||
}
|
||||
export function submitApproval(num, num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间装配管理_领料单审批_修改数据',
|
||||
param: '领料单流水号=' + num + '&审批情况流水号=' + num1 + '&未通过原因=' + num2
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-card style="width: 100%">
|
||||
<div slot="header">
|
||||
<el-row>
|
||||
<el-select v-show="PartType !== '离线采购件'" v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable style="width: 120px;margin-left: 5px" @change="machineChange">
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable style="width: 120px;margin-left: 5px" @change="machineChange">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
@@ -33,19 +33,19 @@
|
||||
</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: 1117px" height="320px" border stripe @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading0" ref="multipleTable" :data="tableData0" :row-class-name="tableRowClassName1" size="mini" style="max-height: 600px;width: 100%" height="320px" border @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>
|
||||
<el-table-column align="center" prop="机床图号" label="机床图号" min-width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="组号" label="组号" width="70px">
|
||||
<el-table-column align="center" prop="组号" label="组号" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="物料名称" label="名称" width="120px" show-overflow-tooltip>
|
||||
<el-table-column align="center" prop="物料名称" label="名称" min-width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>date
|
||||
@@ -60,32 +60,32 @@
|
||||
{{ scope.row.物料规格 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="总数量" width="70px">
|
||||
<el-table-column align="center" label="总数量" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备件数" width="70px">
|
||||
<el-table-column align="center" label="备件数" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备件总数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="已领数" width="70px">
|
||||
<el-table-column align="center" label="已领数" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已领数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="领用数" width="120px">
|
||||
<el-table-column align="center" label="领用数" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number :disabled="Number(scope.row.总数量) <= Number(scope.row.已领数量) || Number(scope.row.货位存量1) === 0.00" :max="Number(scope.row.领用最大值)" :min="Number(scope.row.货位存量1)===0.00 ? 0 : 1" v-model="scope.row.领用数量" size="mini" style="width: 100%"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="库存数" width="70px">
|
||||
<el-table-column align="center" label="库存数" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位存量1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="100px">
|
||||
<el-table-column align="center" label="操作" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="gridData3" highlight-current-row size="mini" show-summary>
|
||||
@@ -119,59 +119,59 @@
|
||||
</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: 1117px" height="320px" border stripe @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading1" ref="multipleTable" :data="tableData1" :row-class-name="tableRowClassName1" size="mini" style="max-height: 600px;width: 100%" height="320px" border @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>
|
||||
<el-table-column align="center" prop="机床图号" label="机床图号" min-width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="组号" label="组号" width="70px">
|
||||
<el-table-column align="center" prop="组号" label="组号" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="物料名称" label="名称" width="120px" show-overflow-tooltip>
|
||||
<el-table-column align="center" prop="物料名称" label="名称" min-width="120px" show-overflow-tooltip>
|
||||
<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="型号" min-width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="物料规格" label="规格" width="150px" show-overflow-tooltip>
|
||||
<el-table-column align="center" prop="物料规格" label="规格" min-width="150px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="总数量" width="70px">
|
||||
<el-table-column align="center" label="总数量" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备件数" width="70px">
|
||||
<el-table-column align="center" label="备件数" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备件总数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="已领数" width="70px">
|
||||
<el-table-column align="center" label="已领数" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已领数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="领用数" width="120px">
|
||||
<el-table-column align="center" label="领用数" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number :disabled="Number(scope.row.总数量) <= Number(scope.row.已领数量) || scope.row.货位存量1 === 0" :max="Number(scope.row.领用最大值)" :min="Number(scope.row.货位存量1)===0.00 ? 0 : 1" v-model="scope.row.领用数量" size="mini" style="width: 100%"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="库存数" width="70px">
|
||||
<el-table-column align="center" label="库存数" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位存量1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="领料单编号" width="100px" show-overflow-tooltip>
|
||||
<el-table-column align="center" label="领料单编号" min-width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.领料单编号 }}
|
||||
</template>
|
||||
@@ -190,64 +190,64 @@
|
||||
</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: 1226px" height="320px" border stripe @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading2" ref="multipleTable" :data="tableData2" :row-class-name="tableRowClassName1" size="mini" style="max-height: 600px;width: 100%" height="320px" border @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>
|
||||
<el-table-column align="center" prop="机床图号" label="机床图号" min-width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="组号" label="组号" width="70px">
|
||||
<el-table-column align="center" prop="组号" label="组号" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="零件名称" label="名称" width="120px" show-overflow-tooltip>
|
||||
<el-table-column align="center" prop="零件名称" label="名称" min-width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="图号" sortable prop="零件图号" width="120px" show-overflow-tooltip>
|
||||
<el-table-column align="center" label="图号" sortable prop="零件图号" min-width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="规格" label="规格" width="120px">
|
||||
<el-table-column align="center" prop="规格" label="规格" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规格 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="材料" width="120px">
|
||||
<el-table-column align="center" label="材料" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="总数量" width="70px">
|
||||
<el-table-column align="center" label="总数量" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备件数" width="70px">
|
||||
<el-table-column align="center" label="备件数" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备件总数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="已领数" width="70px">
|
||||
<el-table-column align="center" label="已领数" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已领数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="领用数" width="120px">
|
||||
<el-table-column align="center" label="领用数" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number :disabled="Number(scope.row.总数量) <= Number(scope.row.已领数量) || scope.row.货位存量1 === 0" :max="Number(scope.row.领用最大值)" :min="Number(scope.row.货位存量1)===0.00 ? 0 : 1" v-model="scope.row.领用数量" size="mini" style="width: 100%"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="库存数" width="70px">
|
||||
<el-table-column align="center" label="库存数" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位存量1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="领料单编号" width="100px" show-overflow-tooltip>
|
||||
<el-table-column align="center" label="领料单编号" min-width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.领料单编号 }}
|
||||
</template>
|
||||
@@ -312,7 +312,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-input v-model="pickingListPeople" clearable size="small" placeholder="领料单编号/制单人/机床" style="width:200px;margin-left: 0px" />
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
size="small"
|
||||
@@ -357,6 +357,11 @@
|
||||
{{ scope.row.操作日期 ? scope.row.操作日期.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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;">
|
||||
<el-pagination
|
||||
@@ -373,7 +378,7 @@
|
||||
<div style="width: 72.5%;float: left">
|
||||
<el-card>
|
||||
<el-table v-loading="listDetailsloading" :data="pickListTable2" border style="width: 100%;" size="mini" highlight-current-row height="447px" @row-click="searchMX">
|
||||
<el-table-column v-if="true" label="状态" align="center" prop="是否领料确认" width="70px">
|
||||
<el-table-column v-if="true" label="状态" align="center" prop="是否领料确认" width="80px">
|
||||
<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>
|
||||
@@ -714,6 +719,15 @@ export default {
|
||||
tableRowClassName({ row }) {
|
||||
if (parseInt(row.是否审批) === 1) {
|
||||
return 'shenpi-row'
|
||||
} else if (parseInt(row.是否审批) === 2) {
|
||||
return 'Fail-row'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
tableRowClassName1({ row }) {
|
||||
if (row.总数量 > Number(row.已领数量) && Number(row.货位存量1) !== 0.00) {
|
||||
return 'canBePickedUp'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
@@ -1153,4 +1167,10 @@ export default {
|
||||
.el-table .shenpi-row {
|
||||
background: #9BD7FC !important;
|
||||
}
|
||||
.el-table .canBePickedUp {
|
||||
background: #CEFFCE !important;
|
||||
}
|
||||
.el-table .Fail-row {
|
||||
background: #FF9797 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
<el-tag v-if="Number(scope.row.是否审批)===1" type="success">已审批</el-tag>
|
||||
<el-tag v-if="Number(scope.row.是否审批)===0 && Number(token)!==21 && Number(token)!==36 && Number(token)!==37" type="warning">未审批</el-tag>
|
||||
<el-button v-if="Number(scope.row.是否审批)===0 && (Number(token)===21 || Number(token)===36 || Number(token)===37)" size="mini" type="primary" plain icon="el-icon-check" @click="approvalPass(scope.row)">审批</el-button>
|
||||
<el-button v-if="Number(scope.row.是否审批)===2 && (Number(token)===21 || Number(token)===36 || Number(token)===37)" size="mini" type="danger" plain icon="el-icon-check" @click="approvalPass(scope.row)">未通过</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -87,11 +88,30 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible3" title="领料单审批" center style="min-height: 300px;" width="380px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="审批是否通过" prop="审批是否通过" center>
|
||||
<el-select v-model="form2.审批是否通过" size="small" @change="selectChange">
|
||||
<el-option
|
||||
v-for="item in approval"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="未通过原因" prop="未通过原因">
|
||||
<el-input v-model="form2.未通过原因" :disabled="disabled" size="small"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :disabled="Open_disable" type="primary" size="small" @click="submitApproval('form2')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initPickPerson, initMachineProject, searchgroup, searchTable, searchList, createList, dropList, selectIntoList, searchListDetail, dropListDetail } from '@/api/Inventory/CreatePickingList'
|
||||
import { initPickPerson, initMachineProject, searchgroup, searchTable, searchList, createList, dropList, selectIntoList, searchListDetail, dropListDetail, submitApproval } from '@/api/Inventory/CreatePickingList'
|
||||
import request from '@/utils/request'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
@@ -99,6 +119,15 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
PartType: '基本件',
|
||||
Open_disable: false,
|
||||
dialogVisible3: false,
|
||||
form2: {
|
||||
审批是否通过: 1,
|
||||
未通过原因: ''
|
||||
},
|
||||
rules2: {
|
||||
审批是否通过: [{ required: true, message: '请选择', trigger: 'change' }]
|
||||
},
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
groupNumberValue: '',
|
||||
@@ -120,6 +149,17 @@ export default {
|
||||
pageSize3: 20,
|
||||
total3: 0,
|
||||
pickListTable2: [],
|
||||
approval: [
|
||||
{
|
||||
value: 1,
|
||||
label: '是'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '否'
|
||||
}
|
||||
],
|
||||
disabled: true,
|
||||
dialogFormVisible1: false,
|
||||
form1: {
|
||||
领料人流水号: '',
|
||||
@@ -149,38 +189,29 @@ export default {
|
||||
methods: {
|
||||
// 审批通过
|
||||
approvalPass(row) {
|
||||
this.$confirm('是否审批通过?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
if (this.pickListTable2.length === 0) {
|
||||
this.$message.error('不能审批空领料单')
|
||||
return
|
||||
}
|
||||
const param = {
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '4',
|
||||
name: `update 车间装配管理_领料单 set 是否审批 = 1 where 领料单流水号 = ${row.领料单流水号}`
|
||||
}
|
||||
}
|
||||
request(param).then(res => {
|
||||
if (res.data[0].result === '1') {
|
||||
this.$message.success('操作成功')
|
||||
this.pickingListNumber = ''
|
||||
this.form2.审批是否通过 = 1
|
||||
this.form2.未通过原因 = ''
|
||||
this.disabled = true
|
||||
this.pickingListNum = row.领料单流水号
|
||||
this.Open_disable = false
|
||||
this.dialogVisible3 = true
|
||||
},
|
||||
submitApproval(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.Open_disable = true
|
||||
submitApproval(this.pickingListNum, this.form2.审批是否通过, this.form2.未通过原因).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('审批成功')
|
||||
this.dialogVisible3 = false
|
||||
this.searchList()
|
||||
} else { this.$message.error('审批失败') }
|
||||
})
|
||||
} else {
|
||||
this.$message.error('操作失败')
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 初始化数据
|
||||
fetchData() {
|
||||
@@ -376,6 +407,13 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
selectChange() {
|
||||
if (this.form2.审批是否通过 === 2) {
|
||||
this.disabled = false
|
||||
} else if (this.form2.审批是否通过 === 1) {
|
||||
this.disabled = true
|
||||
}
|
||||
},
|
||||
// 多选
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val
|
||||
|
||||
@@ -66,8 +66,8 @@
|
||||
<el-table v-loading="listDetailsloading" :data="pickListTable2" border style="width: 100%;" size="mini" highlight-current-row height="800px" @row-click="searchMX">
|
||||
<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>
|
||||
<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>
|
||||
<span v-else-if="Number(scope.row.出库数量1) === 0" type="warning" size="mini">未领料</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -98,12 +98,7 @@
|
||||
</el-table-column>
|
||||
<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="65">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备件数量 }}
|
||||
{{ scope.row.领用数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已领数" align="center" width="65">
|
||||
|
||||
@@ -330,7 +330,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="备料数" align="center" width="65px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购数量 }}
|
||||
{{ scope.row.采购数量 || scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到数" align="center" width="65px">
|
||||
@@ -418,7 +418,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="备料数" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购数量 }}
|
||||
{{ scope.row.采购数量 || scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到数" align="center" width="70px">
|
||||
@@ -550,6 +550,7 @@ export default {
|
||||
tableData6: [],
|
||||
tableData20: [],
|
||||
tableData30: [],
|
||||
tableData40: [],
|
||||
采购计划流水号: '',
|
||||
离线采购计划流水号: '',
|
||||
tableData4: [],
|
||||
@@ -668,6 +669,7 @@ export default {
|
||||
},
|
||||
saveData(row) {
|
||||
var a = 0
|
||||
if (this.planType === 0) {
|
||||
this.tableData30.map(v => {
|
||||
if (v.采购计划明细流水号 === row.采购计划明细流水号) {
|
||||
v.到货重量 = row.到货重量
|
||||
@@ -675,14 +677,32 @@ export default {
|
||||
a = 1
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.tableData40.map(v => {
|
||||
if (v.离线采购计划明细流水号 === row.离线采购计划明细流水号) {
|
||||
v.到货重量 = row.到货重量
|
||||
v.未到货数量 = row.未到货数量
|
||||
a = 1
|
||||
}
|
||||
})
|
||||
}
|
||||
if (a === 0) {
|
||||
if (this.planType === 0) {
|
||||
this.tableData30.push({
|
||||
采购计划明细流水号: row.采购计划明细流水号,
|
||||
到货重量: row.到货重量,
|
||||
未到货数量: row.未到货数量
|
||||
})
|
||||
} else {
|
||||
this.tableData40.push({
|
||||
离线采购计划明细流水号: row.离线采购计划明细流水号,
|
||||
到货重量: row.到货重量,
|
||||
未到货数量: row.未到货数量
|
||||
})
|
||||
}
|
||||
}
|
||||
if (this.arrest.length > 0) {
|
||||
if (this.planType === 0) {
|
||||
this.arrest.map(v => {
|
||||
if (v.采购计划明细流水号 === row.采购计划明细流水号) {
|
||||
v.到货重量 = row.到货重量
|
||||
@@ -693,8 +713,21 @@ export default {
|
||||
for (let i = 0; i < this.arrest.length; i++) {
|
||||
this.totalWight += this.arrest[i].到货重量
|
||||
}
|
||||
} else {
|
||||
this.arrest.map(v => {
|
||||
if (v.离线采购计划明细流水号 === row.离线采购计划明细流水号) {
|
||||
v.到货重量 = row.到货重量
|
||||
v.未到货数量 = row.未到货数量
|
||||
}
|
||||
})
|
||||
this.totalWight = 0.00
|
||||
for (let i = 0; i < this.arrest.length; i++) {
|
||||
this.totalWight += this.arrest[i].到货重量
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.arrest1.length > 0) {
|
||||
if (this.planType === 0) {
|
||||
this.arrest1.map(v => {
|
||||
if (v.采购计划明细流水号 === row.采购计划明细流水号) {
|
||||
v.到货重量 = row.到货重量
|
||||
@@ -705,6 +738,18 @@ export default {
|
||||
for (let i = 0; i < this.arrest1.length; i++) {
|
||||
this.totalWight2 += this.arrest1[i].到货重量
|
||||
}
|
||||
} else {
|
||||
this.arrest1.map(v => {
|
||||
if (v.离线采购计划明细流水号 === row.离线采购计划明细流水号) {
|
||||
v.到货重量 = row.到货重量
|
||||
v.未到货数量 = row.未到货数量
|
||||
}
|
||||
})
|
||||
this.totalWight2 = 0.00
|
||||
for (let i = 0; i < this.arrest1.length; i++) {
|
||||
this.totalWight2 += this.arrest1[i].到货重量
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
fetchdata() {
|
||||
@@ -735,6 +780,14 @@ export default {
|
||||
} else {
|
||||
searchLxMateriel(this.供应商, check, this.零件图号).then(response => {
|
||||
this.tableData20 = response.data
|
||||
for (let i = 0; i < this.tableData20.length; i++) {
|
||||
for (let j = 0; j < this.tableData40.length; j++) {
|
||||
if (this.tableData20[i].离线采购计划明细流水号 === this.tableData40[j].离线采购计划明细流水号) {
|
||||
this.tableData20[i].未到货数量 = this.tableData40[j].未到货数量
|
||||
this.tableData20[i].到货重量 = this.tableData40[j].到货重量
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -1162,6 +1215,7 @@ export default {
|
||||
this.searchTable20()
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
console.log(val, 1234)
|
||||
this.totalWight = 0.00
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.totalWight += val[i].到货重量
|
||||
|
||||
Reference in New Issue
Block a user