处理clearable不起作用的冲突,删除我测试部分,保留曹鑫宇程序
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" clearable>
|
||||
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
@@ -137,7 +137,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button style="margin-left: 120px;margin-top: 20px" @click="dialogFormVisible = false">取消</el-button>
|
||||
<el-button type="primary" style="margin-top: 20px" @click="getName">确认</el-button>
|
||||
<el-button :disabled="staffNum===''" type="primary" style="margin-top: 20px" @click="getName">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
@@ -143,6 +143,12 @@ export default {
|
||||
this.projectValue ? this.check = 1 : this.check = 0
|
||||
this.machineNumberValue ? this.check1 = 1 : this.check1 = 0
|
||||
searchTable(this.check, this.projectValue, this.check1, this.machineNumberValue, this.check2, this.startEndDate[0], this.startEndDate[1], this.pageCurrent, this.pageSize).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
console.log(response.data.rows[i].项目计划完成时间)
|
||||
if (response.data.rows[i].项目计划完成时间 !== '') {
|
||||
response.data.rows[i].项目计划完成时间 = (response.data.rows[i].项目计划完成时间).split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-cjn-09" @click="saveApprove">保存</el-button>
|
||||
<el-checkbox v-model="checked" :disabled="isShow2" size="small" style="margin:10px">是否核准</el-checkbox>
|
||||
</el-row>
|
||||
<div v-for="(item, index) in dataAll" :key="index" style="margin-bottom: 30px">
|
||||
<div v-for="(item, key) in dataAll" :key="key" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
@@ -231,7 +231,7 @@
|
||||
<el-button size="small" @click="processCopy1()">工艺拷贝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-for="(item, index) in dataAll1" :key="index" style="margin-bottom: 30px">
|
||||
<div v-for="(item, key) in dataAll1" :key="key" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
@@ -310,7 +310,7 @@
|
||||
<el-button size="small" @click="processCopy1()">工艺拷贝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-for="(item, index) in dataAll1" :key="index" style="margin-bottom: 30px">
|
||||
<div v-for="(item, key) in dataAll1" :key="key" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
@@ -433,7 +433,8 @@ export default {
|
||||
machineType: [],
|
||||
AssemblyTask: '',
|
||||
Group: '',
|
||||
GroupNumberValue: [],
|
||||
GroupNumberValue: '',
|
||||
GroupNumberValue1: '',
|
||||
GroupNumber: [],
|
||||
GroupNum: '',
|
||||
GroupProcessNumber: '',
|
||||
@@ -448,7 +449,6 @@ export default {
|
||||
Procedure: '',
|
||||
ProcedureNameGroup: [],
|
||||
processRequestValue: '',
|
||||
ProcessContentGroup: [],
|
||||
QualityTesting: [],
|
||||
ProcessSequence: [],
|
||||
tableData: [],
|
||||
@@ -527,12 +527,11 @@ export default {
|
||||
},
|
||||
searchGroup() {
|
||||
this.GroupNumber = []
|
||||
this.GroupNumberValue = []
|
||||
searchGroup(this.machineNumberValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNumber.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组号
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -670,37 +669,55 @@ export default {
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
// this.title = '增加组件工艺'
|
||||
this.addForm('form2', [this.dialogFormVisible4 = true, this.title = '增加组件工艺', this.Group = ''])
|
||||
this.addForm('form2', [this.dialogFormVisible4 = true, this.title = '增加组件工艺', this.Group = '', this.GroupNumberValue1 = ''])
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
handleEdit(row, formName) {
|
||||
console.log(this.$refs[formName])
|
||||
if (this.$refs[formName] !== undefined) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
// this.editForm(row, 'form2', [this.title = '编辑组件工艺', this.GroupProcessNumber = row.组件工艺流水号, this.dialogFormVisible4 = true, this.Group = '', this.form2.组件 = []])
|
||||
this.GroupProcessNumber = row.组件工艺流水号
|
||||
this.GroupNumberValue1 = ''
|
||||
this.title = '编辑组件工艺'
|
||||
this.dialogFormVisible4 = true
|
||||
this.form2.序号 = row.序号
|
||||
this.form2.装配任务 = row.装配任务
|
||||
this.Group = ''
|
||||
this.form2.组件 = []
|
||||
this.GroupProcessNumber = row.组件工艺流水号
|
||||
console.log(row, 1111)
|
||||
this.form2.组件 = (row.组件流水号.split(',')).map(Number)
|
||||
console.log(this.form2.组件)
|
||||
},
|
||||
submitAdd() {
|
||||
for (var i = 0; i < this.form2.组件.length; i++) {
|
||||
this.GroupNumberValue1 = this.form2.组件[0]
|
||||
for (let h = 1; h < this.form2.组件.length; h++) {
|
||||
this.GroupNumberValue1 += ',' + this.form2.组件[h]
|
||||
}
|
||||
for (let i = 0; i < this.form2.组件.length; i++) {
|
||||
for (let j = 0; j < this.GroupNumber.length; j++) {
|
||||
if (this.form2.组件[i] === this.GroupNumber[j].value) {
|
||||
this.form2.组件[i] = this.GroupNumber[j].label
|
||||
}
|
||||
}
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.addTable(submitAdd, [this.machineNumberValue, this.form2.序号, this.Group, this.form2.装配任务], 'form2', function() { this.dialogFormVisible4 = false; this.searchDetail() })
|
||||
this.addTable(submitAdd, [this.machineNumberValue, this.form2.序号, this.Group, this.form2.装配任务, this.GroupNumberValue1], 'form2', function() { this.dialogFormVisible4 = false; this.searchDetail() })
|
||||
},
|
||||
submitEdit() {
|
||||
for (var i = 0; i < this.form2.组件.length; i++) {
|
||||
this.GroupNumberValue1 = this.form2.组件[0]
|
||||
for (let h = 1; h < this.form2.组件.length; h++) {
|
||||
this.GroupNumberValue1 += ',' + this.form2.组件[h]
|
||||
}
|
||||
for (let i = 0; i < this.form2.组件.length; i++) {
|
||||
for (let j = 0; j < this.GroupNumber.length; j++) {
|
||||
if (this.form2.组件[i] === this.GroupNumber[j].value) {
|
||||
this.form2.组件[i] = this.GroupNumber[j].label
|
||||
}
|
||||
}
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.editTable(submitEdit, [this.GroupProcessNumber, this.form2.序号, this.Group, this.form2.装配任务], 'form2', function() { this.searchDetail(); this.dialogFormVisible4 = false })
|
||||
this.editTable(submitEdit, [this.GroupProcessNumber, this.form2.序号, this.Group, this.form2.装配任务, this.GroupNumberValue1], 'form2', function() { this.searchDetail(); this.dialogFormVisible4 = false })
|
||||
},
|
||||
deleteGroup(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
@@ -766,6 +783,8 @@ export default {
|
||||
this.dataAll = []
|
||||
} else { this.$message.error('保存失败') }
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请勾选是否核准')
|
||||
}
|
||||
},
|
||||
upOne(row) {
|
||||
|
||||
@@ -99,8 +99,8 @@
|
||||
<td colspan="6">{{ list.工艺内容及装配具体要求 }}</td>
|
||||
<td align="center">{{ list.质检 }}</td>
|
||||
<td>{{ list.工时 }}</td>
|
||||
<td>{{ list.完成情况 }}</td>
|
||||
<td>{{ list.检验情况 }}</td>
|
||||
<td>{{ list.装配员 }}</td>
|
||||
<td>{{ list.检验员 }}</td>
|
||||
<td width="100px">{{ list.备注 }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
477
src/views/Assembly/TypicalAssemblyMaintenance/index.vue
Normal file
477
src/views/Assembly/TypicalAssemblyMaintenance/index.vue
Normal file
@@ -0,0 +1,477 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<span>机床分类:</span>
|
||||
<el-select v-model="machineTypeValue" placeholder="机床分类" size="small" style="width:150px" @change="SearchMachine">
|
||||
<el-option
|
||||
v-for="item in machineType"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue1" placeholder="机床编号" size="small" style="width:150px" @change="searchGroup()">
|
||||
<el-option
|
||||
v-for="item in machineNumber2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" icon="el-icon-search" style="margin-left: 10px;" size="small" @click="searchDetail">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-tickets" @click="handleAdd">增加</el-button>
|
||||
<el-button type="danger" size="small" icon="el-icon-delete" @click="deleteTable">删除</el-button>
|
||||
</el-card>
|
||||
<el-card style="background-color: #DCDCDC">
|
||||
<div v-for="(item, key) in dataAll" :key="key" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
style="width: 100%;margin-top: 15px">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
width="80"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="组号"
|
||||
width="240"
|
||||
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" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
type="primary"
|
||||
@click="handleEdit(scope.row, 'form2')">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
type="danger"
|
||||
@click="deleteGroup(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table :data="item.table2" size="mini" border style="width: 100%">
|
||||
<el-table-column label="序号" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.序号" size="mini" style="width:60px" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名称" width="230" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.工序名称"
|
||||
size="mini"
|
||||
style="width:200px"
|
||||
@dblclick.native="tableSearch(scope.row)"
|
||||
@change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺内容及装配具体要求" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.工艺内容及装配具体要求"
|
||||
:rows="1"
|
||||
size="mini"
|
||||
type="textarea"
|
||||
@change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="质检" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.质检" size="mini" align="center" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺工时" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.工艺工时" size="mini" align="center" @change="update2(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-arrow-up"
|
||||
type="primary"
|
||||
@click="upOne(scope.row)"/>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-arrow-down"
|
||||
type="primary"
|
||||
@click="downOne(scope.row)"/>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
type="primary"
|
||||
@click="insertOne(scope.row)"/>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
type="danger"
|
||||
@click="deleteOne(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="工序名称、工序要求选择" center width="400px">
|
||||
<el-form ref="form1" :model="form1" label-position="left" label-width="125px" class="demo-ruleForm">
|
||||
<el-form-item label="工序名称分类">
|
||||
<el-select v-model="processNameClassValue" placeholder="分类" size="small" @change="cChange()">
|
||||
<el-option
|
||||
v-for="item in processNameClass"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工序名称">
|
||||
<el-select v-model="processNameValue" placeholder="名称" size="small" @change="nChange()">
|
||||
<el-option
|
||||
v-for="item in processName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工序要求">
|
||||
<el-input v-model="processRequestValue" placeholder="要求" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button size="mini" type="primary" @click="confirmSelect()">确定选择</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible4" center width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left" label-width="125px" class="demo-ruleForm">
|
||||
<el-form-item label="序号" prop="序号">
|
||||
<el-input v-model="form2.序号" placeholder="序号" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="组件" prop="组件">
|
||||
<el-select v-model="form2.组件" multiple placeholder="组件" size="small">
|
||||
<el-option
|
||||
v-for="item in GroupNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="装配任务" prop="装配任务">
|
||||
<el-input v-model="form2.装配任务" placeholder="装配任务" type="textarea" size="small"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible4=false">取消</el-button>
|
||||
<el-button v-show="title==='增加组件工艺'" type="primary" @click="submitAdd()">确定</el-button>
|
||||
<el-button v-show="title==='编辑组件工艺'" type="primary" @click="submitEdit()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { SearchMachine, searchDetail, searchProcess, update, submitAdd, submitEdit, insertOne, update2, upOne, downOne, deleteOne,
|
||||
deleteGroup, initmachineType, initprocessNameClass, initProcessName, update1, searchGroup } from '@/api/Assembly/TypicalAssemblyMaintenance'
|
||||
import '@/icon/iconfont.css'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
radio: 0,
|
||||
checked: false,
|
||||
number: '',
|
||||
machineNumberValue1: '',
|
||||
machineNumber2: [],
|
||||
machineTypeValue: '',
|
||||
machineType: [],
|
||||
AssemblyTask: '',
|
||||
Group: '',
|
||||
GroupNumberValue: [],
|
||||
GroupNumberValue1: '',
|
||||
GroupNumber: [],
|
||||
GroupNum: '',
|
||||
GroupProcessNumber: '',
|
||||
SerialNumber: '',
|
||||
SerialNumberGroup: [],
|
||||
isShow2: false,
|
||||
processNameClassValue: '',
|
||||
processNameClass: [],
|
||||
processNameValue: '',
|
||||
Process: '',
|
||||
processName: [],
|
||||
Procedure: '',
|
||||
ProcedureNameGroup: [],
|
||||
processRequestValue: '',
|
||||
ProcessContentGroup: [],
|
||||
QualityTesting: [],
|
||||
ProcessSequence: [],
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
loading: false,
|
||||
form1: {},
|
||||
form2: {
|
||||
序号: '',
|
||||
组件: [],
|
||||
装配任务: ''
|
||||
},
|
||||
rules: {
|
||||
序号: [{ required: true, message: '请输入序号', trigger: 'blur' }],
|
||||
组件: [{ required: true, message: '请选择组件', trigger: 'change' }],
|
||||
装配任务: [{ required: true, message: '请输入装配任务', trigger: 'blur' }]
|
||||
},
|
||||
num1: '',
|
||||
result: 0,
|
||||
dialogFormVisible2: false,
|
||||
dialogFormVisible4: false,
|
||||
dataAll: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initprocessNameClass().then(response => { // 初始化工序分类
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.processNameClass.push({
|
||||
label: response.data[i].工序分类名称,
|
||||
value: response.data[i].工序分类流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
initmachineType().then(response => { // 初始化机床分类
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineType.push({
|
||||
label: response.data[i].机床分类名称,
|
||||
value: response.data[i].机床分类流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
SearchMachine() {
|
||||
this.machineNumberValue1 = ''
|
||||
this.machineNumber2 = []
|
||||
SearchMachine(this.machineTypeValue).then(response => { // 典型机床查询
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber2.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchGroup() {
|
||||
this.GroupNumber = []
|
||||
this.GroupNumberValue = []
|
||||
searchGroup(this.machineNumberValue1).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNumber.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async searchDetail() { // 主表查询
|
||||
this.dataAll = []
|
||||
if (this.machineNumberValue1 !== '') {
|
||||
const response = await searchDetail(this.machineNumberValue1)
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const response2 = await searchProcess(data[i].组件工艺流水号)
|
||||
this.dataAll.push({
|
||||
table1: [data[i]],
|
||||
table2: response2.data
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
update(row) {
|
||||
update(row.装配工序流水号, row.序号, row.工序名称, row.工艺内容及装配具体要求, row.质检).then(response => {
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
},
|
||||
update2(row) {
|
||||
update2(row.装配工序流水号, row.工艺工时).then(response => {
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.machineNumberValue1 !== '') {
|
||||
this.addForm('form2', [this.dialogFormVisible4 = true, this.title = '增加组件工艺', this.Group = '', this.GroupNumberValue1 = ''])
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
handleEdit(row, formName) {
|
||||
if (this.$refs[formName] !== undefined) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
this.GroupProcessNumber = row.组件工艺流水号
|
||||
this.GroupNumberValue1 = ''
|
||||
this.title = '编辑组件工艺'
|
||||
this.dialogFormVisible4 = true
|
||||
this.form2.序号 = row.序号
|
||||
this.form2.装配任务 = row.装配任务
|
||||
this.Group = ''
|
||||
console.log(row, 1111)
|
||||
this.form2.组件 = (row.组件流水号.split(',')).map(Number)
|
||||
console.log(this.form2.组件)
|
||||
},
|
||||
submitAdd() {
|
||||
this.GroupNumberValue1 = this.form2.组件[0]
|
||||
for (let h = 1; h < this.form2.组件.length; h++) {
|
||||
this.GroupNumberValue1 += ',' + this.form2.组件[h]
|
||||
}
|
||||
for (let i = 0; i < this.form2.组件.length; i++) {
|
||||
for (let j = 0; j < this.GroupNumber.length; j++) {
|
||||
if (this.form2.组件[i] === this.GroupNumber[j].value) {
|
||||
this.form2.组件[i] = this.GroupNumber[j].label
|
||||
}
|
||||
}
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.addTable(submitAdd, [this.machineNumberValue1, this.form2.序号, this.Group, this.form2.装配任务, this.GroupNumberValue1], 'form2', function() { this.dialogFormVisible4 = false; this.searchDetail() })
|
||||
},
|
||||
submitEdit() {
|
||||
this.GroupNumberValue1 = this.form2.组件[0]
|
||||
for (let h = 1; h < this.form2.组件.length; h++) {
|
||||
this.GroupNumberValue1 += ',' + this.form2.组件[h]
|
||||
}
|
||||
for (let i = 0; i < this.form2.组件.length; i++) {
|
||||
for (let j = 0; j < this.GroupNumber.length; j++) {
|
||||
if (this.form2.组件[i] === this.GroupNumber[j].value) {
|
||||
this.form2.组件[i] = this.GroupNumber[j].label
|
||||
}
|
||||
}
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.editTable(submitEdit, [this.GroupProcessNumber, this.form2.序号, this.Group, this.form2.装配任务, this.GroupNumberValue1], 'form2', function() { this.searchDetail(); this.dialogFormVisible4 = false })
|
||||
},
|
||||
deleteGroup(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteGroup(row.组件工艺流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchDetail()
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
insertOne(row) {
|
||||
insertOne(row.组件工艺流水号).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
deleteTable() {
|
||||
this.$confirm('此操作将永久删除该工艺, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.result = 0
|
||||
for (var i = 0; i < this.dataAll.length; i++) {
|
||||
deleteGroup(this.dataAll[i].table1[0].组件工艺流水号).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.dataAll.length) {
|
||||
this.$message.success('删除成功')
|
||||
this.searchDetail()
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
upOne(row) {
|
||||
upOne(row.装配工序流水号, row.组件工艺流水号, row.工序顺序).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
downOne(row) {
|
||||
downOne(row.装配工序流水号, row.组件工艺流水号, row.工序顺序).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
deleteOne(row) {
|
||||
deleteOne(row.装配工序流水号).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
cChange() {
|
||||
this.processName = []
|
||||
initProcessName(this.processNameClassValue).then(response => { // 初始化工序分类
|
||||
this.tableData = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.processName.push({
|
||||
label: response.data[i].工序名称,
|
||||
value: response.data[i].工序名称流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
nChange() {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (this.processNameValue === this.tableData[i].工序名称流水号) {
|
||||
this.Process = this.tableData[i].工序名称
|
||||
this.processRequestValue = this.tableData[i].工艺内容及装配具体要求
|
||||
}
|
||||
}
|
||||
},
|
||||
tableSearch(row) {
|
||||
this.dialogFormVisible2 = true
|
||||
this.processNameClassValue = ''
|
||||
this.processNameValue = ''
|
||||
this.processRequestValue = ''
|
||||
this.Procedure = row.装配工序流水号
|
||||
this.number = row.序号
|
||||
},
|
||||
confirmSelect() {
|
||||
update1(this.Procedure, this.number, this.Process, this.processRequestValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.dialogFormVisible2 = false
|
||||
this.$message.success('选择成功')
|
||||
this.searchDetail()
|
||||
} else {
|
||||
this.$message.success('选择失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
</style>
|
||||
305
src/views/BasicData/EquipmentCapabilitySetting/index.vue
Normal file
305
src/views/BasicData/EquipmentCapabilitySetting/index.vue
Normal file
@@ -0,0 +1,305 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<span>设备名称:</span>
|
||||
<el-input v-model="equipmentName" clearable size="small" style="width:200px;margin:10px;"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" @click="pageCurrent=1;pageSize=10;searchTable()">查询</el-button>
|
||||
<el-button type="primary" class="el-icon-circle-plus-outline" size="small" @click="handleAdd('form');param = 0">新增</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border highlight-current-row>
|
||||
<el-table-column
|
||||
label=" "
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="设备名称" align="center" width="280px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备编号" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备型号" align="center" width="280px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备性能指标" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备性能指标 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备工时系数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备加工工艺" align="center" width="230px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺属性 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="班次类型" align="center" width="110px">
|
||||
<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" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备预留工时系数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
class="el-icon-edit"
|
||||
@click="handleEdit(scope.row);param = 1">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
class="el-icon-delete"
|
||||
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
v-if="!loading"
|
||||
: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>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" center width="800px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm" style="margin: auto">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备名称" prop="设备名称">
|
||||
<el-input v-model="form.设备名称" placeholder="设备名称" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备型号" prop="设备型号">
|
||||
<el-input v-model="form.设备型号" placeholder="设备型号" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性能指标" prop="设备性能指标">
|
||||
<el-input v-model="form.设备性能指标" placeholder="性能指标" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="加工能力" prop="设备加工能力工时">
|
||||
<el-input v-model="form.设备加工能力工时" placeholder="加工能力" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改工时系数" prop="整改工时比例">
|
||||
<el-input v-model="form.整改工时比例" placeholder="设备整改工时系数" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备编号" prop="设备编号">
|
||||
<el-input v-model="form.设备编号" placeholder="设备编号" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工艺" prop="工艺属性代码">
|
||||
<el-select v-model="form.工艺属性代码" filterable size="small" style="width:230px;">
|
||||
<el-option
|
||||
v-for="item in Technology"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="班次类型" prop="班次类型">
|
||||
<el-select v-model="form.班次类型" filterable size="small" style="width:230px;">
|
||||
<el-option
|
||||
v-for="item in ClassType"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工时系数" prop="设备工时系数">
|
||||
<el-input v-model="form.设备工时系数" placeholder="工时系数" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预留工时系数" prop="设备预留工时系数">
|
||||
<el-input v-model="form.设备预留工时系数" placeholder="设备预留工时系数" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff()">取消</el-button>
|
||||
<el-button v-show="title==='增加'" type="primary" @click="submitAdd()">确定</el-button>
|
||||
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getTechnology, searchtable, edittype, handlechange, handledelete } from '@/api/BasicData/EquipmentCapabilitySetting'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
equipmentNum: '',
|
||||
num1: '',
|
||||
equipmentName: '',
|
||||
loading: false,
|
||||
tableData: [], // 表格数据
|
||||
pageSize: 10,
|
||||
pageCurrent: 1,
|
||||
total: 0,
|
||||
dialogFormVisible: false,
|
||||
title: '',
|
||||
Technology: [],
|
||||
ClassType: [{
|
||||
value: 0,
|
||||
label: 0
|
||||
}, {
|
||||
value: 1,
|
||||
label: 1
|
||||
}, {
|
||||
value: 2,
|
||||
label: 2
|
||||
}, {
|
||||
value: 3,
|
||||
label: 3
|
||||
}, {
|
||||
value: 4,
|
||||
label: 4
|
||||
}],
|
||||
form: {
|
||||
设备名称: '', // 设备名称
|
||||
设备型号: '', // 设备型号
|
||||
设备性能指标: '', // 性能指标
|
||||
设备加工能力工时: '', // 加工能力
|
||||
整改工时比例: '', // 设备整改工时指数
|
||||
设备编号: '', // 设备编号
|
||||
工艺属性代码: '', // 工艺
|
||||
班次类型: '', // 班次类型
|
||||
设备工时系数: '', // 工时系数
|
||||
设备预留工时系数: '' // 设备预留工时系数
|
||||
},
|
||||
rules: {
|
||||
设备名称: [{ required: true, message: '请输入设备名称', trigger: 'blur' }],
|
||||
设备型号: [{ required: true, message: '请输入设备型号', trigger: 'blur' }],
|
||||
设备性能指标: [{ required: true, message: '请输入性能指标', trigger: 'blur' }],
|
||||
设备加工能力工时: [{ required: true, message: '请输入加工能力', trigger: 'blur' }],
|
||||
整改工时比例: [{ required: true, message: '请输入设备整改工时指数', trigger: 'blur' }],
|
||||
设备编号: [{ required: true, message: '请输入设备编号', trigger: 'blur' }],
|
||||
工艺属性代码: [{ required: true, message: '请选择工艺', trigger: 'change' }],
|
||||
班次类型: [{ required: true, message: '请选择班次类型', trigger: 'change' }],
|
||||
设备工时系数: [{ required: true, message: '请输入工时系数', trigger: 'blur' }],
|
||||
设备预留工时系数: [{ required: true, message: '请输入设备预留工时系数', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
// 初始化获取工艺
|
||||
fetchData() {
|
||||
this.getSelect(getTechnology, ['工艺名称', '工艺编号'], 'Technology')
|
||||
},
|
||||
// 查询
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
this.equipmentName ? this.num1 = 1 : this.num1 = 0
|
||||
this.getTable(searchtable, [this.pageCurrent, this.pageSize, this.num1, this.equipmentName], ['tableData', 'total', 'loading'])
|
||||
},
|
||||
// 点击增加
|
||||
handleAdd() {
|
||||
this.dialogFormVisible = true
|
||||
this.title = '增加'
|
||||
this.addForm('form')
|
||||
},
|
||||
// 增加确定
|
||||
submitAdd() {
|
||||
this.addTable(edittype, [this.form.设备名称, this.form.设备型号, this.form.设备性能指标, this.form.设备工时系数, this.form.工艺属性代码, this.form.班次类型, this.form.设备加工能力工时, this.form.整改工时比例, this.form.设备编号, this.form.设备预留工时系数], 'form', function() { this.searchTable(); this.dialogFormVisible = false })
|
||||
},
|
||||
// 编辑打开
|
||||
handleEdit(row) {
|
||||
this.dialogFormVisible = true
|
||||
this.title = '编辑'
|
||||
this.equipmentNum = row.设备流水号
|
||||
this.editForm(row, 'form')
|
||||
},
|
||||
// 编辑确定
|
||||
submitEdit() {
|
||||
this.editTable(handlechange, [this.equipmentNum, this.form.设备名称, this.form.设备型号, this.form.设备性能指标, this.form.设备工时系数, this.form.工艺属性代码, this.form.班次类型, this.form.设备加工能力工时, this.form.整改工时比例, this.form.设备编号, this.form.设备预留工时系数], 'form', function() { this.searchTable(); this.dialogFormVisible = false })
|
||||
},
|
||||
// 重置表单
|
||||
callOff() {
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
// 删除
|
||||
handleDelete(index, row) {
|
||||
this.deleteRow(handledelete, row.设备流水号, function() { this.searchTable() })
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-input{
|
||||
width: 200px!important;
|
||||
}
|
||||
</style>
|
||||
251
src/views/BasicData/MaintenanceEquipmentPerson/index.vue
Normal file
251
src/views/BasicData/MaintenanceEquipmentPerson/index.vue
Normal file
@@ -0,0 +1,251 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>设备名称:</span>
|
||||
<el-select v-model="equipmentNameValue" placeholder="设备名称" style="width:200px" size="small" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in equipmentName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>操作者:</span>
|
||||
<el-input v-model="operator" placeholder="操作者" size="small" clearable style="width:200px" @dblclick.native="getOperator();param = 0"/>
|
||||
<el-button type="success" size="mini" icon="el-icon-search" style="margin-left:10px" @click="getTableData">查询</el-button>
|
||||
<el-button type="primary" size="mini" icon="el-icon-circle-plus-outline" @click="handleAdd">增加</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" highlight-current-row border style="height: 500px">
|
||||
<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">
|
||||
<el-button type="primary" size="mini" icon="el-icon-edit" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
: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>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="选择人员" center style="min-height: 300px">
|
||||
<span>部门名称:</span>
|
||||
<el-select v-model="departmentValue" placeholder="部门名称" size="small" clearable style="width:180px" @change="getTablePeople">
|
||||
<el-option
|
||||
v-for="item in department"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-table
|
||||
:data="tablePeople"
|
||||
style="width:100%;max-height: 300px;margin-top: 20px"
|
||||
height="300"
|
||||
highlight-current-row
|
||||
@row-click="currentPeople">
|
||||
<el-table-column align="center" label="考勤编号">
|
||||
<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-column align="center" label="性别">
|
||||
<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 slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="dialogFormVisible = false">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible_form" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="设备名称" prop="设备名称">
|
||||
<el-select v-model="form.设备流水号" placeholder="设备名称" style="width:200px" size="small" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in equipmentName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="班次" prop="班次" >
|
||||
<el-select v-model="form.班次" placeholder="班次" style="width:200px" size="small" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in staff"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作者" prop="操作者" >
|
||||
<el-input v-model="form.操作者" placeholder="操作者" size="small" style="width:200px" clearable @dblclick.native="getOperator();param = 1"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel">取消</el-button>
|
||||
<el-button v-show="title === '增加'" type="primary" @click="submitAdd()">确定</el-button>
|
||||
<el-button v-show="title === '编辑'" type="primary" @click="submitEdit()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getEquipment, getDepartment, getTablePeople, getTableData, deleteTable, getStaff, addTable, editTable } from '@/api/BasicData/MaintenanceEquipmentPerson'
|
||||
import { SectionToChinese } from '@/utils/tool'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
equipmentNameValue: '',
|
||||
equipmentNameCheck: null,
|
||||
equipmentName: [],
|
||||
operator: '',
|
||||
operatorNum: '',
|
||||
operatorCheck: null,
|
||||
dialogFormVisible: false,
|
||||
tablePeople: [],
|
||||
departmentValue: '',
|
||||
department: [],
|
||||
tableData: [],
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
loading: false,
|
||||
title: '',
|
||||
dialogFormVisible_form: false,
|
||||
param: null,
|
||||
form: {
|
||||
设备名称: '',
|
||||
设备流水号: null,
|
||||
班次: '',
|
||||
班次代码: '',
|
||||
操作者: '',
|
||||
操作者编号: null
|
||||
},
|
||||
rules: {
|
||||
设备名称: [{ required: true, message: '请选择设备名称', trigger: 'blur' }],
|
||||
操作者: [{ required: true, message: '请选择操作者', change: 'blur' }]
|
||||
},
|
||||
staff: [],
|
||||
No: null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.getTableData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(getEquipment, ['设备名称', '设备流水号'], 'equipmentName', [0, this.equipmentNameValue]) // 获取设备名称
|
||||
getStaff().then(res => { // 获取班次
|
||||
res.data.map(row => {
|
||||
this.staff.push({
|
||||
label: `${SectionToChinese(row.班次代码)}班`,
|
||||
value: row.班次代码
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
getOperator() {
|
||||
this.dialogFormVisible = true
|
||||
this.getSelect(getDepartment, ['部门', '考核部门编号'], 'department')
|
||||
},
|
||||
getTablePeople() {
|
||||
this.getData(getTablePeople, 'tablePeople', this.departmentValue)
|
||||
},
|
||||
currentPeople(row) {
|
||||
if (this.param === 0) {
|
||||
this.operator = row.姓名
|
||||
this.operatorNum = row.人员编号
|
||||
} else if (this.param === 1) {
|
||||
this.form.操作者 = row.姓名
|
||||
this.form.操作者编号 = row.人员编号
|
||||
} else {
|
||||
console.log(`err`)
|
||||
}
|
||||
},
|
||||
getTableData() {
|
||||
console.log(typeof (this.equipmentName))
|
||||
this.equipmentNameValue ? this.equipmentNameCheck = 1 : this.equipmentNameCheck = 0
|
||||
this.operator ? this.operatorCheck = 1 : this.operatorCheck = 0
|
||||
this.loading = true
|
||||
this.getTable(getTableData, [this.equipmentNameCheck, this.equipmentNameValue, this.operatorCheck, this.operatorNum, this.pageCurrent, this.pageSize], ['tableData', 'total', 'loading'])
|
||||
},
|
||||
handleAdd() {
|
||||
this.addForm('form', [this.dialogFormVisible_form = true, this.title = '增加'])
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.No = row.设备人员关系流水号
|
||||
this.editForm(row, 'form', [this.dialogFormVisible_form = true, this.title = '编辑'])
|
||||
},
|
||||
submitAdd() {
|
||||
for (let i = 0; i < this.equipmentName.length; i++) {
|
||||
if (this.form.设备流水号 === this.equipmentName[i].value) {
|
||||
this.form.设备名称 = this.equipmentName[i].label
|
||||
break
|
||||
}
|
||||
}
|
||||
this.addTable(addTable, [this.form.设备流水号, this.form.设备名称, this.form.班次, this.form.操作者, this.form.操作者编号], 'form', function() { this.getTableData(); this.dialogFormVisible_form = false })
|
||||
},
|
||||
submitEdit() {
|
||||
this.editTable(editTable, [this.form.设备名称, this.form.设备流水号, this.form.班次代码, this.form.操作者, this.form.操作者编号, this.No], 'form', function() { this.getTableData(); this.dialogFormVisible_form = false })
|
||||
},
|
||||
cancel() {
|
||||
this.dialogFormVisible_form = false
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.deleteRow(deleteTable, row.设备人员关系流水号, function() { this.getTableData() })
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.getTableData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 20px;
|
||||
}
|
||||
</style>
|
||||
199
src/views/BasicData/MaterialMaintenance/index.vue
Normal file
199
src/views/BasicData/MaterialMaintenance/index.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>材料名称:</span>
|
||||
<el-input v-model="Material" placeholder="请输材料名称" size="small" style="width:200px" clearable/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 15px" @click="pageCurrent = 1;pageSize = 10;featchMaterial()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="add()">增加</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
height="580"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column align="center" label="材料名称">
|
||||
<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-column label="操作" fixed="right" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="Edit(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="delMaterial(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px">
|
||||
<el-pagination
|
||||
: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>
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="新增材料" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px">
|
||||
<el-form-item label="材料名称" prop="MaterialName" style="display: inline-block">
|
||||
<el-input v-model="form.MaterialName" clearable size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="callOff()">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="addMaterial('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="编辑材料" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left" label-width="110px">
|
||||
<el-form-item label="材料名称" prop="MaterialName2" style="display: inline-block">
|
||||
<el-input v-model="form2.MaterialName2" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="callOff()">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="editMaterial('form2')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { featchMaterial, addMaterial, delMaterial, editMaterial } from '@/api/BasicData/Materialmaintenance'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ID: '',
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible2: false,
|
||||
tableData: [],
|
||||
Material: '', // 材质名称
|
||||
listLoading: false,
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: null,
|
||||
form: {
|
||||
MaterialName: ''
|
||||
},
|
||||
form2: {
|
||||
MaterialName2: ''
|
||||
},
|
||||
rules: {
|
||||
MaterialName: [{ required: true, message: '请输入材料名称', trigger: 'blur' }],
|
||||
MaterialName2: [{ required: true, message: '请输入材料名称', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.featchMaterial()
|
||||
},
|
||||
methods: {
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.featchMaterial()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.featchMaterial()
|
||||
},
|
||||
featchMaterial() {
|
||||
featchMaterial(this.Material, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
callOff() {
|
||||
this.dialogFormVisible = false
|
||||
this.dialogFormVisible2 = false
|
||||
},
|
||||
add() {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.form.MaterialName = ''
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
addMaterial(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addMaterial(this.form.MaterialName).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('添加成功')
|
||||
this.dialogFormVisible = false
|
||||
this.form = {}
|
||||
this.featchMaterial()
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
this.form = {}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
delMaterial(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delMaterial(row.材料流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.form.MaterialName = ''
|
||||
this.featchMaterial()
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
Edit(row) {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible2 = true
|
||||
this.form2.MaterialName2 = row.材料
|
||||
this.ID = row.材料流水号
|
||||
},
|
||||
editMaterial(form2) {
|
||||
this.$refs[form2].validate((valid) => {
|
||||
if (valid) {
|
||||
this.dialogFormVisible2 = false
|
||||
editMaterial(this.ID, this.form2.MaterialName2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.featchMaterial()
|
||||
this.$message.success('编辑成功')
|
||||
this.form = {}
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
this.form = {}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -15,7 +15,8 @@
|
||||
<el-button slot="append" icon="el-icon-search" @click="fetchPeopleForName"/>
|
||||
</el-input>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="addPeople()">新增</el-button>
|
||||
<!--<el-button v-popover:popover4 type="success" icon="el-icon-sort" size="small" @click="moveGroup">移动</el-button>-->
|
||||
<!--<el-button v-popover:popover4 type="success" icon="el-icon-sort" size="small" @click="moveGroup">移动-->
|
||||
<!--</el-button>-->
|
||||
<!--<el-button size="small" @click="postMaintain()">岗位维护</el-button>-->
|
||||
<!--<el-popover-->
|
||||
<!--ref="popover4"-->
|
||||
@@ -29,7 +30,9 @@
|
||||
<!--:disabled="true"-->
|
||||
<!--size="small"-->
|
||||
<!--placeholder="请选择部门"/>-->
|
||||
<!--<el-button type="text" size="small" style="margin-left: 60px; margin-top: 15px" @click="moveGroupConfim">确认</el-button>-->
|
||||
<!--<el-button type="text" size="small" style="margin-left: 60px; margin-top: 15px" @click="moveGroupConfim">-->
|
||||
<!--确认-->
|
||||
<!--</el-button>-->
|
||||
<!--<el-dropdown-menu slot="dropdown">-->
|
||||
<!--<el-tree-->
|
||||
<!--ref="treeForm"-->
|
||||
@@ -176,18 +179,18 @@
|
||||
</el-row>
|
||||
|
||||
<!--新增和编辑部门-->
|
||||
<!--<el-dialog :title="department_Title" :visible.sync="department_DFV" center style="min-height: 200px" width="400px">-->
|
||||
<!--<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">-->
|
||||
<!--<el-form-item label="部门名称" prop="DepartmentName">-->
|
||||
<!--<el-input v-model="department_Form.DepartmentName" size="small" style="width:200px"/>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-form>-->
|
||||
<!--<div slot="footer" class="dialog-footer">-->
|
||||
<!--<el-button @click="cancel">取消</el-button>-->
|
||||
<!--<el-button v-if="department_Title==='新增部门'" type="primary" @click="submitAdd">确定</el-button>-->
|
||||
<!--<el-button v-else-if="department_Title==='编辑部门'" type="primary" @click="submitEdit">确定</el-button>-->
|
||||
<!--</div>-->
|
||||
<!--</el-dialog>-->
|
||||
<el-dialog :title="department_Title" :visible.sync="department_DFV" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="department_Form" :model="department_Form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="部门名称" prop="DepartmentName">
|
||||
<el-input v-model="department_Form.DepartmentName" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button v-if="department_Title==='新增部门'" type="primary" @click="submitAdd">确定</el-button>
|
||||
<el-button v-else-if="department_Title==='编辑部门'" type="primary" @click="submitEdit">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="people_title" :visible.sync="people_DFV" center style="min-height: 200px" width="800px">
|
||||
<el-form ref="people_form" :rules="rules" :model="people_form" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
|
||||
218
src/views/BasicData/SystemRrolemaintenance/index.vue
Normal file
218
src/views/BasicData/SystemRrolemaintenance/index.vue
Normal file
@@ -0,0 +1,218 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>角色功能:</span>
|
||||
<el-input v-model="RoleFunctioning" size="small" clearable style="width:200px"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 15px" @click="pageCurrent=1;pageSize = 10;searchData()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">增加</el-button>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 15px">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column align="center" label="角色编号" width="100">
|
||||
<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-column align="center" label="操作日期">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible1" title="新增角色" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px">
|
||||
<el-form-item label="角色名称" prop="角色功能" style="display: inline-block">
|
||||
<el-input
|
||||
v-model="form.角色功能"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="角色功能"
|
||||
style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogFormVisible1 = false">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitAdd1('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="编辑角色" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px">
|
||||
<el-form-item label="角色名称" prop="角色功能" style="display: inline-block">
|
||||
<el-input
|
||||
v-model="form2.角色功能"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="角色功能"
|
||||
style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogFormVisible2 = false">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitAdd2('form2')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { InitRolefunction, deleteData, searchTable, addData, addData2 } from '@/api/BasicData/SystemRrolemaintenance'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
RoleFunctioning: '',
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: null,
|
||||
loading: false,
|
||||
tableData: [],
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
name: '',
|
||||
num: '', // 角色编号
|
||||
form: {
|
||||
角色功能: ''
|
||||
},
|
||||
form2: {
|
||||
角色功能: ''
|
||||
},
|
||||
rules: {
|
||||
角色功能: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
|
||||
},
|
||||
rules2: {
|
||||
角色功能: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
InitRolefunction(this.pageCurrent, this.pageSize).then(response => { // 初始化
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
searchData() {
|
||||
this.loading = true
|
||||
searchTable(this.RoleFunctioning, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
console.log(response.data)
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.fetchData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.fetchData()
|
||||
},
|
||||
handleEdit(row) {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible2 = true
|
||||
this.form2.角色功能 = row.角色功能
|
||||
this.num = row.角色编号
|
||||
},
|
||||
submitAdd2(formName) { // 编辑角色功能
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addData2(this.form2.角色功能, this.num).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.fetchData()
|
||||
this.dialogFormVisible2 = false
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
submitAdd1(formName) { // 增加角色功能
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addData(this.form.角色功能).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.form.角色功能 = ''
|
||||
this.fetchData()
|
||||
this.dialogFormVisible1 = false
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible1 = true
|
||||
},
|
||||
handleDelete(row) { // 删除
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteData(row.角色编号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
this.fetchData()
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
399
src/views/BasicData/WorkshopPersonnelRoleMana/index.vue
Normal file
399
src/views/BasicData/WorkshopPersonnelRoleMana/index.vue
Normal file
@@ -0,0 +1,399 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<table style="width: 100%">
|
||||
|
||||
<el-card>
|
||||
<span>员工姓名:</span>
|
||||
<el-input v-model="staffName" placeholder="员工姓名" size="small" clearable style="width:200px"/>
|
||||
<span style="margin-left: 15px">角色名称:</span>
|
||||
<el-select v-model="roleName" placeholder="角色名称" clearable size="small" style="width:200px">
|
||||
<el-option
|
||||
v-for="item in roleNames"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 15px" @click="pageCurrent1=1;searchData()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handelAdd">增加</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table :data="tableData" highlight-current-row>
|
||||
<el-table-column label="员工姓名">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column disabled label="所属部门" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.部门名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="岗位名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.岗位名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="角色名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.角色功能 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="考勤编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.考勤编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="submitEdit(scope.$index, scope.row)">修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="10"
|
||||
:total="total1"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</table>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="人员信息" center width="750px">
|
||||
<div style="height: 500px">
|
||||
<div style="float: left;margin-top: 10px;margin-left: 20px;overflow-y: scroll;height: 400px">
|
||||
<el-tree
|
||||
:data="data2"
|
||||
node-key="id"
|
||||
style="width: 150px;float: left"
|
||||
height="400"
|
||||
accordion
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div>
|
||||
<el-table :data="List1" highlight-current-row height="400" style="width: 400px;float: left;margin-left: 30px" @row-click="handleCurrentChange">
|
||||
<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>
|
||||
</div>
|
||||
<el-button style="margin-left: 260px" @click="dialogFormVisible = false">取消</el-button>
|
||||
<el-button type="primary" style="margin-top: 20px" @click="getName">确认</el-button>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible1" title="增加" center style="min-height: 270px" width="800px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="员工姓名" prop="staffName">
|
||||
<el-input v-model="form1.staffName" placeholder="请双击选择" size="small" clearable style="width:200px" @dblclick.native="dialogTableVisible()"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="角色名称" prop="roleName">
|
||||
<el-select v-model="form1.roleName" placeholder="角色名称" size="small" clearable style="width:200px">
|
||||
<el-option
|
||||
v-for="item in roleNames"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="考勤编号" >
|
||||
<el-input
|
||||
v-model="cjscgy"
|
||||
disabled
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属部门" >
|
||||
<el-input v-model="ssks" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOFF">取 消</el-button>
|
||||
<el-button type="primary" @click="submitAdd1()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="编辑" center style="min-height: 270px" width="800px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules1" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="员工姓名" >
|
||||
<el-input v-model="form2.staffName" disabled size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="角色名称" prop="roleName">
|
||||
<el-select v-model="form2.roleName" placeholder="角色名称" clearable size="small" style="width:200px">
|
||||
<el-option
|
||||
v-for="item in roleNames"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="考勤编号" >
|
||||
<el-input
|
||||
v-model="cjscgy"
|
||||
disabled
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item disabled="true" label="所属部门" >
|
||||
<el-input v-model="ssks" disabled size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOFF">取消</el-button>
|
||||
<el-button type="primary" @click="submitAdd2()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { dialogtablevisible, deleteData, getTree, fn, getTable8, initOrderType, addData1, addData2, searchTable } from '@/api/BasicData/WorkshopPersonnelRoleMana'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
number: '',
|
||||
form1: {
|
||||
staffName: '',
|
||||
roleName: ''
|
||||
},
|
||||
form2: {
|
||||
staffName: '',
|
||||
roleName: ''
|
||||
},
|
||||
rules: {
|
||||
staffName: [{ required: true, message: '请选择员工姓名', trigger: 'change' }],
|
||||
roleName: [{ required: true, message: '请选择员工角色', trigger: 'change' }]
|
||||
},
|
||||
rules1: {
|
||||
roleName: [{ required: true, message: '请选择员工角色', trigger: 'change' }]
|
||||
},
|
||||
staffName: '',
|
||||
cjscgy: '',
|
||||
List1: [],
|
||||
ssks: '',
|
||||
data2: [],
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
tableData: [],
|
||||
check1: '',
|
||||
check2: '',
|
||||
name: '', // 中间变量
|
||||
check3: '',
|
||||
check4: '',
|
||||
staffNum: '',
|
||||
personnelNumber: '',
|
||||
personnelStream: '',
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: null,
|
||||
roleName: null,
|
||||
roleNames: [],
|
||||
rybh: '',
|
||||
jsbh: '',
|
||||
dialogFormVisible: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
handelAdd(row) {
|
||||
this.dialogFormVisible1 = true
|
||||
this.ssks = ''
|
||||
this.cjscgy = ''
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
},
|
||||
submitEdit(index, row) {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible2 = true
|
||||
this.personnelStream = row.人员角色流水号
|
||||
this.form2.staffName = row.姓名
|
||||
this.ssks = row.部门名称
|
||||
this.personnelNumber = row.人员编号
|
||||
this.form2.roleName = parseInt(row.角色编号)
|
||||
this.cjscgy = row.考勤编号
|
||||
},
|
||||
callOFF() {
|
||||
this.dialogFormVisible1 = false
|
||||
this.dialogFormVisible2 = false
|
||||
this.ssks = ''
|
||||
this.cjscgy = ''
|
||||
},
|
||||
searchData() {
|
||||
if (this.staffName !== '' && this.staffName !== null) {
|
||||
this.check1 = 1
|
||||
} else {
|
||||
this.check1 = 0
|
||||
}
|
||||
if (this.roleName !== '' && this.roleName !== null) {
|
||||
this.check2 = 1
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
searchTable(this.check1, this.staffName, this.check2, this.roleName, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
fetchData() {
|
||||
getTree().then(response => { // 获取人员信息树
|
||||
const data = response.data
|
||||
this.data2 = fn(data, 0)
|
||||
})
|
||||
initOrderType().then(response => { // 角色名称
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.roleNames.push({
|
||||
label: response.data[i].角色功能,
|
||||
value: response.data[i].角色编号
|
||||
})
|
||||
}
|
||||
})
|
||||
this.searchData()
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchData()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchData()
|
||||
},
|
||||
submitAdd1() {
|
||||
this.$refs['form1'].validate((valid) => {
|
||||
if (valid) {
|
||||
addData1(this.personnelNumber, this.form1.roleName).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.ssks = ''
|
||||
this.form1.staffName = ''
|
||||
this.form1.roleName = ''
|
||||
this.searchData()
|
||||
this.dialogFormVisible1 = false
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
submitAdd2() {
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
addData2(this.personnelStream, this.personnelNumber, this.form2.roleName).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改成功')
|
||||
this.ssks = ''
|
||||
this.searchData()
|
||||
this.dialogFormVisible2 = false
|
||||
} else { this.$message.error('修改失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCurrentChange3(val) {
|
||||
this.searchgroup()
|
||||
},
|
||||
handleNodeClick(data) { // 树节点点击
|
||||
this.ssks = data.label
|
||||
getTable8(data.id).then(response => {
|
||||
this.List1 = response.data
|
||||
})
|
||||
},
|
||||
handleDelete(row) { // 删除
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteData(row.人员角色流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
} else { this.$message.error('删除失败') }
|
||||
this.searchData()
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
dialogTableVisible() {
|
||||
this.dialogFormVisible = true
|
||||
dialogtablevisible().then(response => {
|
||||
})
|
||||
},
|
||||
handleCurrentChange(row) { // 获取当前行人员信息
|
||||
this.ssks = row.节点名称
|
||||
this.number = row.考勤编号
|
||||
this.name = row.姓名
|
||||
this.personnelNumber = row.人员编号
|
||||
},
|
||||
getName() { // 提交人员
|
||||
this.cjscgy = this.number
|
||||
this.dialogFormVisible = false
|
||||
this.form1.staffName = this.name
|
||||
this.form2.staffName = this.name
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom:15px;
|
||||
margin-left: 15px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
</style>
|
||||
545
src/views/BasicData/WorkshopProcessMaintenance/index.vue
Normal file
545
src/views/BasicData/WorkshopProcessMaintenance/index.vue
Normal file
@@ -0,0 +1,545 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-card>
|
||||
<span>工艺分类:</span>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="addProcessClassification()">新增</el-button>
|
||||
<el-button size="small" type="warning" icon="el-icon-edit" @click="editProcessClassification()">编辑</el-button>
|
||||
<el-button size="small" type="danger" icon="el-icon-delete" @click="delProcessClassification()">删除</el-button>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-card>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="addProcess">新增工艺名称</el-button>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading1"
|
||||
ref="multipleTable"
|
||||
:data="tableData1"
|
||||
stripe
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
height="700"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column align="center" label="流水号" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-radio :label="scope.row.工艺分类流水号" v-model="radio" @change.native="getCurrentRow(scope.row.工艺分类流水号, scope.row.工艺分类名称)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="工艺分类">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺分类名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="18">
|
||||
<el-card >
|
||||
<el-table
|
||||
:data="tableData2"
|
||||
:row-key="getRowKeys"
|
||||
:expand-row-keys="expands"
|
||||
height="700"
|
||||
width="100%"
|
||||
@expand-change="searchTechnologicalRequirementsOfProcessNum">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="scope">
|
||||
<el-table :data="tableData3" border>
|
||||
<el-table-column label="工艺要求">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺要求 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
icon="el-icon-edit"
|
||||
@click="editTechnologicalRequirements(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="delTechnologicalRequirements(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
icon="el-icon-edit"
|
||||
@click="editProcess(scope.row)">编辑工艺</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="delProcess(scope.row)">删除工艺</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
@click="addTechnologicalRequirements(scope.row)">新增要求</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-dialog :visible.sync="dialogFormVisible1" title="增加工艺分类" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px" >
|
||||
<el-form-item label="工艺分类" prop="ProcessClassification">
|
||||
<el-input v-model="form1.ProcessClassification" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
<el-button type="primary" @click="submit1('form1')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="编辑工艺分类" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px" >
|
||||
<el-form-item label="工艺分类" prop="ProcessClassification">
|
||||
<el-input v-model="form1.ProcessClassification" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
<el-button type="primary" @click="submit1('form1')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible3" title="增加工艺" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" >
|
||||
<el-form-item label="工艺名称" prop="Process">
|
||||
<el-input v-model="form2.Process" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工艺名称简称" prop="ProcessShort">
|
||||
<el-input v-model="form2.ProcessShort" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
<el-button type="primary" @click="submit1('form2')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible4" title="编辑工艺" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" >
|
||||
<el-form-item label="工艺名称" prop="Process">
|
||||
<el-input v-model="form2.Process" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工艺名称简称" prop="ProcessShort">
|
||||
<el-input v-model="form2.ProcessShort" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
<el-button type="primary" @click="submit1('form2')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible5" title="新增工艺要求" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form3" :model="form3" :rules="rules3" label-position="left" label-width="110px" >
|
||||
<el-form-item label="工艺要求" prop="Process">
|
||||
<el-input v-model="form3.TechnologicalRequirements" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
<el-button type="primary" @click="submit1('form3')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible6" title="编辑工艺要求" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form3" :model="form3" :rules="rules3" label-position="left" label-width="110px" >
|
||||
<el-form-item label="工艺要求" prop="TechnologicalRequirements">
|
||||
<el-input v-model="form3.TechnologicalRequirements" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
<el-button type="primary" @click="submit1('form3')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchProcessClassification, searchProcessNameOfProcessClassification, searchTechnologicalRequirementsOfProcessNum, searchProcessClassificationOfProcessClassificationNum, addProcessClassification, editProcessClassification, delProcessClassification, addProcess, delProcess, editProcess, addTechnologicalRequirements, editTechnologicalRequirements, delTechnologicalRequirements } from '@/api/BasicData/WorkshopProcessMaintenance'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 工艺分类所需变量
|
||||
expands: [],
|
||||
tableData1: [],
|
||||
ProcessNum: '',
|
||||
loading1: false,
|
||||
loading2: false,
|
||||
loading3: false,
|
||||
ProcessClassificationNum: '',
|
||||
radio: null,
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
dialogFormVisible3: false,
|
||||
dialogFormVisible4: false,
|
||||
dialogFormVisible5: false,
|
||||
dialogFormVisible6: false,
|
||||
temp: null,
|
||||
ProcessClassificationNumS: '',
|
||||
form1: {
|
||||
ProcessClassification: ''
|
||||
},
|
||||
form2: {
|
||||
Process: '',
|
||||
ProcessShort: ''
|
||||
},
|
||||
form3: {
|
||||
TechnologicalRequirements: ''
|
||||
},
|
||||
rules1: {
|
||||
ProcessClassification: [{ required: true, message: '请输入工艺分类名称', trigger: 'blur' }]
|
||||
},
|
||||
rules2: {
|
||||
Process: [{ required: true, message: '请输入工艺名称', trigger: 'blur' }],
|
||||
ProcessShort: [{ required: true, message: '请输入工艺名称简称', trigger: 'blur' }]
|
||||
},
|
||||
rules3: {
|
||||
TechnologicalRequirements: [{ required: true, message: '请输入工艺要求', trigger: 'blur' }]
|
||||
},
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
Num: [],
|
||||
maxNum: '',
|
||||
max: [],
|
||||
code: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchProcessClassification()
|
||||
},
|
||||
methods: {
|
||||
searchProcessClassification() {
|
||||
this.loading1 = true
|
||||
searchProcessClassification(this.ProcessClassification).then(response => {
|
||||
this.loading1 = false
|
||||
this.tableData1 = response.data
|
||||
this.total1 = response.data
|
||||
return this.tableData1
|
||||
}).then(data => {
|
||||
this.Num = data
|
||||
for (let i = 0; i < this.Num.length; i++) {
|
||||
this.max.push(this.Num[i].工艺分类流水号)
|
||||
}
|
||||
return this.max
|
||||
}).then(data => {
|
||||
const a = data
|
||||
this.maxNum = a[0]
|
||||
for (let j = 0; j < a.length; j++) {
|
||||
if (this.maxNum < a[j]) {
|
||||
this.maxNum = a[j]
|
||||
}
|
||||
}
|
||||
return this.maxNum
|
||||
}).then(data => {
|
||||
const b = data
|
||||
this.radio = b
|
||||
return this.radio
|
||||
}).then(data => {
|
||||
const c = data
|
||||
this.loading2 = true
|
||||
searchProcessNameOfProcessClassification(c).then(response => {
|
||||
this.loading2 = false
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
})
|
||||
},
|
||||
addProcessClassification() {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.form1 = {}
|
||||
this.dialogFormVisible1 = true
|
||||
this.temp = 1
|
||||
},
|
||||
editProcessClassification() {
|
||||
if (this.radio !== '') {
|
||||
this.temp = 2
|
||||
this.dialogFormVisible2 = true
|
||||
searchProcessClassificationOfProcessClassificationNum(this.radio).then(response => {
|
||||
this.form1.ProcessClassification = response.data[0].工艺分类名称
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择工艺分类')
|
||||
}
|
||||
},
|
||||
submitProcessClassification() {
|
||||
editProcessClassification(this.radio, this.form1.ProcessClassification).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息更新成功')
|
||||
this.dialogFormVisible2 = false
|
||||
this.searchProcessClassification()
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
submitaddProcessClassification() {
|
||||
addProcessClassification(this.form1.ProcessClassification).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.searchProcessClassification()
|
||||
this.dialogFormVisible1 = false
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
},
|
||||
submit1(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.temp === 1) {
|
||||
this.submitaddProcessClassification()
|
||||
this.form1 = {}
|
||||
this.temp = null
|
||||
} else if (this.temp === 2) {
|
||||
this.submitProcessClassification()
|
||||
this.form1 = {}
|
||||
this.temp = null
|
||||
} else if (this.temp === 3) {
|
||||
this.submitaddProcess()
|
||||
this.form2 = {}
|
||||
this.temp = null
|
||||
} else if (this.temp === 4) {
|
||||
this.submiteditProcess()
|
||||
this.form2 = {}
|
||||
this.temp = null
|
||||
} else if (this.temp === 5) {
|
||||
this.submitTechnologicalRequirements()
|
||||
this.form3 = {}
|
||||
this.temp = null
|
||||
} else if (this.temp === 6) {
|
||||
this.submiteditTechnologicalRequirements()
|
||||
this.form3 = {}
|
||||
this.temp = null
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
delProcessClassification() {
|
||||
if (this.radio !== '') {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delProcessClassification(this.radio).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.searchProcessClassification()
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择工艺分类')
|
||||
}
|
||||
},
|
||||
calloff() {
|
||||
this.dialogFormVisible1 = false
|
||||
this.dialogFormVisible2 = false
|
||||
this.dialogFormVisible3 = false
|
||||
this.dialogFormVisible4 = false
|
||||
this.dialogFormVisible5 = false
|
||||
this.dialogFormVisible6 = false
|
||||
this.form1 = {}
|
||||
this.form2 = {}
|
||||
this.form3 = {}
|
||||
},
|
||||
getCurrentRow(row) {
|
||||
searchProcessClassificationOfProcessClassificationNum(this.radio).then(response => {
|
||||
this.form1.ProcessClassification = response.data[0].工艺分类名称
|
||||
})
|
||||
this.loading2 = true
|
||||
searchProcessNameOfProcessClassification(row).then(response => {
|
||||
this.loading2 = false
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
searchTechnologicalRequirementsOfProcessNum(row, expandedRows) {
|
||||
// this.expands = []
|
||||
// this.expands.push(row.工艺编号)
|
||||
if (expandedRows.length > 1) {
|
||||
expandedRows.shift()
|
||||
}
|
||||
this.loading3 = true
|
||||
searchTechnologicalRequirementsOfProcessNum(row.工艺编号).then(response => {
|
||||
this.loading3 = false
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
},
|
||||
addProcess() {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
if (this.radio !== '') {
|
||||
this.form2.Process = ''
|
||||
this.form2.ProcessShort = ''
|
||||
this.dialogFormVisible3 = true
|
||||
this.temp = 3
|
||||
} else {
|
||||
this.$message.warning('请选择一个工艺分类')
|
||||
}
|
||||
},
|
||||
submitaddProcess() {
|
||||
addProcess(this.radio, this.form2.Process, this.form2.ProcessShort).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.loading2 = true
|
||||
searchProcessNameOfProcessClassification(this.radio).then(response => {
|
||||
this.loading2 = false
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
this.dialogFormVisible3 = false
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
},
|
||||
editProcess(row) {
|
||||
this.dialogFormVisible4 = true
|
||||
this.temp = 4
|
||||
this.form2.Process = row.工艺名称
|
||||
this.form2.ProcessShort = row.工艺名称简称
|
||||
this.ProcessNum = row.工艺编号
|
||||
},
|
||||
submiteditProcess() {
|
||||
editProcess(this.ProcessNum, this.form2.Process, this.form2.ProcessShort).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息更新成功')
|
||||
this.dialogFormVisible4 = true
|
||||
searchProcessNameOfProcessClassification(this.radio).then(response => {
|
||||
this.loading2 = false
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
this.dialogFormVisible4 = false
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
getRowKeys(row) {
|
||||
return row.工艺编号
|
||||
},
|
||||
delProcess(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delProcess(row.工艺编号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.loading2 = true
|
||||
searchProcessNameOfProcessClassification(this.radio).then(response => {
|
||||
this.loading2 = false
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
addTechnologicalRequirements(row) {
|
||||
if (this.$refs['form3'] !== undefined) {
|
||||
this.$refs['form3'].resetFields()
|
||||
}
|
||||
this.ProcessNum = row.工艺编号
|
||||
this.form3.TechnologicalRequirements = ''
|
||||
this.dialogFormVisible5 = true
|
||||
this.temp = 5
|
||||
},
|
||||
submitTechnologicalRequirements() {
|
||||
addTechnologicalRequirements(this.ProcessNum, this.form3.TechnologicalRequirements).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.loading3 = true
|
||||
searchTechnologicalRequirementsOfProcessNum(this.ProcessNum).then(response => {
|
||||
this.loading3 = false
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
this.dialogFormVisible5 = false
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
},
|
||||
editTechnologicalRequirements(row) {
|
||||
this.temp = 6
|
||||
this.dialogFormVisible6 = true
|
||||
this.form3.TechnologicalRequirements = row.工艺要求
|
||||
this.code = row.工艺要求流水号
|
||||
this.ProcessNum = row.工艺编号
|
||||
},
|
||||
submiteditTechnologicalRequirements() {
|
||||
editTechnologicalRequirements(this.code, this.form3.TechnologicalRequirements).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息更新成功')
|
||||
this.loading3 = true
|
||||
searchTechnologicalRequirementsOfProcessNum(this.ProcessNum).then(response => {
|
||||
this.loading3 = false
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
this.dialogFormVisible6 = false
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
delTechnologicalRequirements(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delTechnologicalRequirements(row.工艺要求流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.loading3 = true
|
||||
searchTechnologicalRequirementsOfProcessNum(row.工艺编号).then(response => {
|
||||
this.loading3 = false
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card {
|
||||
margin-top: 15px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -59,12 +59,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="80">
|
||||
@@ -268,9 +268,8 @@ export default {
|
||||
this.PeopleNumber = this.id
|
||||
},
|
||||
searchMachine() { // 查询机床
|
||||
if (this.ProjectValue === '') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
this.Machine = []
|
||||
this.ProjectValue ? this.ProjectValue_check = 1 : this.ProjectValue_check = 0
|
||||
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
@@ -281,6 +280,7 @@ export default {
|
||||
})
|
||||
},
|
||||
searchGroupList() { // 查询组号
|
||||
this.GroupNum = []
|
||||
searchTeam(this.MachineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNum.push({
|
||||
@@ -291,16 +291,19 @@ export default {
|
||||
})
|
||||
},
|
||||
searchPeopleData() { // 查询人员
|
||||
this.People = []
|
||||
searchPeople().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.People.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].考勤编号
|
||||
value: parseInt(response.data[i].考勤编号)
|
||||
})
|
||||
}
|
||||
console.log(this.People)
|
||||
})
|
||||
},
|
||||
searchContractData() { // 查询合同
|
||||
this.Contract = []
|
||||
searchContract().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Contract.push({
|
||||
@@ -312,18 +315,10 @@ export default {
|
||||
},
|
||||
searchPartinfo() {
|
||||
this.tableDataPurchase = []
|
||||
if (this.ProjectValue === '') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
if (this.MachineValue === '') {
|
||||
this.MachineValue_check = 0
|
||||
}
|
||||
if (this.GroupNumValue === '') {
|
||||
this.GroupNumValue_check = 0
|
||||
}
|
||||
if (this.ContractValue === '') {
|
||||
this.ContractValue_check = 0
|
||||
}
|
||||
this.ProjectValue ? this.ProjectValue_check = 1 : this.ProjectValue_check = 0
|
||||
this.MachineValue ? this.MachineValue_check = 1 : this.MachineValue_check = 0
|
||||
this.GroupNumValue ? this.GroupNumValue_check = 1 : this.GroupNumValue_check = 0
|
||||
this.ContractValue ? this.ContractValue_check = 1 : this.ContractValue_check = 0
|
||||
this.listLoading = true
|
||||
searchDirectPart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue, this.ContractValue_check, this.ContractValue).then(response => {
|
||||
this.tableDataPurchase = response.data.rows
|
||||
@@ -349,8 +344,7 @@ export default {
|
||||
// 打开直达件表单
|
||||
addDirect(row) {
|
||||
this.PeopleValue = ''
|
||||
this.form = []
|
||||
console.log(row)
|
||||
this.form = {}
|
||||
this.dialogFormVisible = true
|
||||
this.materialNum = row.物料流水号
|
||||
this.purchaseContractNumber = row.采购合同明细流水号
|
||||
@@ -367,7 +361,7 @@ export default {
|
||||
this.dialogFormVisible1 = true
|
||||
this.directPartNumber = row.直达件流水号
|
||||
this.form.DirectNumber = row.到货数量
|
||||
this.PeopleValue = row.领用人员流水号
|
||||
this.PeopleValue = parseInt(row.领用人员流水号)
|
||||
this.form.DirectNote = row.备注
|
||||
},
|
||||
// 修改直达件
|
||||
|
||||
@@ -46,12 +46,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
@@ -76,17 +76,17 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
<el-card>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
@@ -109,12 +109,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
@@ -127,7 +127,7 @@
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<div style="margin: 10px 15px">
|
||||
<el-button size="small" type="primary" icon="el-icon-edit" @click="total = 0;pageSize = 10;pageList = 1;exchange()" >交换</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-edit" @click="total = 0;pageSize = 10;pageList = 1;exchange('form')" >交换</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
@@ -149,12 +149,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
@@ -167,24 +167,6 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--新增交换件对话框-->
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form-item label="交换单编号" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-input v-model="form.ExchangeNumber" size="small" placeholder="请输入零件交换单编号" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="交换数量" prop="TotalContractAmount" label-width="100px">
|
||||
<el-input v-model="form.ExchangeNumberx" size="small" placeholder="请输入交换数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="TotalContractAmount" label-width="100px">
|
||||
<el-input v-model="form.ExchangeNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button v-show="title==='交换'" type="primary" @click="addListDetailinfor('form')">确 定</el-button>
|
||||
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
@@ -240,22 +222,40 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="180">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 0px" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 0 0px" @click="dropListinfor(scope.row)">删除</el-button>
|
||||
<el-button :disabled="scope.row.是否禁用" size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 0px" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button :disabled="scope.row.是否禁用" size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 0 0px" @click="dropListinfor(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total1"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total1"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form-item label="交换单编号" prop="ExchangeNumber" label-width="100px" size="small">
|
||||
<el-input v-model="form.ExchangeNumber" size="small" placeholder="请输入零件交换单编号" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="交换数量" prop="ExchangeNumberx" label-width="100px">
|
||||
<el-input v-model="form.ExchangeNumberx" size="small" placeholder="请输入交换数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="ExchangeNote" label-width="100px">
|
||||
<el-input v-model="form.ExchangeNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button v-show="title==='交换'" type="primary" @click="addListDetailinfor('form')">确 定</el-button>
|
||||
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit(scope.$index, scope.row, 'form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -265,13 +265,15 @@ import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ProjectValue: ' ',
|
||||
count1: 0,
|
||||
count2: 0, // 清表单验证计数器
|
||||
ProjectValue: '',
|
||||
Project: [],
|
||||
ProjectValue_check: 1,
|
||||
MachineValue: ' ',
|
||||
ProjectValue_check: 0,
|
||||
MachineValue: '',
|
||||
Machine: [],
|
||||
MachineValue_check: 1,
|
||||
GroupNumValue: ' ',
|
||||
GroupNumValue: '',
|
||||
GroupNumValue_check: 1,
|
||||
GroupNum: [],
|
||||
tableDataBasic: [],
|
||||
@@ -302,7 +304,7 @@ export default {
|
||||
rules: { // 表单验证规则
|
||||
ExchangeNumber: [{ required: true, message: '请输入交换件编号', trigger: 'blur' }],
|
||||
ExchangeNumberx: [{ required: true, message: '请输入交换件数量', trigger: 'blur' }],
|
||||
ExchangeNote: [{ required: true, message: '请输入交换件备注', trigger: 'change' }]
|
||||
ExchangeNote: [{ required: true, message: '请输入交换件备注', trigger: 'blur' }]
|
||||
},
|
||||
PageCurrent: 1,
|
||||
PageSize: 10,
|
||||
@@ -334,26 +336,33 @@ export default {
|
||||
// 获取人员编号
|
||||
getpeopleid() {
|
||||
this.picikingPeople = this.id
|
||||
console.log(this.picikingPeople)
|
||||
},
|
||||
searchMachine() { // 查询机床
|
||||
if (this.ProjectValue === '') {
|
||||
searchMachine() {
|
||||
this.MachineValue = ''
|
||||
this.Machine = []
|
||||
this.GroupNumValue = ''
|
||||
this.GroupNum = []
|
||||
if (this.ProjectValue !== '') {
|
||||
this.ProjectValue_check = 1
|
||||
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchGroupList() { // 查询组号
|
||||
searchGroupList() {
|
||||
this.GroupNumValue = ''
|
||||
this.GroupNum = []
|
||||
searchTeam(this.MachineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNum.push({
|
||||
label: response.data[i].组件名称,
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
@@ -362,19 +371,18 @@ export default {
|
||||
searchPartinfo() {
|
||||
this.tableDataPurchase = []
|
||||
this.tableDataBasic = []
|
||||
if (this.ProjectValue === ' ') {
|
||||
if (this.ProjectValue === '') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
if (this.MachineValue === ' ') {
|
||||
if (this.MachineValue === '') {
|
||||
this.MachineValue_check = 0
|
||||
}
|
||||
if (this.GroupNumValue === ' ') {
|
||||
if (this.GroupNumValue === '') {
|
||||
this.GroupNumValue_check = 0
|
||||
}
|
||||
this.listLoading = true
|
||||
searchPurchasePart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||
this.tableDataPurchase = response.data.rows
|
||||
console.log(this.tableDataPurchase)
|
||||
this.total = response.data.total
|
||||
})
|
||||
this.listLoading = false
|
||||
@@ -392,44 +400,76 @@ export default {
|
||||
getExchangeTable() {
|
||||
this.listLoading1 = true
|
||||
searchExchangePart(this.PageCurrent1, this.PageSize1).then(response => {
|
||||
this.tableDataExchange = response.data.rows
|
||||
const data = response.data.rows
|
||||
console.log(data)
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].审批通过 === '1' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
}
|
||||
this.tableDataExchange = data
|
||||
this.total1 = response.data.total
|
||||
this.listLoading1 = false
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.PageCurrent1 = 1
|
||||
this.PageSize1 = val
|
||||
this.getExchangeTable()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.PageCurrent1 = val
|
||||
this.getExchangeTable()
|
||||
},
|
||||
// 选择领料单
|
||||
chooseListinfor(row) {
|
||||
this.pickingListNumberx = row.领料单流水号
|
||||
console.log(this.pickingListNumberx)
|
||||
this.searchListDetailt()
|
||||
},
|
||||
// 增加交换件
|
||||
addListDetailinfor() {
|
||||
addExchangepart(this.form.ExchangeNumber, this.tableData1[0].组件零件流水号, this.tableData1[0].物料流水号, this.tableData1[0].采购合同明细流水号, this.tableData2[0].组件零件流水号, this.tableData1[0].物料名称, this.tableData2[0].物料名称, this.tableData2[0].货位流水号, this.form.ExchangeNumberx, this.picikingPeople, this.form.ExchangeNote).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else { this.$message.error('增加失败') }
|
||||
addListDetailinfor(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
addExchangepart(this.form.ExchangeNumber, this.tableData1[0].组件零件流水号, this.tableData1[0].物料流水号, this.tableData1[0].采购合同明细流水号, this.tableData2[0].组件零件流水号, this.tableData1[0].物料名称, this.tableData2[0].物料名称, this.tableData2[0].货位流水号, this.form.ExchangeNumberx, this.picikingPeople, this.form.ExchangeNote).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else { this.$message.error('增加失败') }
|
||||
}).then(() => {
|
||||
this.dialogFormVisible = false
|
||||
this.PageCurrent1 = 1
|
||||
this.getExchangeTable()
|
||||
})
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.getExchangeTable()
|
||||
},
|
||||
// 打开交换表单
|
||||
exchange() {
|
||||
this.title = '交换'
|
||||
this.dialogFormVisible = true
|
||||
exchange(form) {
|
||||
if (this.tableData1.length === 0) {
|
||||
this.$message.error('请选择交换件')
|
||||
} else if (this.tableData2.length === 0) {
|
||||
this.$message.error('请选择交换件')
|
||||
} else {
|
||||
this.count1 = this.count1 + 1
|
||||
if (this.count1 !== 1) {
|
||||
this.$refs[form].resetFields()
|
||||
}
|
||||
this.title = '交换'
|
||||
this.form.ExchangeNumber = ''
|
||||
this.form.ExchangeNumberx = ''
|
||||
this.form.ExchangeNote = ''
|
||||
this.dialogFormVisible = true
|
||||
}
|
||||
},
|
||||
// 重置表单
|
||||
callOff() {
|
||||
callOff(formName) {
|
||||
this.form.ExchangeNumber = ''
|
||||
this.form.ExchangeNumberx = ''
|
||||
this.form.ExchangeNote = ''
|
||||
this.dialogFormVisible = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
// 选中零件交换
|
||||
selecting(row) {
|
||||
const arr = new Array(row)
|
||||
this.tableData1 = arr
|
||||
console.log(this.tableData1)
|
||||
},
|
||||
// 选中被零件交换
|
||||
selected(row) {
|
||||
@@ -448,8 +488,9 @@ export default {
|
||||
dropExchangeList(this.exchangeListNumber, this.eTeamPartNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.getExchangeTable().then(response => {
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.PageCurrent1 = 1
|
||||
this.getExchangeTable()
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchTable, insertOne, getinventory, getlocate } from '@/api/Inventory/Inboundscanning'
|
||||
import { searchTable, insertOne, getinventory, getlocate } from '@/api/Inventory/GenneralPart'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { wsuri, name } from '@/utils/request'
|
||||
import print from '@/vendor/print'
|
||||
@@ -245,7 +245,7 @@ export default {
|
||||
this.locateName = []
|
||||
this.locateNumber = ''
|
||||
if (this.inventoryNumber) {
|
||||
this.getSelect(getlocate, ['货位名称'], 'locateName', this.inventoryNumber)
|
||||
this.getSelect(getlocate, ['货位名称', '货位流水号'], 'locateName', this.inventoryNumber)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,6 +76,7 @@
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" class="el-icon-success" @click="Innumber">入库</el-button>
|
||||
<el-button
|
||||
:disabled="scope.row.是否禁用"
|
||||
size="mini"
|
||||
type="danger"
|
||||
class="el-icon-delete"
|
||||
@@ -178,6 +179,8 @@ export default {
|
||||
if (response.data.length === 0) {
|
||||
this.listLoading = false
|
||||
this.$message.warning('无此零件')
|
||||
} else if (response.data[0].剩余数量 === 0) {
|
||||
this.$message.warning('该零件已入库完毕')
|
||||
} else {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (response.data[0].工艺计划流水号 === this.tableData[i].工艺计划流水号) {
|
||||
@@ -212,18 +215,22 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
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: '零件入库成功!'
|
||||
if (this.locateNumber === '') {
|
||||
this.$message.error('请选择货位')
|
||||
} else {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
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()
|
||||
})
|
||||
}).then(() => {
|
||||
this.Empty()
|
||||
})
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -45,17 +45,14 @@
|
||||
{{ scope.row.领用人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" min-width="100" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
type="primary"
|
||||
@click="handleEdit(scope.row)">修改</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="100" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
@click="handleEdit(scope.$index, scope.row, 'form')">修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@@ -100,6 +97,11 @@
|
||||
{{ scope.row.仓库名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="追溯码" width="150">
|
||||
<template slot-scope="scope">
|
||||
<canvas :id="canvas[scope.$index]"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="100" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -117,14 +119,15 @@
|
||||
</el-table>
|
||||
</el-card>
|
||||
<!--仓库表单-->
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="增加仓库" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="增加仓库" center width="450px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="center" label-width="110px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓库编号" prop="WarehouseNumber">
|
||||
<el-input
|
||||
v-model="form.WarehouseNumber"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -135,6 +138,7 @@
|
||||
<el-input
|
||||
v-model="form.WarehouseName"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -145,6 +149,7 @@
|
||||
<el-input
|
||||
v-model="form.WarehouseDescription"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -154,6 +159,7 @@
|
||||
<el-form-item label="地址" prop="Address">
|
||||
<el-input
|
||||
v-model="form.Address"
|
||||
clearable
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
@@ -161,10 +167,10 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="领用者" prop="TotalContractAmount" label-width="100px">
|
||||
<el-select v-model="PeopleValue" filterable clearable size="small" placeholder="领用者" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-form-item label="联系人" prop="ContactpeopleValue">
|
||||
<el-select v-model="form.ContactpeopleValue" clearable filterable size="small" placeholder="领用者" style="width: 200px;margin-right:10px">
|
||||
<el-option
|
||||
v-for="item in People"
|
||||
v-for="item in Contactpeople"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
@@ -177,6 +183,7 @@
|
||||
<el-form-item label="备注" prop="Note">
|
||||
<el-input
|
||||
v-model="form.Note"
|
||||
clearable
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
@@ -213,7 +220,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="永久" prop="永久">
|
||||
<el-form-item label="是否永久" prop="永久">
|
||||
<el-input
|
||||
v-model="form2.永久"
|
||||
size="small"
|
||||
@@ -241,9 +248,12 @@
|
||||
</template>
|
||||
<script>
|
||||
import { initWarehouse, addWarehouse, alterWarehouse, deleteWarehouse, searchLocate, addLocate, alterLocate, deleteLocate, searchPeople } from '@/api/Inventory/InventoryManagement'
|
||||
import QRCode from 'qrcode'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
Contactpeople: [], // 联系人
|
||||
count2: 0, // 清表单验证计数器
|
||||
tableData: [],
|
||||
tableData2: [],
|
||||
wareHouse: '',
|
||||
@@ -254,10 +264,12 @@ export default {
|
||||
WarehouseName: '', // 仓库名称
|
||||
WarehouseDescription: '', // 仓库描述
|
||||
Address: '', // 地址
|
||||
ContactpeopleValue: '',
|
||||
Note: '' // 备注
|
||||
},
|
||||
rules: { // 表单验证规则
|
||||
WarehouseNumber: [{ required: true, message: '请输入仓库编号', trigger: 'change' }],
|
||||
WarehouseNumber: [{ required: true, message: '请输入仓库编号', trigger: 'blur' }],
|
||||
ContactpeopleValue: [{ required: true, message: '请选择联系人', trigger: 'change' }],
|
||||
WarehouseName: [{ required: true, message: '请输入仓库名称', trigger: 'blur' }],
|
||||
WarehouseDescription: [{ required: true, message: '请输入仓库描述', trigger: 'blur' }],
|
||||
Address: [{ required: true, message: '请输入地址', trigger: 'blur' }],
|
||||
@@ -294,7 +306,6 @@ export default {
|
||||
this.listLoading = true
|
||||
initWarehouse().then(response => {
|
||||
this.listLoading = false
|
||||
console.log(response)
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.tableData.push({
|
||||
仓库流水号: response.data[i].仓库流水号,
|
||||
@@ -302,8 +313,9 @@ export default {
|
||||
仓库名称: response.data[i].仓库名称,
|
||||
仓库描述: response.data[i].仓库描述,
|
||||
地址: response.data[i].地址,
|
||||
联系人: response.data[i].联系人,
|
||||
备注: response.data[i].备注
|
||||
联系人: response.data[i].姓名,
|
||||
备注: response.data[i].备注,
|
||||
人员编号: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -313,11 +325,12 @@ export default {
|
||||
this.getLocate()
|
||||
},
|
||||
searchPeopleData() { // 查询人员
|
||||
this.Contactpeople = []
|
||||
searchPeople().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.People.push({
|
||||
this.Contactpeople.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].考勤编号
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -334,6 +347,7 @@ export default {
|
||||
不可用量: response.data[i].不可用量,
|
||||
仓库名称: response.data[i].仓库名称
|
||||
})
|
||||
this.useqrcode()
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -355,19 +369,20 @@ export default {
|
||||
this.form.WarehouseName = ''
|
||||
this.form.WarehouseDescription = ''
|
||||
this.form.Address = ''
|
||||
this.form.Contactpeople = ''
|
||||
this.form.ContactpeopleValue = ''
|
||||
this.form.Note = ''
|
||||
this.temp = null
|
||||
this.temp = ''
|
||||
} else if (this.temp === 2) {
|
||||
this.chaEdit()
|
||||
this.temp = null
|
||||
this.temp = ''
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 执行增加仓库
|
||||
addTableData() {
|
||||
addWarehouse(this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.PeopleValue, this.form.Note).then(response => {
|
||||
addWarehouse(this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.form.ContactpeopleValue, this.form.Note).then(response => {
|
||||
console.log(this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.form.ContactpeopleValue, this.form.Note)
|
||||
this.dialogFormVisible = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('添加成功')
|
||||
@@ -375,7 +390,7 @@ export default {
|
||||
this.form.WarehouseName = ''
|
||||
this.form.WarehouseDescription = ''
|
||||
this.form.Address = ''
|
||||
this.form.Contactpeople = ''
|
||||
this.form.ContactpeopleValue = ''
|
||||
this.form.Note = ''
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
@@ -384,29 +399,28 @@ export default {
|
||||
})
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
handleEdit(index, row, formName) {
|
||||
console.log(row)
|
||||
this.count2 = this.count2 + 1
|
||||
if (this.count2 !== 1) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
this.temp = 2
|
||||
this.dialogFormVisible = true
|
||||
this.form.WarehouseNumber = row.仓库编号
|
||||
this.form.WarehouseName = row.仓库名称
|
||||
this.form.WarehouseDescription = row.仓库描述
|
||||
this.form.Address = row.地址
|
||||
this.form.Contactpeople = row.联系人
|
||||
this.form.ContactpeopleValue = row.人员编号
|
||||
this.form.Note = row.备注
|
||||
this.HouseNumber = row.仓库流水号
|
||||
},
|
||||
// 执行修改
|
||||
chaEdit() {
|
||||
alterWarehouse(this.HouseNumber, this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.form.Contactpeople, this.form.Note).then(response => {
|
||||
this.dialogFormVisible = false
|
||||
alterWarehouse(this.HouseNumber, this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.form.ContactpeopleValue, this.form.Note).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息更新成功')
|
||||
this.form.WarehouseNumber = ''
|
||||
this.form.WarehouseName = ''
|
||||
this.form.WarehouseDescription = ''
|
||||
this.form.Address = ''
|
||||
this.form.Contactpeople = ''
|
||||
this.form.Note = ''
|
||||
this.dialogFormVisible = false
|
||||
this.getTable()
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
@@ -432,7 +446,6 @@ export default {
|
||||
},
|
||||
// 重置表单
|
||||
callOff(formName) {
|
||||
console.log(1515)
|
||||
this.form = {}
|
||||
this.form2.ContractNumberValue = ''
|
||||
this.form2.EntryName = ''
|
||||
@@ -530,6 +543,15 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
useqrcode() {
|
||||
// 生成的二维码内容,可以添加变量
|
||||
this.QueryDetail = this.num
|
||||
var canvas = document.getElementById('canvas')
|
||||
QRCode.toCanvas(canvas, this.QueryDetail, function(error) {
|
||||
if (error) console.error(error)
|
||||
console.log('success!')
|
||||
})
|
||||
},
|
||||
// 重置表单
|
||||
callLocateOff(formName) {
|
||||
this.form2 = {}
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="addDirectPartm()">确 定</el-button>
|
||||
<el-button type="primary" @click="addDirectPartm()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-card>
|
||||
@@ -113,14 +113,14 @@
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<el-table-column label="机床图号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<el-table-column label="组号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
@@ -177,7 +177,8 @@ export default {
|
||||
PeopleNumber: '',
|
||||
tableDataOut: [],
|
||||
listLoading: '',
|
||||
listLoading1: ''
|
||||
listLoading1: '',
|
||||
partnumber: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -200,7 +201,6 @@ export default {
|
||||
this.PeopleNumber = this.id
|
||||
},
|
||||
searchMachine() { // 查询机床
|
||||
console.log(1351)
|
||||
if (this.ProjectValue === '') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
@@ -243,6 +243,7 @@ export default {
|
||||
},
|
||||
// 打开表单
|
||||
parOut(row) {
|
||||
console.log(row)
|
||||
this.form = []
|
||||
this.MachineValue = ''
|
||||
this.GroupNumValue = ''
|
||||
@@ -250,6 +251,8 @@ export default {
|
||||
this.contractNumber = row.离线合同明细流水号
|
||||
this.locateNumber = row.货位流水号
|
||||
this.materialNumber = row.物料流水号
|
||||
this.partnumber = row.货位存量
|
||||
console.log(this.partnumber)
|
||||
this.searchoutRecord()
|
||||
},
|
||||
// 重置表单
|
||||
@@ -271,21 +274,24 @@ export default {
|
||||
},
|
||||
// 离线外购件出库
|
||||
addDirectPartm() {
|
||||
console.log(this.contractNumber, this.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.MachineValue, this.GroupNumValue, this.materialNumber, this.PeopleNumber)
|
||||
outlinePartOut(this.contractNumber, this.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.MachineValue, this.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.searchDirect()
|
||||
} else {
|
||||
this.$message.error('信息添加失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
if (this.partnumber < this.form.DirectNumber) {
|
||||
this.$message.error('请正确输入数量')
|
||||
} else {
|
||||
outlinePartOut(this.contractNumber, this.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.MachineValue, this.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.searchDirect()
|
||||
} else {
|
||||
this.$message.error('信息添加失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,14 +52,14 @@
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="130">
|
||||
<el-table-column label="机床图号" align="center" min-width="130">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="130">
|
||||
<el-table-column label="组号" align="center" min-width="130">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领用数量" align="center" min-width="130">
|
||||
@@ -84,7 +84,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="small" type="primary" icon="el-icon-back" style="margin: 0 0 0 0px" @click="partOut(scope.row)">出库</el-button>
|
||||
<el-button :disabled="scope.row.是否出库" size="small" type="primary" icon="el-icon-back" style="margin: 0 0 0 0px" @click="partOut(scope.row)">出库</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -93,7 +93,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchList, searchListDetail, PurchasePart, BasicPart, WorkShopPart } from '@/api/Inventory/PartOut'
|
||||
import { searchList, searchListDetail, PurchasePart, BasicPart, WorkShopPart, ListDetailOut } from '@/api/Inventory/PartOut'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
@@ -113,6 +113,7 @@ export default {
|
||||
tableDataPicking: [], // 领料单明细表格
|
||||
listNumber: '',
|
||||
pickingListNumber: null, // 领料单编号
|
||||
pickingListNumber_check: 1,
|
||||
pickingListNumberx: '', // 领料单流水号
|
||||
picikingPeople: '', // 领料人流水号
|
||||
partProjectNumber: '', // 项目流水号
|
||||
@@ -144,8 +145,14 @@ export default {
|
||||
},
|
||||
// 查询领料单
|
||||
searchListinfor() {
|
||||
if (this.pickingListNumber === null) {
|
||||
this.pickingListNumber_check = 0
|
||||
}
|
||||
this.listLoading = true
|
||||
searchList(this.pickingListNumber).then(response => {
|
||||
searchList(this.pickingListNumber_check, this.pickingListNumber).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].领料时间 = response.data[i].领料时间.substring(0, response.data[i].领料时间.length - 8)
|
||||
}
|
||||
this.tableData1 = response.data
|
||||
this.listLoading = false
|
||||
})
|
||||
@@ -154,7 +161,11 @@ export default {
|
||||
searchListDetailt() {
|
||||
this.listLoading1 = true
|
||||
searchListDetail(this.pickingListNumberx).then(response => {
|
||||
this.tableDataPicking = response.data
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].是否出库 === '1' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
}
|
||||
this.tableDataPicking = data
|
||||
this.listLoading1 = false
|
||||
})
|
||||
},
|
||||
@@ -168,15 +179,17 @@ export default {
|
||||
// 出库
|
||||
partOut(row) {
|
||||
console.log(row)
|
||||
if (row.采购合同明细流水号 !== null) {
|
||||
if (row.车间外购 === 1) {
|
||||
WorkShopPart(row.采购合同明细流水号, this.getpicikingPeople, row.出库数量, row.货位流水号, row.备注).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
ListDetailOut(row.领料单明细流水号)
|
||||
this.$message.success('出库成功')
|
||||
} else { this.$message.error('出库失败') }
|
||||
})
|
||||
} else if (row.零件类型 === 1 || row.零件类型 === 2) {
|
||||
PurchasePart(row.组件零件流水号, this.getpicikingPeople, row.出库数量, row.货位流水号, row.备注).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
ListDetailOut(row.领料单明细流水号)
|
||||
this.$message.success('出库成功')
|
||||
} else { this.$message.error('出库失败') }
|
||||
})
|
||||
@@ -184,9 +197,11 @@ export default {
|
||||
BasicPart(row.工艺计划流水号, row.出库数量, row.收件信息ID, row.备注).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('出库成功')
|
||||
ListDetailOut(row.领料单明细流水号)
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
}
|
||||
this.searchListDetailt()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
{{ scope.row.领料单编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领料时间" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-table-column label="领料时间" align="center" min-width="200" >
|
||||
<template slot-scope="scope" value-format="yyyy-MM-dd">
|
||||
{{ scope.row.领料时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -81,14 +81,14 @@
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="130">
|
||||
<el-table-column label="机床图号" align="center" min-width="130">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="130">
|
||||
<el-table-column label="组号" align="center" min-width="130">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领用数量" align="center" min-width="50">
|
||||
@@ -153,14 +153,14 @@
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<el-table-column label="机床图号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<el-table-column label="组号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" min-width="80">
|
||||
@@ -168,11 +168,21 @@
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.可出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待出库数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.待出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="80">
|
||||
<template slot-scope="scope" align="center">
|
||||
{{ scope.row.零件图号 }}
|
||||
@@ -230,14 +240,19 @@
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<el-table-column label="机床图号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<el-table-column label="组号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" align="center" min-width="80">
|
||||
@@ -245,6 +260,11 @@
|
||||
{{ scope.row.货位存量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待出库数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.待出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类型名称 }}
|
||||
@@ -297,24 +317,34 @@
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<el-table-column label="机床图号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<el-table-column label="组号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位存量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待出库数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.待出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件类型 }}
|
||||
{{ scope.row.类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="80">
|
||||
@@ -336,61 +366,61 @@
|
||||
</el-card>
|
||||
<!--基本件领料对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisible1" title="基本件通用件领料" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form-item label="出库数量" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" class="demo-ruleForm">
|
||||
<el-form-item label="出库数量" prop="OutNumber" label-width="100px" size="small">
|
||||
<el-input v-model="form.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库备注" prop="TotalContractAmount" label-width="100px">
|
||||
<el-form-item label="出库备注" prop="outNote" label-width="100px">
|
||||
<el-input v-model="form.outNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="addBasicListDetail()">确 定</el-button>
|
||||
<el-button type="primary" @click="addBasicListDetail('form')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--外购件领料对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="外购件标准件领料" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form-item label="出库数量" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-input v-model="form.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库备注" prop="TotalContractAmount" label-width="100px">
|
||||
<el-input v-model="form.outNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="execaddListDetail()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--车间采购件领料对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisibleWork" title="车间采购件领料" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form-item label="出库数量" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-input v-model="form.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库备注" prop="TotalContractAmount" label-width="100px">
|
||||
<el-input v-model="form.outNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="addWorkshopListDetail()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--编辑领料明细对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="领料单明细" center width="380px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left">
|
||||
<el-form-item label="出库数量" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" class="demo-ruleForm">
|
||||
<el-form-item label="出库数量" prop="OutNumber" label-width="100px" size="small">
|
||||
<el-input v-model="form2.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库备注" prop="TotalContractAmount" label-width="100px">
|
||||
<el-form-item label="出库备注" prop="outNote" label-width="100px">
|
||||
<el-input v-model="form2.outNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form2')">取消</el-button>
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="execaddListDetail('form2')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--车间采购件领料对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisibleWork" title="车间采购件领料" center width="380px">
|
||||
<el-form ref="form3" :model="form3" :rules="rules3" label-position="left" class="demo-ruleForm">
|
||||
<el-form-item label="出库数量" prop="OutNumber" label-width="100px" size="small">
|
||||
<el-input v-model="form3.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库备注" prop="outNote" label-width="100px">
|
||||
<el-input v-model="form3.outNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="addWorkshopListDetail('form3')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--编辑领料明细对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="领料单明细" center width="380px">
|
||||
<el-form ref="form4" :model="form4" :rules="rules4" label-position="left" class="demo-ruleForm">
|
||||
<el-form-item label="出库数量" prop="OutNumber" label-width="100px" size="small">
|
||||
<el-input v-model="form4.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库备注" prop="outNote" label-width="100px">
|
||||
<el-input v-model="form4.outNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form4')">取消</el-button>
|
||||
<el-button type="primary" @click="submitChannge()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -434,14 +464,14 @@ import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ProjectValue: ' ',
|
||||
ProjectValue: '',
|
||||
Project: [],
|
||||
ProjectValue_check: 1,
|
||||
MachineValue: ' ',
|
||||
MachineValue: null,
|
||||
Machine: [],
|
||||
MachineValue_check: 1,
|
||||
GroupNumValue: ' ',
|
||||
GroupNumValue_check: 1,
|
||||
MachineValue_check: 0,
|
||||
GroupNumValue: null,
|
||||
GroupNumValue_check: 0,
|
||||
GroupNum: [],
|
||||
tableDataBasic: [],
|
||||
tableDataPurchase: [],
|
||||
@@ -473,6 +503,22 @@ export default {
|
||||
OutNumber: [{ required: true, message: '请输入出库数量', trigger: 'blur' }],
|
||||
outNote: [{ required: true, message: '请输入出库备注', trigger: 'blur' }]
|
||||
},
|
||||
form3: {
|
||||
OutNumber: '', // 出库数量
|
||||
outNote: '' // 出库备注
|
||||
},
|
||||
rules3: { // 表单验证规则
|
||||
OutNumber: [{ required: true, message: '请输入出库数量', trigger: 'blur' }],
|
||||
outNote: [{ required: true, message: '请输入出库备注', trigger: 'blur' }]
|
||||
},
|
||||
form4: {
|
||||
OutNumber: '', // 出库数量
|
||||
outNote: '' // 出库备注
|
||||
},
|
||||
rules4: { // 表单验证规则
|
||||
OutNumber: [{ required: true, message: '请输入出库数量', trigger: 'blur' }],
|
||||
outNote: [{ required: true, message: '请输入出库备注', trigger: 'blur' }]
|
||||
},
|
||||
partType: '', // 零件类型
|
||||
craftplannumber: '', // 工艺计划流水号
|
||||
receive: '', // 收件信息ID
|
||||
@@ -508,7 +554,11 @@ export default {
|
||||
tableDataHouse: [],
|
||||
listLoadingx: '',
|
||||
purchaseDetailNum: '',
|
||||
dialogFormVisibleWork: false
|
||||
dialogFormVisibleWork: false,
|
||||
time: [],
|
||||
materialLocate: '',
|
||||
enableOut: '',
|
||||
pickingListNumber_check: 1
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -530,8 +580,14 @@ export default {
|
||||
console.log(this.picikingPeople)
|
||||
},
|
||||
searchMachine() { // 查询机床
|
||||
if (this.ProjectValue === ' ') {
|
||||
this.MachineValue = ''
|
||||
this.Machine = []
|
||||
this.GroupNumValue = ''
|
||||
this.GroupNum = []
|
||||
if (this.ProjectValue === '') {
|
||||
this.ProjectValue_check = 0
|
||||
} else {
|
||||
this.ProjectValue_check = 1
|
||||
}
|
||||
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
@@ -543,6 +599,8 @@ export default {
|
||||
})
|
||||
},
|
||||
searchGroupList() { // 查询组号
|
||||
this.GroupNumValue = ''
|
||||
this.GroupNum = []
|
||||
searchTeam(this.MachineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNum.push({
|
||||
@@ -555,14 +613,14 @@ export default {
|
||||
searchPartinfo() {
|
||||
this.tableDataPurchase = []
|
||||
this.tableDataBasic = []
|
||||
if (this.ProjectValue === ' ') {
|
||||
this.ProjectValue_check = 0
|
||||
if (this.ProjectValue !== null && this.ProjectValue !== '') {
|
||||
this.ProjectValue_check = 1
|
||||
}
|
||||
if (this.MachineValue === ' ') {
|
||||
this.MachineValue_check = 0
|
||||
if (this.MachineValue !== null && this.MachineValue !== '') {
|
||||
this.MachineValue_check = 1
|
||||
}
|
||||
if (this.GroupNumValue === ' ') {
|
||||
this.GroupNumValue_check = 0
|
||||
if (this.GroupNumValue !== null && this.GroupNumValue !== '') {
|
||||
this.GroupNumValue_check = 1
|
||||
}
|
||||
this.listLoading = true
|
||||
this.listLoading1 = true
|
||||
@@ -587,23 +645,23 @@ export default {
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.PageCurrent = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.PageCurrent1 = 1
|
||||
this.PageSize1 = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
handleCurrentChange(val) {
|
||||
this.PageCurrent1 = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.PageCurrent = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleSizeChangex(val) {
|
||||
this.PageCurrentx = 1
|
||||
this.PageSizex = val
|
||||
@@ -615,11 +673,18 @@ export default {
|
||||
},
|
||||
// 查询领料单
|
||||
searchListinfor() {
|
||||
if (this.pickingListNumber === null) {
|
||||
this.pickingListNumber_check = 0
|
||||
}
|
||||
this.listLoading2 = true
|
||||
searchList(this.PageCurrent2, this.PageSize2, this.pickingListNumber).then(response => {
|
||||
searchList(this.PageCurrent2, this.PageSize2, this.pickingListNumber_check, this.pickingListNumber).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
response.data.rows[i].领料时间 = response.data.rows[i].领料时间.substring(0, response.data.rows[i].领料时间.length - 8)
|
||||
}
|
||||
this.tableData1 = response.data.rows
|
||||
this.listLoading2 = false
|
||||
this.total2 = response.data.total
|
||||
console.log(response)
|
||||
})
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
@@ -707,9 +772,9 @@ export default {
|
||||
this.partProjectNumber = row.项目流水号
|
||||
this.partProjectName = row.项目名称
|
||||
this.partMachineNumber = row.机床流水号
|
||||
this.partMachineName = row.机床名称
|
||||
this.partMachineName = row.机床图号
|
||||
this.partGroupNumber = row.组件流水号
|
||||
this.partGroupName = row.组件名称
|
||||
this.partGroupName = row.组号
|
||||
this.partType = row.零件类型
|
||||
this.craftplannumber = row.工艺计划流水号
|
||||
this.receive = row.收件信息id
|
||||
@@ -721,23 +786,28 @@ export default {
|
||||
this.materialName = row.零件名称
|
||||
this.materialType = row.零件类型名称
|
||||
this.materialNumber = row.零件图号
|
||||
console.log(this.receive, 41645)
|
||||
this.enableOut = row.可出库数量
|
||||
},
|
||||
addBasicListDetail() {
|
||||
addBasicListDetail(formName) {
|
||||
if (this.pickingListNumberx === '') {
|
||||
this.$message.error('请选择领料单')
|
||||
} if (this.form.OutNumber === '') {
|
||||
this.$message.error('请输入领用数量')
|
||||
} else if (this.form.OutNumber === '' || this.form.OutNumber > this.enableOut) {
|
||||
this.$message.error('请正确输入领用数量')
|
||||
} else {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form.OutNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.teamPart, this.locatenumber, 0, this.materialLocate).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible1 = false
|
||||
this.searchListinfor()
|
||||
}
|
||||
})
|
||||
}
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form.OutNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.teamPart, this.locatenumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible1 = false
|
||||
this.searchListinfor()
|
||||
},
|
||||
// 增加外购件领料单明细
|
||||
addListDetailinfor(row) {
|
||||
@@ -745,9 +815,9 @@ export default {
|
||||
this.partProjectNumber = row.项目流水号
|
||||
this.partProjectName = row.项目名称
|
||||
this.partMachineNumber = row.机床流水号
|
||||
this.partMachineName = row.机床名称
|
||||
this.partMachineName = row.机床图号
|
||||
this.partGroupNumber = row.组件流水号
|
||||
this.partGroupName = row.组件名称
|
||||
this.partGroupName = row.组号
|
||||
this.partType = row.零件类型代码
|
||||
this.craftplannumber = row.工艺计划流水号
|
||||
this.receive = row.收件信息ID
|
||||
@@ -758,23 +828,29 @@ export default {
|
||||
this.materialType = row.物料规格
|
||||
this.dialogFormVisible = true
|
||||
this.purchaseDetailNum = row.采购合同明细流水号
|
||||
this.materialLocate = row.物料与货位对照流水号
|
||||
this.enableOut = row.货位存量
|
||||
},
|
||||
execaddListDetail() {
|
||||
execaddListDetail(formName) {
|
||||
if (this.pickingListNumberx === '') {
|
||||
this.$message.error('请选择领料单')
|
||||
} else if (this.OutNumber === '') {
|
||||
this.$message.error('请输入领用数量')
|
||||
} else if (this.form2.OutNumber === '' || this.form2.OutNumber > this.enableOut) {
|
||||
this.$message.error('请正确输入领用数量')
|
||||
} else {
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form.OutNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.teamPart, this.locatenumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form2.OutNumber, this.partType, this.form2.outNote, this.craftplannumber, this.receive, this.teamPart, this.purchaseDetailNum, this.locatenumber, 0, this.materialLocate).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.searchListinfor()
|
||||
}
|
||||
this.dialogFormVisible = false
|
||||
this.searchListinfor()
|
||||
},
|
||||
// 增加车间采购领料单明细
|
||||
addWorkshopDetailinfor(row) {
|
||||
@@ -782,9 +858,9 @@ export default {
|
||||
this.partProjectNumber = row.项目流水号
|
||||
this.partProjectName = row.项目名称
|
||||
this.partMachineNumber = row.机床流水号
|
||||
this.partMachineName = row.机床名称
|
||||
this.partMachineName = row.机床图号
|
||||
this.partGroupNumber = row.组件流水号
|
||||
this.partGroupName = row.组件名称
|
||||
this.partGroupName = row.组号
|
||||
this.partType = row.零件类型
|
||||
this.receive = row.收件信息ID
|
||||
this.locatenumber = row.货位流水号
|
||||
@@ -793,21 +869,28 @@ export default {
|
||||
this.materialType = row.物料规格
|
||||
this.dialogFormVisibleWork = true
|
||||
this.purchaseDetailNum = row.采购合同明细流水号
|
||||
this.materialLocate = row.物料与货位对照流水号
|
||||
this.enableOut = row.货位存量
|
||||
console.log(this.enableOut)
|
||||
},
|
||||
addWorkshopListDetail() {
|
||||
if (this.pickingListNumberx === '') {
|
||||
this.$message.error('请选择领料单')
|
||||
} else if (this.OutNumber === '') {
|
||||
this.$message.error('请输入领用数量')
|
||||
} else {
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form.OutNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.teamPart, this.purchaseDetailNum, this.locatenumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
addWorkshopListDetail(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.pickingListNumberx === '') {
|
||||
this.$message.error('请选择领料单')
|
||||
} else if (this.form3.OutNumber === '' || this.form3.OutNumber > this.enableOut) {
|
||||
this.$message.error('请正确输入领用数量')
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form3.OutNumber, this.partType, this.form3.outNote, this.craftplannumber, this.receive, this.teamPart, this.purchaseDetailNum, this.locatenumber, 1, this.materialLocate).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
this.dialogFormVisibleWork = false
|
||||
this.searchListinfor()
|
||||
},
|
||||
@@ -817,7 +900,7 @@ export default {
|
||||
this.pickingListDetail = row.领料单明细流水号
|
||||
},
|
||||
submitChannge() {
|
||||
editListDetail(this.pickingListDetail, this.form2.OutNumber, this.form2.outNote).then(response => {
|
||||
editListDetail(this.pickingListDetail, this.form4.OutNumber, this.form4.outNote).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改成功')
|
||||
} else {
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<el-card>
|
||||
<span style="margin: 5px">替换单编号</span>
|
||||
<el-input v-model="substituteNumber" clearable size="small" style="width:200px" />
|
||||
<span style="margin: 5px">零件图号</span>
|
||||
<el-input v-model="partNumber" clearable size="small" style="width:200px" />
|
||||
<span style="margin: 5px">替换件名称</span>
|
||||
<el-input v-model="subPartName" clearable size="small" style="width:200px" />
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="getSubstitutedCard()">查询</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
@@ -65,8 +65,10 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
tableDataExchange: [],
|
||||
substituteNumber: '',
|
||||
partNumber: '',
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
substituteNumber: '', // 替换单编号
|
||||
subPartName: '', // 替换件名称
|
||||
listLoading: '',
|
||||
subList: '',
|
||||
locateNumber: '',
|
||||
@@ -77,7 +79,9 @@ export default {
|
||||
// 替换单查询
|
||||
getSubstitutedCard() {
|
||||
this.listloading = true
|
||||
searchSubstitutedCard().then(response => {
|
||||
this.substituteNumber ? this.check1 = 1 : this.check1 = 0
|
||||
this.subPartName ? this.check2 = 1 : this.check2 = 0
|
||||
searchSubstitutedCard(this.check1, this.substituteNumber, this.check2, this.subPartName).then(response => {
|
||||
this.tableDataExchange = response.data
|
||||
this.listloading = false
|
||||
})
|
||||
|
||||
@@ -46,12 +46,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
|
||||
@@ -4,13 +4,11 @@
|
||||
<span>项目名称:</span>
|
||||
<el-select
|
||||
v-model="entryNameValue"
|
||||
:remote-method="remoteMethod"
|
||||
placeholder="项目名称"
|
||||
style="width:200px"
|
||||
size="small"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
@change="empty">
|
||||
<el-option
|
||||
v-for="item in entryName"
|
||||
@@ -19,9 +17,9 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床号:</span>
|
||||
<el-input v-model="machineToolNumber" placeholder="机床号" size="small" clearable style="width:200px" @change="empty1" @dblclick.native="SearchMachine"/>
|
||||
<el-input v-model="machineToolNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @change="empty1" @dblclick.native="SearchMachine"/>
|
||||
<span>组号:</span>
|
||||
<el-input v-model="groupNumber" placeholder="组号" size="small" clearable style="width:200px" @dblclick.native="searchGroupList"/>
|
||||
<el-input v-model="groupNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @dblclick.native="searchGroupList"/>
|
||||
<span>年:</span>
|
||||
<el-date-picker
|
||||
v-model="year"
|
||||
@@ -54,7 +52,7 @@
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 100%;max-height: 600px"
|
||||
height="600"
|
||||
height="300"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column align="center" label="序号" type="index" width="60"/>
|
||||
@@ -105,7 +103,140 @@
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading1"
|
||||
:data="tableDataPurchase"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="300">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床图号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位存量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent4"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize4"
|
||||
:total="total4"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange4"
|
||||
@current-change="handleCurrentChange4"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading2"
|
||||
:data="tableData1"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="300">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床图号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位存量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库时间" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent5"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize5"
|
||||
:total="total5"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange5"
|
||||
@current-change="handleCurrentChange5"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="选择机床" center style="min-height: 300px">
|
||||
<el-table
|
||||
:data="tableData6"
|
||||
@@ -155,7 +286,9 @@
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<el-button type="primary" style="margin-left: 350px;margin-top: 20px" @click="submitName">提交</el-button>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitName">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible3" title="选择组号" center style="min-height: 300px">
|
||||
@@ -202,13 +335,15 @@
|
||||
@size-change="handleSizeChange3"
|
||||
@current-change="handleCurrentChange3"/>
|
||||
</div>
|
||||
<el-button type="primary" style="margin-left: 350px;margin-top: 20px" @click="submitGroup">提交</el-button>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitGroup">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchTable, searchmachine, searchgroup } from '@/api/ManufacturingCenter/GroupMatching'
|
||||
import { initProject, searchTable, searchmachine, searchgroup, searchPurchaseTable, searchTable1 } from '@/api/ManufacturingCenter/GroupMatching'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -228,17 +363,25 @@ export default {
|
||||
pageSize1: 10,
|
||||
pageCurrent2: 1,
|
||||
pageSize2: 10,
|
||||
pageCurrent4: 1,
|
||||
pageSize4: 10,
|
||||
pageCurrent5: 1,
|
||||
pageSize5: 10,
|
||||
tableData7: [],
|
||||
tableData6: [],
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
state: null,
|
||||
total: null,
|
||||
total1: null,
|
||||
total2: null,
|
||||
listLoading1: false,
|
||||
listLoading2: false,
|
||||
total: 0,
|
||||
total1: 0,
|
||||
total2: 0,
|
||||
total4: 0,
|
||||
total5: 0,
|
||||
title: '',
|
||||
dialogFormVisible2: false,
|
||||
dialogFormVisible3: false,
|
||||
List: [],
|
||||
check: null,
|
||||
check1: null,
|
||||
check2: null,
|
||||
@@ -285,17 +428,18 @@ export default {
|
||||
}, {
|
||||
value: 12,
|
||||
label: '12'
|
||||
}]
|
||||
}],
|
||||
tableDataPurchase: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
searchData() {
|
||||
this.loading = true
|
||||
this.listLoading1 = true
|
||||
this.listLoading2 = true
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
this.check = 1
|
||||
@@ -340,36 +484,33 @@ export default {
|
||||
this.total = parseInt(response.data.total)
|
||||
this.loading = false
|
||||
})
|
||||
searchPurchaseTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent, this.pageSize).then(response => {
|
||||
console.log(response)
|
||||
this.tableDataPurchase = response.data.rows
|
||||
this.listLoading1 = false
|
||||
this.total4 = parseInt(response.data.total)
|
||||
})
|
||||
searchTable1(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent, this.pageSize).then(response => {
|
||||
console.log(response)
|
||||
this.tableData1 = response.data.rows
|
||||
this.listLoading2 = false
|
||||
this.total5 = parseInt(response.data.total)
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning('请先选择项目')
|
||||
}
|
||||
},
|
||||
getList() { // 初始化项目名称
|
||||
this.list = []
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.list.push({
|
||||
this.entryName.push({
|
||||
label: response.data[i].项目名称,
|
||||
value: response.data[i].项目流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
remoteMethod(query) {
|
||||
if (query !== '') {
|
||||
setTimeout(() => {
|
||||
this.entryName = this.list.filter(item => {
|
||||
if (item.label !== null) {
|
||||
return item.label.toLowerCase()
|
||||
.indexOf(query.toLowerCase()) > -1
|
||||
}
|
||||
})
|
||||
}, 1000)
|
||||
} else {
|
||||
this.entryName = []
|
||||
}
|
||||
},
|
||||
empty() {
|
||||
this.machineToolNumber = ''
|
||||
this.groupNumber = ''
|
||||
@@ -427,11 +568,105 @@ export default {
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchData()
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
this.check = 1
|
||||
} else {
|
||||
this.check = 0
|
||||
}
|
||||
if (this.machineToolNumber !== '') {
|
||||
this.check1 = 1
|
||||
} else {
|
||||
this.check1 = 0
|
||||
}
|
||||
if (this.groupNumber !== '') {
|
||||
this.check2 = 1
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
if (this.year !== null && this.year !== '') {
|
||||
this.check3 = 1
|
||||
} else {
|
||||
this.check3 = 0
|
||||
}
|
||||
if (this.month !== null && this.month !== '') {
|
||||
this.check4 = 1
|
||||
} else {
|
||||
this.check4 = 0
|
||||
}
|
||||
if (this.time !== '' && this.time !== null) {
|
||||
this.check5 = 1
|
||||
} else {
|
||||
this.check5 = 0
|
||||
}
|
||||
searchTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent, this.pageSize).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].入库时间 !== null) {
|
||||
response.data.rows[i].入库时间 = response.data.rows[i].入库时间.split(' ', 2)[0]
|
||||
}
|
||||
if (response.data.rows[i].计划完成时间 !== null) {
|
||||
response.data.rows[i].计划完成时间 = response.data.rows[i].计划完成时间.split(' ', 2)[0]
|
||||
}
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
this.total = parseInt(response.data.total)
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning('请先选择项目')
|
||||
}
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchData()
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
this.check = 1
|
||||
} else {
|
||||
this.check = 0
|
||||
}
|
||||
if (this.machineToolNumber !== '') {
|
||||
this.check1 = 1
|
||||
} else {
|
||||
this.check1 = 0
|
||||
}
|
||||
if (this.groupNumber !== '') {
|
||||
this.check2 = 1
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
if (this.year !== null && this.year !== '') {
|
||||
this.check3 = 1
|
||||
} else {
|
||||
this.check3 = 0
|
||||
}
|
||||
if (this.month !== null && this.month !== '') {
|
||||
this.check4 = 1
|
||||
} else {
|
||||
this.check4 = 0
|
||||
}
|
||||
if (this.time !== '' && this.time !== null) {
|
||||
this.check5 = 1
|
||||
} else {
|
||||
this.check5 = 0
|
||||
}
|
||||
searchTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent, this.pageSize).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].入库时间 !== null) {
|
||||
response.data.rows[i].入库时间 = response.data.rows[i].入库时间.split(' ', 2)[0]
|
||||
}
|
||||
if (response.data.rows[i].计划完成时间 !== null) {
|
||||
response.data.rows[i].计划完成时间 = response.data.rows[i].计划完成时间.split(' ', 2)[0]
|
||||
}
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
this.total = parseInt(response.data.total)
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning('请先选择项目')
|
||||
}
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
@@ -450,6 +685,184 @@ export default {
|
||||
handleCurrentChange3(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.searchGroupList()
|
||||
},
|
||||
handleSizeChange4(val) {
|
||||
this.pageCurrent4 = 1
|
||||
this.pageSize4 = val
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
this.check = 1
|
||||
} else {
|
||||
this.check = 0
|
||||
}
|
||||
if (this.machineToolNumber !== '') {
|
||||
this.check1 = 1
|
||||
} else {
|
||||
this.check1 = 0
|
||||
}
|
||||
if (this.groupNumber !== '') {
|
||||
this.check2 = 1
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
if (this.year !== null && this.year !== '') {
|
||||
this.check3 = 1
|
||||
} else {
|
||||
this.check3 = 0
|
||||
}
|
||||
if (this.month !== null && this.month !== '') {
|
||||
this.check4 = 1
|
||||
} else {
|
||||
this.check4 = 0
|
||||
}
|
||||
if (this.time !== '' && this.time !== null) {
|
||||
this.check5 = 1
|
||||
} else {
|
||||
this.check5 = 0
|
||||
}
|
||||
searchPurchaseTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent4, this.pageSize4).then(response => {
|
||||
console.log(response)
|
||||
this.tableDataPurchase = response.data.rows
|
||||
this.listLoading1 = false
|
||||
this.total4 = parseInt(response.data.total)
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning('请先选择项目')
|
||||
}
|
||||
},
|
||||
handleCurrentChange4(val) {
|
||||
this.pageCurrent4 = val
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
this.check = 1
|
||||
} else {
|
||||
this.check = 0
|
||||
}
|
||||
if (this.machineToolNumber !== '') {
|
||||
this.check1 = 1
|
||||
} else {
|
||||
this.check1 = 0
|
||||
}
|
||||
if (this.groupNumber !== '') {
|
||||
this.check2 = 1
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
if (this.year !== null && this.year !== '') {
|
||||
this.check3 = 1
|
||||
} else {
|
||||
this.check3 = 0
|
||||
}
|
||||
if (this.month !== null && this.month !== '') {
|
||||
this.check4 = 1
|
||||
} else {
|
||||
this.check4 = 0
|
||||
}
|
||||
if (this.time !== '' && this.time !== null) {
|
||||
this.check5 = 1
|
||||
} else {
|
||||
this.check5 = 0
|
||||
}
|
||||
searchPurchaseTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent4, this.pageSize4).then(response => {
|
||||
console.log(response)
|
||||
this.tableDataPurchase = response.data.rows
|
||||
this.listLoading1 = false
|
||||
this.total4 = parseInt(response.data.total)
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning('请先选择项目')
|
||||
}
|
||||
},
|
||||
handleSizeChange5(val) {
|
||||
this.pageCurrent5 = 1
|
||||
this.pageSize5 = val
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
this.check = 1
|
||||
} else {
|
||||
this.check = 0
|
||||
}
|
||||
if (this.machineToolNumber !== '') {
|
||||
this.check1 = 1
|
||||
} else {
|
||||
this.check1 = 0
|
||||
}
|
||||
if (this.groupNumber !== '') {
|
||||
this.check2 = 1
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
if (this.year !== null && this.year !== '') {
|
||||
this.check3 = 1
|
||||
} else {
|
||||
this.check3 = 0
|
||||
}
|
||||
if (this.month !== null && this.month !== '') {
|
||||
this.check4 = 1
|
||||
} else {
|
||||
this.check4 = 0
|
||||
}
|
||||
if (this.time !== '' && this.time !== null) {
|
||||
this.check5 = 1
|
||||
} else {
|
||||
this.check5 = 0
|
||||
}
|
||||
searchTable1(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent5, this.pageSize5).then(response => {
|
||||
console.log(response)
|
||||
this.tableData1 = response.data.rows
|
||||
this.listLoading2 = false
|
||||
this.total5 = parseInt(response.data.total)
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning('请先选择项目')
|
||||
}
|
||||
},
|
||||
handleCurrentChange5(val) {
|
||||
this.pageCurrent5 = val
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
this.check = 1
|
||||
} else {
|
||||
this.check = 0
|
||||
}
|
||||
if (this.machineToolNumber !== '') {
|
||||
this.check1 = 1
|
||||
} else {
|
||||
this.check1 = 0
|
||||
}
|
||||
if (this.groupNumber !== '') {
|
||||
this.check2 = 1
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
if (this.year !== null && this.year !== '') {
|
||||
this.check3 = 1
|
||||
} else {
|
||||
this.check3 = 0
|
||||
}
|
||||
if (this.month !== null && this.month !== '') {
|
||||
this.check4 = 1
|
||||
} else {
|
||||
this.check4 = 0
|
||||
}
|
||||
if (this.time !== '' && this.time !== null) {
|
||||
this.check5 = 1
|
||||
} else {
|
||||
this.check5 = 0
|
||||
}
|
||||
searchTable1(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent5, this.pageSize5).then(response => {
|
||||
console.log(response)
|
||||
this.tableData1 = response.data.rows
|
||||
this.listLoading2 = false
|
||||
this.total5 = parseInt(response.data.total)
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning('请先选择项目')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,24 +143,24 @@
|
||||
{{ scope.row.零件类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否外协" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="tableData[scope.$index].checked_waixie" @change="gaibianwaixie(scope.$index, scope.row)"/>
|
||||
外协
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否带料" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox :disabled="!tableData[scope.$index].checked_waixie" v-model="tableData[scope.$index].checked_dailiao"/>
|
||||
带料
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否着急" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="tableData[scope.$index].checked_zhaoji"/>
|
||||
着急
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="是否外协" align="center" width="90">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-checkbox v-model="tableData[scope.$index].checked_waixie" @change="gaibianwaixie(scope.$index, scope.row)"/>-->
|
||||
<!--外协-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="是否带料" align="center" width="90">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-checkbox :disabled="!tableData[scope.$index].checked_waixie" v-model="tableData[scope.$index].checked_dailiao"/>-->
|
||||
<!--带料-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="是否着急" align="center" width="90">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-checkbox v-model="tableData[scope.$index].checked_zhaoji"/>-->
|
||||
<!--着急-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column prop="name" label="打回原因" width="170" align="center">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-input v-model="tableData[scope.$index].name" type="textarea" :rows="1" style="width:150px" placeholder="原因">-->
|
||||
@@ -176,7 +176,7 @@
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handleDele(scope.$index, scope.row, 'form1')">打回档案</el-button>
|
||||
@click="handleDele(scope.$index, scope.row, 'form1')">打回</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -190,16 +190,10 @@
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
<el-checkbox v-model="checked_baitu" style="margin-top:0px">是否白图</el-checkbox>
|
||||
<el-checkbox v-model="checked_gaonandu">是否高难度</el-checkbox>
|
||||
<!--<el-checkbox v-model="checked_baitu" style="margin-top:0px">是否白图</el-checkbox>-->
|
||||
<!--<el-checkbox v-model="checked_gaonandu">是否高难度</el-checkbox>-->
|
||||
<el-button type="primary" size="small" style="float:right;margin-top:10px" @click="production">投产</el-button>
|
||||
</div>
|
||||
|
||||
<!--<el-row>-->
|
||||
<!--<el-checkbox v-model="checked_baitu" style="margin-top:20px">是否白图</el-checkbox>-->
|
||||
<!--<el-checkbox v-model="checked_gaonandu">是否高难度</el-checkbox>-->
|
||||
<!--<el-button type="primary" size="small" @click="production" style="float:right;margin-top:10px">投产</el-button>-->
|
||||
<!--</el-row>-->
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
@@ -236,14 +230,14 @@
|
||||
label="批次数量">
|
||||
<template slot-scope="scope">{{ scope.row.批次数量 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="是否外协">
|
||||
<template slot-scope="scope">{{ scope.row.是否外协 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="是否带料">
|
||||
<template slot-scope="scope">{{ scope.row.是否带料 }}</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column-->
|
||||
<!--label="是否外协">-->
|
||||
<!--<template slot-scope="scope">{{ scope.row.是否外协 }}</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column-->
|
||||
<!--label="是否带料">-->
|
||||
<!--<template slot-scope="scope">{{ scope.row.是否带料 }}</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column
|
||||
label="机加工开始时间">
|
||||
<template slot-scope="scope">{{ scope.row.机加工开始时间 }}</template>
|
||||
|
||||
@@ -186,8 +186,8 @@
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
<el-button type="success" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="purchaseRequisition()">车间请购</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="PurchasingDepartment()">采购部门采购</el-button>
|
||||
<el-button type="warning" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="Production()">车间生产</el-button>
|
||||
<el-button v-show="PartType!=='基本件'" type="primary" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="PurchasingDepartment()">采购部门采购</el-button>
|
||||
<el-button v-show="PartType==='基本件'" type="warning" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="Production()">车间生产</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-row>
|
||||
@@ -299,7 +299,7 @@
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="请购人" prop="请购人">
|
||||
<el-form-item label="请购人">
|
||||
<el-input
|
||||
v-model="name"
|
||||
size="small"
|
||||
@@ -496,6 +496,12 @@ export default {
|
||||
this.check4 = 0
|
||||
}
|
||||
searchTable1(this.PurchaseOrder, this.check4).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
console.log(response.data[i].请购时间)
|
||||
if (response.data[i].请购时间 !== '') {
|
||||
response.data[i].请购时间 = (response.data[i].请购时间).split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
},
|
||||
@@ -576,6 +582,11 @@ export default {
|
||||
searchDetailed(row) {
|
||||
this.RequisitionList = row.请购单流水号
|
||||
searchDetailed(row.请购单流水号).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].物料计划到货时间 !== '') {
|
||||
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData5 = response.data
|
||||
})
|
||||
},
|
||||
|
||||
280
src/views/ManufacturingCenter/ProcessAdjustQuery/index.vue
Normal file
280
src/views/ManufacturingCenter/ProcessAdjustQuery/index.vue
Normal file
@@ -0,0 +1,280 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>工艺员:</span>
|
||||
<el-select v-model="craftmenValue" placeholder="工艺员" size="small" style="width:100px" @change="searchParts()">
|
||||
<el-option
|
||||
v-for="item in craftmen"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件图号:</span>
|
||||
<el-select v-model="partNumValue" filterable placeholder="零件图号" style="margin-right: 10px" size="small" clearable @clear="returnDate = ''">
|
||||
<el-option
|
||||
v-for="item in partNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchData()">查询</el-button>
|
||||
<span>打回时间:</span>
|
||||
<el-date-picker v-model="returnDate" :clearable="false" type="datetime" placeholder="打回时间" size="small" readonly/>
|
||||
</el-card>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-card>
|
||||
<div style="display: inline-block;margin-bottom: 20px">改前零件工艺</div>
|
||||
<el-table id="div1" ref="div1" :data="tableData1" :row-class-name="tableRowClassName1" size="mini" border style="height:350px;overflow-y: auto;" @mouseenter.native="changeScrollBefore">
|
||||
<el-table-column align="center" label="工序顺序" width="70px">
|
||||
<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="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺难度等级 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column header-align="center" label="工艺要求">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺要求 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-card style="margin-left:15px">
|
||||
<div style="display: inline-block;margin-bottom: 20px">改后零件工艺</div>
|
||||
<el-table id="div2" ref="div2" :data="tableData2" :row-class-name="tableRowClassName2" size="mini" border style="height:350px;overflow-y: scroll;" @mouseenter.native="changeScrollAfter">
|
||||
<el-table-column align="center" label="工序顺序" width="70px">
|
||||
<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="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺难度等级 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column header-align="center" label="工艺要求">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺要求 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-card>
|
||||
<div id="myChart" :style="{width: '100%', height: '400px', margin: 'auto'}"/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts'
|
||||
import { initCraftmen, searchPart, searchProcessOld, searchProcessNew, searchChart } from '@/api/ManufacturingCenter/ProcessAdjustQuery'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
returnDate: '',
|
||||
craftmenValue: '',
|
||||
craftmen: [],
|
||||
partNumValue: '', // 工艺计划流水号
|
||||
partNum: [],
|
||||
partStatus: '',
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
dataX: [],
|
||||
partsNum: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchChart()
|
||||
},
|
||||
methods: {
|
||||
changeScrollBefore() {
|
||||
const div1 = document.getElementById('div1')
|
||||
const div2 = document.getElementById('div2')
|
||||
div2.removeAttribute('onscroll')
|
||||
div1.setAttribute('onscroll', 'document.getElementById(\'div2\').scrollTop = scrollTop')
|
||||
},
|
||||
changeScrollAfter() {
|
||||
const div1 = document.getElementById('div1')
|
||||
const div2 = document.getElementById('div2')
|
||||
div1.removeAttribute('onscroll')
|
||||
div2.setAttribute('onscroll', 'document.getElementById(\'div1\').scrollTop = scrollTop')
|
||||
},
|
||||
searchChart() {
|
||||
searchChart().then(response => {
|
||||
console.log(response, 11)
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.dataX.push(response.data[i].姓名)
|
||||
this.partsNum.push(response.data[i].零件数量)
|
||||
}
|
||||
this.drawLine()
|
||||
})
|
||||
},
|
||||
drawLine() {
|
||||
const myChart = echarts.init(document.getElementById('myChart'))
|
||||
myChart.clear()
|
||||
myChart.setOption({
|
||||
title: {
|
||||
text: '在制零件工艺调整统计',
|
||||
left: 'center'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
name: '工艺员',
|
||||
data: this.dataX,
|
||||
axisLabel: {
|
||||
interval: 0,
|
||||
rotate: 0,
|
||||
margin: 10
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: '工艺被调整零件数',
|
||||
min: 0,
|
||||
minInterval: 1
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '工艺调整零件数',
|
||||
type: 'bar',
|
||||
data: this.partsNum,
|
||||
markLine: {
|
||||
data: [
|
||||
{ type: 'average', name: '平均值' }
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
},
|
||||
fetchData() {
|
||||
this.craftmen = []
|
||||
initCraftmen().then(response => { // 初始化工艺员
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.craftmen.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchParts() {
|
||||
this.tableData1 = []
|
||||
this.tableData2 = []
|
||||
this.partNum = []
|
||||
this.partNumValue = ''
|
||||
this.returnDate = ''
|
||||
searchPart(this.craftmenValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.partNum.push({
|
||||
label: response.data[i].零件图号_零件工艺计划,
|
||||
value: response.data[i].工艺计划流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchData() {
|
||||
this.tableData1 = []
|
||||
this.tableData2 = []
|
||||
if (this.partNumValue !== '' && this.partNumValue !== null) {
|
||||
searchProcessOld(this.partNumValue).then(response => {
|
||||
this.tableData1 = response.data
|
||||
this.returnDate = response.data[0].操作时间
|
||||
})
|
||||
searchProcessNew(this.partNumValue).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请先选择零件')
|
||||
}
|
||||
},
|
||||
tableRowClassName2({ row }) {
|
||||
for (let i = 0; i < this.tableData1.length; i++) {
|
||||
row.工艺编号 === null ? row.工艺编号 = 0 : row.工艺编号
|
||||
if (this.tableData1[i].工序流水号 === row.工序流水号 && this.tableData1[i].工艺编号 !== null) {
|
||||
if (this.tableData1[i].工艺编号 !== row.工艺编号 || this.tableData1[i].工艺要求 !== row.工艺要求 || this.tableData1[i].工艺难度等级 !== row.工艺难度等级) {
|
||||
return 'change'
|
||||
} else {
|
||||
if (this.tableData1[i].工序顺序 !== row.工序顺序 && (row.工艺要求 || row.工艺难度等级)) {
|
||||
return 'change'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
tableRowClassName1({ row }) {
|
||||
for (let i = 0; i < this.tableData2.length; i++) {
|
||||
row.工艺编号 === null ? row.工艺编号 = 0 : row.工艺编号
|
||||
if (this.tableData2[i].工序流水号 === row.工序流水号 && this.tableData2[i].工艺编号 !== null) {
|
||||
if (this.tableData2[i].工艺编号 !== row.工艺编号 || this.tableData2[i].工艺要求 !== row.工艺要求 || this.tableData2[i].工艺难度等级 !== row.工艺难度等级) {
|
||||
return 'change'
|
||||
} else {
|
||||
if (this.tableData1[i].工序顺序 !== row.工序顺序 && (row.工艺要求 || row.工艺难度等级)) {
|
||||
return 'change'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.el-table .change {
|
||||
background: oldlace;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:200px
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
@@ -10,11 +10,16 @@
|
||||
partNumValue = '';typeValue = '';partName = '';
|
||||
material = '';materialName = '';spec = '';batchNum = '';
|
||||
searchParts()">
|
||||
<el-radio :label="1">未编制</el-radio>
|
||||
<el-radio :label="2">已编制</el-radio>
|
||||
<el-radio v-model="radio" :label="1">未编制</el-radio>
|
||||
<el-radio v-model="radio" :label="2">已编制</el-radio>
|
||||
</el-radio-group>
|
||||
<span>工艺员:</span>
|
||||
<el-select v-model="CraftmenValue" placeholder="工艺员" size="small" style="width:100px" @change="clearDetail();searchParts()">
|
||||
<el-select
|
||||
v-model="CraftmenValue"
|
||||
placeholder="工艺员"
|
||||
size="small"
|
||||
style="width:100px"
|
||||
@change="clearDetail();searchParts()">
|
||||
<el-option
|
||||
v-for="item in Craftmen"
|
||||
:key="item.value"
|
||||
@@ -22,16 +27,26 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件号:</span>
|
||||
<el-select v-model="partNumValue" filterable clearable placeholder="零件号" size="small" @clear="clearDetail" @change="searchParts">
|
||||
<el-select
|
||||
v-model="partNumValue"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="零件号"
|
||||
size="small"
|
||||
@clear="clearDetail"
|
||||
@change="searchParts">
|
||||
<el-option
|
||||
v-for="item in partNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" icon="el-icon-search" style="margin: 10px;" size="small" @click="searchDetail">查询</el-button>
|
||||
<el-button v-show="isShow2" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">在制零件工艺调整</el-button>
|
||||
<el-button v-show="!isShow2" plain size="small" style="margin: 10px;float:right" @click="switchEdit()">切换编辑模式</el-button>
|
||||
<el-button type="success" icon="el-icon-search" style="margin: 10px;" size="small" @click="searchDetail">查询
|
||||
</el-button>
|
||||
<el-button v-show="isShow2" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">在制零件工艺调整
|
||||
</el-button>
|
||||
<el-button v-show="!isShow2" plain size="small" style="margin: 10px;float:right" @click="switchEdit()">切换编辑模式
|
||||
</el-button>
|
||||
<div v-show="isShow">
|
||||
<span>种类:</span>
|
||||
<el-input v-model="typeValue" placeholder="种类" size="small" readonly style="width:100px"/>
|
||||
@@ -66,15 +81,26 @@
|
||||
<el-input v-model="tolerance" size="small" style="width:150px" placeholder="公差"/>
|
||||
<el-button style="margin:10px" type="primary" size="small" @click="calTol()">计算公差</el-button>
|
||||
<el-button-group v-if="isShow1" style="margin: 10px">
|
||||
<el-button v-if="isShow1" type="info" size="small" icon="el-icon-tickets" @click="copyAndSave">复制并保存</el-button>
|
||||
<el-button v-if="isShow1" type="info" size="small" icon="el-icon-tickets" @click="copyAndSave">复制并保存
|
||||
</el-button>
|
||||
<el-button v-if="isShow1" type="info" size="small" icon="el-icon-document" @click="pasteTable">粘贴</el-button>
|
||||
<el-button :disabled="disabled" type="warning" size="small" icon="el-icon-tickets" @click="DYbtn">典艺</el-button>
|
||||
<el-button :disabled="disabled" type="warning" size="small" icon="el-icon-tickets" @click="WYbtn">完艺</el-button>
|
||||
<el-button :disabled="disabled" type="danger" size="small" icon="el-icon-delete" @click="deleteTable">删除</el-button>
|
||||
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-cjn-09" @click="saveApprove">保存</el-button>
|
||||
<el-button :disabled="disabled" type="warning" size="small" icon="el-icon-tickets" @click="DYbtn">典艺
|
||||
</el-button>
|
||||
<el-button :disabled="disabled" type="warning" size="small" icon="el-icon-tickets" @click="WYbtn">完艺
|
||||
</el-button>
|
||||
<el-button :disabled="disabled" type="danger" size="small" icon="el-icon-delete" @click="deleteTable">删除
|
||||
</el-button>
|
||||
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-cjn-09" @click="saveApprove">保存
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</el-row>
|
||||
<el-table v-loading="loading0" :data="tableData" :row-class-name="tableRowClassName" border style="width: 100%;max-height: 550px;" size="mini" height="550px">
|
||||
<el-table
|
||||
v-loading="loading0"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%;max-height: 550px;"
|
||||
size="mini"
|
||||
height="550px">
|
||||
<el-table-column prop="num" label="序号" width="50" align="center" type="index"/>
|
||||
<el-table-column prop="name" label="工艺名称" width="230" align="center">
|
||||
<template slot-scope="scope">
|
||||
@@ -147,7 +173,13 @@
|
||||
|
||||
<el-dialog :visible.sync="dialogMaterial" title="材质选择" center width="400px">
|
||||
<el-input v-model="input" placeholder="材质" size="small" style="width:200px"/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin: 0 0 10px 10px" @click="total=0;pageCurrent=1;pageSize=10;searchMaterial()">查询</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin: 0 0 10px 10px"
|
||||
@click="total=0;pageCurrent=1;pageSize=10;searchMaterial()">查询
|
||||
</el-button>
|
||||
<el-table
|
||||
:data="tableMaterial"
|
||||
size="mini"
|
||||
@@ -217,7 +249,12 @@
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="典型工艺零件分类">
|
||||
<el-select v-model="typicalClassValue" placeholder="分类" size="small" style="width:150px" @change="classChange()">
|
||||
<el-select
|
||||
v-model="typicalClassValue"
|
||||
placeholder="分类"
|
||||
size="small"
|
||||
style="width:150px"
|
||||
@change="classChange()">
|
||||
<el-option
|
||||
v-for="item in typicalClass"
|
||||
:key="item.value"
|
||||
@@ -228,7 +265,13 @@
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="零件名称">
|
||||
<el-select id="name" v-model="partNameValue1" placeholder="零件名称" size="small" style="width:150px" @change="nameChange()">
|
||||
<el-select
|
||||
id="name"
|
||||
v-model="partNameValue1"
|
||||
placeholder="零件名称"
|
||||
size="small"
|
||||
style="width:150px"
|
||||
@change="nameChange()">
|
||||
<el-option
|
||||
v-for="item in partName1"
|
||||
:key="item.value"
|
||||
@@ -244,7 +287,13 @@
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="典型工艺号">
|
||||
<el-select id="num" v-model="processNumValue" placeholder="工艺号" style="width:150px" size="small" @change="numChange()">
|
||||
<el-select
|
||||
id="num"
|
||||
v-model="processNumValue"
|
||||
placeholder="工艺号"
|
||||
style="width:150px"
|
||||
size="small"
|
||||
@change="numChange()">
|
||||
<el-option
|
||||
v-for="item in partName1"
|
||||
:key="item.value"
|
||||
@@ -262,7 +311,12 @@
|
||||
<el-button size="small" @click="processCopy()">工艺拷贝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="tableData2" style="width: 97%;max-height: 300px;margin-top:15px" height="300px" border size="mini">
|
||||
<el-table
|
||||
:data="tableData2"
|
||||
style="width: 97%;max-height: 300px;margin-top:15px"
|
||||
height="300px"
|
||||
border
|
||||
size="mini">
|
||||
<el-table-column align="center" label="工艺序号" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺序号 }}
|
||||
@@ -292,7 +346,9 @@
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="工艺员">
|
||||
<el-input v-model="CraftmanValue" size="small" readonly style="width: 150px;" @focus="dialogFormVisible3=true"/>
|
||||
<el-input v-model="CraftmanValue" clearable size="small" readonly style="width: 150px;">
|
||||
<el-button slot="append" icon="el-icon-search" @click="dialogFormVisible3=true"/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
@@ -300,9 +356,7 @@
|
||||
<el-input v-model="PN" size="small" placeholder="输入零件号" style="width: 150px" @change="inputChange"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button size="small" type="success" icon="el-icon-search" @click="searchProcess1()">查询</el-button>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
@@ -328,13 +382,18 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button size="small" @click="processCopy1()">工艺拷贝</el-button>
|
||||
<el-button size="small" type="success" icon="el-icon-search" @click="searchProcess1()">查询</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="零件图号">
|
||||
<el-select v-model="tuhaoValue" placeholder="零件图号" size="small" style="width:150px" @change="numChange1()">
|
||||
<el-select
|
||||
v-model="tuhaoValue"
|
||||
placeholder="零件图号"
|
||||
size="small"
|
||||
style="width:150px"
|
||||
@change="numChange1()">
|
||||
<el-option
|
||||
v-for="item in tuhao"
|
||||
:key="item.value"
|
||||
@@ -345,11 +404,19 @@
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="零件名称">
|
||||
<el-input v-model="remark1" size="small" style="width: 150px;"/>
|
||||
<el-input v-model="remark1" size="small" readonly style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button size="small" @click="processCopy1()">工艺拷贝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="tableData4" style="width: 97%;max-height: 250px;margin-top: 15px" size="mini" border height="250px">
|
||||
<el-table
|
||||
:data="tableData4"
|
||||
style="width: 97%;max-height: 250px;margin-top: 15px"
|
||||
size="mini"
|
||||
border
|
||||
height="250px">
|
||||
<el-table-column align="center" label="工艺序号" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序顺序 }}
|
||||
@@ -423,12 +490,46 @@
|
||||
|
||||
<script>
|
||||
import '@/icon/iconfont.css'
|
||||
import { initCraftmen, getPartnames1, getPartnames2, detailInfo, mainTable, getMaterial, searchMaterial, typicalProcess, initTolerance, FcK,
|
||||
searchProcess, searchWYgongyi, gongyiCopy, initPerson, gongyiYQ, hardEdit, requestEdit, processNameClick, processNameSelect,
|
||||
processRequestSelect, searchTolerance, insertOne, deleteOne, upOne, downOne, saveMaterial, saveApprove, selectRequest,
|
||||
pasteTable, deleteTable, returnEdit, searchRecord } from '@/api/ManufacturingCenter/ProcessPlanning'
|
||||
import {
|
||||
initCraftmen,
|
||||
getPartnames1,
|
||||
getPartnames2,
|
||||
detailInfo,
|
||||
mainTable,
|
||||
getMaterial,
|
||||
searchMaterial,
|
||||
typicalProcess,
|
||||
initTolerance,
|
||||
FcK,
|
||||
searchProcess,
|
||||
searchWYgongyi,
|
||||
gongyiCopy,
|
||||
initPerson,
|
||||
gongyiYQ,
|
||||
hardEdit,
|
||||
requestEdit,
|
||||
processNameClick,
|
||||
processNameSelect,
|
||||
processRequestSelect,
|
||||
searchTolerance,
|
||||
insertOne,
|
||||
deleteOne,
|
||||
upOne,
|
||||
downOne,
|
||||
saveMaterial,
|
||||
saveApprove,
|
||||
selectRequest,
|
||||
pasteTable,
|
||||
deleteTable,
|
||||
returnEdit,
|
||||
searchRecord
|
||||
} from '@/api/ManufacturingCenter/ProcessPlanning'
|
||||
import elInput from 'element-ui/packages/input'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
elInput
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
total: 0,
|
||||
@@ -445,6 +546,7 @@ export default {
|
||||
CraftmenValue: '', // 工艺员值
|
||||
Craftmen: [], // 工艺员
|
||||
CraftmanValue: '', // 完艺表单工艺员值
|
||||
CraftmanValue2: '', // 完艺表单工艺员值中间变量
|
||||
Craftman: [], // 完艺表单工艺员
|
||||
partName: '', // 零件名称
|
||||
batchNum: '', // 投产总数量
|
||||
@@ -501,7 +603,8 @@ export default {
|
||||
date02: '', // 完艺结束时间
|
||||
PN: '', // 零件号
|
||||
num: '', // 工艺计划流水号
|
||||
perNum: [],
|
||||
perNum: '',
|
||||
perNum2: '',
|
||||
tuhao: [],
|
||||
tuhaoValue: '',
|
||||
check1: 0,
|
||||
@@ -532,15 +635,15 @@ export default {
|
||||
this.spec = ''
|
||||
this.batchNum = ''
|
||||
},
|
||||
tableRowClassName({ row }) {
|
||||
for (let i = 0; i < this.tableRecord.length; i++) {
|
||||
if (this.tableRecord[i].工序流水号 === row.工序流水号 && this.radio === 2 && this.tableRecord[i].工艺编号 !== null) { // && this.tableRecord[i].工艺难度等级 !== null && this.tableRecord[i].工艺要求 !== null
|
||||
if (this.tableRecord[i].工艺编号 !== row.工艺编号 || this.tableRecord[i].工艺要求 !== row.工艺要求 || this.tableRecord[i].工艺难度等级 !== row.工艺难度等级 || this.tableRecord[i].工序顺序 !== row.工序顺序) {
|
||||
return 'change'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// tableRowClassName({ row }) {
|
||||
// for (let i = 0; i < this.tableRecord.length; i++) {
|
||||
// if (this.tableRecord[i].工序流水号 === row.工序流水号 && this.radio === 2 && this.tableRecord[i].工艺编号 !== null) { // && this.tableRecord[i].工艺难度等级 !== null && this.tableRecord[i].工艺要求 !== null
|
||||
// if (this.tableRecord[i].工艺编号 !== row.工艺编号 || this.tableRecord[i].工艺要求 !== row.工艺要求 || this.tableRecord[i].工艺难度等级 !== row.工艺难度等级 || this.tableRecord[i].工序顺序 !== row.工序顺序) {
|
||||
// return 'change'
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
returnEdit() { // 在制零件工艺修改
|
||||
if (this.partNumValue === '' || this.partNumValue === null) {
|
||||
this.$message.error('请选择零件')
|
||||
@@ -555,7 +658,9 @@ export default {
|
||||
this.$message.success('打回成功')
|
||||
this.partNumValue = ''
|
||||
this.tableData = []
|
||||
} else { this.$message.error('打回失败') }
|
||||
} else {
|
||||
this.$message.error('打回失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
@@ -677,7 +782,9 @@ export default {
|
||||
switchEdit() { // 切换编辑模式
|
||||
if (this.radio === 1) {
|
||||
this.isShow = !this.isShow
|
||||
} else { this.isShow = true }
|
||||
} else {
|
||||
this.isShow = true
|
||||
}
|
||||
},
|
||||
searchDetail() { // 查主表和上面显示的信息
|
||||
if (this.partNumValue === '' || this.partNumValue === null) {
|
||||
@@ -726,12 +833,19 @@ export default {
|
||||
this.tableData2 = null
|
||||
},
|
||||
WYbtn() { // 完艺按钮
|
||||
this.tableData2 = null
|
||||
this.tableData4 = []
|
||||
this.dialogFormVisible1 = true
|
||||
},
|
||||
selectPerson(row) { // 选择工艺员
|
||||
this.CraftmanValue = row.姓名
|
||||
this.perNum = row.人员编号
|
||||
this.CraftmanValue2 = row.姓名
|
||||
this.perNum2 = row.人员编号
|
||||
},
|
||||
tijiao() { // 提交完艺表单中工艺定额人员的选择
|
||||
this.dialogFormVisible3 = false
|
||||
this.CraftmanValue = this.CraftmanValue2
|
||||
this.perNum = this.perNum2
|
||||
this.remark1 = ''
|
||||
this.tuhaoValue = ''
|
||||
},
|
||||
inputChange() { // 零件号改变
|
||||
this.remark1 = ''
|
||||
@@ -777,15 +891,21 @@ export default {
|
||||
searchProcess() { // 典艺工艺查询
|
||||
if (this.typicalClassValue === '') {
|
||||
this.serialNumValue1check = false
|
||||
} else { this.serialNumValue1check = true }
|
||||
} else {
|
||||
this.serialNumValue1check = true
|
||||
}
|
||||
|
||||
if (this.partNameValue1 === '') {
|
||||
this.partNameValue1check = false
|
||||
} else { this.partNameValue1check = true }
|
||||
} else {
|
||||
this.partNameValue1check = true
|
||||
}
|
||||
|
||||
if (this.processNumValue === '') {
|
||||
this.processNumValuecheck = false
|
||||
} else { this.processNumValuecheck = true }
|
||||
} else {
|
||||
this.processNumValuecheck = true
|
||||
}
|
||||
this.tableData2 = []
|
||||
searchProcess(this.serialNumValue1check, this.serialNumValue1, this.partNameValue1check, this.serialNumValue2, this.processNumValuecheck, this.serialNumValue2).then(response => {
|
||||
this.tableData2 = response.data
|
||||
@@ -816,16 +936,24 @@ export default {
|
||||
this.tuhao = []
|
||||
if (this.PN === '') { // 零件号
|
||||
this.check1 = 0
|
||||
} else { this.check1 = 1 }
|
||||
} else {
|
||||
this.check1 = 1
|
||||
}
|
||||
if (this.perNum === '') { // 工艺员编号
|
||||
this.check2 = 0
|
||||
} else { this.check2 = 1 }
|
||||
} else {
|
||||
this.check2 = 1
|
||||
}
|
||||
if (this.remark1 === '') { // 零件名称
|
||||
this.check4 = 0
|
||||
} else { this.check4 = 1 }
|
||||
} else {
|
||||
this.check4 = 1
|
||||
}
|
||||
if (this.date01 === '' || this.date02 === '' || this.date01 === null || this.date02 === null) { // 日期
|
||||
this.check3 = 0
|
||||
} else { this.check3 = 1 }
|
||||
} else {
|
||||
this.check3 = 1
|
||||
}
|
||||
searchWYgongyi(this.check1, this.PN, this.check2, this.perNum, this.check3, this.date01, this.date02, this.check4, this.remark1).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.tuhao.push({
|
||||
@@ -847,11 +975,6 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
tijiao() { // 提交完艺表单中工艺定额人员的选择
|
||||
this.dialogFormVisible3 = false
|
||||
this.remark1 = ''
|
||||
this.tuhaoValue = ''
|
||||
},
|
||||
numChange1() { // 当完成工艺号改变时,零件名称改变,并获取工艺要求
|
||||
this.remark1 = ''
|
||||
this.tableData4 = null
|
||||
@@ -953,7 +1076,9 @@ export default {
|
||||
searchTolerance(this.numVal, this.selParaValue).then(response => {
|
||||
if (response.data.length !== 0) { // 防止超出范围报错
|
||||
this.tolerance = response.data[0].公差
|
||||
} else { this.$message.error('输入的数值不对!') }
|
||||
} else {
|
||||
this.$message.error('输入的数值不对!')
|
||||
}
|
||||
})
|
||||
},
|
||||
copyAndSave() { // 复制并保存
|
||||
@@ -980,7 +1105,9 @@ export default {
|
||||
this.newNum = ''
|
||||
this.$message.success('保存成功')
|
||||
this.searchParts()
|
||||
} else { this.$message.error('请核准后保存') }
|
||||
} else {
|
||||
this.$message.error('请核准后保存')
|
||||
}
|
||||
},
|
||||
insertOne(row) { // 插入行
|
||||
if (this.partNumValue === '') {
|
||||
@@ -1040,7 +1167,9 @@ export default {
|
||||
saveMaterial(this.partNumValue, this.material).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('保存成功')
|
||||
} else { this.$message.error('保存失败') }
|
||||
} else {
|
||||
this.$message.error('保存失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -1052,7 +1181,9 @@ export default {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('粘贴成功')
|
||||
this.searchDetail()
|
||||
} else { this.$message.error('粘贴失败') }
|
||||
} else {
|
||||
this.$message.error('粘贴失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -1074,7 +1205,9 @@ export default {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchDetail()
|
||||
} else { this.$message.error('删除失败') }
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
@@ -1089,16 +1222,19 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.doing-row4{
|
||||
.doing-row4 {
|
||||
background: #f0f9eb;
|
||||
}
|
||||
.el-card{
|
||||
|
||||
.el-card {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:150px
|
||||
|
||||
.el-date-editor {
|
||||
width: 150px
|
||||
}
|
||||
span{
|
||||
|
||||
span {
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
<el-button type="primary" size="small" style="margin-left: 10px" @click="selectAll(tableData)">全选</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-cjn-09" style="" @click="save">保存</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
@@ -131,7 +132,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="dialogFormVisible=false">提交</el-button>
|
||||
<el-button type="primary" @click="tijiao()">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -143,6 +144,8 @@ import { getProject0, getProject, getGraphNum, getGroupNum, getTable0, getGraphN
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
num1: '', // 工艺员中间变量
|
||||
num2: '', // 工艺员流水号中间变量
|
||||
loading: false,
|
||||
loading0: false,
|
||||
projectNameValue: '',
|
||||
@@ -323,8 +326,13 @@ export default {
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
confirmPerson(row) { // 选择一行
|
||||
this.tableData[this.index].工艺员 = row.姓名
|
||||
this.tableData[this.index].人员编号 = row.人员编号
|
||||
this.num1 = row.姓名
|
||||
this.num2 = row.人员编号
|
||||
},
|
||||
tijiao() {
|
||||
this.tableData[this.index].工艺员 = this.num1
|
||||
this.tableData[this.index].人员编号 = this.num2
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
selectAll(rows) {
|
||||
if (this.tableData[0].工艺员 !== '') {
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 200px;"/>
|
||||
<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>
|
||||
<span>进度颜色:</span>
|
||||
<el-radio v-model="radioList" label="0" style="background-color: white">全部</el-radio>
|
||||
<el-radio v-model="radioList" label="1" style="background-color: red">拖期</el-radio>
|
||||
<el-radio v-model="radioList" label="2" style="background-color: yellow">即将拖期</el-radio>
|
||||
<el-radio v-model="radioList" label="3" style="background-color: lawngreen">如期</el-radio>
|
||||
<el-radio v-model="radioList" label="4" style="background-color: deepskyblue">工序外协</el-radio>
|
||||
<!--<span style="background-color: white">全部</span>-->
|
||||
<span style="background-color: red">拖期</span>
|
||||
<span style="background-color: yellow">即将拖期</span>
|
||||
<span style="background-color: lawngreen">如期</span>
|
||||
<span style="background-color: deepskyblue">工序外协</span>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
@@ -396,6 +396,7 @@ export default {
|
||||
this.Groups = []
|
||||
if (this.project !== '') {
|
||||
getMachines(this.project).then(response => {
|
||||
console.log(response.data)
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machines.push({
|
||||
label: response.data[i].机床图号,
|
||||
@@ -539,7 +540,7 @@ export default {
|
||||
background-color: transparent;
|
||||
border: 0px solid white;
|
||||
}
|
||||
.lightgreen{
|
||||
.green{
|
||||
background-color: lightgreen;
|
||||
border: 1px solid #1f2d3d;
|
||||
}
|
||||
|
||||
@@ -73,12 +73,12 @@
|
||||
type="selection"
|
||||
align="center"
|
||||
width="35"/>
|
||||
<el-table-column label="零件图号" align="center" width="200">
|
||||
<el-table-column label="零件图号" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="130">
|
||||
<el-table-column label="零件名称" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
@@ -103,42 +103,42 @@
|
||||
{{ scope.row.工序数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否超负荷" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.是否超负荷 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外协" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="scope.row.是否预计外协" @change="table1Out(scope.row)">外协</el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="加工件合格" align="center" width="230">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
v-model="tableData[scope.$index].加工件合格时间"
|
||||
size="mini"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择加工件合格时间"
|
||||
@change="timeChange(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="板焊结束" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.板焊 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200px" align="center" fixed="right">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
class="el-icon-edit"
|
||||
@click="PlateWelding(scope.$index, scope.row, 'form1')">板焊</el-button>
|
||||
<el-button size="mini" type="primary" @click="inBatches">分批</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="是否超负荷" align="center" width="100">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.是否超负荷 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="外协" width="100" align="center">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-checkbox v-model="scope.row.是否预计外协" @change="table1Out(scope.row)">外协</el-checkbox>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="加工件合格" align="center" width="230">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="tableData[scope.$index].加工件合格时间"-->
|
||||
<!--size="mini"-->
|
||||
<!--type="date"-->
|
||||
<!--value-format="yyyy-MM-dd"-->
|
||||
<!--placeholder="选择加工件合格时间"-->
|
||||
<!--@change="timeChange(scope.row)"/>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="板焊结束" width="150" align="center">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.板焊 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="操作" width="200px" align="center" fixed="right">-->
|
||||
<!--<template slot-scope="scope" align="center">-->
|
||||
<!--<el-button-->
|
||||
<!--size="mini"-->
|
||||
<!--type="primary"-->
|
||||
<!--class="el-icon-edit"-->
|
||||
<!--@click="PlateWelding(scope.$index, scope.row, 'form1')">板焊</el-button>-->
|
||||
<!--<!–<el-button size="mini" type="primary" @click="inBatches">分批</el-button>–>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
</el-table>
|
||||
<div v-if="是否扫描 === false" class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
@@ -1224,6 +1224,7 @@ export default {
|
||||
}
|
||||
}).then(() => {
|
||||
this.tableData1.push(this.result[i])
|
||||
console.log(this.tableData1)
|
||||
selection2(this.工艺计划流水号[this.indexAdjust]).then(response => { // 刷新对话框显示和颜色
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.partType = response.data[i].零件类型
|
||||
|
||||
@@ -5,13 +5,11 @@
|
||||
<span>项目名称:</span>
|
||||
<el-select
|
||||
v-model="entryNameValue"
|
||||
:remote-method="remoteMethod"
|
||||
placeholder="项目名称"
|
||||
style="width:200px"
|
||||
size="small"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
@change="empty">
|
||||
<el-option
|
||||
v-for="item in entryName"
|
||||
@@ -20,9 +18,13 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床号:</span>
|
||||
<el-input v-model="machineToolNumber" placeholder="机床号" size="small" clearable style="width:200px" @dblclick.native="SearchMachine" @change="empty1"/>
|
||||
<el-input v-model="machineToolNumber" placeholder="机床号" size="small" readonly clearable style="width:200px" @change="empty1">
|
||||
<el-button slot="append" icon="el-icon-search" @click="SearchMachine" />
|
||||
</el-input>
|
||||
<span>组号:</span>
|
||||
<el-input v-model="groupNumber" placeholder="组号" size="small" clearable style="width:200px" @dblclick.native="searchGroupList"/>
|
||||
<el-input v-model="groupNumber" placeholder="组号" size="small" readonly clearable style="width:200px">
|
||||
<el-button slot="append" icon="el-icon-search" @click="searchGroupList" />
|
||||
</el-input>
|
||||
<span>零件号:</span>
|
||||
<el-input v-model="partNumber" placeholder="零件号" size="small" clearable style="width:200px"/>
|
||||
<br>
|
||||
@@ -187,7 +189,9 @@
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<el-button type="primary" style="margin-left: 350px;margin-top: 20px" @click="submitName">提交</el-button>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitName">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible3" title="选择组号" center style="min-height: 300px">
|
||||
@@ -234,7 +238,9 @@
|
||||
@size-change="handleSizeChange3"
|
||||
@current-change="handleCurrentChange3"/>
|
||||
</div>
|
||||
<el-button type="primary" style="margin-left: 350px;margin-top: 20px" @click="submitGroup">提交</el-button>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitGroup">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
@@ -242,7 +248,12 @@
|
||||
|
||||
<script>
|
||||
import { initProject, intPartState, searchTable, searchmachine, searchgroup, editData } from '@/api/ManufacturingCenter/StatusQuery'
|
||||
import elInput from 'element-ui/packages/input'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
elInput
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading0: false,
|
||||
@@ -302,8 +313,6 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
@@ -363,28 +372,15 @@ export default {
|
||||
})
|
||||
},
|
||||
getList() { // 初始化项目名称
|
||||
this.list = []
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.list.push({
|
||||
this.entryName.push({
|
||||
label: response.data[i].项目名称,
|
||||
value: response.data[i].项目流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
remoteMethod(query) {
|
||||
if (query !== '') {
|
||||
setTimeout(() => {
|
||||
this.entryName = this.list.filter(item => {
|
||||
return item.label.toLowerCase()
|
||||
.indexOf(query.toLowerCase()) > -1
|
||||
})
|
||||
}, 1000)
|
||||
} else {
|
||||
this.entryName = []
|
||||
}
|
||||
},
|
||||
empty() {
|
||||
this.machineToolNumber = ''
|
||||
this.groupNumber = ''
|
||||
@@ -401,6 +397,12 @@ export default {
|
||||
if (response.data.result[i].机床结束时间 !== '') {
|
||||
response.data.result[i].机床结束时间 = response.data.result[i].机床结束时间.substr(0, 10)
|
||||
}
|
||||
if (response.data.result[i].工位属性 === '请选择') {
|
||||
response.data.result[i].工位属性 = ''
|
||||
}
|
||||
if (response.data.result[i].机床主管 === '请选择') {
|
||||
response.data.result[i].机床主管 = ''
|
||||
}
|
||||
}
|
||||
this.tableData6 = response.data.result
|
||||
this.total1 = parseInt(response.data.output[0].ItemCount)
|
||||
|
||||
@@ -2,38 +2,36 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div style="margin-top: -10px;">
|
||||
<el-row>
|
||||
<span>零件分类:</span>
|
||||
<el-select v-model="partsCategoriesValue" size="small" filterable clearable placeholder="零件分类" @change="getPartsName">
|
||||
<el-option
|
||||
v-for="item in partsCategories"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
|
||||
<span>零件名称:</span>
|
||||
<el-select v-model="partsNameValue" size="small" filterable clearable placeholder="零件名称" @change="getTableData" >
|
||||
<el-option
|
||||
v-for="item in partsName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
|
||||
<span>典型工艺号:</span>
|
||||
<el-input v-model="typicalNumValue" auto-complete="off" style="width: 200px" size="small" />
|
||||
<el-button size="small" type="primary" icon="el-icon-search" style="margin: 10px 0 0 10px" @click="getTableData">查询</el-button>
|
||||
<el-button size="small" type="info" icon="el-icon-circle-plus-outline" style="margin: 10px 0 0 10px" @click="addTableData">增加</el-button>
|
||||
<el-button size="small" type="success" icon="el-icon-cjn-09" style="margin: 10px 0 0 10px" @click="editConfirm">保存</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
<span>零件分类:</span>
|
||||
<el-select v-model="partsCategoriesValue" size="small" filterable clearable placeholder="零件分类" @change="getPartsName">
|
||||
<el-option
|
||||
v-for="item in partsCategories"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件名称:</span>
|
||||
<el-select v-model="partsNameValue" size="small" filterable clearable placeholder="零件名称" @change="getTableData" >
|
||||
<el-option
|
||||
v-for="item in partsName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>典型工艺号:</span>
|
||||
<el-input v-model="typicalNumValue" auto-complete="off" style="width: 100px" size="small" readonly/>
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin-left: 10px" @click="total=0;pageCurrent=1;pageSize=20;getTableData()">查询</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addTableData">增加</el-button>
|
||||
<el-button size="small" type="warning" icon="el-icon-menu" style="margin-left: 10px" @click="editConfirm">保存</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" border style="width: 100%;max-height: 550px;" size="mini" height="550px">
|
||||
<el-table-column prop="num" label="序号" width="50" align="center" type="index"/>
|
||||
<el-table-column prop="num" label="序号" width="50" align="center" type="index">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="工艺名称" width="230" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
@@ -66,12 +64,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="单件" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.单件定额工时" style="width:50px" placeholder="单件定额工时"/>
|
||||
<el-input v-model="scope.row.单件定额工时" size="mini" style="width:90px" placeholder="单件定额"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="准结" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.准结定额工时" style="width:50px" placeholder="准结定额工时"/>
|
||||
<el-input v-model="scope.row.准结定额工时" size="mini" style="width:90px" placeholder="准结定额"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="300" align="center" fixed="right">
|
||||
@@ -101,6 +99,16 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[20, 30, 40, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="工艺名称、工艺要求选择" center width="400px">
|
||||
@@ -145,6 +153,9 @@ import { getPartsCategories, getPartsName, getTableData, upMove, downMove, deleR
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageCurrent: 1,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
partsCategories: [],
|
||||
partsCategoriesCheck: null,
|
||||
partsCategoriesValue: '',
|
||||
@@ -181,7 +192,7 @@ export default {
|
||||
getPartsName(this.partsCategoriesValue).then(res => {
|
||||
const data = res.data
|
||||
data.length > 0 ? this.partsNameValue = data[0].典型工艺流水号 : this.partsNameValue = ''
|
||||
this.typicalNumValue = data[0].典型工艺号
|
||||
this.typicalNumValue = data.length > 0 ? data[0].典型工艺号 : ''
|
||||
data.map(item => {
|
||||
this.partsName.push({
|
||||
label: item.典型工艺名称,
|
||||
@@ -193,11 +204,25 @@ export default {
|
||||
getTableData() {
|
||||
this.partsCategoriesValue ? this.partsCategoriesCheck = 1 : this.partsCategoriesCheck = 0
|
||||
this.partsNameValue ? this.partsNameCheck = 1 : this.partsNameCheck = 0
|
||||
this.loading = true
|
||||
getTableData(this.partsCategoriesCheck, this.partsCategoriesValue, this.partsNameCheck, this.partsNameValue).then(res => {
|
||||
this.loading = false
|
||||
this.tableData = res.data
|
||||
})
|
||||
if (this.partsCategoriesCheck === 0 && this.partsNameCheck === 0) {
|
||||
this.$message.error('请选择查询条件')
|
||||
} else {
|
||||
this.loading = true
|
||||
getTableData(this.pageCurrent, this.pageSize, this.partsCategoriesCheck, this.partsCategoriesValue, this.partsNameCheck, this.partsNameValue).then(res => {
|
||||
this.loading = false
|
||||
this.tableData = res.data.rows
|
||||
this.total = res.data.total
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.getTableData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.getTableData()
|
||||
},
|
||||
upMove(row) {
|
||||
upMove(row.典型工艺流水号, row.典型工艺工序流水号).then(res => {
|
||||
@@ -234,7 +259,7 @@ export default {
|
||||
if (res.data[0].result === '1') {
|
||||
index++
|
||||
} else {
|
||||
this.$message.error('零件保存失败')
|
||||
this.$message.error('零件工艺保存失败')
|
||||
}
|
||||
if (index === this.tableData.length) {
|
||||
this.$message.success('保存修改成功')
|
||||
@@ -302,4 +327,7 @@ export default {
|
||||
span{
|
||||
margin: 20px;
|
||||
}
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table :data="List" highlight-current-row border>
|
||||
<el-table :data="List" style="height: 550px" border size="small">
|
||||
<el-table-column label="设备名称" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备名称 }}
|
||||
@@ -184,8 +184,7 @@ export default {
|
||||
{ value: '3', label: 3 },
|
||||
{ value: '4', label: 4 }],
|
||||
form: {
|
||||
设备名称: '',
|
||||
设备编号: '',
|
||||
设备名称: '', 设备编号: '',
|
||||
设备型号: '',
|
||||
设备性能指标: '',
|
||||
设备加工能力: '',
|
||||
@@ -253,6 +252,7 @@ export default {
|
||||
this.form.设备型号 = row.设备型号
|
||||
this.form.设备性能指标 = row.设备性能指标
|
||||
this.form.设备加工能力 = row.设备加工能力工时
|
||||
this.form.设备加工工艺 = parseInt(row.工艺属性代码)
|
||||
this.form.班次类型 = row.班次类型
|
||||
this.form.设备工时系数 = row.设备工时系数
|
||||
this.form.整改工时系数 = row.整改工时比例
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<el-radio v-model="radio" label="1">未收回</el-radio>
|
||||
<el-radio v-model="radio" label="2">已收回</el-radio>
|
||||
<span style="margin-left: 20px">保金类型:</span>
|
||||
<el-select v-model="TypeOfGoldDepositValue" clearable filterable placeholder="请选择" size="small" style="margin-left: 10px;width: 130px">
|
||||
<el-select v-model="TypeOfGoldDepositValue" clearable filterable placeholder="请选择" size="small" style="margin-left: 10px;width: 100px">
|
||||
<el-option
|
||||
v-for="item in TypeOfGoldDeposit"
|
||||
:key="item.value"
|
||||
@@ -120,7 +120,7 @@
|
||||
icon="el-icon-edit"
|
||||
@click.stop="TakeBack(scope.row);flag1 = 1">收回</el-button>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
:disabled="scope.row.是否禁用履约"
|
||||
size="mini"
|
||||
type="info"
|
||||
icon="el-icon-edit"
|
||||
@@ -251,7 +251,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="投标人" prop="投标人">
|
||||
<el-input v-model="form2.投标人" size="small" placeholder="请输入投标人" style="width: 200px;" readonly @dblclick.native="dialogFormVisiblePeople = true;flag2 = 2" @clear="clear()"/>
|
||||
<el-input v-model="form2.投标人" size="small" placeholder="请输入投标人" style="width: 200px;" clearable readonly @dblclick.native="dialogFormVisiblePeople = true;flag2 = 2" @clear="clear()"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -301,8 +301,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import elInput from 'element-ui/packages/input'
|
||||
import { initType, selectBidBond, getTree, tree, getTablePeople, TakeBack, ComplianceGold, addBidBond, editBidBond, delBidBond } from '@/api/MarketingCenter/BidBond'
|
||||
export default {
|
||||
components: {
|
||||
elInput
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
disabled: false,
|
||||
@@ -418,10 +422,16 @@ export default {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].履约金 === '1' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
data[i].履约金 === '1' ? data[i].是否禁用履约 = true : data[i].是否禁用履约 = false
|
||||
data[i].投标日期 = data[i].投标日期.substring(0, data[i].投标日期.length - 8)
|
||||
data[i].预计收回日期 = data[i].预计收回日期.substring(0, data[i].预计收回日期.length - 8)
|
||||
}
|
||||
if (this.radio === '2') {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].是否禁用 = true
|
||||
data[i].投标日期 = data[i].投标日期.substring(0, data[i].投标日期.length - 8)
|
||||
data[i].预计收回日期 = data[i].预计收回日期.substring(0, data[i].预计收回日期.length - 8)
|
||||
data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8)
|
||||
}
|
||||
}
|
||||
this.tableData1 = data
|
||||
@@ -507,6 +517,7 @@ export default {
|
||||
},
|
||||
callOff() {
|
||||
this.dialogFormVisible1 = false
|
||||
this.dialogFormVisible2 = false
|
||||
},
|
||||
ComplianceGold(row) {
|
||||
this.$confirm('此操作会将此投标保证金转为履约保证金, 是否继续?', '提示', {
|
||||
@@ -517,9 +528,9 @@ export default {
|
||||
ComplianceGold(row.招标保证金流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.fetchTableData1()
|
||||
this.$message.success('删除成功')
|
||||
this.$message.success('操作成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
this.$message.error('操作失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -531,13 +542,13 @@ export default {
|
||||
},
|
||||
addTableData1() {
|
||||
addBidBond(this.form2.招标企业, this.form2.联系人, this.form2.联系电话, this.form2.保证金金额, this.peopleid, this.form2.保证金类型, this.form2.投标日期, this.form2.计划收回日期, this.form2.备注, this.form2.提前X天提醒我).then(response => {
|
||||
this.dialogFormVisible2 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('添加成功')
|
||||
this.title = ''
|
||||
this.dialogFormVisible2 = false
|
||||
this.fetchTableData1()
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
this.$message.error('添加失败,请检查金额于提醒天数是否为数字')
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -561,13 +572,13 @@ export default {
|
||||
},
|
||||
editTableData1() {
|
||||
editBidBond(this.form2.招标企业, this.form2.联系人, this.form2.联系电话, this.form2.保证金金额, this.peopleid, this.form2.保证金类型, this.form2.投标日期, this.form2.计划收回日期, this.form2.备注, this.form2.提前X天提醒我, this.BidBondCode).then(response => {
|
||||
this.dialogFormVisible2 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('添加成功')
|
||||
this.$message.success('编辑成功')
|
||||
this.title = ''
|
||||
this.dialogFormVisible2 = false
|
||||
this.fetchTableData1()
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
this.$message.error('编辑失败,请检查金额于提醒天数是否为数字')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -9,6 +9,18 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<!--<el-input v-model="CustomerName" placeholder="请输入客户名称" size="small"></el-input>-->
|
||||
<!--<span class="move">销售经理:</span>-->
|
||||
<!--<el-input clearable v-model="MarketingManagerValue" @dblclick.native="dialogFormVisiblePeople = true" size="small" style="width:200px" placeholder="请选择营销经理" clearable></el-input>-->
|
||||
<!--<span class="move">信誉等级:</span>-->
|
||||
<!--<el-select v-model="CreditRatingValue" placeholder="请选择信誉等级" size="small">-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in CreditRating"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value">-->
|
||||
<!--</el-option>-->
|
||||
<!--</el-select>-->
|
||||
<el-button type="success" icon="el-icon-search" class="move" size="small" @click="selectCustomerOfName">查询</el-button>
|
||||
</el-card>
|
||||
<el-row>
|
||||
@@ -254,7 +266,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系地址:" prop="联系地址">
|
||||
<el-input v-model="form2.联系地址" clearable size="small" style="width:200px" placeholder="请输入联系地址" readonly/>
|
||||
<el-input v-model="form2.联系地址" clearable size="small" style="width:200px" placeholder="请输入联系地址"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -269,7 +281,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="银行账号:" prop="银行账号">
|
||||
<el-input v-model="form2.银行账号" clearable size="small" style="width:200px" placeholder="请输入银行账号" />
|
||||
<el-input v-model="form2.银行账号" clearable size="small" style="width:200px" placeholder="请输入银行账号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -299,8 +311,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import elInput from 'element-ui/packages/input'
|
||||
import { searchValue, selectAdress, selectCustomer, getTree, tree, getTablePeople, selectMarketingManager, selectCustomerOfName, initCustomer, deleteCustomer, deleteMarketingManager, addMarketingManager, editMarketingManager, addCustomer, selectAdressOfID, editCustomer } from '@/api/MarketingCenter/CRM'
|
||||
export default {
|
||||
components: {
|
||||
elInput
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
a: '', // 营销经理地区流水号
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span style="margin-left: 10px">销售经理</span>
|
||||
<el-input v-model="MarketingManagerValue" clearable size="small" style="width:200px" readonly placeholder="请选择营销经理" @dblclick.native="dialogFormVisiblePeople = true" @clear="clear()"/>
|
||||
<el-input v-model="MarketingManagerValue" readonly clearable size="small" style="width:200px" placeholder="请双击选择营销经理" @dblclick.native="dialogFormVisiblePeople = true" @clear="clear()"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;tableData2=[];getTableData()">查询收款计划</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">新增收款计划</el-button>
|
||||
<el-badge :value="value" :max="99" class="item">
|
||||
@@ -42,11 +42,6 @@
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="发货状态" align="center">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.机床名称 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -119,12 +114,6 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
<!--<el-button-->
|
||||
<!--size="mini"-->
|
||||
<!--type="primary"-->
|
||||
<!--icon="el-icon-tickets"-->
|
||||
<!--:disabled="scope.row.是否禁用"-->
|
||||
<!--@click.stop="handleEdit(scope.row, scope.$index)">付款</el-button>-->
|
||||
<el-button
|
||||
:disabled="scope.row.是否禁用编辑"
|
||||
size="mini"
|
||||
@@ -180,11 +169,6 @@
|
||||
{{ 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="操作" fixed="right" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -246,12 +230,17 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="danger" style="width: 80px">{{ scope.row.状态 }}</el-tag>
|
||||
<el-tag v-if="scope.row.计划付款时间===''||scope.row.计划付款时间===null" size="small">无计划</el-tag>
|
||||
<el-tag v-else-if="scope.row.计划付款时间!==''&&scope.row.计划付款时间!==null&&parseInt(scope.row.未收金额)===0" type="success" size="small">已完成</el-tag>
|
||||
<el-tag v-else-if="scope.row.计划付款时间!==''&&scope.row.计划付款时间!==null&&scope.row.状态==='未开始'" type="primary" size="small">未开始</el-tag>
|
||||
<el-tag v-else-if="scope.row.计划付款时间!==''&&scope.row.计划付款时间!==null&&scope.row.状态==='即将拖期'" type="warning" size="small">即将拖期</el-tag>
|
||||
<el-tag v-else-if="scope.row.计划付款时间!==''&&scope.row.计划付款时间!==null&&scope.row.状态==='已拖期'" type="danger" size="small">已拖期</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="280">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="scope.row.是否禁用收款"
|
||||
size="mini"
|
||||
type="warning"
|
||||
icon="el-icon-edit"
|
||||
@@ -280,9 +269,9 @@
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="新增付款计划" center width="380px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left">
|
||||
<el-form-item label="项目名称" prop="entryNameValue" label-width="100px">
|
||||
<el-select v-model="form2.entryNameValue" placeholder="请输入项目名称" style="margin-left: 2px; width: 200px" size="small" clearable filterable @change="searchProjectName">
|
||||
<el-select v-model="form2.entryNameValue" clearable filterable placeholder="请输入项目名称" style="margin-left: 2px; width: 200px" size="small" @change="searchProjectName">
|
||||
<el-option
|
||||
v-for="item in entryName"
|
||||
v-for="item in entryName2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
@@ -304,7 +293,7 @@
|
||||
<el-dialog :visible.sync="dialogFormVisible4" title="编辑付款计划" center width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left">
|
||||
<el-form-item label="项目名称" prop="entryNameValue" label-width="100px">
|
||||
<el-select v-model="form2.entryNameValue" :disabled="true" clearable placeholder="请输入项目名称" style="width: 200px" size="small" filterable @change="searchProjectName">
|
||||
<el-select v-model="form2.entryNameValue" :disabled="true" clearable filterable placeholder="请输入项目名称" style="width: 200px" size="small" @change="searchProjectName">
|
||||
<el-option
|
||||
v-for="item in entryName"
|
||||
:key="item.value"
|
||||
@@ -418,7 +407,7 @@
|
||||
<el-input-number v-model="form4.转移金额" :min="0" :max="max1" :precision="2" :step="1" controls-position="right" size="small" style="width: 200px" placeholder="请输入本次付款金额" @change="changeMoney"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划阶段" prop="计划阶段" label-width="110px">
|
||||
<el-select v-model="form4.计划阶段" clearable placeholder="请选择计划转移到某阶段" style="width: 200px" size="small" filterable>
|
||||
<el-select v-model="form4.计划阶段" clearable filterable placeholder="请选择计划转移到某阶段" style="width: 200px" size="small">
|
||||
<el-option
|
||||
v-for="item in Planning"
|
||||
:key="item.value"
|
||||
@@ -485,7 +474,8 @@
|
||||
|
||||
<script>
|
||||
import elInput from 'element-ui/packages/input'
|
||||
import { SelectContractFunds, AccountsReceivable, editDay, TransPlanning, selectBatch, editList, delMoney, editTime, selectMax, editFukuan, fukuan, selectProvince, SelectMarketingManager, searchTable1, searchTable2, editBatchCapitalChar, deletechar, searchProjectNumber, searchProjectName, addList, PaymentPhase, dellist, selectMachine, selectBatchFundingDetails } from '@/api//MarketingCenter/ContractCapitalManagement'
|
||||
import { searchProjectNumber2, SelectContractFunds, AccountsReceivable, editDay, TransPlanning, selectBatch, editList, delMoney, editTime, selectMax, editFukuan, fukuan, selectProvince, SelectMarketingManager, searchTable1, searchTable2, editBatchCapitalChar, deletechar, searchProjectNumber, searchProjectName, addList, PaymentPhase, dellist, selectMachine, selectBatchFundingDetails } from '@/api//MarketingCenter/ContractCapitalManagement'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
elInput
|
||||
@@ -499,7 +489,7 @@ export default {
|
||||
}
|
||||
}
|
||||
return {
|
||||
// disabled: false,
|
||||
entryName2: [],
|
||||
type: '',
|
||||
a: 1,
|
||||
b: 1,
|
||||
@@ -611,7 +601,6 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.fetchData()
|
||||
this.getTableData()
|
||||
this.init()
|
||||
},
|
||||
@@ -619,6 +608,7 @@ export default {
|
||||
init() {
|
||||
this.getSelect(selectProvince, ['省份', '省份流水号'], 'Province')
|
||||
this.getSelect(searchProjectNumber, ['项目名称', '项目流水号'], 'entryName')
|
||||
this.getSelect(searchProjectNumber2, ['项目名称', '项目流水号'], 'entryName2')
|
||||
this.getSelect(PaymentPhase, ['付款阶段', '付款阶段ID'], 'PaymentPhase')
|
||||
AccountsReceivable().then(response => {
|
||||
const data = response.data
|
||||
@@ -654,7 +644,9 @@ export default {
|
||||
})
|
||||
selectBatchFundingDetails(this.id).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].本次收款时间 = response.data[i].本次收款时间.substring(0, response.data[i].本次收款时间.length - 9)
|
||||
if (response.data[i].本次收款时间 !== null || response.data[i].本次收款时间 !== '') {
|
||||
response.data[i].本次收款时间 = response.data[i].本次收款时间.substring(0, response.data[i].本次收款时间.length - 9)
|
||||
}
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
@@ -662,6 +654,8 @@ export default {
|
||||
this.listLoading2 = false
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用收款 = true : data[i].是否禁用收款 = false
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
@@ -680,7 +674,6 @@ export default {
|
||||
}
|
||||
}
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
// data[i].已支付 === '0' ? data[i].是否禁用编辑 = false : data[i].是否禁用编辑 = true
|
||||
}
|
||||
this.tableData2 = data
|
||||
this.total2 = response.data.total
|
||||
@@ -711,6 +704,8 @@ export default {
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用收款 = true : data[i].是否禁用收款 = false
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
@@ -792,7 +787,9 @@ export default {
|
||||
this.tableData4 = []
|
||||
selectBatchFundingDetails(row.批次资金id).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].本次收款时间 = response.data[i].本次收款时间.substring(0, response.data[i].本次收款时间.length - 9)
|
||||
if (response.data[i].本次收款时间 !== null || response.data[i].本次收款时间 !== '') {
|
||||
response.data[i].本次收款时间 = response.data[i].本次收款时间.substring(0, response.data[i].本次收款时间.length - 9)
|
||||
}
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
@@ -812,19 +809,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
// fetchData() {
|
||||
// getTree().then(response => { // 获取人员信息树
|
||||
// const data = response.data
|
||||
// this.dataPeople = tree(data, 0)
|
||||
// })
|
||||
// },
|
||||
// handleNodeClick(data) { // 树节点点击
|
||||
// this.getData(getTablePeople, 'ListPeople', data.id)
|
||||
// },
|
||||
// handleChange(row) {
|
||||
// this.peopleid = row.人员编号
|
||||
// this.peoplename = row.姓名
|
||||
// },
|
||||
getName() {
|
||||
this.dialogFormVisiblePeople = false
|
||||
this.MarketingManagerValue = this.peoplename
|
||||
@@ -877,6 +861,7 @@ export default {
|
||||
this.listLoading2 = false
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用收款 = true : data[i].是否禁用收款 = false
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
@@ -900,7 +885,6 @@ export default {
|
||||
this.tableData2 = data
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
// this.getTable(searchTable2, [this.PageCurrent2, this.PageSize2, this.moneyID], ['tableData2', 'total2', 'listLoading2'])
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.PageCurrent = 1
|
||||
@@ -945,6 +929,8 @@ export default {
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用收款 = true : data[i].是否禁用收款 = false
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
@@ -1007,6 +993,8 @@ export default {
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用收款 = true : data[i].是否禁用收款 = false
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
@@ -1088,11 +1076,6 @@ export default {
|
||||
},
|
||||
handleEdit1(row) {
|
||||
this.addForm('form3')
|
||||
// let sum = 0
|
||||
// this.tableData2.map(item => {
|
||||
// sum += parseFloat(item.本次付款)
|
||||
// })
|
||||
// this.max1 = this.contractTotal - (sum - row.本次付款)
|
||||
this.title = '记录阶段收款'
|
||||
this.max1 = parseFloat(row.应收金额) - parseFloat(row.已收金额)
|
||||
this.dialogFormVisible3 = true
|
||||
@@ -1111,6 +1094,8 @@ export default {
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用收款 = true : data[i].是否禁用收款 = false
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
@@ -1150,7 +1135,9 @@ export default {
|
||||
})
|
||||
selectBatchFundingDetails(this.id).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].本次收款时间 = response.data[i].本次收款时间.substring(0, response.data[i].本次收款时间.length - 9)
|
||||
if (response.data[i].本次收款时间 !== null || response.data[i].本次收款时间 !== '') {
|
||||
response.data[i].本次收款时间 = response.data[i].本次收款时间.substring(0, response.data[i].本次收款时间.length - 9)
|
||||
}
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
@@ -1182,6 +1169,8 @@ export default {
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用收款 = true : data[i].是否禁用收款 = false
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
@@ -1207,7 +1196,9 @@ export default {
|
||||
})
|
||||
selectBatchFundingDetails(this.id).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].本次收款时间 = response.data[i].本次收款时间.substring(0, response.data[i].本次收款时间.length - 9)
|
||||
if (response.data[i].本次收款时间 !== null || response.data[i].本次收款时间 !== '') {
|
||||
response.data[i].本次收款时间 = response.data[i].本次收款时间.substring(0, response.data[i].本次收款时间.length - 9)
|
||||
}
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
@@ -1241,6 +1232,8 @@ export default {
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用收款 = true : data[i].是否禁用收款 = false
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
@@ -1313,6 +1306,8 @@ export default {
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用收款 = true : data[i].是否禁用收款 = false
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
@@ -1369,6 +1364,8 @@ export default {
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用收款 = true : data[i].是否禁用收款 = false
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
@@ -1438,6 +1435,8 @@ export default {
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, row.资金ID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用收款 = true : data[i].是否禁用收款 = false
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span style="margin-left: 10px">销售经理</span>
|
||||
<el-input v-model="MarketingManagerValue" clearable size="small" style="width:200px" placeholder="请选择营销经理" readonly @dblclick.native="openName();param = 1" @clear="clear()"/>
|
||||
<el-input v-model="MarketingManagerValue" readonly clearable size="small" style="width:200px" placeholder="请选择营销经理" @dblclick.native="openName();param = 1" @clear="clear()"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">增加</el-button>
|
||||
</el-card>
|
||||
@@ -172,7 +172,7 @@
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
<div v-for="file in hadFile" :key="file.id">
|
||||
<div v-for="(file, key) in hadFile" :key="key">
|
||||
<div class="wrapper">
|
||||
<div class="content">
|
||||
<div class="action">
|
||||
@@ -200,7 +200,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="已完成进度" prop="executionProgressID">
|
||||
<el-select v-model="form.executionProgressID" :disabled="infoDisable" placeholder="请输入目前执行进度" clearable size="small" style="width: 200px">
|
||||
<el-select v-model="form.executionProgressID" :disabled="infoDisable" placeholder="请输入目前执行进度" size="small" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in executionProgress"
|
||||
:key="item.value"
|
||||
@@ -211,7 +211,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="销售经理" prop="MarketingManagerValue">
|
||||
<el-input v-model="form.MarketingManagerValue" clearable size="small" style="width:200px" placeholder="请选择营销经理" readonly @dblclick.native="openName()" @clear="clear()"/>
|
||||
<el-input v-model="form.MarketingManagerValue" readonly clearable size="small" style="width:200px" placeholder="请双击选择营销经理" @dblclick.native="openName()" @clear="clear()"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -256,12 +256,12 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户名称" prop="customerName">
|
||||
<el-input v-model="form.customerName" size="small" placeholder="请输入客户名称" style="width:200px" readonly @dblclick.native="CustomerChange()"/>
|
||||
<el-input v-model="form.customerName" readonly size="small" placeholder="请双击选择客户" style="width:200px" clearable @dblclick.native="CustomerChange()" @clear="clear1()"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="付款方式" prop="付款方式">
|
||||
<el-select v-model="form.付款方式" :disabled="disabled" placeholder="请选择付款方式" clearable size="small" style="width: 200px">
|
||||
<el-select v-model="form.付款方式" :disabled="disabled" placeholder="请选择付款方式" size="small" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in money"
|
||||
:key="item.value"
|
||||
@@ -417,10 +417,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import elInput from 'element-ui/packages/input'
|
||||
import { initProject, searchTable1, fetchExecutionProgress, delList, addList, executionProgressID, editchar, getTree, tree, getTablePeople, fetchCustomerData, getFileData, deleteFileData, selectMachine, selectProvince, SelectMarketingManager, submitMachine, editMachine, delMachine, money } from '@/api/MarketingCenter/ContractInformationManagement'
|
||||
import { upload, download } from '@/utils/request'
|
||||
export default {
|
||||
|
||||
components: {
|
||||
elInput
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
a: 1,
|
||||
@@ -705,6 +708,9 @@ export default {
|
||||
this.tableData3 = []
|
||||
this.ProvinceValue = ''
|
||||
},
|
||||
clear1() {
|
||||
this.CustomerCode = ''
|
||||
},
|
||||
CustomerChange() {
|
||||
this.dialogCustomerFormVisible = true
|
||||
},
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
<template>
|
||||
<div style="display: inline-block;width: 100%;height: 100%;margin: 10px 20px 40px 10px">
|
||||
<input id="excel-upload-input" ref="excel-upload-input" type="file" multiple="multiple" accept=".xlsx, .xls" class="c-hide" @change="handkeFileChange">
|
||||
<el-button style="margin-left:16px;" size="small" icon="el-icon-search" type="success" @click="handleUpload">浏览清单</el-button>
|
||||
<!--<div id="drop" @drop="handleDrop" @dragover="handleDragover" @dragenter="handleDragover">-->
|
||||
<!--将Excel文件拖到这或-->
|
||||
<!--<el-button style="margin-left:16px;" size="small" icon="el-icon-search" type="success" @click="handleUpload">浏览</el-button>-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import XLSX from 'xlsx'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
excelData: {
|
||||
itemFile: [],
|
||||
worksheet: []
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
generateDate({ itemFile, worksheet }) {
|
||||
this.excelData.itemFile.push(itemFile)
|
||||
this.excelData.worksheet.push(worksheet)
|
||||
},
|
||||
handleDrop(e) {
|
||||
this.excelData.itemFile = []
|
||||
this.excelData.worksheet = [] // 每次拖拽都清空一次
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
const files = e.dataTransfer.files
|
||||
for (let i = 0; i < files.length; i++) { // 支持多个文件
|
||||
const itemFile = files[i]
|
||||
this.readerData(itemFile)
|
||||
}
|
||||
this.$emit('on-selected-file', this.excelData)
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
},
|
||||
handleDragover(e) {
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
e.dataTransfer.dropEffect = 'copy'
|
||||
},
|
||||
handleUpload() {
|
||||
this.excelData.itemFile = []
|
||||
this.excelData.worksheet = [] // 每次点击“浏览”都清空一次
|
||||
document.getElementById('excel-upload-input').click()
|
||||
},
|
||||
handkeFileChange(e) {
|
||||
const files = e.target.files
|
||||
for (let i = 0; i < files.length; i++) { // 支持多个文件
|
||||
const itemFile = files[i]
|
||||
if (!itemFile) return
|
||||
this.readerData(itemFile)
|
||||
}
|
||||
this.$emit('on-selected-file', this.excelData)
|
||||
this.$refs['excel-upload-input'].value = null // fix can't select the same excel
|
||||
},
|
||||
readerData(itemFile) {
|
||||
const reader = new FileReader()
|
||||
reader.onload = e => {
|
||||
const data = e.target.result
|
||||
const fixedData = this.fixdata(data)
|
||||
const workbook = XLSX.read(btoa(fixedData), { type: 'base64' })
|
||||
const firstSheetName = workbook.SheetNames[0] // cjnsheetname
|
||||
const worksheet = workbook.Sheets[firstSheetName] // 默认firstsheet
|
||||
this.generateDate({ itemFile, worksheet })
|
||||
}
|
||||
reader.readAsArrayBuffer(itemFile)
|
||||
},
|
||||
fixdata(data) {
|
||||
let o = ''
|
||||
let l = 0
|
||||
const w = 10240
|
||||
for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)))
|
||||
o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)))
|
||||
return o
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#excel-upload-input{
|
||||
display: none;
|
||||
z-index: -9999;
|
||||
}
|
||||
#drop{
|
||||
border: 2px dashed #bbb;
|
||||
width: 600px;
|
||||
line-height: 160px;
|
||||
margin: 0;
|
||||
font-size: 24px;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
color: #bbb;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
1085
src/views/MarketingCenter/DeliveryManagement/index.vue
Normal file
1085
src/views/MarketingCenter/DeliveryManagement/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -365,8 +365,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import elInput from 'element-ui/packages/input'
|
||||
import { initProject, searchTable1, searchTable2, addSafetyMargin, editSafetyMargin, delSafetyMargin, Withdrawing, delWithdrawing, edtWithdrawing, TakeBack } from '@/api/MarketingCenter/SafetyMargin'
|
||||
export default {
|
||||
components: {
|
||||
elInput
|
||||
},
|
||||
data() {
|
||||
const validateValue = (rule, value, callback) => {
|
||||
if (value === 0) {
|
||||
@@ -581,6 +585,8 @@ export default {
|
||||
callOff() {
|
||||
this.dialogFormVisible1 = false
|
||||
this.dialogFormVisible2 = false
|
||||
this.dialogFormVisible3 = false
|
||||
this.dialogFormVisible4 = false
|
||||
},
|
||||
delSafetyMargin(row) {
|
||||
this.deleteRow(delSafetyMargin, row.安全保证金流水号, function() { this.fetchTableData1() })
|
||||
@@ -598,7 +604,7 @@ export default {
|
||||
this.dialogFormVisible2 = true
|
||||
this.code = row.安全保证金流水号
|
||||
this.projectName = row.项目名称
|
||||
this.maxMoney = parseFloat(row.保证金金额)
|
||||
this.maxMoney = parseFloat(row.应收回金额)
|
||||
this.SurplusAmount = row.应收回金额
|
||||
this.addForm('form2')
|
||||
},
|
||||
|
||||
@@ -52,26 +52,11 @@
|
||||
{{ scope.row.设备情况 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="类别" align="center" width="110px">-->
|
||||
<!--<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" width="150px">
|
||||
<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" width="200px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -138,18 +123,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--<el-row>-->
|
||||
<!--<el-col :span="12">-->
|
||||
<!--<el-form-item label="类别" prop="category">-->
|
||||
<!--<el-input v-model="form.category" placeholder="类别" clearable size="small"></el-input>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="12">-->
|
||||
<!--<el-form-item label="关注" prop="attention">-->
|
||||
<!--<el-input v-model="form.attention" placeholder="关注" clearable size="small" ></el-input>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-col>-->
|
||||
<!--</el-row>-->
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备情况" prop="EquipmentCondition">
|
||||
@@ -162,15 +135,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--<el-row>-->
|
||||
<!--<el-col :span="12">-->
|
||||
<!--<el-form-item label="厂家序号" prop="ManufacturerNumber">-->
|
||||
<!--<el-input v-model="form.ManufacturerNumber" placeholder="厂家序号" clearable size="small"></el-input>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="12">-->
|
||||
<!--</el-col>-->
|
||||
<!--</el-row>-->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
:data="tableData3"
|
||||
border
|
||||
stripe
|
||||
size="small"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%;"
|
||||
height="650">
|
||||
@@ -43,30 +44,31 @@
|
||||
<template slot-scope="scope">{{ scope.row.工艺名称简称 }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="计算方式" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="parseInt(scope.row.外协价格计算标准流水号)===1" type="success" size="small">工时</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.外协价格计算标准流水号)===2" type="success" size="small">重量</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.外协价格计算标准流水号)===3" type="success" size="small">面积</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="工时价格(元/分)">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode1[scope.$index]">
|
||||
<h4>{{ scope.row.外协价格1 }}</h4>
|
||||
</div>
|
||||
{{ scope.row.外协价格1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="重量价格(元/kg)">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode2[scope.$index]">
|
||||
<h4>{{ scope.row.重量价格1 }}</h4>
|
||||
</div>
|
||||
{{ scope.row.重量价格1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="面积价格(元/m2)">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode3[scope.$index]">
|
||||
<h4>{{ scope.row.面积价格1 }}</h4>
|
||||
</div>
|
||||
{{ scope.row.面积价格1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="130px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -227,21 +229,6 @@ export default {
|
||||
getTable(this.Code_Check, this.Code, this.Code_Check1, this.processClassificationValue, this.pageList, this.pageSize).then(response => {
|
||||
this.total = parseInt(response.data.total)
|
||||
if (response.data.rows.length !== 0) {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].外协价格计算标准流水号 === '1') {
|
||||
this.colorCode1.push('mianji')
|
||||
this.colorCode2.push('')
|
||||
this.colorCode3.push('')
|
||||
} else if (response.data.rows[i].外协价格计算标准流水号 === '2') {
|
||||
this.colorCode1.push('')
|
||||
this.colorCode2.push('mianji')
|
||||
this.colorCode3.push('')
|
||||
} else {
|
||||
this.colorCode1.push('')
|
||||
this.colorCode2.push('')
|
||||
this.colorCode3.push('mianji')
|
||||
}
|
||||
}
|
||||
this.tableData3 = response.data.rows
|
||||
}
|
||||
})
|
||||
|
||||
@@ -56,12 +56,18 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" :row-class-name="tableRowClassName" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @row-click="getParts">
|
||||
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @row-click="getParts">
|
||||
<el-table-column
|
||||
label=" "
|
||||
type="index"
|
||||
align="center"
|
||||
width="50"/>
|
||||
<el-table-column label="付款状态" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.实际付款时间!==''" type="success" size="small">已付款</el-tag>
|
||||
<el-tag v-else type="info" size="small">未付款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="表单号" align="center" width="280px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.表单号 }}
|
||||
@@ -425,14 +431,6 @@ export default {
|
||||
this.dialogFormVisible2 = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
// 表格颜色
|
||||
tableRowClassName({ row }) {
|
||||
if (row.实际付款时间 !== '') {
|
||||
return 'fukuan'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
// 获取表格2数据
|
||||
getParts(row) {
|
||||
this.loading2 = true
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
<span>表单号:</span>
|
||||
<el-input v-model="formNumber" size="small" placeholder="表单号" clearable style="width:200px"/>
|
||||
<span>外协厂家:</span>
|
||||
<el-input v-model="manufacturers" readonly size="small" placeholder="外协厂家" style="width:200px" clearable @dblclick.native="onFocus1();param=0"/>
|
||||
<el-input v-model="manufacturers" readonly size="small" placeholder="外协厂家" style="width:250px" clearable>
|
||||
<el-button slot="append" icon="el-icon-search" @click="onFocus1();param=0"/>
|
||||
</el-input>
|
||||
<span>下达任务日期:</span>
|
||||
<el-date-picker
|
||||
v-model="time"
|
||||
@@ -17,7 +19,13 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading2" :data="List" :row-class-name="tableRowClassName2" highlight-current-row height="350" border @row-click="searchProcess" >
|
||||
<el-table v-loading="loading2" :data="List" highlight-current-row height="350" border @row-click="searchProcess" >
|
||||
<el-table-column label="单据状态" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.单据状态==='成交'" type="success" size="small">成交</el-tag>
|
||||
<el-tag v-else type="info" size="small">未成交</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="表单号" align="center" min-width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.表单号 }}
|
||||
@@ -446,8 +454,12 @@ import { getTable, getData1, getTable1, getprocedure, searchManufactor, sparePar
|
||||
import { getExplorer, method5, Cleanup } from '@/vendor/exportExcel'
|
||||
import { convertCurrency } from '@/vendor/int2Chinese'
|
||||
import { mapGetters } from 'vuex'
|
||||
import elInput from 'element-ui/packages/input'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
elInput
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
bianliang: [],
|
||||
@@ -609,7 +621,7 @@ export default {
|
||||
this.List3 = []
|
||||
getTable(this.num, this.formNumber, this.num1, this.ManufactorNumber, this.num2, this.time1, this.time2, this.id, this.pageList, this.pageSize).then(response => {
|
||||
this.total = parseInt(response.data.total)
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].任务下达日期 !== null) {
|
||||
response.data.rows[i].任务下达日期 = response.data.rows[i].任务下达日期.substr(0, 10)
|
||||
}
|
||||
@@ -871,7 +883,7 @@ export default {
|
||||
sums[4] = '材料费:'
|
||||
sums[6] = '其他费用:'
|
||||
sums[8] = '运费:'
|
||||
sums[9] = this.freight
|
||||
sums[9] = parseInt(this.freight)
|
||||
sums[10] = '合计:'
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
sums[24] += Math.round(parseFloat(data[i].外协预算总价格) * 100) / 100
|
||||
@@ -1046,6 +1058,7 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
// 确定价格
|
||||
confirmPrice() {
|
||||
this.code1 = 0
|
||||
for (let i = 0; i < this.List3.length; i++) {
|
||||
@@ -1168,6 +1181,7 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
// 成交
|
||||
Deal() {
|
||||
this.documentStatus = 2
|
||||
this.sign = 1
|
||||
@@ -1227,7 +1241,7 @@ export default {
|
||||
},
|
||||
// 提交编辑
|
||||
submitEdit() {
|
||||
editData(this.Number, this.ManufactorNumber1, this.form.运费, this.documentStatus, this.sign, this.Explain).then(response => {
|
||||
editData(this.Number, this.ManufactorNumber1, this.form.运费, this.documentStatus, 1, this.Explain).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogFormVisible = false
|
||||
@@ -1534,14 +1548,6 @@ export default {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
// 表格颜色
|
||||
tableRowClassName2({ row }) {
|
||||
if (row.单据状态 === '成交') {
|
||||
return 'chengjiao'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageList = 1
|
||||
|
||||
@@ -16,11 +16,9 @@
|
||||
align="center"
|
||||
width="50"/>
|
||||
<el-table-column label="零件图号" align="center" width="380px">
|
||||
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="320px">
|
||||
<template slot-scope="scope">
|
||||
@@ -57,19 +55,23 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading2" :data="tableData2" :row-class-name="tableRowClassName" height="350" style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table v-loading="loading2" :data="tableData2" height="350" style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column
|
||||
label=" "
|
||||
type="index"
|
||||
align="center"
|
||||
width="50"/>
|
||||
|
||||
<el-table-column label="序间外协" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="checkBox[scope.$index]" @change="edit(scope.$index, scope.row)">选择</el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="外协状态" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="parseInt(scope.row.工序间是否外协)===2" type="success" size="small">外协</el-tag>
|
||||
<el-tag v-else size="small">自制</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺名称" align="center" width="220px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
@@ -252,14 +254,6 @@ export default {
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable()
|
||||
},
|
||||
// 表格颜色
|
||||
tableRowClassName({ row }) {
|
||||
if (row.工序间是否外协 === 2) {
|
||||
return 'waixie'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
</el-select>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
<span>提前</span>
|
||||
<el-input-number v-model="warningValue" :min="1" controls-position="right" size="small" style="width: 90px"/>
|
||||
<span>天预警</span>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -70,7 +73,7 @@
|
||||
<el-progress
|
||||
:text-inside="true"
|
||||
:stroke-width="18"
|
||||
:percentage="100*(parseInt(scope.row.合同物料到货总数)/parseInt(scope.row.合同物料采购总数)).toFixed(4)"
|
||||
:percentage="parseFloat((100*scope.row.合同物料到货总数/scope.row.合同物料采购总数).toFixed(2))"
|
||||
status="success"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -114,7 +117,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="已到货数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总到货数量 }}
|
||||
{{ scope.row.总到货数量 ? scope.row.总到货数量 : 0 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -130,6 +133,7 @@ export default {
|
||||
name: '', // 项目总价查询
|
||||
data() {
|
||||
return {
|
||||
warningValue: 3,
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
contractNumValue: '',
|
||||
@@ -169,6 +173,7 @@ export default {
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.warningValue ? this.warningValue : this.warningValue = 1
|
||||
this.arrival = [] // 规定到货时间数组
|
||||
this.now = new Date()
|
||||
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
|
||||
@@ -177,13 +182,13 @@ export default {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.arrival.push(new Date(response.data.rows[i].规定到货时间))
|
||||
if (parseInt(response.data.rows[i].合同物料到货总数) === parseInt(response.data.rows[i].合同物料采购总数)) {
|
||||
this.judge[i] = 1
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.now - this.arrival[i]) > 0 && (this.now - this.arrival[i]) < 86400000) {
|
||||
this.judge[i] = 2
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.now - this.arrival[i]) > 86400000) {
|
||||
this.judge[i] = 3
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.now - this.arrival[i]) < 0) {
|
||||
this.judge[i] = 4
|
||||
this.judge[i] = 1 // 全部到货
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.arrival[i] - this.now) > 0 && (this.arrival[i] - this.now) < (86400000 * this.warningValue)) {
|
||||
this.judge[i] = 2 // 即将拖期
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.arrival[i] - this.now) < 0) {
|
||||
this.judge[i] = 3 // 已拖期
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.arrival[i] - this.now) > (86400000 * this.warningValue)) {
|
||||
this.judge[i] = 4 // 进度正常
|
||||
}
|
||||
}
|
||||
this.tableData1 = response.data.rows
|
||||
|
||||
@@ -20,24 +20,20 @@
|
||||
<span>合同号:</span>
|
||||
<el-input v-model="contractNum" placeholder="合同号" size="small" style="width:180px" clearable/>
|
||||
<span>采购员:</span>
|
||||
<el-input
|
||||
v-model="buyerName"
|
||||
placeholder="采购员"
|
||||
size="small"
|
||||
readonly
|
||||
clearable
|
||||
style="width:100px"
|
||||
@dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px" clearable>
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>供应商:</span>
|
||||
<el-input
|
||||
v-model="supplierName"
|
||||
placeholder="供应商"
|
||||
size="small"
|
||||
readonly
|
||||
clearable
|
||||
style="width:180px"
|
||||
@dblclick.native="dialogVisible1=true;submitDisable=true"
|
||||
@clear="emptySupplierDetail"/>
|
||||
style="width:180px"/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -47,28 +43,37 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading1" :data="tableData1" size="mini" border style="width: 100%;">
|
||||
<el-table-column label="采购合同编号" min-width="150" align="center">
|
||||
<el-table :data="tableData1" size="mini" border style="width: 100%">
|
||||
<el-table-column label="请款" min-width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon=""
|
||||
@click="requestFund(scope.row)">请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同编号" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同名称" min-width="150" align="center">
|
||||
<el-table-column label="采购合同名称" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规定到货时间" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规定到货时间 }}
|
||||
{{ scope.row.规定到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" min-width="200" align="center">
|
||||
<el-table-column label="供应商" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" width="80" align="center">
|
||||
<el-table-column label="总金额" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总金额 }}
|
||||
</template>
|
||||
@@ -78,7 +83,7 @@
|
||||
{{ scope.row.付款方式内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="欠款金额" min-width="100" align="center">
|
||||
<el-table-column label="欠款金额" min-width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.欠款金额 }}
|
||||
</template>
|
||||
@@ -93,9 +98,18 @@
|
||||
<el-input v-model="scope.row.本次应请款" size="mini" style="width:70px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款付款情况" width="810" align="center">
|
||||
<el-table-column label="请款付款情况" width="900" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-table v-show="tableData11[scope.$index].length!==0" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
|
||||
<el-table :id="scope.$index" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
|
||||
<el-table-column label="取消请款" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="scope.row.审核情况流水号!==3"
|
||||
type="danger"
|
||||
size="mini"
|
||||
@click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="次数" min-width="60" align="center" type="index"/>
|
||||
<el-table-column label="请款金额" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
@@ -104,25 +118,25 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="请款时间" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款时间 }}
|
||||
{{ scope.row.请款时间 ? scope.row.请款时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核情况内容" width="80" align="center">
|
||||
<el-table-column label="审核情况" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审核情况内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过审核原因" width="80" align="center">
|
||||
<el-table-column label="未通过审核原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审核原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批情况内容" width="80" align="center">
|
||||
<el-table-column label="审批情况" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批情况内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过审批原因" width="80" align="center">
|
||||
<el-table-column label="未通过审批原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审批原因 }}
|
||||
</template>
|
||||
@@ -132,32 +146,14 @@
|
||||
{{ scope.row.付款情况内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未付款原因" width="80" align="center">
|
||||
<el-table-column label="未付款原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未付款原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
size="mini"
|
||||
icon=""
|
||||
@click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款" min-width="80" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon=""
|
||||
@click="requestFund(scope.row)">请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
@@ -173,22 +169,22 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<span>请款开始时间:</span>
|
||||
<span>请款时间区间:</span>
|
||||
<el-date-picker
|
||||
v-model="startRequestDate"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
<span>请款结束时间:</span>
|
||||
placeholder="开始日期"/>
|
||||
~
|
||||
<el-date-picker
|
||||
v-model="endRequestDate"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
placeholder="结束日期"/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -217,15 +213,10 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="规定到货时间" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规定到货时间 }}
|
||||
{{ scope.row.规定到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实际到货时间" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.实际到货时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" min-width="150" align="center">
|
||||
<el-table-column label="供应商" min-width="250" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
@@ -257,170 +248,23 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="请款时间" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款时间 }}
|
||||
{{ scope.row.请款时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible1" title="供应商选择" center style="min-height: 300px">
|
||||
<el-form ref="form1" :model="form1" label-position="left" label-width="90px" class="searchForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商名称">
|
||||
<el-input v-model="supplierName" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="企业性质">
|
||||
<el-input v-model="enterpriseNature" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="货期">
|
||||
<el-input v-model="goodTime" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="注册资本">
|
||||
<el-input v-model="registeredCapital" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="税号">
|
||||
<el-input v-model="taxNum" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电子邮箱">
|
||||
<el-input v-model="EMail" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="地址">
|
||||
<el-input v-model="address" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="账号">
|
||||
<el-input v-model="account" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开户行">
|
||||
<el-input v-model="openingBank" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电话号码">
|
||||
<el-input v-model="phone" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="传真">
|
||||
<el-input v-model="fax" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
@click="searchSupplier">查询</el-button>
|
||||
<el-button
|
||||
:disabled="submitDisable"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitSelectSupplier">确定</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
icon="el-icon-delete"
|
||||
@click="emptySupplierDetail">清空</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="tableData01" size="mini" style="width: 97%;max-height: 300px;margin-top:15px" height="200px" border @row-click="showSupplierDetail">
|
||||
<el-table-column align="center" label="供应商名称" width="200">
|
||||
<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-column align="center" label="创立日期">
|
||||
<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>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible2" title="采购员选择" center style="min-height: 300px;" width="40%">
|
||||
<el-table
|
||||
:data="tableData02"
|
||||
size="small"
|
||||
border
|
||||
style="width: 100%;min-height:300px"
|
||||
height="300px"
|
||||
highlight-current-row
|
||||
@row-click="clickBuyer">
|
||||
<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>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :disabled="submitDisable" type="primary" size="small" icon="el-icon-check" @click="submitSelectBuyer">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchSupplier, searchTable1, requestFund, searchCondition, cancelRequestFund, searchRequestTable, initBuyer } from '@/api/PurchasingCenter/BuyerRequestFund'
|
||||
import { searchTable1, requestFund, searchCondition, cancelRequestFund, searchRequestTable, initBuyer } from '@/api/PurchasingCenter/BuyerRequestFund'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableData02: [],
|
||||
dialogVisible2: false,
|
||||
personValue: '',
|
||||
person: [],
|
||||
loading2: false,
|
||||
tableData2: [],
|
||||
tableData11: [],
|
||||
@@ -430,37 +274,10 @@ export default {
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
contractNum: '',
|
||||
buyerName: '',
|
||||
dialogVisible1: false,
|
||||
submitDisable: true,
|
||||
form1: {},
|
||||
supplierValue: '',
|
||||
supplierName: '',
|
||||
enterpriseNature: '',
|
||||
createDate: '',
|
||||
registeredCapital: '',
|
||||
taxNum: '',
|
||||
EMail: '',
|
||||
address: '',
|
||||
account: '',
|
||||
openingBank: '',
|
||||
phone: '',
|
||||
fax: '',
|
||||
goodTime: '',
|
||||
supplierCheck1: 0,
|
||||
supplierCheck2: 0,
|
||||
supplierCheck3: 0,
|
||||
supplierCheck4: 0,
|
||||
supplierCheck5: 0,
|
||||
supplierCheck6: 0,
|
||||
supplierCheck7: 0,
|
||||
supplierCheck8: 0,
|
||||
supplierCheck9: 0,
|
||||
supplierCheck10: 0,
|
||||
supplierCheck11: 0,
|
||||
supplierCheck12: 0,
|
||||
tableData01: [],
|
||||
loading1: false,
|
||||
tableData1: [],
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
@@ -479,100 +296,43 @@ export default {
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.initBuyer()
|
||||
},
|
||||
methods: {
|
||||
submitSelectBuyer() { // 确定
|
||||
this.dialogVisible2 = false
|
||||
},
|
||||
clickBuyer(row) { // 点击采购员表某一行
|
||||
this.submitDisable = false
|
||||
this.buyerName = row.姓名
|
||||
},
|
||||
initBuyer() { // 初始化采购人员
|
||||
initBuyer().then(response => {
|
||||
this.tableData02 = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.person.push({
|
||||
text: response.data[i].姓名,
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchSupplier() { // 查询创立日期和注册资本大于符合条件的数据
|
||||
this.supplierName ? this.supplierCheck1 = 1 : (this.supplierCheck1 = 0, this.supplierName = '')
|
||||
this.enterpriseNature ? this.supplierCheck2 = 1 : (this.supplierCheck2 = 0, this.enterpriseNature = '')
|
||||
this.createDate ? this.supplierCheck3 = 1 : (this.supplierCheck3 = 0, this.createDate = '')
|
||||
this.registeredCapital ? this.supplierCheck4 = 1 : (this.supplierCheck4 = 0, this.registeredCapital = '')
|
||||
this.taxNum ? this.supplierCheck5 = 1 : (this.supplierCheck5 = 0, this.taxNum = '')
|
||||
this.EMail ? this.supplierCheck6 = 1 : (this.supplierCheck6 = 0, this.EMail = '')
|
||||
this.address ? this.supplierCheck7 = 1 : (this.supplierCheck7 = 0, this.address = '')
|
||||
this.account ? this.supplierCheck8 = 1 : (this.supplierCheck8 = 0, this.account = '')
|
||||
this.openingBank ? this.supplierCheck9 = 1 : (this.supplierCheck9 = 0, this.openingBank = '')
|
||||
this.phone ? this.supplierCheck10 = 1 : (this.supplierCheck10 = 0, this.phone = '')
|
||||
this.fax ? this.supplierCheck11 = 1 : (this.supplierCheck11 = 0, this.fax = '')
|
||||
this.goodTime ? this.supplierCheck12 = 1 : (this.supplierCheck12 = 0, this.goodTime = '')
|
||||
searchSupplier(this.supplierCheck1, this.supplierName, this.supplierCheck2, this.enterpriseNature, this.supplierCheck3, this.createDate, this.supplierCheck4, this.registeredCapital, this.supplierCheck5, this.taxNum, this.supplierCheck6, this.EMail, this.supplierCheck7, this.address, this.supplierCheck8, this.account, this.supplierCheck9, this.openingBank, this.supplierCheck10, this.phone, this.supplierCheck11, this.fax, this.supplierCheck12, this.goodTime).then(response => {
|
||||
this.tableData01 = response.data
|
||||
})
|
||||
},
|
||||
submitSelectSupplier() { // 确定选择供应商
|
||||
this.dialogVisible1 = false
|
||||
},
|
||||
emptySupplierDetail() { // 清空
|
||||
this.submitDisable = true
|
||||
this.supplierValue = ''
|
||||
this.supplierName = ''
|
||||
this.enterpriseNature = ''
|
||||
this.createDate = ''
|
||||
this.registeredCapital = ''
|
||||
this.taxNum = ''
|
||||
this.EMail = ''
|
||||
this.address = ''
|
||||
this.account = ''
|
||||
this.openingBank = ''
|
||||
this.phone = ''
|
||||
this.fax = ''
|
||||
this.goodTime = ''
|
||||
},
|
||||
showSupplierDetail(row) { // 点击供应商表某一行
|
||||
this.submitDisable = false
|
||||
this.supplierValue = row.供应商流水号
|
||||
this.supplierName = row.供应商名称
|
||||
this.enterpriseNature = row.企业性质
|
||||
this.createDate = row.创立日期
|
||||
this.registeredCapital = row.注册资本
|
||||
this.taxNum = row.税号
|
||||
this.EMail = row.电子信箱
|
||||
this.address = row.地址
|
||||
this.account = row.帐号
|
||||
this.openingBank = row.开户行
|
||||
this.phone = row.电话号码
|
||||
this.fax = row.传真
|
||||
this.goodTime = row.货期
|
||||
},
|
||||
searchTable1() {
|
||||
this.loading1 = true
|
||||
this.tableData1 = []
|
||||
this.startDate && this.endDate ? this.check1 = 1 : this.check1 = 0
|
||||
this.contractNum ? this.check2 = 1 : this.check2 = 0
|
||||
this.buyerName ? this.check3 = 1 : this.check3 = 0
|
||||
this.personValue ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName ? this.check4 = 1 : this.check4 = 0
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startDate, this.endDate, this.check2, this.contractNum, this.check3, this.buyerName, this.check4, this.supplierName).then(response => {
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startDate, this.endDate, this.check2, this.contractNum, this.check3, this.personValue, this.check4, this.supplierName).then(response => {
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
if (response.data.rows[j].规定到货时间 !== null) {
|
||||
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
|
||||
}
|
||||
if (response.data.rows[j].实际到货时间 !== null) {
|
||||
response.data.rows[j].实际到货时间 = response.data.rows[j].实际到货时间.substring(0, response.data.rows[j].实际到货时间.indexOf(' '))
|
||||
}
|
||||
this.tableData11[j] = []
|
||||
searchCondition(response.data.rows[j].采购合同流水号).then(response0 => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
for (let i = 0; i < response0.data.length; i++) {
|
||||
if (response0.data[i].请款时间 !== null) {
|
||||
response0.data[i].请款时间 = response0.data[i].请款时间.substring(0, response0.data[i].请款时间.indexOf(' '))
|
||||
if (response0.data.length === 0) {
|
||||
this.tableData11[j].push(response0.data)
|
||||
document.getElementById(j).setAttribute('style', 'display:none')
|
||||
} else {
|
||||
for (let i = 0; i < response0.data.length; i++) {
|
||||
this.tableData11[j].push(response0.data[i])
|
||||
}
|
||||
this.tableData11[j].push(response0.data[i])
|
||||
}
|
||||
})
|
||||
}
|
||||
}).then(() => {
|
||||
this.loading1 = false
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
@@ -598,6 +358,7 @@ export default {
|
||||
})
|
||||
},
|
||||
cancelRequestFund(row) { // 取消请款
|
||||
console.log(row)
|
||||
this.$confirm('确认取消请款吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -625,17 +386,17 @@ export default {
|
||||
},
|
||||
searchRequestTable() { // 查询请款表
|
||||
this.loading2 = true
|
||||
if (this.startRequestDate === '' || this.startRequestDate === null || this.endRequestDate === '' || this.endRequestDate === null) {
|
||||
if ((this.startRequestDate === '' || this.startRequestDate === null) && (this.endRequestDate === '' || this.endRequestDate === null)) {
|
||||
this.checkRequest = 0
|
||||
} else { this.checkRequest = 1 }
|
||||
} else if (this.startRequestDate !== '' && this.startRequestDate !== null && this.endRequestDate !== '' && this.endRequestDate !== null) {
|
||||
this.checkRequest = 1
|
||||
} else {
|
||||
this.$message.error('请款时间区间有误')
|
||||
this.loading2 = false
|
||||
return
|
||||
}
|
||||
searchRequestTable(this.checkRequest, this.startRequestDate, this.endRequestDate).then(response => {
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
if (response.data[j].规定到货时间 !== null) {
|
||||
response.data[j].规定到货时间 = response.data[j].规定到货时间.substring(0, response.data[j].规定到货时间.indexOf(' '))
|
||||
}
|
||||
if (response.data[j].实际到货时间 !== null) {
|
||||
response.data[j].实际到货时间 = response.data[j].实际到货时间.substring(0, response.data[j].实际到货时间.indexOf(' '))
|
||||
}
|
||||
if (response.data[j].请款时间 !== null) {
|
||||
response.data[j].请款时间 = response.data[j].请款时间.substring(0, response.data[j].请款时间.indexOf(' '))
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" clearable style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
@@ -186,7 +186,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-select v-model="personValue3" placeholder="采购员" size="small" style="width: 100px">
|
||||
<el-select v-model="personValue3" placeholder="采购员" size="small" clearable style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
@@ -494,16 +494,27 @@ export default {
|
||||
},
|
||||
contractChange() {
|
||||
if (this.contractValue) {
|
||||
contractChange(this.contractValue, this.changeReason).then(response => {
|
||||
this.contractValue = ''
|
||||
this.changeReason = ''
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('变更成功')
|
||||
this.searchTable1()
|
||||
this.contractNumValue = ''
|
||||
this.contractNumValue3 = ''
|
||||
this.fetchData()
|
||||
} else { this.$message.error('变更失败') }
|
||||
this.$confirm('确定更改该合同?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
contractChange(this.contractValue, this.changeReason).then(response => {
|
||||
this.contractValue = ''
|
||||
this.changeReason = ''
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('变更成功')
|
||||
this.searchTable1()
|
||||
this.contractNumValue = ''
|
||||
this.contractNumValue3 = ''
|
||||
this.fetchData()
|
||||
} else { this.$message.error('变更失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请先选择合同')
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第1次付款时间">
|
||||
<el-select v-model="payTime1Value" placeholder="请选择" size="small" clearable>
|
||||
<el-select v-model="payTime1Value" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
@@ -62,7 +62,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第2次付款时间">
|
||||
<el-select v-model="payTime2Value" :disabled="disable2" placeholder="请选择" size="small" clearable>
|
||||
<el-select v-model="payTime2Value" :disabled="disable2" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
@@ -73,7 +73,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第3次付款时间">
|
||||
<el-select v-model="payTime3Value" :disabled="disable3" placeholder="请选择" size="small" clearable>
|
||||
<el-select v-model="payTime3Value" :disabled="disable3" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
@@ -84,7 +84,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第4次付款时间">
|
||||
<el-select v-model="payTime4Value" :disabled="disable4" placeholder="请选择" size="small" clearable>
|
||||
<el-select v-model="payTime4Value" :disabled="disable4" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
@@ -97,7 +97,7 @@
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第5次付款时间">
|
||||
<el-select v-model="payTime5Value" :disabled="disable5" placeholder="请选择" size="small" clearable>
|
||||
<el-select v-model="payTime5Value" :disabled="disable5" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
@@ -118,7 +118,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="币种">
|
||||
<el-select v-model="currencyValue" placeholder="币种" size="small" clearable>
|
||||
<el-select v-model="currencyValue" placeholder="币种" size="small">
|
||||
<el-option
|
||||
v-for="item in currency"
|
||||
:key="item.value"
|
||||
@@ -186,7 +186,7 @@
|
||||
style="margin-top:10px"
|
||||
@click="calculateContractSum">计算合同总额</el-button>
|
||||
<span>合同总额:</span>
|
||||
<el-input v-model="contractSum" size="small"/>
|
||||
<el-input v-model="contractSum" size="small" readonly/>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
@@ -237,10 +237,10 @@ export default {
|
||||
searchView: '',
|
||||
fileList: [],
|
||||
minDate: null,
|
||||
endDateOpt: { // 为了让规定到货时间早于物料计划到货时间
|
||||
endDateOpt: { // 禁用大于规定到货日期和小于当前日期
|
||||
disabledDate: (time) => {
|
||||
if (this.minDate) {
|
||||
return time.getTime() > this.minDate
|
||||
return time.getTime() > this.minDate || time.getTime() < new Date()
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -251,19 +251,19 @@ export default {
|
||||
contractName: '产品购销合同', // 合同名称
|
||||
supplierName: '', // 供应商名称
|
||||
stipulateArrivalTime: '', // 规定到货时间
|
||||
payMethodValue: '', // 付款方式流水号
|
||||
payMethodValue: 1, // 付款方式流水号
|
||||
payMethodName: '', // 付款方式名称
|
||||
payMethod: [],
|
||||
payTime: [],
|
||||
payTime1Value: '', // 付款时间
|
||||
payTime2Value: '', // 付款时间
|
||||
payTime3Value: '', // 付款时间
|
||||
payTime4Value: '', // 付款时间
|
||||
payTime5Value: '', // 付款时间
|
||||
payTime6Value: '', // 付款时间
|
||||
freight: '', // 运费
|
||||
taxRate: '', // 税率
|
||||
currencyValue: '', // 币种
|
||||
payTime1Value: 1, // 付款时间
|
||||
payTime2Value: 1, // 付款时间
|
||||
payTime3Value: 1, // 付款时间
|
||||
payTime4Value: 1, // 付款时间
|
||||
payTime5Value: 1, // 付款时间
|
||||
payTime6Value: 1, // 付款时间
|
||||
freight: 0, // 运费
|
||||
taxRate: '0.17', // 税率
|
||||
currencyValue: 1, // 币种
|
||||
currency: [
|
||||
{
|
||||
label: '人民币',
|
||||
@@ -380,10 +380,12 @@ export default {
|
||||
})
|
||||
initPayTimeNode().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.payTime.push({
|
||||
label: response.data[i].付款时间节点名称,
|
||||
value: response.data[i].付款时间节点流水号
|
||||
})
|
||||
if (parseInt(response.data[i].付款时间节点流水号) !== 0) {
|
||||
this.payTime.push({
|
||||
label: response.data[i].付款时间节点名称,
|
||||
value: response.data[i].付款时间节点流水号
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -318,23 +318,20 @@
|
||||
<el-input v-model="form2.inquirySheetNum" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplierName">
|
||||
<el-input v-model="form2.supplierName" size="small" readonly>
|
||||
<el-button slot="append" icon="el-icon-search" @click="dialogVisible1=true"/>
|
||||
</el-input>
|
||||
<el-input v-model="form2.supplierName" size="small" readonly @focus="dialogVisible1=true"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible2=false">取消</el-button>
|
||||
<el-button
|
||||
v-show="title2==='创建询价单'"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitCreateInquirySheet">确定</el-button>
|
||||
<el-button
|
||||
v-show="title2==='编辑询价单'"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitEditInquirySheet">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -342,7 +339,7 @@
|
||||
<el-dialog :visible.sync="dialogVisible3" title="物料变更选择" center style="min-height: 300px;" width="780px">
|
||||
<span>物料名称:</span>
|
||||
<el-input v-model="materialName0" placeholder="物料名称" size="small" clearable/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" @click="pageCurrent02=1;pageSize02=10;total02=0;searchMaterial()">查询</el-button>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="pageCurrent02=1;pageSize02=10;total02=0;searchMaterial()">查询</el-button>
|
||||
<el-table :data="tableData02" size="mini" style="width: 97%;max-height: 300px;margin-top:15px" height="400px" border highlight-current-row @row-click="selectNewMaterial">
|
||||
<el-table-column align="center" label="物料名称" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
@@ -374,7 +371,8 @@
|
||||
<span style="font-size: large;color: red">将原物料替换为: {{ materialNew }}</span>
|
||||
<!--<el-input v-model="materialNew" size="small" readonly style="margin: 10px 10px 0 10px"></el-input>-->
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" size="small" icon="el-icon-check" @click="submitMaterialChange">确定</el-button>
|
||||
<el-button size="small" @click="dialogVisible3=false">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitMaterialChange">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="到票情况" min-width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-progress :text-inside="true" :stroke-width="18" :percentage="parseFloat((100*(scope.row.到票总金额/scope.row.合同总金额)).toFixed(2))" status="success"/>
|
||||
<el-progress :status="Number(scope.row.到票总金额)>Number(scope.row.合同总金额)?'exception':'success'" :text-inside="true" :stroke-width="18" :percentage="Number(scope.row.到票总金额)>Number(scope.row.合同总金额)?100:parseFloat((100*(scope.row.到票总金额/scope.row.合同总金额)).toFixed(2))"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
763
src/views/PurchasingCenter/MaterialManagement/index.vue
Normal file
763
src/views/PurchasingCenter/MaterialManagement/index.vue
Normal file
@@ -0,0 +1,763 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<!--<span>部门名称:</span>-->
|
||||
<!--<el-select v-model="DepartmentValue" style="width:200px" placeholder="请选择" size="small" clearable @change="searchMaterialCategory">-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in Department"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value">-->
|
||||
<!--</el-option>-->
|
||||
<!--</el-select>-->
|
||||
<span>物料类别:</span>
|
||||
<el-select
|
||||
v-model="MaterialCategoryValue"
|
||||
style="width:200px"
|
||||
placeholder="请选择"
|
||||
size="small"
|
||||
clearable
|
||||
@change="searchMaterialVariety">
|
||||
<el-option
|
||||
v-for="item in MaterialCategory"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>物料品种:</span>
|
||||
<el-select
|
||||
v-model="MaterialVarietyValue"
|
||||
style="width:200px"
|
||||
placeholder="请选择"
|
||||
size="small"
|
||||
clearable
|
||||
@change="searchMaterial">
|
||||
<el-option
|
||||
v-for="item in MaterialVariety"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="el-icon-refresh"
|
||||
size="small"
|
||||
style="margin-left: 15px"
|
||||
@click="CategoryMaintenance">维护物料类别
|
||||
</el-button>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<span>物料名称:</span>
|
||||
<el-input v-model="MaterialName" placeholder="物料名称" size="small" clearable style="margin-top: 15px;width:200px"/>
|
||||
<span>物料全称:</span>
|
||||
<el-input
|
||||
v-model="FullNameOfMaterial"
|
||||
placeholder="物料全称"
|
||||
size="small"
|
||||
clearable
|
||||
style="margin-top: 15px;width:200px"/>
|
||||
<span>物料规格:</span>
|
||||
<el-input
|
||||
v-model="MaterialSpecification"
|
||||
placeholder="物料规格"
|
||||
size="small"
|
||||
clearable
|
||||
style="margin-top: 15px;width:200px"/>
|
||||
<span>物料型号:</span>
|
||||
<el-input
|
||||
v-model="MaterialModel"
|
||||
placeholder="物料型号"
|
||||
size="small"
|
||||
clearable
|
||||
style="margin-top: 15px;width:200px"/>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<span>计算单位:</span>
|
||||
<el-select
|
||||
v-model="MeasurementUnitValue"
|
||||
style="margin-top: 15px;width:200px"
|
||||
placeholder="请选择"
|
||||
size="small"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in MeasurementUnit"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>物料来源:</span>
|
||||
<el-select
|
||||
v-model="MaterialSourceValue"
|
||||
style="margin-top: 15px;width:200px"
|
||||
placeholder="请选择"
|
||||
size="small"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in MaterialSource"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span style="margin-left: 25px">供货商:</span>
|
||||
<el-input
|
||||
v-model="supplier"
|
||||
placeholder="供货商"
|
||||
size="small"
|
||||
clearable
|
||||
style="margin-top: 15px;width:200px"
|
||||
@dblclick.native="param=0;openSupplier()"/>
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-search"
|
||||
size="small"
|
||||
style="margin-top: 15px;margin-left: 15px"
|
||||
@click="pageCurrent=1;searchMaterial()">查询
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">增加</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card style="margin-top: 15px">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
height="440"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column align="center" label="物料名称">
|
||||
<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-column align="center" label="物料型号">
|
||||
<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-column align="center" label="参考价格">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.参考价格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleEdit(scope.row)">编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="选择供货商" center width="400px">
|
||||
<el-input v-model="supplier1" placeholder="供货商" size="small" clearable style="width:200px"/>
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-search"
|
||||
size="small"
|
||||
style="margin-left: 15px; margin-bottom: 10px"
|
||||
@click="pageCurrent1=1;searchSupplier()">查询
|
||||
</el-button>
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
border
|
||||
@row-click="selectSupplier">
|
||||
<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
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
small
|
||||
layout="sizes, prev, pager, next"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitSupplier">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible1" center style="min-height: 300px" width="800px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料类别" prop="物料类别流水号">
|
||||
<el-select
|
||||
v-model="form.物料类别流水号"
|
||||
style="width:200px"
|
||||
placeholder="请选择"
|
||||
size="small"
|
||||
clearable
|
||||
@change="searchMaterialVariety1">
|
||||
<el-option
|
||||
v-for="item in MaterialCategory1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料品种" prop="物料品种流水号">
|
||||
<el-select v-model="form.物料品种流水号" style="width:200px" placeholder="请选择" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in MaterialVariety1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料名称" prop="物料名称">
|
||||
<el-input v-model="form.物料名称" placeholder="物料名称" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料全名" prop="物料全名">
|
||||
<el-input v-model="form.物料全名" placeholder="物料全名" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料规格" prop="物料规格">
|
||||
<el-input v-model="form.物料规格" placeholder="物料规格" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料型号" prop="物料型号">
|
||||
<el-input v-model="form.物料型号" placeholder="物料型号" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="计量单位" prop="计量单位流水号">
|
||||
<el-select v-model="form.计量单位流水号" style="width:200px" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in MeasurementUnit"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料来源" prop="物料来源流水号">
|
||||
<el-select v-model="form.物料来源流水号" style="width:200px" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in MaterialSource"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供货商" prop="供货商">
|
||||
<el-input
|
||||
v-model="form.供货商"
|
||||
placeholder="供货商"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@click.native="param=1;openSupplier()"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancel('form')">取消</el-button>
|
||||
<el-button v-show="title==='增加'" type="primary" @click="submitAdd('form')">确定</el-button>
|
||||
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="物料类别维护" center width="1200px">
|
||||
<div style="width: 47%;display: inline-block">
|
||||
<el-card>
|
||||
<span>物料类别:</span>
|
||||
<el-input v-model="MaterialCategory2" placeholder="物料类别" size="mini" clearable style="width:100px"/>
|
||||
<span>类别编号:</span>
|
||||
<el-input v-model="CategoryNumber" placeholder="类别编号" size="mini" clearable style="width:100px"/>
|
||||
<el-button type="primary" size="mini" style="margin-left: 10px" @click="handleAdd1">增加</el-button>
|
||||
<el-button type="warning" size="mini" @click="handleEdit1">编辑</el-button>
|
||||
<br>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
:data="tableData2"
|
||||
size="mini"
|
||||
height="328"
|
||||
highlight-current-row
|
||||
border
|
||||
@row-click="selectMaterialCategory">
|
||||
<el-table-column align="center" label="物料类别">
|
||||
<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-column align="center" label="ID">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料类别ID }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="handleDelete1(scope.row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
<div style="width: 49%;display: inline-block;margin-left: 20px">
|
||||
<el-card>
|
||||
<span>品种编号:</span>
|
||||
<el-input v-model="VarietyNumber" placeholder="品种编号" size="mini" clearable style="width:100px"/>
|
||||
<span>物料品种:</span>
|
||||
<el-input v-model="MaterialVariety2" placeholder="物料品种" size="mini" clearable style="width:100px"/>
|
||||
<span>规格1:</span>
|
||||
<el-input v-model="Specifications1" placeholder="规格1" size="mini" clearable style="width:100px"/>
|
||||
<br>
|
||||
<span style="margin-left: 30px">规格2:</span>
|
||||
<el-input v-model="Specifications2" placeholder="规格2" size="mini" clearable style="width:100px"/>
|
||||
<el-button type="primary" size="mini" style="margin-left: 10px" @click="handleAdd2">增加</el-button>
|
||||
<el-button type="warning" size="mini" @click="handleEdit2">编辑</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
:data="tableData3"
|
||||
size="mini"
|
||||
height="300"
|
||||
highlight-current-row
|
||||
border
|
||||
@row-click="selectMaterialVariety">
|
||||
<el-table-column align="center" label="品种编号">
|
||||
<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-column align="center" label="规格1">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规格1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="规格2">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规格2 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="handleDelete2(scope.row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
initDepartmentName,
|
||||
initMaterialCategory,
|
||||
initMaterialVariety,
|
||||
initMeasurementUnit,
|
||||
initMaterialSource,
|
||||
searchmaterial,
|
||||
getSupplier,
|
||||
addData,
|
||||
editData,
|
||||
deleteData,
|
||||
searchCategory,
|
||||
searchVarieties,
|
||||
editCategory,
|
||||
addCategory,
|
||||
deleteCategory,
|
||||
editVariety,
|
||||
addVariety,
|
||||
deleteVariety
|
||||
} from '@/api/PurchasingCenter/MaterialManagement'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
DepartmentValue: '', // 部门名称
|
||||
Department: [], // 部门数组
|
||||
MaterialCategoryValue: '', // 物料类别
|
||||
MaterialCategory: [], // 物料类别数组
|
||||
MaterialVarietyValue: '', // 物料品种
|
||||
MaterialVariety: [], // 物料品种数组
|
||||
MaterialName: '', // 物料名称
|
||||
FullNameOfMaterial: '', // 物料全称
|
||||
MaterialSpecification: '', // 物料规格
|
||||
MaterialModel: '', // 物料型号
|
||||
MeasurementUnitValue: '', // 计量单位
|
||||
MeasurementUnit: [], // 计量单位数组
|
||||
MaterialSourceValue: '', // 物料来源
|
||||
MaterialSource: [], // 物料来源数组
|
||||
supplier: '', // 供货商
|
||||
supplier1: '', // 供货商(弹框)
|
||||
supplierValue: '', // 供货商流水号
|
||||
ReferencePrice: '', // 参考价格
|
||||
supplierValue1: '',
|
||||
MaterialCategory1: [],
|
||||
MaterialVariety1: [],
|
||||
MaterialCategory2: '', // 物料类别
|
||||
CategoryNumber: '', // 类别编号
|
||||
VarietyNumber: '', // 品种编号
|
||||
MaterialVariety2: '', // 物料品种
|
||||
Specifications1: '', // 规格1
|
||||
Specifications2: '', // 规格2
|
||||
MaterialCategoryNum: '', // 物料类别流水号
|
||||
MaterialVarietyNum: '', // 物料品种流水号
|
||||
param: 0,
|
||||
tableData: [],
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: null,
|
||||
tableData1: [],
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: null,
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
check1: '',
|
||||
check2: '',
|
||||
check3: '',
|
||||
check4: '',
|
||||
check5: '',
|
||||
check6: '',
|
||||
check7: '',
|
||||
check8: '',
|
||||
check9: '',
|
||||
check10: '',
|
||||
title: '',
|
||||
form: {
|
||||
物料流水号: '',
|
||||
物料类别流水号: '',
|
||||
物料品种流水号: '',
|
||||
物料名称: '',
|
||||
物料全名: '',
|
||||
物料规格: '',
|
||||
物料型号: '',
|
||||
计量单位流水号: '',
|
||||
物料来源流水号: '',
|
||||
供货商: ''
|
||||
},
|
||||
rules: {
|
||||
物料名称: [{ required: true, message: '请输入物料名称', trigger: 'blur' }],
|
||||
供货商: [{ required: true, message: '请选择供货商', trigger: 'change' }],
|
||||
物料类别流水号: [{ required: true, message: '请选择物料类别', trigger: 'change' }],
|
||||
物料品种流水号: [{ required: true, message: '请选择物料品种', trigger: 'change' }],
|
||||
计量单位流水号: [{ required: true, message: '请选择计量单位', trigger: 'change' }],
|
||||
物料来源流水号: [{ required: true, message: '请选择物料来源', trigger: 'change' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchMaterialCategory()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initDepartmentName, ['物料部门名称', '物料部门流水号'], 'Department') // 物料部门
|
||||
this.getSelect(initMeasurementUnit, ['计量单位', '计量单位流水号'], 'MeasurementUnit') // 计量单位
|
||||
this.getSelect(initMaterialSource, ['物料来源', '物料来源流水号'], 'MaterialSource') // 物料来源
|
||||
},
|
||||
searchMaterialCategory() { // 获取物料类别
|
||||
this.MaterialCategory = []
|
||||
this.MaterialVariety = []
|
||||
this.MaterialCategoryValue = ''
|
||||
this.MaterialVarietyValue = ''
|
||||
this.getSelect(initMaterialCategory, ['物料类别', '物料类别流水号'], 'MaterialCategory', [0, this.DepartmentValue])
|
||||
},
|
||||
searchMaterialVariety() { // 初始化物料品种
|
||||
this.MaterialVariety = []
|
||||
this.MaterialVarietyValue = ''
|
||||
this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety', this.MaterialCategoryValue)
|
||||
},
|
||||
searchMaterial() { // 物料查询
|
||||
this.MaterialName !== '' ? this.check1 = 1 : this.check1 = 0 // 物料名称
|
||||
this.FullNameOfMaterial !== '' ? this.check2 = 1 : this.check2 = 0 // 物料全称
|
||||
this.MaterialSpecification !== '' ? this.check3 = 1 : this.check3 = 0 // 物料规格
|
||||
this.MaterialModel !== '' ? this.check4 = 1 : this.check4 = 0 // 物料型号
|
||||
this.MaterialCategoryValue !== '' ? this.check5 = 1 : this.check5 = 0 // 物料类别
|
||||
this.MaterialVarietyValue !== '' ? this.check6 = 1 : this.check6 = 0 // 物料品种
|
||||
this.MeasurementUnitValue !== '' ? this.check7 = 1 : this.check7 = 0 // 计量单位
|
||||
this.MaterialSourceValue !== '' ? this.check8 = 1 : this.check8 = 0 // 物料来源
|
||||
this.supplier !== '' ? this.check9 = 1 : this.check9 = 0 // 供货商
|
||||
searchmaterial(this.check1, this.MaterialName, this.check2, this.FullNameOfMaterial, this.check3, this.MaterialSpecification, this.check4, this.MaterialModel, this.pageCurrent, this.pageSize, this.check5, this.MaterialCategoryValue, this.check6, this.MaterialVarietyValue, this.check7, this.MeasurementUnitValue, this.check8, this.MaterialSourceValue, this.check9, this.supplierValue).then(response => {
|
||||
this.tableData = response.data.result
|
||||
this.total = parseInt(response.data.output[0].ItemCount)
|
||||
})
|
||||
},
|
||||
openSupplier() {
|
||||
this.dialogFormVisible = true
|
||||
this.supplier1 = ''
|
||||
this.check10 = 0
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = 10
|
||||
this.getTable(getSupplier, [this.check10, this.supplier1, this.pageCurrent1, this.pageSize1], ['tableData1', 'total1'])
|
||||
},
|
||||
searchSupplier() {
|
||||
this.supplier1 !== '' ? this.check10 = 1 : this.check10 = 0
|
||||
this.getTable(getSupplier, [this.check10, this.supplier1, this.pageCurrent1, this.pageSize1], ['tableData1', 'total1'])
|
||||
},
|
||||
selectSupplier(row) {
|
||||
if (this.param === 0) {
|
||||
this.supplierValue = row.供货商流水号
|
||||
} else if (this.param === 1) {
|
||||
this.supplierValue1 = row.供货商流水号
|
||||
}
|
||||
this.supplier1 = row.供货商
|
||||
},
|
||||
submitSupplier() {
|
||||
if (this.param === 0) {
|
||||
this.supplier = this.supplier1
|
||||
} else if (this.param === 1) {
|
||||
this.form.供货商 = this.supplier1
|
||||
}
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
cancel() { // 取消
|
||||
this.dialogFormVisible1 = false
|
||||
},
|
||||
searchMaterialVariety1() { // 物料品种
|
||||
this.MaterialVariety1 = []
|
||||
this.form.物料品种流水号 = ''
|
||||
this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety1', this.form.物料类别流水号)
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.supplierValue1 = ''
|
||||
this.MaterialCategory1 = []
|
||||
this.MaterialVariety1 = []
|
||||
this.supplierValue1 = row.供货商流水号
|
||||
this.getSelect(initMaterialCategory, ['物料类别', '物料类别流水号'], 'MaterialCategory1')
|
||||
this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety1', row.物料类别流水号)
|
||||
this.editForm(row, 'form', [this.title = '编辑', this.dialogFormVisible1 = true])
|
||||
},
|
||||
submitEdit() {
|
||||
this.editTable(editData, [this.form.物料流水号, this.form.物料品种流水号, this.form.物料名称, this.form.物料全名, this.form.物料规格, this.form.物料型号, this.form.计量单位流水号, this.form.物料来源流水号, this.supplierValue1], 'form', function() {
|
||||
this.searchMaterial()
|
||||
this.dialogFormVisible1 = false
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.supplierValue1 = ''
|
||||
this.MaterialCategory1 = []
|
||||
this.MaterialVariety1 = []
|
||||
this.getSelect(initMaterialCategory, ['物料类别', '物料类别流水号'], 'MaterialCategory1')
|
||||
this.addForm('form', [this.dialogFormVisible1 = true, this.title = '增加'])
|
||||
},
|
||||
submitAdd() { // 提交增加
|
||||
this.addTable(addData, [this.form.物料品种流水号, this.form.物料名称, this.form.物料全名, this.form.物料规格, this.form.物料型号, this.form.计量单位流水号, this.form.物料来源流水号, this.supplierValue1], 'form', function() {
|
||||
this.dialogFormVisible1 = false
|
||||
this.searchMaterial()
|
||||
})
|
||||
},
|
||||
handleDelete(row) { // 删除
|
||||
this.deleteRow(deleteData, row.物料流水号, function() {
|
||||
this.searchMaterial()
|
||||
})
|
||||
},
|
||||
CategoryMaintenance() {
|
||||
this.dialogFormVisible2 = true
|
||||
this.getData(searchCategory, 'tableData2')
|
||||
},
|
||||
selectMaterialCategory(row) {
|
||||
this.MaterialCategory2 = row.物料类别
|
||||
this.CategoryNumber = row.类别编号
|
||||
this.MaterialCategoryNum = row.物料类别流水号
|
||||
this.getData(searchVarieties, 'tableData3', row.物料类别流水号)
|
||||
},
|
||||
selectMaterialVariety(row) {
|
||||
this.MaterialVarietyNum = row.物料品种流水号
|
||||
this.VarietyNumber = row.品种编号
|
||||
this.MaterialVariety2 = row.物料品种
|
||||
this.Specifications1 = row.规格1
|
||||
this.Specifications2 = row.规格2
|
||||
},
|
||||
handleEdit1() {
|
||||
editCategory(this.MaterialCategoryNum, this.MaterialCategory2, this.CategoryNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.getData(searchCategory, 'tableData2')
|
||||
this.tableData3 = []
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAdd1() {
|
||||
addCategory(this.MaterialCategory2, this.CategoryNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.getData(searchCategory, 'tableData2')
|
||||
this.tableData3 = []
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete1(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteCategory(row.物料类别流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.getData(searchCategory, 'tableData2')
|
||||
this.tableData3 = []
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
handleEdit2() {
|
||||
editVariety(this.MaterialVarietyNum, this.MaterialCategoryNum, this.MaterialVariety2, this.VarietyNumber, this.Specifications1, this.Specifications2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.getData(searchVarieties, 'tableData3', this.MaterialCategoryNum)
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAdd2() {
|
||||
addVariety(this.MaterialCategoryNum, this.MaterialVariety2, this.VarietyNumber, this.Specifications1, this.Specifications2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.getData(searchVarieties, 'tableData3', this.MaterialCategoryNum)
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete2(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteVariety(row.物料品种流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.getData(searchVarieties, 'tableData3', this.MaterialCategoryNum)
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchMaterial()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchMaterial()
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.supplier1 !== '' ? this.check10 = 1 : this.check10 = 0
|
||||
this.getTable(getSupplier, [this.check10, this.supplier1, this.pageCurrent1, this.pageSize1], ['tableData1', 'total1'])
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.supplier1 !== '' ? this.check10 = 1 : this.check10 = 0
|
||||
this.getTable(getSupplier, [this.check10, this.supplier1, this.pageCurrent1, this.pageSize1], ['tableData1', 'total1'])
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span {
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading1"
|
||||
:data="tableData1"
|
||||
border
|
||||
style="width: 100%;max-height: 300px;"
|
||||
@@ -69,7 +70,22 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="安全库存量" min-width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.安全库存量 }}
|
||||
<template v-if="scope.row.changeSafeValue">
|
||||
<el-input v-model="scope.row.安全库存量" class="edit-input" size="mini"/>
|
||||
<el-button class="cancel-btn" size="mini" icon="el-icon-refresh" type="warning" @click="cancelEdit(scope.row)">取消</el-button>
|
||||
</template>
|
||||
<span v-else>{{ scope.row.安全库存量 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设置" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.changeSafeValue" type="mini" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit(scope.row)">确定</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
@click="scope.row.changeSafeValue=!scope.row.changeSafeValue">设置</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -228,12 +244,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="合计" align="center" min-width="100" prop="合计">
|
||||
<template slot-scope="scope">
|
||||
{{ parseFloat(scope.row.单价) * parseInt(scope.row.数量) }}
|
||||
{{ parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" @click="deleteMateriel(scope.row)">移除</el-button>
|
||||
<el-button :disabled="disable" type="danger" size="mini" icon="el-icon-delete" @click="deleteMateriel(scope.row)">移除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -243,7 +259,7 @@
|
||||
<el-table
|
||||
:data="tableData4"
|
||||
:show-header="false"
|
||||
highlight-current-row
|
||||
:highlight-current-row="!disable"
|
||||
border
|
||||
height="280px"
|
||||
style="width: 250px;display:inline-block;max-height: 280px;"
|
||||
@@ -256,7 +272,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-input :rows="20" v-model="textArea" :readonly="disable" type="textarea" style="width:calc(99% - 250px);float:right;margin-bottom: 20px" resize="none"/>
|
||||
<el-button type="success" size="mini" icon="el-icon-circle-check-outline" @click="doneOfflineContact">生成离线合同</el-button>
|
||||
<el-button :disabled="disable" type="success" size="mini" icon="el-icon-circle-check-outline" @click="doneOfflineContact">生成离线合同</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible1" title="供应商选择" center style="min-height: 300px">
|
||||
@@ -491,13 +507,14 @@
|
||||
|
||||
<script>
|
||||
import { searchInventoryNum, searchOfflineContract, searchOfflineContract2, searchSupplier, initPayMethod, initPayTimeNode, addOfflineContract, editOfflineContract, deleteOfflineContract, searchMateriel,
|
||||
addMateriel, deleteMateriel, doneOfflineContact, searchContractDemo } from '@/api/PurchasingCenter/OfflineContract'
|
||||
addMateriel, deleteMateriel, doneOfflineContact, searchContractDemo, setSafeValue } from '@/api/PurchasingCenter/OfflineContract'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 离线合同
|
||||
data() {
|
||||
return {
|
||||
loading1: false,
|
||||
title2: '',
|
||||
purchaseStateValue: 2, // 采购状态 全部
|
||||
purchaseState: [
|
||||
@@ -603,7 +620,7 @@ export default {
|
||||
disable2: true,
|
||||
disable3: true,
|
||||
disable4: true,
|
||||
disable: false // 其他的禁用
|
||||
disable: true // 其他的禁用
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -640,12 +657,18 @@ export default {
|
||||
})
|
||||
},
|
||||
searchTable1() { // 查询物料库物料
|
||||
this.loading1 = true
|
||||
this.materialName ? this.check1 = 1 : this.check1 = 0
|
||||
this.inventoryStateValue ? this.check2 = 1 : this.check2 = 0
|
||||
searchInventoryNum(this.pageCurrent1, this.pageSize1, this.check1, this.materialName, this.check2, this.inventoryStateValue, this.purchaseStateValue).then(response => {
|
||||
console.log(response.data.rows)
|
||||
this.tableData1 = response.data.rows
|
||||
this.tableData1.map(v => {
|
||||
this.$set(v, 'changeSafeValue', false)
|
||||
v.原安全库存量 = v.安全库存量
|
||||
return v
|
||||
})
|
||||
this.total1 = response.data.total
|
||||
this.loading1 = false
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
@@ -663,6 +686,23 @@ export default {
|
||||
this.materielGroup.push(val[i].物料流水号)
|
||||
}
|
||||
},
|
||||
cancelEdit(row) { // 取消设置
|
||||
row.安全库存量 = row.原安全库存量
|
||||
row.changeSafeValue = false
|
||||
this.$message('取消修改')
|
||||
},
|
||||
confirmEdit(row) { // 确认设置
|
||||
Number(row.安全库存量) ? row.安全库存量 = Number(row.安全库存量) : row.安全库存量 = 0
|
||||
setSafeValue(row.物料流水号, parseInt(row.安全库存量)).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
row.changeSafeValue = false
|
||||
this.$message.success('设置成功')
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.error('设置失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable2() { // 查询离线合同列表
|
||||
this.offlineContract ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
|
||||
@@ -963,9 +1003,11 @@ export default {
|
||||
}
|
||||
}
|
||||
this.paramRow = row
|
||||
searchContractDemo(this.paramRow.合同模板流水号).then(response => {
|
||||
this.textArea = response.data[0].合同模板内容.replace('stipulateArrivalTime', this.stipulateArrivalTime).replace('payMethodName', this.payMethodName)
|
||||
})
|
||||
if (!this.disable) {
|
||||
searchContractDemo(this.paramRow.合同模板流水号).then(response => {
|
||||
this.textArea = response.data[0].合同模板内容.replace('stipulateArrivalTime', this.stipulateArrivalTime).replace('payMethodName', this.payMethodName)
|
||||
})
|
||||
}
|
||||
},
|
||||
payMethodChange() { // 付款方式改变
|
||||
for (let i = 0; i < this.payMethod.length; i++) {
|
||||
@@ -1023,4 +1065,12 @@ export default {
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
</el-table>
|
||||
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-left: 10px" @click="searchTable02(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
<el-button :disabled="parseInt(scope.row.审核情况流水号)!==3&&parseInt(scope.row.审批情况流水号)!==3&&parseInt(scope.row.付款情况流水号)!==3" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="预付款时间" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.预付时间 }}
|
||||
{{ scope.row.预付时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款比例" align="center" min-width="100">
|
||||
@@ -175,7 +175,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="付款时间" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.预付时间 }}
|
||||
{{ scope.row.预付时间 ? scope.row.预付时间.split(' ')[0] : '参考时间节点未设置' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款比例" align="center" min-width="100">
|
||||
|
||||
@@ -165,6 +165,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible3=false">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitApproval('form2')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -214,7 +215,7 @@ export default {
|
||||
],
|
||||
disabled: true,
|
||||
form2: {
|
||||
审批是否通过: '',
|
||||
审批是否通过: 1,
|
||||
未通过原因: ''
|
||||
},
|
||||
rules2: {},
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" clearable style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
@@ -239,11 +239,8 @@ export default {
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
mounted() {
|
||||
this.useqrcode()
|
||||
},
|
||||
methods: {
|
||||
useqrcode() {
|
||||
useqrcode(contractNum) {
|
||||
const opts = {
|
||||
errorCorrectionLevel: 'H',
|
||||
type: 'image/jpeg',
|
||||
@@ -251,7 +248,8 @@ export default {
|
||||
quality: 0.3
|
||||
}
|
||||
}
|
||||
QRCode.toDataURL('知道这是啥吗你就扫', opts, function(err, url) {
|
||||
const str = 'http://192.168.1.111:8022/searchContract.html?contractNum=' + contractNum
|
||||
QRCode.toDataURL(str, opts, function(err, url) {
|
||||
if (err) throw err
|
||||
const img = document.getElementById('img')
|
||||
img.src = url
|
||||
@@ -260,7 +258,6 @@ export default {
|
||||
searchPic() {
|
||||
// 读取图片时,查找合同流水号,获取其下所有图片id,根据拼接成的路径,查询图片显示出来。
|
||||
searchFile(this.contract).then(response => {
|
||||
console.log(response.data)
|
||||
if (response.data.length !== 0) {
|
||||
this.searchView = 'http://localhost:8022/Img/' + response.data[0].文件名
|
||||
} else {
|
||||
@@ -335,6 +332,7 @@ export default {
|
||||
this.searchTable1()
|
||||
},
|
||||
searchTable2(row) {
|
||||
this.useqrcode(row.采购合同流水号)
|
||||
this.textarea = row.合同文本
|
||||
this.supplier = row.供应商名称
|
||||
this.contract = row.采购合同编号
|
||||
|
||||
@@ -1,45 +1,59 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>物料名称:</span>
|
||||
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
|
||||
<span>分配情况:</span>
|
||||
<el-select v-model="allocateStateValue" placeholder="分配情况" size="small" style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in allocateState"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent1=1;pageSize1=20;total1=0;searchTable1()">查询</el-button>
|
||||
<span>采购员:</span>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-menu"
|
||||
style="margin-left: 10px"
|
||||
@click="allocateTask">分配</el-button>
|
||||
</el-card>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="16">
|
||||
<el-card>
|
||||
<span style="margin:0">项目名称:</span>
|
||||
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>物料名称:</span>
|
||||
<el-input v-model="materialName" placeholder="物料名称" style="width:170px" size="small" clearable/>
|
||||
<span>分配情况:</span>
|
||||
<el-select v-model="allocateStateValue" placeholder="分配情况" size="small" style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in allocateState"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent1=1;pageSize1=20;total1=0;searchTable1()">查询</el-button>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card>
|
||||
<span>采购员:</span>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-menu"
|
||||
style="margin-left: 10px"
|
||||
@click="allocateTask">分配</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
icon="el-icon-back"
|
||||
style="margin-left: 10px"
|
||||
@click="executeReturn">退回</el-button>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
@@ -109,7 +123,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, initBuyer, searchTable1, allocateTask } from '@/api/PurchasingCenter/PurchaseTaskAllocate'
|
||||
import { initProject, initBuyer, searchTable1, allocateTask, executeReturn } from '@/api/PurchasingCenter/PurchaseTaskAllocate'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
@@ -140,6 +154,7 @@ export default {
|
||||
check2: 0,
|
||||
tableData1: [],
|
||||
standardAndPurchase: [],
|
||||
groupAndPart: [],
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 20,
|
||||
total1: 0
|
||||
@@ -187,8 +202,10 @@ export default {
|
||||
},
|
||||
handleSelectionChange1(val) { // 多选
|
||||
this.standardAndPurchase = []
|
||||
this.groupAndPart = []
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.standardAndPurchase.push(val[i].标准件和外购件流水号)
|
||||
this.groupAndPart.push(val[i].组件零件流水号)
|
||||
}
|
||||
},
|
||||
selectable(row) { // 多选禁用
|
||||
@@ -231,6 +248,29 @@ export default {
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
executeReturn() { // 退回
|
||||
if (this.standardAndPurchase.length === 0) {
|
||||
this.$message.error('请选择需退回的物料')
|
||||
} else {
|
||||
this.$confirm('此操作执行后不可修改,是否确定退回?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
executeReturn(this.standardAndPurchase, this.groupAndPart).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('操作成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<span>传送人:</span>
|
||||
<el-select v-model="transmitValue" placeholder="传送人" size="small" filterable clearable style="width:100px">
|
||||
<el-option
|
||||
v-for="item in selectPerson"
|
||||
v-for="item in sender"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
@@ -27,7 +27,7 @@
|
||||
<span>接收人:</span>
|
||||
<el-select v-model="recipientValue" placeholder="接收人" size="small" filterable clearable style="width:100px">
|
||||
<el-option
|
||||
v-for="item in selectPerson"
|
||||
v-for="item in receiver"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
@@ -61,7 +61,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开票时间" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票时间 }}
|
||||
{{ scope.row.开票时间 ? scope.row.开票时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开票金额" min-width="100px">
|
||||
@@ -96,12 +96,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="接收人" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.接收人姓名 }}
|
||||
{{ scope.row.接收人姓名==='请选择' ? '—' : scope.row.接收人姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备注" min-width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
{{ scope.row.备注 ? scope.row.备注 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" fixed="right" width="200px">
|
||||
@@ -158,7 +158,7 @@
|
||||
<el-form-item label="传送人" prop="sendPerson">
|
||||
<el-select v-model="form1.sendPersonValue" placeholder="传送人" size="small" disabled filterable clearable style="width:100px">
|
||||
<el-option
|
||||
v-for="item in selectPerson"
|
||||
v-for="item in sender"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
@@ -167,7 +167,7 @@
|
||||
<el-form-item label="接收人" prop="receivePerson">
|
||||
<el-select v-model="form1.receivePersonValue" placeholder="接收人" size="small" filterable clearable style="width:100px">
|
||||
<el-option
|
||||
v-for="item in selectPerson"
|
||||
v-for="item in receiver"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
@@ -187,7 +187,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchInvoice, addInvoice, editInvoice, deleteInvoice, initPerson, initContract } from '@/api/PurchasingCenter/ReceiptConnectionSheet'
|
||||
import { searchInvoice, addInvoice, editInvoice, deleteInvoice, initSender, initReceiver, initContract } from '@/api/PurchasingCenter/ReceiptConnectionSheet'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
@@ -199,7 +199,8 @@ export default {
|
||||
invoiceNum: '',
|
||||
invoiceTime: '',
|
||||
transmitValue: '',
|
||||
selectPerson: [], // 传送人接收人
|
||||
sender: [], // 传送人
|
||||
receiver: [], // 接收人
|
||||
recipientValue: '',
|
||||
contractNum: '',
|
||||
pageCurrent1: 1,
|
||||
@@ -255,9 +256,17 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
initPerson().then(response => {
|
||||
initSender().then(response => { // 传送人
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.selectPerson.push({
|
||||
this.sender.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
initReceiver().then(response => { // 接收人
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.receiver.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="数量">
|
||||
<el-table-column align="center" label="小计(元)" prop="小计">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
{{ scope.row.小计 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="单价">
|
||||
@@ -51,9 +51,14 @@
|
||||
{{ scope.row.单价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="小计(元)" prop="小计">
|
||||
<el-table-column align="center" label="领用数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.小计 }}
|
||||
{{ scope.row.出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="领用时间">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="供应商">
|
||||
<el-input v-model="supplierName" size="small" readonly clearable @dblclick.native="dialogVisible1=true;submitDisable=true" @clear="emptySupplierDetail"/>
|
||||
<el-input v-model="supplierName" size="small" placeholder="请双击选择" readonly clearable @dblclick.native="dialogVisible1=true;submitDisable=true" @clear="emptySupplierDetail"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -490,6 +490,9 @@ export default {
|
||||
methods: {
|
||||
searchData() {
|
||||
searchData(this.contractNumValue).then(response => {
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
response.data[j].物料计划到货时间 = (response.data[j].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
this.tableData3 = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.deliveryDay[i] = 0
|
||||
@@ -591,6 +594,7 @@ export default {
|
||||
this.getSelect(initPurchaseOrder, ['请购单编号', '请购单流水号'], 'contractNum')
|
||||
},
|
||||
searchSupplier() { // 查询创立日期和注册资本大于符合条件的数据
|
||||
console.log(this.id)
|
||||
this.supplierName ? this.supplierCheck1 = 1 : (this.supplierCheck1 = 0, this.supplierName = '')
|
||||
this.enterpriseNature ? this.supplierCheck2 = 1 : (this.supplierCheck2 = 0, this.enterpriseNature = '')
|
||||
this.createDate ? this.supplierCheck3 = 1 : (this.supplierCheck3 = 0, this.createDate = '')
|
||||
|
||||
@@ -20,16 +20,20 @@
|
||||
<span>合同号:</span>
|
||||
<el-input v-model="contractNum" placeholder="合同号" size="small" style="width:180px" clearable/>
|
||||
<span>采购员:</span>
|
||||
<el-input
|
||||
v-model="buyerName"
|
||||
placeholder="采购员"
|
||||
size="small"
|
||||
readonly
|
||||
clearable
|
||||
style="width:100px"
|
||||
@dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px" clearable>
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
<el-input
|
||||
v-model="supplierName"
|
||||
placeholder="供应商"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:180px"/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -39,28 +43,37 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading1" :data="tableData1" size="mini" border style="width: 100%;">
|
||||
<el-table-column label="采购合同编号" min-width="150" align="center">
|
||||
<el-table :data="tableData1" size="mini" border style="width: 100%">
|
||||
<el-table-column label="请款" min-width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon=""
|
||||
@click="requestFund(scope.row)">请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同编号" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同名称" min-width="150" align="center">
|
||||
<el-table-column label="采购合同名称" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规定到货时间" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规定到货时间 }}
|
||||
{{ scope.row.规定到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" min-width="200" align="center">
|
||||
<el-table-column label="供应商" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" width="80" align="center">
|
||||
<el-table-column label="总金额" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总金额 }}
|
||||
</template>
|
||||
@@ -70,7 +83,7 @@
|
||||
{{ scope.row.付款方式内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="欠款金额" min-width="100" align="center">
|
||||
<el-table-column label="欠款金额" min-width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.欠款金额 }}
|
||||
</template>
|
||||
@@ -85,9 +98,18 @@
|
||||
<el-input v-model="scope.row.本次应请款" size="mini" style="width:70px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款付款情况" width="810" align="center">
|
||||
<el-table-column label="请款付款情况" width="900" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-table v-show="tableData11[scope.$index].length!==0" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
|
||||
<el-table :id="scope.$index" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
|
||||
<el-table-column label="取消请款" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="scope.row.审核情况流水号!==3"
|
||||
type="danger"
|
||||
size="mini"
|
||||
@click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="次数" min-width="60" align="center" type="index"/>
|
||||
<el-table-column label="请款金额" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
@@ -96,25 +118,25 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="请款时间" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款时间 }}
|
||||
{{ scope.row.请款时间 ? scope.row.请款时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核情况内容" width="80" align="center">
|
||||
<el-table-column label="审核情况" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审核情况内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过审核原因" width="80" align="center">
|
||||
<el-table-column label="未通过审核原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审核原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批情况内容" width="80" align="center">
|
||||
<el-table-column label="审批情况" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批情况内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过审批原因" width="80" align="center">
|
||||
<el-table-column label="未通过审批原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审批原因 }}
|
||||
</template>
|
||||
@@ -124,32 +146,14 @@
|
||||
{{ scope.row.付款情况内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未付款原因" width="80" align="center">
|
||||
<el-table-column label="未付款原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未付款原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
size="mini"
|
||||
icon=""
|
||||
@click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款" min-width="80" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon=""
|
||||
@click="requestFund(scope.row)">请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
@@ -165,22 +169,22 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<span>请款开始时间:</span>
|
||||
<span>请款时间区间:</span>
|
||||
<el-date-picker
|
||||
v-model="startRequestDate"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
<span>请款结束时间:</span>
|
||||
placeholder="开始日期"/>
|
||||
~
|
||||
<el-date-picker
|
||||
v-model="endRequestDate"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
placeholder="结束日期"/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -191,7 +195,8 @@
|
||||
type="warning"
|
||||
size="small"
|
||||
icon="el-icon-download"
|
||||
style="margin-left:10px">导出Excel</el-button>
|
||||
style="margin-left:10px"
|
||||
>导出Excel</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
@@ -208,10 +213,10 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="规定到货时间" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规定到货时间 }}
|
||||
{{ scope.row.规定到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" min-width="150" align="center">
|
||||
<el-table-column label="供应商" min-width="250" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
@@ -243,46 +248,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="请款时间" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款时间 }}
|
||||
{{ scope.row.请款时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible2" title="采购员选择" center style="min-height: 300px;" width="40%">
|
||||
<el-table
|
||||
:data="tableData02"
|
||||
size="small"
|
||||
border
|
||||
style="width: 100%;min-height:300px"
|
||||
height="300px"
|
||||
highlight-current-row
|
||||
@row-click="clickBuyer">
|
||||
<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>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :disabled="submitDisable" type="primary" size="small" icon="el-icon-check" @click="submitSelectBuyer">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -293,8 +263,8 @@ import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableData02: [],
|
||||
dialogVisible2: false,
|
||||
personValue: '',
|
||||
person: [],
|
||||
loading2: false,
|
||||
tableData2: [],
|
||||
tableData11: [],
|
||||
@@ -304,37 +274,10 @@ export default {
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
contractNum: '',
|
||||
buyerName: '',
|
||||
dialogVisible1: false,
|
||||
submitDisable: true,
|
||||
form1: {},
|
||||
supplierValue: '',
|
||||
supplierName: '',
|
||||
enterpriseNature: '',
|
||||
createDate: '',
|
||||
registeredCapital: '',
|
||||
taxNum: '',
|
||||
EMail: '',
|
||||
address: '',
|
||||
account: '',
|
||||
openingBank: '',
|
||||
phone: '',
|
||||
fax: '',
|
||||
goodTime: '',
|
||||
supplierCheck1: 0,
|
||||
supplierCheck2: 0,
|
||||
supplierCheck3: 0,
|
||||
supplierCheck4: 0,
|
||||
supplierCheck5: 0,
|
||||
supplierCheck6: 0,
|
||||
supplierCheck7: 0,
|
||||
supplierCheck8: 0,
|
||||
supplierCheck9: 0,
|
||||
supplierCheck10: 0,
|
||||
supplierCheck11: 0,
|
||||
supplierCheck12: 0,
|
||||
tableData01: [],
|
||||
loading1: false,
|
||||
tableData1: [],
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
@@ -353,45 +296,43 @@ export default {
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.initBuyer()
|
||||
},
|
||||
methods: {
|
||||
submitSelectBuyer() { // 确定
|
||||
this.dialogVisible2 = false
|
||||
},
|
||||
clickBuyer(row) { // 点击采购员表某一行
|
||||
this.submitDisable = false
|
||||
this.buyerName = row.姓名
|
||||
},
|
||||
initBuyer() { // 初始化采购人员
|
||||
initBuyer().then(response => {
|
||||
this.tableData02 = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.person.push({
|
||||
text: response.data[i].姓名,
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.loading1 = true
|
||||
this.tableData1 = []
|
||||
this.startDate && this.endDate ? this.check1 = 1 : this.check1 = 0
|
||||
this.contractNum ? this.check2 = 1 : this.check2 = 0
|
||||
this.buyerName ? this.check3 = 1 : this.check3 = 0
|
||||
this.personValue ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName ? this.check4 = 1 : this.check4 = 0
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startDate, this.endDate, this.check2, this.contractNum, this.check3, this.buyerName, this.check4, this.supplierName).then(response => {
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startDate, this.endDate, this.check2, this.contractNum, this.check3, this.personValue, this.check4, this.supplierName).then(response => {
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
if (response.data.rows[j].规定到货时间 !== null) {
|
||||
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
|
||||
}
|
||||
this.tableData11[j] = []
|
||||
searchCondition(response.data.rows[j].采购合同流水号).then(response0 => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
for (let i = 0; i < response0.data.length; i++) {
|
||||
if (response0.data[i].请款时间 !== null) {
|
||||
response0.data[i].请款时间 = response0.data[i].请款时间.substring(0, response0.data[i].请款时间.indexOf(' '))
|
||||
if (response0.data.length === 0) {
|
||||
this.tableData11[j].push(response0.data)
|
||||
document.getElementById(j).setAttribute('style', 'display:none')
|
||||
} else {
|
||||
for (let i = 0; i < response0.data.length; i++) {
|
||||
this.tableData11[j].push(response0.data[i])
|
||||
}
|
||||
this.tableData11[j].push(response0.data[i])
|
||||
}
|
||||
})
|
||||
}
|
||||
}).then(() => {
|
||||
this.loading1 = false
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
@@ -417,6 +358,7 @@ export default {
|
||||
})
|
||||
},
|
||||
cancelRequestFund(row) { // 取消请款
|
||||
console.log(row)
|
||||
this.$confirm('确认取消请款吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -444,14 +386,17 @@ export default {
|
||||
},
|
||||
searchRequestTable() { // 查询请款表
|
||||
this.loading2 = true
|
||||
if (this.startRequestDate === '' || this.startRequestDate === null || this.endRequestDate === '' || this.endRequestDate === null) {
|
||||
if ((this.startRequestDate === '' || this.startRequestDate === null) && (this.endRequestDate === '' || this.endRequestDate === null)) {
|
||||
this.checkRequest = 0
|
||||
} else { this.checkRequest = 1 }
|
||||
} else if (this.startRequestDate !== '' && this.startRequestDate !== null && this.endRequestDate !== '' && this.endRequestDate !== null) {
|
||||
this.checkRequest = 1
|
||||
} else {
|
||||
this.$message.error('请款时间区间有误')
|
||||
this.loading2 = false
|
||||
return
|
||||
}
|
||||
searchRequestTable(this.checkRequest, this.startRequestDate, this.endRequestDate).then(response => {
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
if (response.data[j].规定到货时间 !== null) {
|
||||
response.data[j].规定到货时间 = response.data[j].规定到货时间.substring(0, response.data[j].规定到货时间.indexOf(' '))
|
||||
}
|
||||
if (response.data[j].请款时间 !== null) {
|
||||
response.data[j].请款时间 = response.data[j].请款时间.substring(0, response.data[j].请款时间.indexOf(' '))
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-input v-model="buyerName" placeholder="采购员" size="small" readonly clearable style="width:100px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
|
||||
<el-input v-model="buyerName" placeholder="请双击选择" size="small" clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
<el-button
|
||||
@@ -266,7 +266,9 @@ export default {
|
||||
审批是否通过: '',
|
||||
未通过原因: ''
|
||||
},
|
||||
rules2: {},
|
||||
rules2: {
|
||||
审批是否通过: [{ required: true, message: '请选择', trigger: 'change' }]
|
||||
},
|
||||
tableData2: [],
|
||||
textarea: ``,
|
||||
contractValue: '' // 显示表2和变更合同用的变量
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-input v-model="buyerName" placeholder="采购员" size="small" readonly clearable style="width:100px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
|
||||
<el-input v-model="buyerName" placeholder="请双击选择" size="small" clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
<span>审批情况:</span>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<span>时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="startEndDate"
|
||||
style="width:250px"
|
||||
style="width:240px"
|
||||
size="small"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
@@ -14,7 +14,7 @@
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" style="width:180px" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNum"
|
||||
:key="item.value"
|
||||
@@ -25,7 +25,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-input v-model="buyerName" placeholder="采购员" size="small" readonly clearable style="width:100px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;Buyer=0"/>
|
||||
<el-input v-model="buyerName" placeholder="请双击选择" size="small" clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;buyer=0"/>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<span>供应商:</span>
|
||||
@@ -144,7 +144,7 @@
|
||||
<span>时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="startEndDate"
|
||||
style="width:250px"
|
||||
style="width:240px"
|
||||
size="small"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
@@ -152,9 +152,9 @@
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-select v-model="contractNumValue1" placeholder="合同号" size="small" style="width:180px" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNum"
|
||||
v-for="item in contractNum1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
@@ -163,11 +163,11 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-input v-model="buyerName1" placeholder="采购员" size="small" readonly clearable style="width:100px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;buyer=1"/>
|
||||
<el-input v-model="buyerName1" placeholder="请双击选择" size="small" clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;buyer=1"/>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
<el-input v-model="supplierName1" placeholder="供应商" size="small" clearable/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -331,7 +331,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initContract, initBuyer, searchTable1, searchTable2, searchTable3, searchTable4, submitContract } from '@/api/WorkshopProcurement/PurchaseContractChange'
|
||||
import { initContract, initContract1, initBuyer, searchTable1, searchTable2, searchTable3, searchTable4, submitContract } from '@/api/WorkshopProcurement/PurchaseContractChange'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -352,6 +352,8 @@ export default {
|
||||
freight1: '',
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
contractNumValue1: '',
|
||||
contractNum1: [],
|
||||
ProcurementContractNum: '',
|
||||
buyer: 0,
|
||||
Supplier: 0,
|
||||
@@ -412,6 +414,15 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
initContract1().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.contractNum1.push({
|
||||
label: response.data[i].采购合同编号,
|
||||
name: response.data[i].采购合同名称,
|
||||
value: response.data[i].采购合同变更流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
initBuyer() { // 初始化采购人员
|
||||
initBuyer().then(response => {
|
||||
@@ -449,7 +460,7 @@ export default {
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.buyerValue, this.check4, this.supplierName, this.check5, this.approvalValue).then(response => {
|
||||
this.loading1 = false
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
if (response.data.rows[j].规定到货时间 !== null) {
|
||||
if (response.data.rows[j].规定到货时间 !== null || response.data.rows[j].规定到货时间 !== '') {
|
||||
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
|
||||
}
|
||||
}
|
||||
@@ -464,10 +475,10 @@ export default {
|
||||
this.check1 = 0
|
||||
this.startEndDate = ''
|
||||
} else { this.check1 = 1 }
|
||||
this.contractNumValue ? this.check2 = 1 : this.check2 = 0
|
||||
this.buyerName ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName ? this.check4 = 1 : this.check4 = 0
|
||||
searchTable3(this.pageCurrent2, this.pageSize2, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.buyerValue, this.check4, this.supplierName).then(response => {
|
||||
this.contractNumValue1 ? this.check2 = 1 : this.check2 = 0
|
||||
this.buyerName1 ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName1 ? this.check4 = 1 : this.check4 = 0
|
||||
searchTable3(this.pageCurrent2, this.pageSize2, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue1, this.check3, this.buyerValue1, this.check4, this.supplierName1).then(response => {
|
||||
this.loading2 = false
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
if (response.data.rows[j].规定到货时间 !== null) {
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
</el-select>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable style="width: 200px"/>
|
||||
<span>零件号:</span>
|
||||
<el-select v-model="PartNumberValue" placeholder="零件号" size="small" clearable>
|
||||
<span>零件名称:</span>
|
||||
<el-select v-model="PartNumberValue" placeholder="零件名称" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in PartNumber"
|
||||
:key="item.value"
|
||||
@@ -161,6 +161,14 @@ export default {
|
||||
this.PartNumberValue ? this.check3 = 1 : this.check3 = 0
|
||||
searchParts(this.pageCurrent, this.pageSize, this.check1, this.contractNumValue, this.check2, this.supplierName, this.check3, this.PartNumberValue).then(response => {
|
||||
this.loading = false
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].交检日期 !== '') {
|
||||
response.data.rows[i].交检日期 = (response.data.rows[i].交检日期).split(' ')[0]
|
||||
}
|
||||
if (response.data.rows[i].检查日期 !== '') {
|
||||
response.data.rows[i].检查日期 = (response.data.rows[i].检查日期).split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
|
||||
@@ -74,6 +74,31 @@
|
||||
<span>账号:4001</span>
|
||||
<span>密码:4001</span>
|
||||
</div>
|
||||
<div class="tips">
|
||||
<span>财务总监</span>
|
||||
<span>账号:7001</span>
|
||||
<span>密码:7001</span>
|
||||
</div>
|
||||
<div class="tips">
|
||||
<span>出纳</span>
|
||||
<span>账号:7002</span>
|
||||
<span>密码:7002</span>
|
||||
</div>
|
||||
<div class="tips">
|
||||
<span>会计</span>
|
||||
<span>账号:7003</span>
|
||||
<span>密码:7003</span>
|
||||
</div>
|
||||
<div class="tips">
|
||||
<span>总经理</span>
|
||||
<span>账号:1002</span>
|
||||
<span>密码:1002</span>
|
||||
</div>
|
||||
<div class="tips">
|
||||
<span>工艺定额员</span>
|
||||
<span>账号:6301</span>
|
||||
<span>密码:6301</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user