This commit is contained in:
liushuai
2020-06-08 17:57:49 +08:00
parent 6966adb952
commit fa5f12d664
16 changed files with 679 additions and 87 deletions

View File

@@ -0,0 +1,347 @@
<template>
<div class="app-container">
<el-card style="width: 91%">
<el-row style="margin-top: 10px; margin-bottom: 10px">
<span>机床编号:</span>
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="searchTable()">
<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>
<span>机床数量{{ machineNum }}</span>
<el-button size="small" icon="el-icon-circle-plus-outline" type="distribution" style="margin-left: 300px" @click="addTaskName()">增加装配任务</el-button>
<el-button type="danger" plain size="small" icon="el-icon-delete" style="margin-left: 300px" @click="deleteData()">删除</el-button>
</el-row>
</el-card>
<el-card style="width: 52%; float: left">
<el-table v-loading="loading" :data="tableData" border stripe size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="720px">
<el-table-column label="机床组号" align="center" width="140px">
<template slot-scope="scope">
{{ scope.row.机床组号 }}
</template>
</el-table-column>
<el-table-column label="部件名称" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.部件名称 }}
</template>
</el-table-column>
<el-table-column label="部件数" align="center" width="65px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.部件数 }}
</template>
</el-table-column>
<!--<el-table-column label="总数量" align="center" width="65px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.机床数量 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="自制件入库" align="center" width="95px">
<template slot-scope="scope">
{{ scope.row.自制件入库率 }}
</template>
</el-table-column>
<el-table-column label="外购件入库" align="center" width="95px">
<template slot-scope="scope">
{{ scope.row.外购件入库率 }}
</template>
</el-table-column>
<el-table-column label="成组配套" align="center" width="90px">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="openDialog(scope.row)">查看详情</el-button>
</template>
</el-table-column>
<el-table-column label="分配时间" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.分配时间 ? scope.row.分配时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="90px">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="openPeople(scope.row)">分配</el-button>
<el-button type="text" icon="el-icon-delete" size="mini" @click="deleteData(scope.row)"/>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card style="width: 38%; float: left">
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="720px">
<el-table-column label="状态" align="center" width="90px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-select v-model="scope.row.组件流水号" filterable clearable size="small" style="width: 100px" @change="groupChange(scope.row, scope.$index)">
<el-option
v-for="item in groupNum"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</template>
<template v-else>
{{ scope.row.组号 }}
</template>
</template>
</el-table-column>
<el-table-column label="部件" align="center" width="120px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.任务名称" size="mini" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.任务名称 }}
</template>
</template>
</el-table-column>
<el-table-column label="装配人" align="center" width="70px" prop="计划工时">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.计划工时" size="mini" style="width: 100%" props="" @input="filterNuber(scope.row.计划工时, scope.$index, '计划工时')"/>
</template>
<template v-else>
{{ scope.row.计划工时 }}
</template>
</template>
</el-table-column>
<el-table-column label="装配开始" align="center" width="110px">
<template slot-scope="scope">
{{ scope.row.机床装配完成时间 ? scope.row.机床装配完成时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="装配暂停" align="center" width="110px">
<template slot-scope="scope">
{{ scope.row.机床装配完成时间 ? scope.row.机床装配完成时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="装配结束" align="center" width="110px">
<template slot-scope="scope">
{{ scope.row.机床装配完成时间 ? scope.row.机床装配完成时间.split(' ')[0] : '' }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog
v-el-drag-dialog
:visible.sync="dialogFormVisible"
title="零件完成情况"
width="40%">
<div style="margin: 10px 0 0 20px;height: 650px;overflow: auto">
<el-tree
:data="departmentData"
:indent="50"
:expand-on-click-node="false"
:render-content="renderContent"
node-key="机床流水号"
class="selectTree"/>
</div>
</el-dialog>
<el-dialog
v-el-drag-dialog
:visible.sync="dialogFormVisible1"
title="装配任务"
center
width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="120px">
<el-form-item label="任务名称" prop="任务名称">
<el-input v-model="form.任务名称" size="small" style="width: 150px;"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button
:disabled="addPurchaseOrder_disable"
type="primary"
size="small"
icon="el-icon-check"
@click="submitTaskName">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>import { initProject, searchTable, getMachineNames, selectParts, addData, deletedata } from '@/api/Assembly/AssemblyTaskAssignment'
// import { mapGetters } from 'vuex'
export default {
data() {
return {
machineNumberValue: '',
machineNumber: [],
machineNum: '',
dialogFormVisible: false,
dialogFormVisible1: false,
groupNumberValue: '',
groupNum: [],
loading: false,
tableData: [],
tableData2: [],
hadFile: [],
option: [],
plan: '',
addPurchaseOrder_disable: false,
form: {
任务名称: ''
},
rules: {
任务名称: [{ required: true, message: '请填写任务名称' }]
},
departmentData: [] // 树状数据
}
},
// created() {
// this.searchTable1()
// },
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].机床流水号
})
}
})
},
searchTable() {
this.loading = true
getMachineNames(this.machineNumberValue).then(response => {
this.machineNum = response.data[0].机床数量
})
searchTable(this.machineNumberValue).then(response => {
this.tableData = response.data
}).then(() => {
this.loading = false
})
},
renderContent(h, { node, data, store }) {
console.log(node, 11111)
if (node.data.零件类型 === 1) { // 自制
if (parseInt(node.data.考核状态) > 6) {
return (<span class='treeNotesComplate'>{node.label}</span>)
} else {
return (<span class='treeNotesUnComplate'>{node.label}</span>)
}
} else { // 外购
if (node.data.采购状态 === '已完成') {
return (<span class='treeNotesComplate'>{node.label}</span>)
} else {
return (<span class='treeNotesUnComplate'>{node.label}</span>)
}
}
},
openDialog(row) {
this.dialogFormVisible = true
this.departmentData = []
selectParts(1, row.组件流水号, 0, 0).then(response => {
for (let j = 0; j < response.data.length; j++) {
this.departmentData.push({
label: (response.data[j].零件图号 ? response.data[j].零件图号 : '无零件图号') + '\xa0\xa0\xa0\xa0\xa0\xa0' + (response.data[j].规格 ? response.data[j].规格 : '') + '\xa0\xa0\xa0\xa0\xa0\xa0' + (response.data[j].投产总数量 ? response.data[j].投产总数量 : '') + '..........' + (response.data[j].零件名称 ? response.data[j].零件名称 : '无零件名称') + (response.data[j].零件类型 === 1 ? '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0自制' + response.data[j].考核状态名称 : (response.data[j].零件类型 === 2 ? '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0制造采购' : '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0外购' + response.data[j].采购状态)),
value: response.data[j].工艺计划流水号,
考核状态: response.data[j].考核状态,
采购状态: response.data[j].采购状态,
零件类型: response.data[j].零件类型
})
}
})
},
openPeople(row) {},
addTaskName() {
if (this.$refs['form'] !== undefined) {
this.$refs['form'].resetFields()
}
this.form.任务名称 = ''
this.addPurchaseOrder_disable = false
this.dialogFormVisible1 = true
},
submitTaskName() {
if (this.machineNumberValue) {
this.$refs['form'].validate((valid) => {
if (valid) {
this.addPurchaseOrder_disable = true
addData(this.machineNumberValue, this.form.任务名称, 1).then(response => {
if (response.data[0].result === '1') {
this.$message.success('新建装配任务成功')
this.searchTable()
this.dialogFormVisible1 = false
} else { this.$message.error('新建装配任务失败') }
})
} else {
return false
}
})
} else {
this.$message.warning('请先选择机床')
}
},
deleteData(row) {
this.$confirm('确认删除该装配任务', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deletedata(row.计划流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchTable()
} else { this.$message.error('删除失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}
}
}
</script>
<style>
.el-table .cjzuwcqk_complet {
background: #9bd7fc !important;
}
</style>
<style lang="scss">
.selectTree{
.el-tree-node__content>.el-tree-node__expand-icon{
display: inline !important;
}
.el-tree-node:focus > .el-tree-node__content {
background-color: #ccc !important;
}
}
.treeNotesComplate {
color: black;
background-color: #9bd7fc !important;
}
.treeNotesUnComplate {
color: black;
}
</style>
<style scoped>
.el-form--label-left >>> .el-form-item__label {
text-align: right;
}
>>>.el-dialog--center .el-dialog__body {
text-align: initial;
padding: 20px 30px 20px
}
>>>.el-dialog__header {
padding: 20px 20px 0px;
}
>>>.el-dialog__footer {
padding: 0px 20px 20px;
/*text-align: right;*/
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
>>>.el-form-item {
margin-bottom: 13px;
}
</style>

View File

@@ -22,9 +22,9 @@
<el-button size="small" type="primary" icon="el-icon-search" style="margin: 0 0 0 10px" plain @click="searchList()">查询</el-button>
<el-button :disabled="审批未通过===true" size="small" style="margin-left: 100px" type="distribution" @click="inputPassword()">领料确认</el-button>
</div>
<div style="width: 25%;float: left;margin-right: 10px">
<div style="width: 26%;float: left;margin-right: 10px">
<el-card>
<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 :data="pickListTable1" :row-class-name="tableRowClassName" class="shenpi" highlight-current-row border size="mini" width="100%" height="585px" @row-click="clickList">
<el-table-column prop="领料单编号" label="领料单编号" show-overflow-tooltip align="center" width="95px">
<template slot-scope="scope">
{{ scope.row.领料单编号 }}
@@ -57,7 +57,7 @@
<el-card>
<el-table :data="pickListTable2" :row-class-name="tableRowClassName1" highlight-current-row border style="width: 1000px" size="mini" height="600" @selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" align="center" width="45"/>
<el-table-column label="名称" show-overflow-tooltip prop="名称" align="center" width="90">
<el-table-column label="名称" show-overflow-tooltip prop="名称" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
@@ -105,7 +105,7 @@
<!-- <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" width="80" show-overflow-tooltip>
<el-table-column label="机床图号" prop="机床图号" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>

View File

@@ -183,7 +183,7 @@ export default {
type: '3',
name: `select distinct 供应商流水号,供应商名称 from (
select 供应商流水号,供应商名称,sum(数量) as 总采购数量,sum(已到货数量) as 总到货数量
from 库存管理_外购件_采购合同明细_视图 where 是否启用 = 1
from 库存管理_外购件_采购合同明细_视图 where 是否启用 = 1 and 审批情况流水号 = 1
group by 采购合同流水号,供应商流水号,供应商名称
having sum(数量) > sum(已到货数量)
) as 已采购的离线合同`

View File

@@ -832,17 +832,24 @@ export default {
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.totalNum = 0
this.loading = true
var check
this.Machine ? this.check1 = 1 : this.check1 = 0
this.Group ? this.check2 = 1 : this.check2 = 0
searchTable(this.check1, this.Machine, this.check2, this.Group, this.pageCurrent, this.pageSize).then(response => {
this.materialName ? check = 1 : check = 0
searchTable(this.check1, this.Machine, this.check2, this.Group, check, this.materialName, this.order, this.pageCurrent, this.pageSize).then(response => {
for (let i = 0; i < response.data.result.length; i++) {
if (response.data.result[i].入库时间) {
response.data.result[i].入库时间 = response.data.result[i].入库时间.split(' ', 2)[0]
this.totalNum += 1
}
if (response.data.result[i].计划完成时间) {
response.data.result[i].计划完成时间 = response.data.result[i].计划完成时间.split(' ', 2)[0]
}
if (response.data.result[i].机加工实际完成时间) {
response.data.result[i].机加工实际完成时间 = response.data.result[i].机加工实际完成时间.split(' ', 2)[0]
}
}
this.tableData = response.data.result
this.total = parseInt(response.data.output[0].ItemCount)
@@ -851,17 +858,24 @@ export default {
},
handleCurrentChange(val) {
this.pageCurrent = val
this.totalNum = 0
this.loading = true
var check
this.Machine ? this.check1 = 1 : this.check1 = 0
this.Group ? this.check2 = 1 : this.check2 = 0
searchTable(this.check1, this.Machine, this.check2, this.Group, this.pageCurrent, this.pageSize).then(response => {
this.materialName ? check = 1 : check = 0
searchTable(this.check1, this.Machine, this.check2, this.Group, check, this.materialName, this.order, this.pageCurrent, this.pageSize).then(response => {
for (let i = 0; i < response.data.result.length; i++) {
if (response.data.result[i].入库时间) {
response.data.result[i].入库时间 = response.data.result[i].入库时间.split(' ', 2)[0]
this.totalNum += 1
}
if (response.data.result[i].计划完成时间) {
response.data.result[i].计划完成时间 = response.data.result[i].计划完成时间.split(' ', 2)[0]
}
if (response.data.result[i].机加工实际完成时间) {
response.data.result[i].机加工实际完成时间 = response.data.result[i].机加工实际完成时间.split(' ', 2)[0]
}
}
this.tableData = response.data.result
this.total = parseInt(response.data.output[0].ItemCount)

View File

@@ -1,7 +1,7 @@
<template>
<div class="app-container">
<el-card>
<el-select v-model="machineValue" placeholder="机床图号" style="width: 150px" filterable size="small">
<el-select v-model="machineValue" placeholder="机床图号" style="width: 150px" clearable filterable size="small" @clear="clearmachineValue">
<el-option
v-for="item in machine"
:key="item.value"
@@ -16,10 +16,27 @@
:value="item.value"/>
</el-select>
<el-input v-model="ModelValue" placeholder="名称规格型号" style="width: 180px" size="small" clearable/>
<el-select v-model="assignmentTypeValue" filterable placeholder="分配类型" size="small" style="width: 100px;margin-left: 10px" clearable>
<el-option
v-for="item in assignmentType"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-date-picker
v-model="outTime"
type="daterange"
size="small"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
range-separator="~"
style="width:240px;margin-left: 0px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button icon="el-icon-search" type="primary" plain size="small" style="margin-left:10px" @click="getTableData()">查询</el-button>
<!-- <el-tooltip :open-delay="1000" effect="dark" content="导出查询数据" placement="top">
<el-tooltip :open-delay="1000" effect="dark" content="导出查询数据" placement="top">
<el-button v-positive="'loading'" type="warning" size="small" icon="el-icon-download" plain style="margin-left:10px" @click="exportExcel()">导出</el-button>
</el-tooltip> -->
</el-tooltip>
</el-card>
<!-- <el-card>
<div v-for="(file, key) in hadFile" :key="key">
@@ -326,15 +343,32 @@
</template>
<script>
import { machineSelect, groupSelect, basicPartsData, deleteBasicParts, deletePurchaseData, getFileData, searchModel } from '@/api/ManufacturingCenter/MaterialAllocation'
import { machineSelect, groupSelect, basicPartsData, deleteBasicParts, deletePurchaseData, searchModel } from '@/api/ManufacturingCenter/MaterialAllocation'
import { mapGetters } from 'vuex'
import { ServerIP } from '@/utils/request'
// import { ServerIP } from '@/utils/request'
export default {
name: 'Index',
data() {
return {
orderName: 1,
order: 1,
assignmentTypeValue: '',
assignmentType: [
{
value: '未分配',
label: '未分配'
}, {
value: '采购部',
label: '采购部'
}, {
value: '车间生产',
label: '车间生产'
}, {
value: '制造部',
label: '制造部'
}
],
outTime: '',
orderName: 0,
order: 0,
distribution: 0,
completionRate: 0,
machineValue: '',
@@ -372,6 +406,11 @@ export default {
}
},
watch: {
assignmentTypeValue(val) {
if (val) {
this.getTableData()
}
},
machineValue(val) {
this.groupValue = ''
this.group = []
@@ -398,6 +437,12 @@ export default {
this.fetchData()
},
methods: {
clearmachineValue() {
this.machineValue = ''
this.machine = []
this.group = []
this.groupValue = ''
},
sortChange(column, prop, order) {
console.log(column, column.prop, column.order, 11111)
if (column.prop === '分配') {
@@ -419,6 +464,9 @@ export default {
const machine_check = this.machineValue ? 1 : 0
const group_check = this.groupValue ? 1 : 0
const Model_check = this.ModelValue ? 1 : 0
const assignmentTypeValue_check = this.assignmentTypeValue ? 1 : 0
let check_time
this.outTime ? check_time = 1 : (check_time = 0, this.outTime = '')
var param = []
param[0] = ['机床流水号_check', machine_check]
param[1] = ['机床流水号', this.machineValue]
@@ -426,44 +474,17 @@ export default {
param[3] = ['组件流水号', this.groupValue]
param[4] = ['规格_check', Model_check]
param[5] = ['规格', this.ModelValue]
var Data = this.CreateData('2001', '报表_零件分配查询_自制件_查询', param)
param[6] = ['排序名称', this.orderName]
param[7] = ['排序顺序', this.order]
param[8] = ['分配类型_check', assignmentTypeValue_check]
param[9] = ['分配类型', this.assignmentTypeValue]
param[10] = ['分配时间_check', check_time]
param[11] = ['分配开始时间', this.outTime[0]]
param[12] = ['分配结束时间', this.outTime[1]]
var Data = this.CreateData('2001', '报表_零件分配查询_查询', param)
this.exportExcel_NPOI(Data)
}
},
exportExcel2() {
if (this.tableDataWB.length === 0) {
this.$message.warning('请先查询要导出的数据')
} else {
const machine_check = this.machineValue ? 1 : 0
const group_check = this.groupValue ? 1 : 0
const Model_check = this.ModelValue ? 1 : 0
var param = []
param[0] = ['机床流水号_check', machine_check]
param[1] = ['机床流水号', this.machineValue]
param[2] = ['组件流水号_check', group_check]
param[3] = ['组件流水号', this.groupValue]
param[4] = ['规格_check', Model_check]
param[5] = ['规格', this.ModelValue]
var Data = this.CreateData('2001', '报表_零件分配查询_标准件和外购件_查询', param)
this.exportExcel_NPOI(Data)
}
},
// 在什么情况下需要查询上传的附件调用this.getFileData()即可根据
getFileData(machineValue) {
this.hadFile = []
getFileData(machineValue).then(res => {
if (res.data.length > 0) {
res.data.map(item => {
this.hadFile.push({
url: `${ServerIP}${item.文件标识}.${item.文件后缀}`,
name: `${item.文件名称}.${item.文件后缀}`,
suffix: item.文件后缀,
id: item.文件标识
})
})
}
})
},
fetchData() {
this.getSelect(machineSelect, ['机床图号', '机床流水号'], 'machine')
},
@@ -486,14 +507,16 @@ export default {
},
getTableData() {
// this.getFileData(this.machineValue)
if (this.machineValue) {
if (this.machineValue || this.outTime) {
const machine_check = this.machineValue ? 1 : 0
const group_check = this.groupValue ? 1 : 0
const Model_check = this.ModelValue ? 1 : 0
const assignmentTypeValue_check = this.assignmentTypeValue ? 1 : 0
let check_time
this.outTime ? check_time = 1 : (check_time = 0, this.outTime = '')
this.loading = true
basicPartsData(machine_check, this.machineValue, group_check, this.groupValue, Model_check, this.ModelValue, this.orderName, this.order).then(response => {
basicPartsData(machine_check, this.machineValue, group_check, this.groupValue, Model_check, this.ModelValue, this.orderName, this.order, assignmentTypeValue_check, this.assignmentTypeValue, check_time, this.outTime[0], this.outTime[1]).then(response => {
this.loading = false
console.log(response, 7777777777)
const res = response.data
this.distribution = 0
this.completionRate = ''
@@ -516,26 +539,6 @@ export default {
} else {
this.$message.warning('请输入查询条件')
}
// this.loadingWB = true
// const machine_check = this.machineValue ? 1 : 0
// const group_check = this.groupValue ? 1 : 0
// const Model_check = this.ModelValue ? 1 : 0
// purchasePartsData(machine_check, this.machineValue, group_check, this.groupValue, Model_check, this.ModelValue, this.pageSizeWB, this.pageCurrentWB).then(response => {
// this.loadingWB = false
// const data = response.data
// this.totalWB = data.total
// this.tableDataWB = data.rows.map(item => {
// if (item.整改类型 === '1') {
// item.整改类型 = '新增'
// } else if (item.整改类型 === '2') {
// item.整改类型 = '替换'
// } else if (item.整改类型 === '3') {
// item.整改类型 = '补充加工'
// }
// item.零件类型 = item.零件类型 === '2' ? '外购件' : '标准件'
// return item
// })
// })
},
openUrgentItem() {
if (this.$refs['form'] !== undefined) {

View File

@@ -27,6 +27,9 @@
<el-badge :value="value" :max="99" class="item">
<el-button size="small" type="text" @click="PartCallbackInformation;dialogFormVisible1 = true">基本件打回信息</el-button>
</el-badge>
<el-badge :value="unallocatedQuantity" :max="99" class="item">
<el-button size="small" type="text" @click="hreftwo">今日未分配零件信息</el-button>
</el-badge>
</el-row>
</el-card>
<el-tabs type="border-card" @tab-click="selectPart">
@@ -496,7 +499,7 @@
</template>
<script>
import { inPart, searchBillNumber, DeliveryTimeSelect, initProject, searchgroup, searchTable, searchPart, searchPart1, searchTable1, addData, editData, deleteData, searchDetailed1, purchaseRequisition, purchaseRequisition1, purchaseRequisition2, MoveOut, MoveOut1, PurchasingDepartment, Production, PartCallbackInformation, PartCallbackInformation1, Delete, Delete1, editStock, editNum, OutPart, PurchasingDepartmentBack, purchaseRequisition2Back } from '@/api/ManufacturingCenter/PartAssignment'
import { getunallocated, inPart, searchBillNumber, DeliveryTimeSelect, initProject, searchgroup, searchTable, searchPart, searchPart1, searchTable1, addData, editData, deleteData, searchDetailed1, purchaseRequisition, purchaseRequisition1, purchaseRequisition2, MoveOut, MoveOut1, PurchasingDepartment, Production, PartCallbackInformation, PartCallbackInformation1, Delete, Delete1, editStock, editNum, OutPart, PurchasingDepartmentBack, purchaseRequisition2Back } from '@/api/ManufacturingCenter/PartAssignment'
import { mapGetters } from 'vuex'
import { getNowShotTime } from '@/utils/tool'
import Cookie from 'js-cookie'
@@ -505,6 +508,7 @@ export default {
inject: ['reload'],
data() {
return {
unallocatedQuantity: 0,
purchaseRequisition_loading: false,
Production_loading: false,
PurchasingDepartment_loading: false,
@@ -631,8 +635,17 @@ export default {
this.fetchData()
this.PartCallbackInformation()
this.PartCallbackInformation1()
this.getUnallocated()
},
methods: {
hreftwo() {
this.$router.push({ path: '/ManufacturingCenter/MaterialAllocation' })
},
getUnallocated() {
getunallocated().then(response => {
this.unallocatedQuantity = response.data[0].未分配数量
})
},
// EXCEL 导出
// 姜福壮
exportExcel() {

View File

@@ -116,11 +116,16 @@
{{ scope.row.未付款原因 === '通过' ? '' : scope.row.未付款原因 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="90px" fixed="right">
<el-table-column label="操作" align="center" width="110px" fixed="right">
<template slot-scope="scope">
<el-tooltip :open-delay="1000" effect="dark" content="查看详情" placement="top">
<div style="display: inline-block;">
<el-button style=" margin-right: 20px" type="text" size="mini" @click="searchTable2(scope.row)">详情</el-button>
</div>
</el-tooltip>
<el-tooltip :open-delay="1000" effect="dark" content="撤回审核" placement="top">
<div style="display: inline-block">
<el-button type="text" size="mini" @click="searchTable2(scope.row)">详情</el-button>
<el-button type="text" size="mini" @click="repeal(scope.row)">撤回</el-button>
</div>
</el-tooltip>
</template>
@@ -172,7 +177,7 @@
</template>
<script>
import { initBuyer, searchTable1, searchTable2, searchSupplier } from '@/api/ManufacturingCenter/RequestApprovalQuery'
import { repeal, initBuyer, searchTable1, searchTable2, searchSupplier } from '@/api/ManufacturingCenter/RequestApprovalQuery'
import { mapGetters } from 'vuex'
export default {
@@ -199,6 +204,7 @@ export default {
'sidebar',
'avatar',
'name',
'token',
'id' // 人员编号
])
},
@@ -208,6 +214,20 @@ export default {
this.searchSupplier()
},
methods: {
repeal(row) {
if (row.审批情况流水号 !== '3') {
this.$message.error('请款信息已审批,无法撤回!')
} else {
repeal(row.采购合同请款流水号, 0).then(response => {
if (response.data[0].result === '1') {
this.$message.success('审核撤销成功')
this.searchTable1()
} else {
this.$message.error('审核撤销失败')
}
})
}
},
searchSupplier() {
this.supplier = []
searchSupplier().then(response => {

View File

@@ -68,7 +68,7 @@
</el-table-column>
<el-table-column label="未过原因" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.未通过审核原因 }}
{{ scope.row.未通过审核原因 === '通过' ? '' : scope.row.未通过审核原因 }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="60">
@@ -88,7 +88,7 @@
</el-table-column>
<el-table-column label="未过原因" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.未通过审批原因 }}
{{ scope.row.未通过审批原因 === '通过' ? '' : scope.row.未通过审批原因 }}
</template>
</el-table-column>
<el-table-column label="付款人" align="center" min-width="60">
@@ -106,13 +106,18 @@
{{ scope.row.未付款原因 === '通过' ? '' : scope.row.未付款原因 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="90px" fixed="right">
<el-table-column label="操作" align="center" width="110px" fixed="right">
<template slot-scope="scope">
<el-tooltip :open-delay="1000" effect="dark" content="查看详情" placement="top">
<div style="display: inline-block">
<el-button type="text" size="mini" @click="searchTable2(scope.row)">详情</el-button>
</div>
</el-tooltip>
<el-tooltip :open-delay="1000" effect="dark" content="撤回审核" placement="top">
<div style="display: inline-block">
<el-button type="text" size="mini" @click="repeal(scope.row)">撤回</el-button>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
@@ -157,7 +162,7 @@
</template>
<script>
import { initBuyer, searchTable1, searchTable2, searchSupplier } from '@/api/ManufacturingCenter/RequestApprovalQuery1'
import { repeal, initBuyer, searchTable1, searchTable2, searchSupplier } from '@/api/ManufacturingCenter/RequestApprovalQuery1'
import { mapGetters } from 'vuex'
export default {
@@ -176,7 +181,9 @@ export default {
tableData1: [],
loading1: false,
dialogFormVisible: false,
gridData1: []
gridData1: [],
role: '',
jinyong: ''
}
},
computed: {
@@ -184,6 +191,7 @@ export default {
'sidebar',
'avatar',
'name',
'token',
'id' // 人员编号
])
},
@@ -193,6 +201,34 @@ export default {
this.searchSupplier()
},
methods: {
repeal(row) {
console.log(this.token, 'token')
if (this.token === 4) {
this.role = 1
if (row.付款情况流水号 !== '3') {
this.$message('财务已付款,无法撤销!')
} else {
repeal(row.采购合同请款流水号, this.role).then(response => {
if (response.data[0].result === '1') {
this.$message.success('审核撤销成功')
this.searchTable1()
} else {
this.$message.error('审核撤销失败')
}
})
}
} else if (this.token === 18) {
this.role = 2
repeal(row.采购合同请款流水号, this.role).then(response => {
if (response.data[0].result === '1') {
this.$message.success('审核撤销成功')
this.searchTable1()
} else {
this.$message.error('审核撤销失败')
}
})
}
},
searchSupplier() {
this.supplier = []
searchSupplier().then(response => {

View File

@@ -157,7 +157,7 @@
<!-- <h4 style="margin-top: 5px;margin-bottom: 0px;display: inline-block;width: 150px;">发票结算申请单明细</h4>-->
<!-- <span>发票号</span>-->
<!-- <el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>-->
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 450px;" height="450px" size="mini">
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 400px;" height="300px" size="mini">
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购物料名称 || scope.row.离线物料名称 || scope.row.采购零件名称 }}
@@ -193,6 +193,11 @@
{{ scope.row.到票数量 }}
</template>
</el-table-column>
<el-table-column label="金额" align="center" width="100">
<template slot-scope="scope">
{{ Number(scope.row.金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-tooltip v-show="true" :open-delay="100" content="删除" placement="right">
@@ -201,6 +206,7 @@
</template>
</el-table-column>
</el-table>
<span style="margin-left: 1080px">到票总额{{ monetaryTotal.toFixed(2) }}</span>
</el-card>
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="700px">
@@ -283,7 +289,7 @@
</div>
</el-dialog>
<el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="900px">
<el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="1000px">
<span>供应商</span>
<el-input v-model="supplierName" size="small" placeholder="请选择供应商到票" style="margin: 0 5px 10px 0;" readonly/>
<el-radio-group v-model="contractType" size="small" @change="searchTable01()">
@@ -344,6 +350,11 @@
<el-input-number v-model="scope.row.本次到票数量" :min="0" :max="scope.row.已到货数量 - scope.row.到票数量" size="mini" controls-position="right" style="width: 100%;"/>
</template>
</el-table-column>
<el-table-column label="本次到票金额" align="center" width="100">
<template slot-scope="scope">
{{ Number(scope.row.本次到票数量 * scope.row.单价).toFixed(2) }}
</template>
</el-table-column>
</el-table>
<el-table v-show="showtable03" ref="multipleTable" :data="tableData03" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" align="center" width="45"/>
@@ -400,6 +411,7 @@ export default {
name: '', // 发票结算申请
data() {
return {
monetaryTotal: 0,
submitAdd1_disable: false,
dateRange: '',
pickerOptions: {
@@ -672,6 +684,7 @@ export default {
}
},
searchTable2(row) {
this.monetaryTotal = 0
this.applyOrderNum = row.发票结算申请单流水号
this.invoiceNumber = row.发票号
this.supplierName = row.供应商名称
@@ -679,6 +692,11 @@ export default {
Number(row.是否提交申请) === 1 ? this.disabled = true : this.disabled = false
searchTable2(row.发票结算申请单流水号).then(response => {
this.tableData2 = response.data
if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) {
this.monetaryTotal += response.data[i].金额
}
}
})
},
addInStoreRecord() {

View File

@@ -106,6 +106,11 @@ export default {
document.getElementsByClassName('tags-view-wrapper')[0].style.minWidth = '1680px'
document.getElementsByClassName('navbar')[0].style.minWidth = '1680px'
break
case 'AssemblyTaskAssignment': // 装配任务分配
document.getElementById('app-main').style.width = '1680px'
document.getElementsByClassName('tags-view-wrapper')[0].style.minWidth = '1680px'
document.getElementsByClassName('navbar')[0].style.minWidth = '1680px'
break
default:
document.getElementById('app-main').style.width = '1380px'
document.getElementsByClassName('tags-view-wrapper')[0].style.minWidth = '1380px'