Merge branch 'master' of ssh://192.168.1.149:29418/高精2.0

This commit is contained in:
liushuai
2018-11-24 10:23:22 +08:00
5 changed files with 47 additions and 121 deletions

View File

@@ -45,13 +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>
@click="handleEdit(scope.$index, scope.row, 'form')">修改</el-button>
<el-button
size="mini"
type="danger"
@@ -113,14 +114,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>
@@ -131,6 +133,7 @@
<el-input
v-model="form.WarehouseName"
size="small"
clearable
style="width:200px"/>
</el-form-item>
</el-col>
@@ -141,6 +144,7 @@
<el-input
v-model="form.WarehouseDescription"
size="small"
clearable
style="width:200px"/>
</el-form-item>
</el-col>
@@ -150,6 +154,7 @@
<el-form-item label="地址" prop="Address">
<el-input
v-model="form.Address"
clearable
size="small"
style="width:200px"/>
</el-form-item>
@@ -157,10 +162,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"/>
@@ -173,6 +178,7 @@
<el-form-item label="备注" prop="Note">
<el-input
v-model="form.Note"
clearable
size="small"
style="width:200px"/>
</el-form-item>
@@ -209,7 +215,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"
@@ -240,6 +246,8 @@ import { initWarehouse, addWarehouse, alterWarehouse, deleteWarehouse, searchLoc
export default {
data() {
return {
Contactpeople: [], // 联系人
count2: 0, // 清表单验证计数器
tableData: [],
tableData2: [],
wareHouse: '',
@@ -250,10 +258,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' }],
@@ -290,7 +300,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].仓库流水号,
@@ -298,8 +307,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].人员编号
})
}
})
@@ -309,11 +319,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].人员编号
})
}
})
@@ -351,19 +362,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('添加成功')
@@ -371,7 +383,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('添加失败')
@@ -380,29 +392,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('信息更新失败')
@@ -428,7 +439,6 @@ export default {
},
// 重置表单
callOff(formName) {
console.log(1515)
this.form = {}
this.form2.ContractNumberValue = ''
this.form2.EntryName = ''

View File

@@ -218,18 +218,24 @@ export default {
},
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.工艺难度等级 || this.tableData1[i].工序顺序 !== row.工序顺序) {
if (this.tableData1[i].工艺编号 !== row.工艺编号 || this.tableData1[i].工艺要求 !== row.工艺要求 || this.tableData1[i].工艺难度等级 !== 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.工艺难度等级 || this.tableData2[i].工序顺序 !== row.工序顺序) {
if (this.tableData2[i].工艺编号 !== row.工艺编号 || this.tableData2[i].工艺要求 !== row.工艺要求 || this.tableData2[i].工艺难度等级 !== row.工艺难度等级) {
return 'change'
} else {
return ''
}
}
}

View File

@@ -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>

View File

@@ -1,54 +0,0 @@
<!--二维码扫描查询-->
<template>
<div class="app-container">
<el-card>
<el-table v-loading="loading0" :data="tableData" height="650" style="width: 100%;" border>
<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>
</el-card>
</div>
</template>
<script>
import { searchtable } from '@/api/Outsourcing/OutFactoryMaintenance'
export default {
data() {
return {
loading0: false,
tableData: []
}
},
created() {
this.searchTable()
},
methods: {
// 查询
searchTable() {
this.loading0 = true
searchtable(this.pageCurrent, this.pageSize, this.num1, this.ManufacturerNumber, this.num2, this.ManufacturerName, this.num10, this.ManufacturerAbbreviation, this.num3, this.address, this.num4, this.roleName, this.num5, this.phNumber, this.num6, this.Fax, this.num7, this.Remarks, this.num8, this.category, this.num11, this.attention, this.num9, this.EquipmentCondition).then(response => {
this.tableData = response.data.rows
this.total = response.data.total
this.loading0 = false
})
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
</style>