更新
This commit is contained in:
@@ -305,7 +305,7 @@
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="right" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="外购计划单名称" prop="采购计划单名称">
|
||||
<el-form-item label="外购备料单名称" prop="采购计划单名称">
|
||||
<el-input v-model="form2.采购单名称" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -287,7 +287,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table v-show="type!==4" ref="multipleTable" :data="tableData03" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table v-show="type!==4" ref="multipleTable" :data="tableData02" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="45"/>
|
||||
<el-table-column label="名称" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
@@ -296,12 +296,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
|
||||
{{ scope.row.图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
|
||||
{{ scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购数量" align="center" width="80">
|
||||
@@ -654,6 +654,7 @@ export default {
|
||||
searchTable02(row) {
|
||||
this.tableData02 = []
|
||||
this.tableData03 = []
|
||||
console.log(row, 222)
|
||||
if (this.contractType === '采购合同') {
|
||||
if (row.模板类型 === 4) {
|
||||
this.type = row.模板类型
|
||||
@@ -662,14 +663,17 @@ export default {
|
||||
this.$set(data, '本次到票数量', 0)
|
||||
data.本次到票数量 = data.已到货数量 - data.到票数量
|
||||
this.tableData03.push(data)
|
||||
console.log(this.tableData03, 111)
|
||||
})
|
||||
})
|
||||
} else {
|
||||
searchPurchaseDetail(row.采购合同流水号).then(response => {
|
||||
console.log(response, 88)
|
||||
response.data.map(data => {
|
||||
this.$set(data, '本次到票数量', 0)
|
||||
data.本次到票数量 = data.已到货数量 - data.到票数量
|
||||
this.tableData02.push(data)
|
||||
console.log(this.tableData02, 111)
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -681,6 +685,7 @@ export default {
|
||||
this.tableData02.push(data)
|
||||
})
|
||||
})
|
||||
console.log(this.tableData03, 112)
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="取消关联" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button :disabled="disable === '1'" type="text" size="mini" style="margin-left: 20px" icon="el-icon-circle-close" @click="deleteArrivalMX(scope.row)"/>
|
||||
<el-button :disabled="disable === '1'" type="text" size="mini" style="margin-left: 20px" icon="el-icon-top" @click="deleteArrivalMX(scope.row)"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
@@ -188,7 +188,7 @@
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip effect="dark" content="取消关联" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button :disabled="disable === '1'" type="text" icon="el-icon-circle-close" size="mini" @click="deleteMateriel(scope.row)"/>
|
||||
<el-button :disabled="disable === '1'" type="text" icon="el-icon-top" size="mini" @click="deleteMateriel(scope.row)"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
@@ -326,12 +326,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="到货件数" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.采购数量-parseInt(scope.row.到货数量)" :step="1" :min="0" size="mini" style="width:95px" @change="saveData(scope.row)"/>
|
||||
<el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.采购数量-parseInt(scope.row.到货数量)" :step="1" :min="0.00" size="mini" style="width:100%" @change="saveData(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货重量(KG)" align="center" width="120px" prop="到货重量">
|
||||
<el-table-column label="到货重量(KG)" align="center" width="150px" prop="到货重量">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.到货重量" :disabled="disable === '1'" :step="1" :min="0" size="mini" style="width:95px" @change="saveData(scope.row)"/>
|
||||
<el-input-number v-model="scope.row.到货重量" :disabled="disable === '1'" :step="1" :min="0.00" size="mini" style="width:100%" @change="saveData(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成品尺寸(长、宽、高)" align="center" width="170px">
|
||||
@@ -451,7 +451,7 @@
|
||||
{{ scope.row.到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货件数" align="center" width="120px">
|
||||
<el-table-column label="到货件数" align="center" width="90px">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.采购数量-parseInt(scope.row.到货数量)" :step="1" :min="0" size="mini" style="width:95px" @change="saveData(scope.row)"/>
|
||||
</template>
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
<el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="350px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="right" label-width="80px">
|
||||
<el-form-item label="计划名称" prop="计划名称">
|
||||
<el-input v-model="form2.离线采购计划名称" size="small"/>
|
||||
<el-input v-model="form2.计划名称" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplierNameValue">
|
||||
<el-select v-model="form2.supplierNameValue" placeholder="供应商" size="small" filterable>
|
||||
@@ -302,12 +302,12 @@ export default {
|
||||
计划完成日期: '',
|
||||
采购单名称: '',
|
||||
form2: {
|
||||
离线采购计划名称: '',
|
||||
计划名称: '',
|
||||
supplierNameValue: '',
|
||||
离线采购计划流水号: ''
|
||||
},
|
||||
rules2: {
|
||||
计划名称: [{ required: true, message: '请填写离线采购计划名称' }],
|
||||
计划名称: [{ required: true, message: '请填写计划名称' }],
|
||||
supplierNameValue: [{ required: true, message: '请选择供应商' }]
|
||||
},
|
||||
form3: {
|
||||
@@ -509,7 +509,7 @@ export default {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.form2.离线采购计划名称 = ''
|
||||
this.form2.计划名称 = ''
|
||||
this.form2.supplierNameValue = ''
|
||||
this.title2 = '创建外购备料计划'
|
||||
this.dialogVisible2 = true
|
||||
@@ -517,7 +517,7 @@ export default {
|
||||
submitAddPurchaseOrder() { // 新建采购单
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
addPurchaseOrder(this.form2.离线采购计划名称, this.form2.supplierNameValue).then(response => {
|
||||
addPurchaseOrder(this.form2.计划名称, this.form2.supplierNameValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('新建离线外购备料成功')
|
||||
this.searchTable()
|
||||
@@ -535,14 +535,14 @@ export default {
|
||||
}
|
||||
this.title2 = '编辑外购备料计划'
|
||||
this.form2.离线采购计划流水号 = row.离线采购计划流水号
|
||||
this.form2.离线采购计划名称 = row.离线采购计划名称
|
||||
this.form2.计划名称 = row.离线采购计划名称
|
||||
this.form2.supplierNameValue = row.供应商流水号
|
||||
this.dialogVisible2 = true
|
||||
},
|
||||
submitEditPurchaseOrder() {
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
editPurchaseOrder(this.form2.离线采购计划流水号, this.form2.离线采购计划名称, this.form2.supplierNameValue).then(response => {
|
||||
editPurchaseOrder(this.form2.离线采购计划流水号, this.form2.计划名称, this.form2.supplierNameValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改离线外购备料成功')
|
||||
this.searchTable()
|
||||
|
||||
Reference in New Issue
Block a user