This commit is contained in:
liushuai
2019-04-09 09:25:56 +08:00
11 changed files with 392 additions and 136 deletions

View File

@@ -0,0 +1,39 @@
import request from '@/utils/request'
// 机床查询
export function getMachines(check, num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_机床名称_查询数据',
param: '项目流水号_check=' + check + '=int&项目流水号=' + num
}
})
}
// 分组查询
export function getGroups(machineNumber) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_组件名称_查询数据',
param: '机床流水号=' + machineNumber
}
})
}
// 主表查询
export function getTable(num1, num2, num3, num4, num5, num6, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_库存管理_基本件出库记录查询',
param: '机床流水号_check=' + num1 + '&机床流水号=' + num2 + '&组件流水号_check=' + num3 + '&组件流水号=' + num4 + '&零件图号_check=' + num5 + '&零件图号=' + num6,
Pagination: pageCurrent + '&' + pageSize
}
})
}

View File

@@ -81,7 +81,7 @@ export function BasicPart(listNumber, data1, data2, data3, data4, data5) {
data: {
type: '2',
name: 'MES_机加工MES_库存管理_出库模块_出库零件信息_零件出库',
param: '领料单明细流水号=' + listNumber + '工艺计划流水号=' + data1 + '&本次出库数量=' + data2 + '&收件信息ID=' + data3 + '&领用人编号=' + data4 + '&出库备注=' + data5
param: '领料单明细流水号=' + listNumber + '&工艺计划流水号=' + data1 + '&本次出库数量=' + data2 + '&收件信息ID=' + data3 + '&领用人编号=' + data4 + '&出库备注=' + data5
}
})
}

View File

@@ -136,6 +136,18 @@ export function dropListDetail(DetailNumberx, isBacklog) {
}
})
}
// 删除领料单明细/基本件
export function dropListDetailBasic(...params) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_领料单_领料单明细删除_基本件',
param: `领料单明细流水号=${params[0]}&收件信息ID=${params[1]}&返还数量=${params[2]}`
}
})
}
// 增加领料单明细
export function addListDetail(PickingListNumberx, projectnumber, machinenumber, teamNumber, outNumber, partType, Note, data1, data2, data4, data5, data6, data7, data8, data9, data10, data11, data12, data13) {
return request({

View File

@@ -74,3 +74,15 @@ export function change2(Number, code, num) {
}
})
}
export function handlechange2(Number, code) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工序_修改数据_修改实际完成时间',
param: '工序流水号=' + Number + '&实际完成时间=' + code
}
})
}

View File

@@ -32,17 +32,17 @@
</el-table-column>
<el-table-column label="计划数量" align="center" min-width="100">
<template slot-scope="scope" align="center">
<el-input v-model="tableData[scope.$index].plannumber" readonly size="small"/>
{{ tableData[scope.$index].plannumber }}
</template>
</el-table-column>
<el-table-column label="入库数量" align="center" min-width="100">
<template slot-scope="scope">
<el-input v-model="tableData[scope.$index].innumber" clearable size="small"/>
<el-input v-model="tableData[scope.$index].innumber" clearable size="mini"/>
</template>
</el-table-column>
<el-table-column label="仓库" align="center" min-width="100">
<template slot-scope="scope">
<el-select v-model="inventoryNumber" filterable clearable size="small" placeholder="仓库名称" @change="Getlocate">
<el-select v-model="inventoryNumber" filterable clearable size="mini" placeholder="仓库名称" @change="Getlocate">
<el-option
v-for="item in inventoryName"
:key="item.value"
@@ -53,7 +53,7 @@
</el-table-column>
<el-table-column label="货位" align="center" min-width="120">
<template slot-scope="scope">
<el-select v-model="locateNumber" filterable clearable size="small" placeholder="货位名称">
<el-select v-model="locateNumber" filterable clearable size="mini" placeholder="货位名称">
<el-option
v-for="item in locateName"
:key="item.value"
@@ -64,7 +64,7 @@
</el-table-column>
<el-table-column label="备注" align="center">
<template slot-scope="scope" align="center">
<el-input v-model="tableData[scope.$index].note" clearable size="small"/>
<el-input v-model="tableData[scope.$index].note" clearable size="mini"/>
</template>
</el-table-column>
<el-table-column label="操作" min-width="100" align="center">
@@ -79,7 +79,6 @@
</el-table-column>
</el-table>
</el-card>
</div>
</template>
@@ -87,7 +86,6 @@
import { searchTable, insertOne, getinventory, getlocate, searchPartNumber, CraftNumber } from '@/api/Inventory/Inboundscanning'
import { mapGetters } from 'vuex'
import { wsuri, name } from '@/utils/request'
import print from '@/vendor/print'
export default {
data() {
return {
@@ -118,75 +116,67 @@ export default {
this.Getinvent()
},
methods: {
// 移除
handleDelete(index, row) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.tableData.splice(index, 1)
this.$message({
message: '已被成功移除',
type: 'success'
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
this.tableData.splice(index, 1)
},
// 获取人员编号
getpeopleid() {
this.PeopleNumber = this.id
const a = this.token
console.log(a, 1111)
},
aaa() {
print('#print')
},
initWebpack() { // 初始化websocket
// 初始化websocket
initWebpack() {
this.websock = new WebSocket(wsuri)// 这里面的this都指向vue
this.websock.onopen = this.websocketopen
this.websock.onmessage = this.websocketonmessage
this.websock.onclose = this.websocketclose
this.websock.onerror = this.websocketerror
},
websocketopen() { // 打开
// 打开
websocketopen() {
console.log('WebSocket连接成功')
this.websock.send('{<' + name + '>}')
},
websocketonmessage(msg) { // 数据接收
// 数据接收
websocketonmessage(msg) {
this.partNumber = msg.data.split('|')[3]
this.partNumber = this.partNumber.slice(1)
this.getPaint(this.partNumber)
},
websocketclose() { // 关闭
// 关闭
websocketclose() {
console.log('WebSocket关闭')
},
websocketerror() { // 失败
// 失败
websocketerror() {
console.log('WebSocket连接失败')
},
// 根据图号查流水号并查表1
getCraftNumber() {
this.partNumber = ''
CraftNumber(this.Partpaint).then(response => {
this.partNumber = response.data[0].工艺计划流水号
if (response.data.length > 0 && response.data[0].工艺计划流水号) {
this.partNumber = response.data[0].工艺计划流水号
}
}).then(() => {
this.getscantable()
})
},
// 扫描并获取图号并查表1
getPaint() {
searchPartNumber(this.partNumber).then(response => {
this.Partpaint = response.data[0].零件图号
})
this.getscantable()
},
// 扫描查询
// 根据流水号查询
getscantable() {
if (this.partNumber === '' || this.partNumber === null) {
this.$message.error('请输入零件号')
this.$message.error('请输入正确零件号')
} else {
this.listLoading = true
searchTable(this.partNumber).then(response => {
console.log(response.data)
if (response.data.length === 0) {
this.listLoading = false
this.$message.warning('该零件未加工完成')
@@ -234,19 +224,25 @@ export default {
this.$message.error('请选择货位')
} else {
for (let i = 0; i < this.tableData.length; i++) {
if (this.tableData[i].innumber === '0') {
if (Number(this.tableData[i].innumber) === 0) {
this.$message.error('请输入正确数量')
} else {
if (this.tableData[i].innumber > this.tableData[i].plannumber) {
this.tableData[i].innumber = this.tableData[i].plannumber
}
insertOne(this.tableData[i].工艺计划流水号, this.tableData[i].innumber, this.PeopleNumber, this.tableData[i].capture, this.inventoryNumber, this.locateNumber, this.tableData[i].note).then(response => {
this.$message({
type: 'success',
message: '零件入库成功!'
})
}).then(() => {
this.Empty()
if (response.data[0].result === '1') {
this.$message({
type: 'success',
message: '零件入库成功!'
})
this.Empty()
} else {
this.$message({
type: 'error',
message: '零件入库失败!'
})
}
})
}
}
@@ -267,7 +263,7 @@ export default {
Getinvent() {
this.getSelect(getinventory, ['仓库名称', '仓库流水号'], 'inventoryName')
},
// 根据项目获取机床
// 根据仓库获取货位
Getlocate() {
this.locateName = []
this.locateNumber = ''

View File

@@ -0,0 +1,186 @@
<template>
<div class="app-container">
<el-card>
<span>机床号:</span>
<el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;width: 220px" placeholder="机床号" @change="getGroup()">
<el-option
v-for="item in Machines"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
</el-option>
</el-select>
<span>组号:</span>
<el-select v-model="Group" size="small" clearable placeholder="组号" style="margin-top:10px;width: 180px;">
<el-option
v-for="item in Groups"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>零件图号:</span>
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 180px;"/>
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="getTableData();pageCurrent=1;pageSize=10;total = 0">查询</el-button>
</el-card>
<el-card>
<el-table v-loading="listLoading1" :data="tableData1" class="table" border height="650">
<el-table-column
label="序号"
align="center"
width="50"
type="index"/>
<el-table-column align="center" label="零件名称" width="150px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件图号" width="150px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<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="120px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<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="120px">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="货位名称" width="120px">
<template slot-scope="scope">
{{ scope.row.货位名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="入库时间">
<template slot-scope="scope">
{{ scope.row.入库时间 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
v-if="!listLoading1"
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
</div>
</template>
<script>
import { getMachines, getGroups, getTable } from '@/api/Inventory/OutPartSelect'
export default {
data() {
return {
Machine: '',
Machines: [],
Group: '',
Groups: [],
number: '',
checkbox_Machine: false,
checkbox_Group: false,
checkbox_number: false,
tableData1: [],
listLoading1: false,
total: 0, // 总条数
pageSize: 10,
pageCurrent: 1
}
},
created() {
this.getMachine()
this.getTableData()
},
methods: {
getMachine() {
this.Machine = ''
this.Machines = []
this.Group = ''
this.Groups = []
getMachines().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machines.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号,
value2: response.data[i].项目名称
})
}
})
},
getGroup() {
this.Group = ''
this.Groups = []
getGroups(this.Machine).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Groups.push({
label: response.data[i].组号,
value: response.data[i].组件流水号
})
}
})
},
// 按条件查询
getTableData() {
this.listLoading1 = true
if (this.Machine === '') {
this.checkbox_Machine = 0
} else {
this.checkbox_Machine = 1
}
if (this.Group === '') {
this.checkbox_Group = 0
} else {
this.checkbox_Group = 1
}
if (this.number === '') {
this.checkbox_number = 0
} else {
this.checkbox_number = 1
}
this.tableData1 = []
getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.pageCurrent, this.pageSize).then(response => {
if (response.data.total === 0) {
this.listLoading1 = false
} else {
this.tableData1 = response.data.rows
this.total = response.data.total
this.listLoading1 = false
}
})
},
handleSizeChange(val) {
this.pageSize = val
this.getTableData()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.getTableData()
}
}
}
</script>
<style scoped>
</style>

View File

@@ -327,7 +327,7 @@ export default {
},
// 出库
partOut(row) {
console.log(row.领料单明细流水号, row.出库数量, row.滞货物料与货位对照流水号)
console.log(row.出库类型, row.领料单明细流水号, row.出库数量, row.滞货物料与货位对照流水号)
this.$confirm('确认出库?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -355,11 +355,12 @@ export default {
} else { this.$message.error('出库失败') }
})
} else { // 自制件
console.log(row.领料单明细流水号, row.工艺计划流水号, row.出库数量, row.收件信息ID, this.getpicikingPeople, row.备注)
BasicPart(row.领料单明细流水号, row.工艺计划流水号, row.出库数量, row.收件信息ID, this.getpicikingPeople, row.备注).then(response => {
if (response.data[0].result === '1') {
this.$message.success('出库成功')
this.searchListDetailt()
} else { this.$message.error('增加失败') }
} else { this.$message.error('出库失败') }
})
}
}).catch(() => {

View File

@@ -160,7 +160,7 @@
</el-table-column>
<el-table-column label="库存数量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.出库数量 }}
{{ scope.row.入库数量 - scope.row.出库数量 }}
</template>
</el-table-column>
<el-table-column label="待出库数量" align="center" width="90">
@@ -168,6 +168,11 @@
{{ scope.row.待出库数量 }}
</template>
</el-table-column>
<el-table-column label="可出库数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.可出库数量 = scope.row.入库数量 - scope.row.出库总数量 - scope.row.待出库数量 }}
</template>
</el-table-column>
<el-table-column label="仓库" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
@@ -190,7 +195,7 @@
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope" align="center">
<el-button :disabled="scope.row.是否禁用" size="mini" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addBasicList(scope.row)">领料</el-button>
<el-button :disabled="scope.row.可出库数量===0" size="mini" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addBasicList(scope.row)">领料</el-button>
</template>
</el-table-column>
</el-table>
@@ -439,6 +444,9 @@
<!--基本件领料对话框-->
<el-dialog :visible.sync="dialogFormVisible1" title="基本件通用件领料" center width="380px">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left">
<el-form-item label="领料单号" label-width="100px" size="small">
<el-input v-model="pickingListNumber" size="small" placeholder="空" readonly style="width: 200px"/>
</el-form-item>
<el-form-item label="出库数量" prop="outNumber" label-width="100px" size="small">
<el-input-number v-model="form1.outNumber" :min="0" :max="enableOut" controls-position="right" style="width: 200px"/>
</el-form-item>
@@ -510,7 +518,7 @@
<script>
import { initProject, searchmachine, searchTeam, searchPurchasePart, searchBasicPart, searchList, addList, dropList,
addListDetail, searchListDetail, dropListDetail, searchHoursePart, searchBacklogPart, submitAddBacklogList } from '@/api/Inventory/PickingList'
addListDetail, searchListDetail, dropListDetail, searchHoursePart, searchBacklogPart, submitAddBacklogList, dropListDetailBasic } from '@/api/Inventory/PickingList'
import { mapGetters } from 'vuex'
export default {
data() {
@@ -692,28 +700,52 @@ export default {
},
// 删除领料单明细
dropListdetail(row) {
let isBacklog
Number(row.出库类型) === 4 ? isBacklog = 1 : isBacklog = 0
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
dropListDetail(row.领料单明细流水号, isBacklog).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchListDetailt()
this.searchPartinfo()
} else {
this.$message.error('数据占用')
}
console.log(row)
if (Number(row.零件类型) === 3) { // 基本件
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
dropListDetailBasic(row.领料单明细流水号, row.收件信息ID, row.出库数量).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchListDetailt()
this.searchPartinfo()
} else {
this.$message.error('数据占用')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
} else { // 采购部采购件、滞货件
let isBacklog
Number(row.出库类型) === 4 ? isBacklog = 1 : isBacklog = 0
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
dropListDetail(row.领料单明细流水号, isBacklog).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchListDetailt()
this.searchPartinfo()
} else {
this.$message.error('数据占用')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
})
}
},
// 查询机床
searchMachine() {
@@ -760,6 +792,7 @@ export default {
this.listLoading1 = true
searchBasicPart(this.PageCurrent1, this.PageSize1, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
const data = response.data.rows
console.log(response.data.rows)
for (let i = 0; i < data.length; i++) {
data[i].可出库数量 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
}
@@ -904,7 +937,7 @@ export default {
} else {
this.$refs['form1'].validate((valid) => {
if (valid) {
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.form.outNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.purchaseDetailNum, this.askPurchaseNumber, this.locatenumber, this.outType, this.materialLocate, this.materialName, this.materialType, this.materialNumber, this.materialNumber, this.material).then(response => {
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.form1.outNumber, this.partType, this.form1.outNote, this.craftplannumber, this.receive, this.purchaseDetailNum, this.askPurchaseNumber, this.locatenumber, this.outType, this.materialLocate, this.materialName, this.materialType, this.materialNumber, this.materialNumber, this.material).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.searchPartinfo()

View File

@@ -95,66 +95,16 @@ import { getMachines, getGroups, getTable } from '@/api/Inventory/StockInquiry'
export default {
data() {
return {
startTime: '',
endTime: '',
startTime_check: 0,
endTime_check: 0,
liushuihao: '',
// value2: null,
radioList: '0',
length: 0,
listLoading1: false,
tableData1: [],
project: '',
projects: [],
Machine: '',
Machines: [],
Group: '',
Groups: [],
part: '',
parts: [{
value: 0,
label: '全部零件'
}, {
value: 1,
label: '自家生产'
}, {
value: 2,
label: '外协生产'
}],
Speed: '',
Speeds: [{
value: 5,
label: '全部'
}, {
value: 1,
label: '拖期'
}, {
value: 2,
label: '即将拖期'
}, {
value: 3,
label: '如期'
}, {
value: 4,
label: '工序外协'
}],
number: '',
checkbox_project: false,
checkbox_Machine: false,
checkbox_Group: false,
checkbox_part: false,
checkbox_number: false,
零件图号: [],
零件名称: [],
投产数量: [],
result: [],
process: [[]],
planDate: [[]],
worker: [[]],
colorCode: [[]],
realDate: [[]],
// waixie: [[]],
tableData1: [],
listLoading1: false,
total: 0, // 总条数
pageSize: 10,
pageCurrent: 1
@@ -215,9 +165,6 @@ export default {
if (response.data.total === 0) {
this.listLoading1 = false
} else {
// for (let i = 0; i < response.data.rows.length; i++) {
// response.data.rows[i].入库时间 = response.data.rows[i].入库时间.split(' ')[0]
// }
this.tableData1 = response.data.rows
this.total = response.data.total
this.listLoading1 = false

View File

@@ -115,11 +115,12 @@
</template>
<script>
import { searchtable, searchtable2, change, handlechange, searchtable3, change2 } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
import { searchtable, searchtable2, change, handlechange, searchtable3, change2, handlechange2 } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
import { mapGetters } from 'vuex'
export default {
data() {
return {
editTime: '',
bianliang1: [],
bianliang2: [],
num: 0,
@@ -179,20 +180,40 @@ export default {
备料到货: this.Data[i].备料到货,
工艺要求: response.data[0].工艺要求,
工序流水号: response.data[0].工序流水号,
重量: response.data[0].重量
重量: response.data[0].重量,
单价: 0
})
})
this.loading = false
}
})
},
zeroFill(i) {
if (i >= 0 && i <= 9) {
return '0' + i
} else {
return i
}
},
// 自家备料出库
handleChange1(row) {
change(row.工艺计划流水号, row.重量, row.单价).then(() => {
handlechange(row.工序流水号, '0000')
}).then(response => {
this.searchTable()
})
if (row.重量 === '' || row.重量 === null) {
this.$message.error('请输入重量')
} else if (row.单价 === '' || row.单价 === null) {
this.$message.error('请输入单价')
} else {
var date = new Date()
var month = this.zeroFill(date.getMonth() + 1)
var day = this.zeroFill(date.getDate())
this.editTime = date.getFullYear() + '-' + month + '-' + day
change(row.工艺计划流水号, row.重量, row.单价).then(() => {
handlechange(row.工序流水号, '0000').then(response => {
handlechange2(row.工序流水号, this.form.完成时间)
})
}).then(response => {
this.searchTable()
})
}
},
handleSelectionChange(val) {
this.arrest = val

View File

@@ -141,9 +141,9 @@
</el-table-column>
<el-table-column label="合同状态" align="center" width="100" fixed="left">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.离线合同状态)===1" type="warning" size="small">编辑中</el-tag>
<el-tag v-if="Number(scope.row.离线合同状态)===2&&Number(scope.row.总采购数量)!==Number(scope.row.总到货数量)" type="primary" size="small">已采购</el-tag>
<el-tag v-if="Number(scope.row.总采购数量)===Number(scope.row.总到货数量)&&Number(scope.row.总采购数量)!==0" type="success" size="small">全部到货</el-tag>
<el-tag v-if="editing(scope.row)" type="warning" size="small">编辑中</el-tag>
<el-tag v-if="purchasing(scope.row)" type="primary" size="small">已采购</el-tag>
<el-tag v-if="arrival(scope.row)" type="success" size="small">全部到货</el-tag>
</template>
</el-table-column>
<el-table-column label="离线合同编号" align="center" min-width="170">
@@ -596,6 +596,15 @@ export default {
this.searchTable2()
},
methods: {
editing(row) {
return Number(row.离线合同状态) === 1
},
purchasing(row) {
return Number(row.离线合同状态) === 2 && Number(row.总采购数量) !== Number(row.总到货数量)
},
arrival(row) {
return Number(row.总采购数量) === Number(row.总到货数量) && Number(row.总采购数量) !== 0
},
useqrcode(contractNum) {
const opts = {
errorCorrectionLevel: 'H',