This commit is contained in:
zhangdingyu
2019-06-03 13:38:03 +08:00
29 changed files with 998 additions and 95 deletions

View File

@@ -26,7 +26,7 @@
</el-card>
<el-card>
<h3 style="text-align: center;">总装调试</h3>
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="100px">
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="200px">
<el-table-column label="项目名称" align="center">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
@@ -150,7 +150,7 @@ export default {
},
searchTable1() {
this.tableData1 = []
if (this.machineNumberValue !== '') { this.check2 = 1 } else { this.check2 = 0 }
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
searchTable1(this.machineNumberValue, this.check2).then(response => {
this.tableData1 = response.data
console.log(response.data, 1111)
@@ -158,8 +158,8 @@ export default {
},
searchTable2() {
this.tableData2 = []
if (this.machineNumberValue !== '') { this.check2 = 1 } else { this.check2 = 0 }
if (this.groupNumberValue !== '') { this.check3 = 1 } else { this.check3 = 0 }
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check3 = 1 } else { this.check3 = 0 }
searchTable2(this.machineNumberValue, this.check2).then(response => {
console.log(response.data, 222)
this.tableData2 = response.data

View File

@@ -13,7 +13,6 @@
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<!--<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="selecttable">查询</el-button>-->
</el-row>
</el-card>
<el-card>
@@ -46,7 +45,7 @@
<el-table-column label="操作" align="center" width="250px" fixed="right">
<template slot-scope="scope">
<el-button v-if="scope.row.发货状态===null || scope.row.发货状态===0" type="success" size="small" @click="handlconfirm(scope.row)">确认发货</el-button>
<el-button v-else-if="scope.row.发货状态===1" type="danger" size="small"> 审批</el-button>
<el-button v-else-if="scope.row.发货状态===1" disabled="true" type="danger" size="small">待审批</el-button>
<el-button v-else type="info" size="small" >已审批</el-button>
</template>
</el-table-column>
@@ -89,7 +88,7 @@ export default {
},
selecttable() {
this.tableData1 = []
if (this.machineNumberValue !== '') { this.check2 = 1 } else { this.check2 = 0 }
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
selecttable(this.check2, this.machineNumberValue).then(response => {
this.tableData1 = response.data
console.log(response.data)

View File

@@ -31,7 +31,7 @@
</el-select>
<span>零件:</span>
<el-input v-model="SpareParts" filterable placeholder="请输入零件名称" style="width: 200px" size="small" clearable/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="selecttable()">查询</el-button>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="pageSize=10; pageCurrent= 1;selecttable()">查询</el-button>
</el-row>
</el-card>
<el-card>
@@ -56,7 +56,7 @@
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="零件号" align="center">
<el-table-column label="零件号" align="center">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
@@ -66,6 +66,11 @@
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="规格或材料" align="center">
<template slot-scope="scope">
{{ scope.row.规格或材料 }}
</template>
</el-table-column>
<el-table-column label="质检类型" align="center">
<template slot-scope="scope">
{{ scope.row.质检类型 }}
@@ -83,12 +88,17 @@
</el-table-column>
<el-table-column label="不合格原因" align="center">
<template slot-scope="scope">
{{ scope.row.不合格原因 }}
{{ scope.row.不合格原因文本 }}
</template>
</el-table-column>
<el-table-column label="处理结果" align="center">
<template slot-scope="scope">
{{ scope.row.处理结果 }}
{{ scope.row.不合格处理文本 }}
</template>
</el-table-column>
<el-table-column label="操作时间" align="center">
<template slot-scope="scope">
{{ scope.row.操作时间 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center">

View File

@@ -0,0 +1,125 @@
<template>
<div class="app-container">
<el-card>
<el-row>
<span>机床编号:</span>
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="selecttable()">
<el-option
v-for="item in machineNumber"
: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.name }}</div>
</el-option>
</el-select>
<!--<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="selecttable">查询</el-button>-->
</el-row>
</el-card>
<el-card>
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="600px">
<el-table-column label="项目名称" align="center">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床编号" align="center">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="机床名称" align="center">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
<el-table-column label="注意事项" align="center">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.注意事项" style="width:100px;margin-right:3px" size="mini" width="120"/>
</template>
<span v-else>{{ scope.row.注意事项 }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="250px" fixed="right">
<template slot-scope="scope">
<el-button v-if="!scope.row.edit && scope.row.发货状态===1" type="success" size="mini" icon="el-icon-circle-check-outline" @click="scope.row.edit=!scope.row.edit" >确认审批</el-button>
<el-button v-else-if="!scope.row.edit && scope.row.发货状态===2" disabled="true" type="danger" size="mini" icon="el-icon-circle-check-outline" >已审批</el-button>
<el-button v-if="scope.row.edit" class="cancel-btn" size="mini" type="primary" @click="confirmEdit(scope.row)">确认</el-button>
<el-button v-if="scope.row.edit" class="cancel-btn" size="mini" type="danger" @click="cancelEdit(scope.row)">取消</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
import { initProject, selecttable, updatestate } from '@/api/Assembly/ShipmentApproval'
// import { mapGetters } from 'vuex'
export default {
data() {
return {
machineNumberValue: '',
machineNumber: [],
groupNumberValue: '',
groupNumber: [],
tableData1: [],
tableData2: []
}
},
created() {
},
mounted() {
this.initProject()
},
methods: {
initProject() {
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
name: response.data[i].项目名称,
value: response.data[i].机床流水号
})
}
})
},
selecttable() {
this.tableData1 = []
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
selecttable(this.check2, this.machineNumberValue).then(response => {
response.data.map(v => {
this.$set(v, 'edit', false)
v.原注意事项 = v.注意事项
return v
})
this.tableData1 = response.data
this.edit = false
console.log(response.data)
})
},
cancelEdit(row) {
row.注意事项 = row.原注意事项
row.edit = false
this.$message('取消修改')
},
confirmEdit(row) {
updatestate(row.机床流水号, 2, row.注意事项).then(response => {
this.selecttable()
})
}
}
}
</script>
<style scoped>
</style>

View File

@@ -577,7 +577,7 @@ export default {
selectIntoList(basePartGroup, null, this.pickingListNum).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.multipleSelection = []
this.searchTable()
this.clickList()
} else { this.$message.error('操作失败') }
})
@@ -585,7 +585,7 @@ export default {
selectIntoList(null, purchasePartGroup, this.pickingListNum).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.multipleSelection = []
this.searchTable()
this.clickList()
} else { this.$message.error('操作失败') }
})

View File

@@ -0,0 +1,438 @@
<template>
<div class="app-container">
<el-card>
<div slot="header">
<span style="margin: 5px">领料单编号:</span>
<el-input v-model="pickingListNumber" clearable size="small" style="width:200px" />
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchList()">查询</el-button>
</div>
<h4 style="margin-top:0">领料单</h4>
<el-table :data="pickListTable1" highlight-current-row border style="width: 100%;" size="mini" height="300" @row-click="clickList">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="领料单编号" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.领料单编号 }}
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" min-width="200" >
<template slot-scope="scope">
{{ scope.row.操作日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="领料人" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="领料单备注" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.领料单备注 }}
</template>
</el-table-column>
<el-table-column label="领回确认" align="center" min-width="80">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否启用)===1" type="warning" size="small">未确认</el-tag>
<el-tag v-else type="success" size="small">已确认</el-tag>
</template>
</el-table-column>
</el-table>
<div class="block" style="float:right;margin: 10px 0;">
<el-pagination
:current-page="pageCurrent3"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize3"
:total="total3"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange3"
@current-change="handleCurrentChange3"/>
</div>
<h4>领料单明细{{ pickingListNumberShow }}</h4>
<el-table :data="pickListTable2" highlight-current-row border style="width: 100%;" size="mini" height="400" @row-click="clickListDetail">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.图号或型号 || '—' }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.规格 || '—' }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="总数量" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.总数量 }}
</template>
</el-table-column>
<el-table-column label="备件数量" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.备件数量 }}
</template>
</el-table-column>
<el-table-column label="已领数量" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.出库数量 }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<h4 style="margin-top:0">物料货位数量信息</h4>
<el-table :data="StockNumberTable" border style="width: 100%;" size="mini" height="300">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料名称 || scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料型号 || scope.row.零件图号 || '—' }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料规格 || scope.row.规格 || '—' }}
</template>
</el-table-column>
<el-table-column label="仓库名称" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="货位名称" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.货位名称 }}
</template>
</el-table-column>
<el-table-column label="货位存量" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.货位存量 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.机床图号 || '—' }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.组号 || '—' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200px">
<template slot-scope="scope" align="center">
<el-button size="mini" type="primary" @click="outStore(scope.row)">出库</el-button>
<el-button size="mini" type="warning" @click="errorRecord(scope.row)">异常记录</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog :visible.sync="dialogFormVisible1" title="物料出库" center width="380px">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left">
<el-form-item label="机床" prop="machineValue" label-width="100px">
<el-select v-model="form1.machineValue" :disabled="true" filterable size="small" placeholder="机床" style="width: 200px;margin-right:10px" @change="searchGroup()">
<el-option
v-for="item in machine"
: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">&nbsp;&nbsp;{{ item.name }}</div>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="分组" prop="groupNumValue" label-width="100px">
<el-select v-model="form1.groupNumValue" :disabled="true" filterable size="small" placeholder="分组" style="width: 200px;margin-right:10px">
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="出库数量" prop="outNumber" label-width="100px" size="small">
<el-input-number v-model="form1.outNumber" :min="0.01" :precision="2" size="small" placeholder="出库数量" style="width: 200px"/>
</el-form-item>
<el-form-item label="出库人" prop="personValue" label-width="100px">
<el-select v-model="form1.personValue" :disabled="true" size="small" style="width: 200px;margin-right:10px">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<!--<el-form-item label="领料人" prop="DirectNote" label-width="100px">-->
<!--<el-input v-model="form1.DirectNote" size="small" placeholder="请输入领料人" style="width: 200px"/>-->
<!--</el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible1=false">取消</el-button>
<el-button type="primary" @click="submitOutStore()">确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible2" title="异常记录" center width="380px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left">
<el-form-item label="异常数量" prop="errorNumber" label-width="100px" size="small">
<el-input v-model="form2.errorNumber" size="small" placeholder="异常数量" style="width: 200px"/>
</el-form-item>
<el-form-item label="异常原因" prop="reason" label-width="100px">
<el-input v-model="form2.reason" size="small" placeholder="异常原因" style="width: 200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible2=false">取消</el-button>
<el-button type="primary" @click="submitErrorRecord()"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { initPickPerson, initMachineProject, searchgroup, searchList, searchListDetail, searchStockNumber, submitOutStore } from '@/api/Inventory/MaterialOut'
import { mapGetters } from 'vuex'
export default {
name: 'MaterialOut',
data() {
return {
pickingListNumber: '',
pickingListNumberShow: '',
pickListTable1: [],
pageCurrent3: 1,
pageSize3: 20,
total3: 0,
pickListTable2: [],
StockNumberTable: [],
dialogFormVisible1: false,
dialogFormVisible2: false,
form1: {
machineValue: '',
groupNumValue: '',
outNumber: '',
personValue: '',
DirectNote: ''
},
form2: {
errorNumber: '',
reason: '',
物料流水号: '',
基本件流水号: '',
仓库流水号: '',
货位流水号: ''
},
rules1: {
machineValue: [{ required: true, message: '请选择' }],
groupNumValue: [{ required: true, message: '请选择' }],
outNumber: [{ required: true, message: '请输入' }],
personValue: [{ required: true, message: '请输入' }],
DirectNote: [{ required: true, message: '请输入' }]
},
rules2: {
errorNumber: [{ required: true, message: '请输入' }],
reason: [{ required: true, message: '请输入' }]
},
machine: [],
group: [],
person: [],
materialNum: '', // 中间变量
machineValue: '', // 中间变量
groupNumValue: '', // 中间变量
basePartNum: '', // 中间变量
parchasePartNum: '', // 中间变量
outNumber: 0 // 中间变量
}
},
computed: {
...mapGetters([
'id'
])
},
mounted() {
this.fetchData()
this.searchList()
},
methods: {
// 初始化数据
fetchData() {
this.person = []
initPickPerson().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.person.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
this.machine = []
initMachineProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machine.push({
label: response.data[i].机床图号,
name: response.data[i].项目名称,
value: response.data[i].机床流水号
})
}
})
},
// 查询组号
searchGroup() {
this.group = []
this.form1.groupNumValue = ''
searchgroup(this.form1.machineValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.group.push({
label: response.data[i].组号,
value: Number(response.data[i].组件流水号)
})
}
})
},
// 查询领料单列表
searchList() {
let check
this.pickingListNumber ? check = 1 : check = 0
searchList(this.pageCurrent3, this.pageSize3, check, this.pickingListNumber).then(response => {
this.pickListTable1 = response.data.rows
this.total3 = response.data.total
})
},
handleSizeChange3(val) {
this.pageSize3 = val
this.pageCurrent3 = 1
this.searchList()
},
handleCurrentChange3(val) {
this.pageCurrent3 = val
this.searchList()
},
// 查看领料单明细
clickList(row) {
row ? this.pickingListNum = row.领料单流水号 : this.pickingListNum
row ? this.pickingListNumberShow = row.领料单编号 : this.pickingListNumberShow
searchListDetail(this.pickingListNum).then(res => {
this.pickListTable2 = res.data
})
},
// 查看领料单明细相关的物料货位数量
clickListDetail(row) {
console.log(row)
row.基本件流水号 ? (this.basePartNum = row.基本件流水号, this.materialNum = '', this.parchasePartNum = '') : this.basePartNum
row.物料流水号 ? (this.materialNum = row.物料流水号, this.basePartNum = '') : this.materialNum
row.标准件和外购件流水号 ? (this.parchasePartNum = row.标准件和外购件流水号, this.basePartNum = '') : this.parchasePartNum
this.machineValue = row.机床流水号
this.groupNumValue = row.组件流水号
this.outNumber = row.总数量
if (this.materialNum) {
searchStockNumber(this.materialNum).then(res => {
this.StockNumberTable = res.data
})
} else if (this.basePartNum) {
console.log(this.basePartNum)
}
},
// 出库
outStore(row) {
console.log(this.form1.machineValue, this.form1.groupNumValue, row, this.id)
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
this.form1.machineValue = this.machineValue
this.group = []
this.form1.groupNumValue = ''
searchgroup(this.form1.machineValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.group.push({
label: response.data[i].组号,
value: Number(response.data[i].组件流水号)
})
}
}).then(() => {
this.form1.groupNumValue = this.groupNumValue
this.form1.outNumber = this.outNumber
this.form1.personValue = Number(this.id)
this.dialogFormVisible1 = true
})
},
// 提交出库
submitOutStore() {
this.$refs['form1'].validate((valid) => {
if (valid) {
// 出库数量,出库人,基本件流水号/标准件和外购件流水号 => 记录到一个新表
submitOutStore(this.form1.outNumber, this.form1.personValue, this.basePartNum, this.parchasePartNum).then(response => {
if (response.data[0].result === '1') {
this.$message.success('出库成功')
this.dialogFormVisible1 = false
this.clickListDetail()
this.clickList()
} else { this.$message.error('操作失败') }
})
} else {
return false
}
})
},
// 异常记录
errorRecord(row) {
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
this.form2.errorNumber = ''
this.form2.reason = ''
this.form2.物料流水号 = row.物料流水号
this.form2.基本件流水号 = row.基本件流水号
this.form2.仓库流水号 = row.仓库流水号
this.form2.货位流水号 = row.货位流水号
this.dialogFormVisible2 = true
},
// 提交异常记录
submitErrorRecord() {
this.$refs['form2'].validate((valid) => {
if (valid) {
console.log(this.form2.errorNumber, this.form2.reason, this.form2.物料流水号, this.form2.基本件流水号, this.form2.仓库流水号, this.form2.货位流水号)
this.dialogFormVisible2 = false
this.$message.success('记录成功')
} else {
return false
}
})
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.el-tag{
margin: 0
}
</style>

View File

@@ -93,75 +93,77 @@
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-card v-if="tableData2.length">
<el-card>
<div slot="header">
<el-button v-show="true" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">在制零件工艺调整</el-button>
</div>
<table class="tg">
<tr>
<td class="tg-x61c" colspan="4" rowspan="2">江苏高精</td>
<td class="tg-c3ow" colspan="2" rowspan="2">零件条码</td>
<td class="tg-c3ow" colspan="3">零件图号</td>
<td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].零件图号 : '' }}</td>
<td class="tg-c3ow">数量</td>
</tr>
<tr>
<td class="tg-c3ow" colspan="3">零件名称</td>
<td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].零件名称 : '' }}</td>
<td class="tg-c3ow" rowspan="3">{{ tableData2[0] ? tableData2[0].投产数量 : '' }}</td>
</tr>
<tr>
<td class="tg-c3ow" colspan="2">项目名称</td>
<td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].项目名称 : '' }}</td>
<td class="tg-c3ow" colspan="2" rowspan="2">{{ tableData2[0] ? 'P' + tableData2[0].工艺计划流水号 : '' }}</td>
<td class="tg-c3ow" colspan="3">机床</td>
<td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].机床图号 : '' }}</td>
</tr>
<tr>
<td class="tg-c3ow">材质</td>
<td class="tg-c3ow">{{ tableData2[0] ? tableData2[0].材料 : '' }}</td>
<td class="tg-c3ow">规格</td>
<td class="tg-c3ow">{{ tableData2[0] ? tableData2[0].原材料规格 : '' }}</td>
<td class="tg-c3ow" colspan="3">组号</td>
<td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].组号 : '' }}</td>
</tr>
<tr>
<td class="tg-c3ow">序次</td>
<td class="tg-c3ow">工艺名称</td>
<td class="tg-c3ow" colspan="3">工艺要求</td>
<td class="tg-c3ow">难度系数</td>
<td class="tg-c3ow">工作者</td>
<td class="tg-c3ow">单件</td>
<td class="tg-c3ow">准结</td>
<td class="tg-c3ow">检查结果</td>
<td class="tg-c3ow">计划完成日期</td>
<td class="tg-c3ow">工序条码</td>
</tr>
<tr v-for="(value,key) in tableData2" :id="key" :key="key">
<td class="tg-c3ow">{{ key + 1 }}</td>
<td class="tg-c3ow">{{ value.工艺名称 }}</td>
<td class="tg-c3ow" colspan="3">{{ value.工艺要求 }}</td>
<td class="tg-c3ow">{{ value.工艺难度等级 }}</td>
<td class="tg-c3ow"/>
<td class="tg-c3ow">{{ value.单件定额工时 }}</td>
<td class="tg-c3ow">{{ value.准结定额工时 }}</td>
<td class="tg-c3ow"/>
<td class="tg-c3ow">{{ value.计划日期 }}</td>
<td class="tg-c3ow">{{ value.工序流水号 }}</td>
</tr>
<tr>
<td class="tg-c3ow">工艺员</td>
<td class="tg-c3ow">{{ tableData2[0] ? tableData2[0].工艺员 : '' }}</td>
<td class="tg-c3ow">定额员</td>
<td class="tg-c3ow">{{ tableData2[0] ? tableData2[0].定额员 : '' }}</td>
<td class="tg-c3ow">工艺完成</td>
<td class="tg-c3ow">{{ tableData2[0].工艺实际完成时间 ? tableData2[0].工艺实际完成时间.split(' ')[0] : '' }}</td>
<td class="tg-c3ow">加工开始</td>
<td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].机加工开始时间 : '' }}</td>
<td class="tg-c3ow">加工结束</td>
<td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].机加工结束时间 : '' }}</td>
</tr>
</table>
<div v-if="tableData2.length">
<table class="tg">
<tr>
<td class="tg-x61c" colspan="4" rowspan="2">江苏高精</td>
<td class="tg-c3ow" colspan="2" rowspan="2">零件条码</td>
<td class="tg-c3ow" colspan="3">零件图号</td>
<td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].零件图号 : '' }}</td>
<td class="tg-c3ow">数量</td>
</tr>
<tr>
<td class="tg-c3ow" colspan="3">零件名称</td>
<td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].零件名称 : '' }}</td>
<td class="tg-c3ow" rowspan="3">{{ tableData2[0] ? tableData2[0].投产数量 : '' }}</td>
</tr>
<tr>
<td class="tg-c3ow" colspan="2">项目名称</td>
<td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].项目名称 : '' }}</td>
<td class="tg-c3ow" colspan="2" rowspan="2">{{ tableData2[0] ? 'P' + tableData2[0].工艺计划流水号 : '' }}</td>
<td class="tg-c3ow" colspan="3">机床</td>
<td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].机床图号 : '' }}</td>
</tr>
<tr>
<td class="tg-c3ow">材质</td>
<td class="tg-c3ow">{{ tableData2[0] ? tableData2[0].材料 : '' }}</td>
<td class="tg-c3ow">规格</td>
<td class="tg-c3ow">{{ tableData2[0] ? tableData2[0].原材料规格 : '' }}</td>
<td class="tg-c3ow" colspan="3">组号</td>
<td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].组号 : '' }}</td>
</tr>
<tr>
<td class="tg-c3ow">序次</td>
<td class="tg-c3ow">工艺名称</td>
<td class="tg-c3ow" colspan="3">工艺要求</td>
<td class="tg-c3ow">难度系数</td>
<td class="tg-c3ow">工作者</td>
<td class="tg-c3ow">单件</td>
<td class="tg-c3ow">准结</td>
<td class="tg-c3ow">检查结果</td>
<td class="tg-c3ow">计划完成日期</td>
<td class="tg-c3ow">工序条码</td>
</tr>
<tr v-for="(value,key) in tableData2" :id="key" :key="key">
<td class="tg-c3ow">{{ key + 1 }}</td>
<td class="tg-c3ow">{{ value.工艺名称 }}</td>
<td class="tg-c3ow" colspan="3">{{ value.工艺要求 }}</td>
<td class="tg-c3ow">{{ value.工艺难度等级 }}</td>
<td class="tg-c3ow"/>
<td class="tg-c3ow">{{ value.单件定额工时 }}</td>
<td class="tg-c3ow">{{ value.准结定额工时 }}</td>
<td class="tg-c3ow"/>
<td class="tg-c3ow">{{ value.计划日期 }}</td>
<td class="tg-c3ow">{{ value.工序流水号 }}</td>
</tr>
<tr>
<td class="tg-c3ow">工艺员</td>
<td class="tg-c3ow">{{ tableData2[0] ? tableData2[0].工艺员 : '' }}</td>
<td class="tg-c3ow">定额员</td>
<td class="tg-c3ow">{{ tableData2[0] ? tableData2[0].定额员 : '' }}</td>
<td class="tg-c3ow">工艺完成</td>
<td class="tg-c3ow">{{ tableData2[0].工艺实际完成时间 ? tableData2[0].工艺实际完成时间.split(' ')[0] : '' }}</td>
<td class="tg-c3ow">加工开始</td>
<td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].机加工开始时间 : '' }}</td>
<td class="tg-c3ow">加工结束</td>
<td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].机加工结束时间 : '' }}</td>
</tr>
</table>
</div>
</el-card>
</div>
</template>
@@ -173,6 +175,7 @@ import { initMachineProject, searchgroup, initPerson, search, searchtable1,
export default {
data() {
return {
partNumValue: '',
machineNumberValue: '',
machineNumber: [],
groupNumberValue: '',

View File

@@ -78,7 +78,7 @@
</el-table-column>
<el-table-column align="center" label="数量" width="60px">
<template slot-scope="scope">
{{ scope.row.投产总数量 }}
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="投产时间" width="130px">

View File

@@ -231,7 +231,11 @@ export default {
methods: {
// 导出
exportUninquirySheet3() {
if (this.machineNumberValue === null) {
this.machineNumberValue = ''
}
searchtable55(this.machineNumberValue).then(res1 => {
console.log(res1.data)
if (res1.data.length === 0) {
this.$message.error('请选择机床')
return

View File

@@ -476,7 +476,7 @@ export default {
return Number(prev)
}
}, 0)
sums[index] += ' 元(含税)'
sums[index] += ' 元(含税)'
} else {
sums[index] = 'N/A'
}
@@ -484,10 +484,10 @@ export default {
sums[index] = this.taxRate * 100 + '% (税率)'
return
} else if (index === 9) {
sums[index] = (parseInt(sums[7]) * 100 * this.taxRate) / 100 + ' 万元(税额)'
sums[index] = (parseFloat(sums[7]) - (parseFloat(sums[7]) / (1 + parseFloat(sums[8]) / 100)).toFixed(2)).toFixed(2) + ' 万元(税额)'
return
} else if (index === 10) {
sums[index] = parseFloat(sums[7]) - parseFloat(sums[9]) + ' 万元(未税)'
sums[index] = (parseFloat(sums[7]) / (1 + parseFloat(sums[8]) / 100)).toFixed(2) + ' 万元(未税)'
return
}
})

View File

@@ -214,7 +214,7 @@ export default {
fax2: '',
postCode2: '',
hasTax: '含税',
taxRate: 0.16,
taxRate: 0.13,
preview: false, // 预览
demoRadio: '', // 模板radio
content: ``, // 合同格式模板

View File

@@ -20,6 +20,7 @@
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="primary" size="small" @click="opendialogVisibleMachine()">上传总图</el-button>
</div>
<upload-excel-component @on-selected-file="selected"/>
</div>
@@ -44,6 +45,50 @@
<!--<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>-->
<!--<div slot="tip" class="el-upload__tip">只能上传jpg/png文件且不超过500kb</div>-->
<!--</el-upload>-->
<el-dialog
:visible.sync="dialogVisibleMachine"
width="30%">
<el-card>
<el-select v-model="machineDrawValue" clearable filterable size="small" placeholder="机床名称" @change="changeMachine">
<el-option
v-for="item in machineDraw"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<div style="float: right;">
<el-upload
:disabled="disabledMachine"
:action="action"
:on-success="uploadSuccess"
:on-error="uploadFailure"
:show-file-list="showFileList"
:file-list="fileList"
class="upload-demo"
multiple>
<el-button :disabled="disabledMachine" size="small" type="primary">点击上传</el-button>
</el-upload>
</div>
</el-card>
<el-card>
<div v-for="(file, key) in hadFile" :key="key">
<div class="wrapper">
<div class="content">
<div class="action">
<a class="delete" @click="deleteFileData(file.id)">删除</a>
</div>
<div v-if="file.suffix==='pdf'" class="icon"><svg-icon icon-class="pdf" /></div>
<div v-else-if="file.suffix==='docx'||file.suffix === 'doc'" class="icon"><svg-icon icon-class="doc" /></div>
<div v-else-if="file.suffix==='xlsx' || file.suffix === 'xls'" class="icon"><svg-icon icon-class="excel" /></div>
<div v-else-if="file.suffix==='pptx' || file.suffix === 'ppt'" class="icon"><svg-icon icon-class="ppt" /></div>
<div v-else-if="file.suffix==='jpg' || file.suffix === 'jpeg'|| file.suffix === 'png'" class="icon"><svg-icon icon-class="pic" /></div>
<div v-else class="icon"><svg-icon icon-class="file" /></div>
<a :href="file.url"><div class="info">{{ file.name }}</div></a>
</div>
</div>
</div>
</el-card>
</el-dialog>
</div>
</template>
@@ -51,13 +96,22 @@
import UploadExcelComponent from './UploadExcel/index.vue'
import specificationData from './specificationData'
import { sleep } from '../../../utils/tool'
import { initProject, isExit, isExit1, importBasics, importPurcharse, searchMachine, searchGroupNum } from '../../../api/TechnologyCenter/ImportParts'
import { initProject, isExit, isExit1, importBasics, importPurcharse, searchMachine, searchGroupNum, machineSelect, getFileData, deleteFileData } from '../../../api/TechnologyCenter/ImportParts'
import { uploadFileMachine, downloadFileMachine } from '@/utils/request'
export default {
name: 'UploadExcel',
components: { UploadExcelComponent, specificationData },
data() {
return {
fileList: [],
hadFile: [],
showFileList: true,
projectId: '',
action: '',
disabledMachine: true,
machineDrawValue: '',
machineDraw: [],
dialogVisibleMachine: false,
project: [],
projectValue: '',
worksheet: [],
@@ -108,6 +162,57 @@ export default {
this.fetchData()
},
methods: {
opendialogVisibleMachine() {
this.machineDraw = []
this.machineDrawValue = ''
this.dialogVisibleMachine = true
this.machineDrawValue === '' ? this.disabledMachine = true : this.disabledMachine = false
this.getSelect(machineSelect, ['机床图号', '机床流水号'], 'machineDraw', this.projectValue)
},
changeMachine() {
this.machineDrawValue === '' ? this.disabledMachine = true : this.disabledMachine = false
this.action = `${uploadFileMachine}?&MachineNum=${this.machineDrawValue}`
this.getFileData(this.machineDrawValue)
console.log(this.action)
},
uploadSuccess(res, file, fileList) {
if (res[0].result === '1') {
const index = fileList.indexOf(file)
fileList.splice(index, 1)
} else {
this.$message.error(`${file.name}文件上传失败,请检查上传文件是否正确!`)
}
if (fileList.length === 0) {
this.$message.success('文件上传成功')
this.getFileData(this.machineDrawValue)
}
},
uploadFailure(a, file, fileList) {
fileList.map(file => {
this.$message.error(`${file.name}文件上传失败,请检查上传文件是否正确!`)
})
},
// 在什么情况下需要查询上传的附件调用this.getFileData()即可根据
getFileData(machineDrawValue) {
console.log(machineDrawValue, 88)
this.hadFile = []
getFileData(machineDrawValue).then(res => {
console.log(res)
if (res.data.length > 0) {
res.data.map(item => {
this.hadFile.push({
url: `${downloadFileMachine}?id=${item.文件标识}.${item.文件后缀}&name=${item.文件名称}.${item.文件后缀}`,
name: `${item.文件名称}.${item.文件后缀}`,
suffix: item.文件后缀,
id: item.文件标识
})
})
}
})
},
deleteFileData(id) {
this.deleteRow(deleteFileData, id, function() { this.getFileData(this.machineDrawValue) })
},
async test() {
await sleep(10000)
console.log(1)
@@ -339,8 +444,52 @@ export default {
}
</script>
<style lang="scss" scoped>
/*.wrapper{*/
/*width: 100%;*/
/*margin: 0 auto;*/
/*}*/
.wrapper{
width: 100%;
margin: 0 auto;
width: 225px;
height: 50px;
overflow: hidden;
border: 1px solid #b8c7d9;
float: left;
margin: 10px;
}
</style>
.content{
position: relative;
padding: 8px 8px 0 8px;
}
.action{
position: absolute;
top: 4px;
right: 8px;
}
.delete{
padding: 0 5px;
border-radius: 3px;
color: #0f84b0;
font-size: 12px;
}
.delete:hover{
background: -webkit-linear-gradient(top,#0ba9e3,#0099d3);
color: #fff;
}
a{
text-decoration: none;
}
.icon{
width: 30px;
height: 30px;
display: inline-block;
margin-right: 7px;
margin-top: 2px;
font-size: 26px;
}
.info{
position: absolute;
left: 44px;
line-height: 30px;
display: inline-block;
color: #999;
}</style>

View File

@@ -13,8 +13,8 @@
主页
</el-dropdown-item>
</router-link>
<el-dropdown-item divided>
<span style="display:block;" @click="logout">退出</span>
<el-dropdown-item divided @click.native="logout">
<span style="display:block;">退出</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>

View File

@@ -7,6 +7,7 @@
</router-link>
</scroll-pane>
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
<li @click="refreshSelectedTag(selectedTag)">重新加载</li>
<li @click="closeSelectedTag(selectedTag)">关闭当前</li>
<li @click="closeOthersTags">关闭其他</li>
<li @click="closeAllTags">关闭全部</li>
@@ -20,6 +21,7 @@ import Cookies from 'js-cookie'
export default {
components: { ScrollPane },
inject: ['reload'],
data() {
return {
visible: false,
@@ -78,6 +80,11 @@ export default {
}
})
},
refreshSelectedTag() {
this.$nextTick(() => {
this.reload() // 2019.6.2 cjn
})
},
closeSelectedTag(view) {
this.$store.dispatch('delVisitedViews', view).then((views) => {
if (this.isActive(view)) {