更新
This commit is contained in:
@@ -315,7 +315,7 @@
|
||||
<el-table-column align="center" label="数量" width="130">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="disabledPick === false">
|
||||
<el-input-number v-model="scope.row.数量" :min="1" label="描述文字" size="mini" controls-position="right" style="width:100px" @change="handleChange"/>
|
||||
<el-input-number v-model="scope.row.数量" :min="1" label="描述文字" size="mini" controls-position="right" style="width:100px"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.数量 }}
|
||||
@@ -367,7 +367,7 @@
|
||||
<el-divider/>
|
||||
</div>
|
||||
<div>
|
||||
<el-tabs v-model="category" tab-position="left" style="height: 200px;">
|
||||
<el-tabs v-model="category" tab-position="left" style="height: 200px;" @tab-click="selecttabs">
|
||||
<el-tab-pane label="机床">
|
||||
<el-table
|
||||
:data="tableDataMachine"
|
||||
@@ -399,7 +399,7 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="组件">
|
||||
<el-table
|
||||
:data="tableDataMachine"
|
||||
:data="tableDataMachine1"
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="200"
|
||||
@@ -428,7 +428,7 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="零件">
|
||||
<el-table
|
||||
:data="tableDataMachine"
|
||||
:data="tableDataMachine2"
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="200"
|
||||
@@ -457,7 +457,7 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="物料">
|
||||
<el-table
|
||||
:data="tableDataMachine"
|
||||
:data="tableDataMachine3"
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="200"
|
||||
@@ -651,6 +651,9 @@ export default {
|
||||
tableData: [],
|
||||
array: [],
|
||||
tableDataMachine: [],
|
||||
tableDataMachine1: [],
|
||||
tableDataMachine2: [],
|
||||
tableDataMachine3: [],
|
||||
tableDataSearchList: [],
|
||||
listLoading: false,
|
||||
dialogFormVisible: false,
|
||||
@@ -666,6 +669,7 @@ export default {
|
||||
typeE: [],
|
||||
typeF: [],
|
||||
typeG: [],
|
||||
typeH: [],
|
||||
form: {
|
||||
项目: '',
|
||||
项目名称: ''
|
||||
@@ -716,6 +720,9 @@ export default {
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
selecttabs() {
|
||||
this.searchPick = ''
|
||||
},
|
||||
querySearchMachine(queryString, cb) {
|
||||
this.restaurants_Machine = []
|
||||
if (this.input_Name !== '' && this.input_Name !== null) {
|
||||
@@ -765,6 +772,9 @@ export default {
|
||||
function_Pick() {
|
||||
this.dialogFormVisible = true
|
||||
this.tableDataMachine = []
|
||||
this.tableDataMachine1 = []
|
||||
this.tableDataMachine2 = []
|
||||
this.tableDataMachine3 = []
|
||||
this.searchPick = ''
|
||||
this.category = '0'
|
||||
},
|
||||
@@ -929,6 +939,7 @@ export default {
|
||||
this.typeE = []
|
||||
this.typeF = []
|
||||
this.typeG = []
|
||||
this.typeH = []
|
||||
InvoiceSave(this.invoiceNum, this.input_Company, this.input_Adress, this.input_People, this.input_Mobile, this.input_Remake, this.machineName, this.machineNum).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('保存成功!')
|
||||
@@ -945,8 +956,9 @@ export default {
|
||||
this.typeE.push(this.tableData[i].货品型号)
|
||||
this.typeF.push(this.tableData[i].设计者)
|
||||
this.typeG.push(this.tableData[i].数量)
|
||||
this.typeH.push(this.tableData[i].机床流水号)
|
||||
}
|
||||
InvoiceDetailsSave(this.typeA, this.typeB, this.typeC, this.typeD, this.typeE, this.typeF, this.typeG, this.invoiceNum).then(response => {
|
||||
InvoiceDetailsSave(this.typeA, this.typeB, this.typeC, this.typeD, this.typeE, this.typeF, this.typeG, this.typeH, this.invoiceNum).then(response => {
|
||||
console.log(response, 9990)
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('保存成功!')
|
||||
@@ -1090,48 +1102,68 @@ export default {
|
||||
SelectMachine(item.value).then(response => {
|
||||
if (response.data.length !== 0) {
|
||||
this.tableDataMachine = response.data
|
||||
console.log(response.data, '机床')
|
||||
}
|
||||
})
|
||||
}
|
||||
if (this.category === '1') {
|
||||
SelectAssembly(item.value).then(response => {
|
||||
if (response.data.length !== 0) {
|
||||
this.tableDataMachine = response.data
|
||||
this.tableDataMachine1 = response.data
|
||||
console.log(response.data, '组件')
|
||||
}
|
||||
})
|
||||
}
|
||||
if (this.category === '2') {
|
||||
SelectPart(item.value).then(response => {
|
||||
if (response.data.length !== 0) {
|
||||
this.tableDataMachine = response.data
|
||||
this.tableDataMachine2 = response.data
|
||||
}
|
||||
})
|
||||
}
|
||||
if (this.category === '3') {
|
||||
SelectMateriel(item.value).then(response => {
|
||||
if (response.data.length !== 0) {
|
||||
this.tableDataMachine = response.data
|
||||
this.tableDataMachine3 = response.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSelectionChangeMachine(val) {
|
||||
this.array = val
|
||||
console.log(val, 'val', this.category)
|
||||
},
|
||||
off() {
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
submit() {
|
||||
for (let i = 0; i < this.array.length; i++) {
|
||||
this.tableData.push({
|
||||
货品名称: this.array[i].货品名称 ? this.array[i].货品名称 : '—' || '—',
|
||||
货品编号: this.array[i].货品编号 ? this.array[i].货品编号 : '—' || '—',
|
||||
设计者: this.array[i].设计者 ? this.array[i].设计者 : '—' || '—',
|
||||
货品规格: this.array[i].货品规格 ? this.array[i].货品规格 : '—' || '—',
|
||||
货品型号: this.array[i].货品型号 ? this.array[i].货品型号 : '—' || '—',
|
||||
数量: 1,
|
||||
货品类别: this.array[i].类别 ? this.array[i].类别 : '—' || '—'
|
||||
})
|
||||
console.log(this.category, 'category')
|
||||
if (this.category === '0') {
|
||||
for (let i = 0; i < this.array.length; i++) {
|
||||
this.tableData.push({
|
||||
货品名称: this.array[i].货品名称 ? this.array[i].货品名称 : '—' || '—',
|
||||
货品编号: this.array[i].货品编号 ? this.array[i].货品编号 : '—' || '—',
|
||||
设计者: this.array[i].设计者 ? this.array[i].设计者 : '—' || '—',
|
||||
货品规格: this.array[i].货品规格 ? this.array[i].货品规格 : '—' || '—',
|
||||
货品型号: this.array[i].货品型号 ? this.array[i].货品型号 : '—' || '—',
|
||||
数量: 1,
|
||||
货品类别: this.array[i].类别 ? this.array[i].类别 : '—' || '—',
|
||||
机床流水号: this.array[i].机床流水号 ? this.array[i].机床流水号 : '—' || '—'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < this.array.length; i++) {
|
||||
this.tableData.push({
|
||||
货品名称: this.array[i].货品名称 ? this.array[i].货品名称 : '—' || '—',
|
||||
货品编号: this.array[i].货品编号 ? this.array[i].货品编号 : '—' || '—',
|
||||
设计者: this.array[i].设计者 ? this.array[i].设计者 : '—' || '—',
|
||||
货品规格: this.array[i].货品规格 ? this.array[i].货品规格 : '—' || '—',
|
||||
货品型号: this.array[i].货品型号 ? this.array[i].货品型号 : '—' || '—',
|
||||
数量: 1,
|
||||
货品类别: this.array[i].类别 ? this.array[i].类别 : '—' || '—',
|
||||
机床流水号: 0
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
openSearch() {
|
||||
|
||||
Reference in New Issue
Block a user