修复物料管理
This commit is contained in:
parent
959afef0e8
commit
1c21113ebc
@ -47,7 +47,7 @@
|
||||
:total="Number(total)"
|
||||
></el-pagination>
|
||||
</vue-scroll>
|
||||
<el-dialog title="新增" :visible.sync="dialogVisibleAdd" width="30%" :before-close="handleClose">
|
||||
<el-dialog title="新增" :modal-append-to-body="false" :visible.sync="dialogVisibleAdd" width="30%" :before-close="handleClose">
|
||||
<el-form ref="form" :model="form" label-width="150px" :rules="addEditRules">
|
||||
<el-form-item label="发货单位:" prop="unitName">
|
||||
<el-input v-model="form.unitName" style="width:350px" placeholder="请输入"></el-input>
|
||||
@ -70,8 +70,8 @@
|
||||
<el-button type="primary" @click="okAdd">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog title="编辑" :visible.sync="dialogVisibleEdit" width="30%" :before-close="handleClose">
|
||||
<el-form ref="form" :model="form" label-width="150px">
|
||||
<el-dialog :modal-append-to-body="false" title="编辑" :visible.sync="dialogVisibleEdit" width="30%" :before-close="handleClose">
|
||||
<el-form ref="editForm" :model="editForm" label-width="150px">
|
||||
<el-form-item label="发货单位:" prop="unitName">
|
||||
<el-input v-model="editForm.unitName" style="width:350px" placeholder="请输入"></el-input>
|
||||
</el-form-item>
|
||||
@ -164,6 +164,8 @@ export default {
|
||||
})
|
||||
},
|
||||
okAdd() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
let data = {
|
||||
projectSn: this.projectSn,
|
||||
unitName: this.form.unitName,
|
||||
@ -178,19 +180,24 @@ export default {
|
||||
this.$message.success('新增成功!')
|
||||
this.getListData()
|
||||
this.dialogVisibleAdd = false
|
||||
console.log("11111",this.form);
|
||||
console.log('11111', this.form)
|
||||
Object.keys(this.form).forEach(item => {
|
||||
this.form[item] = ''
|
||||
})
|
||||
console.log("222222",this.form);
|
||||
console.log('222222', this.form)
|
||||
} else {
|
||||
this.$message.success('新增失败!')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
okEdit() {
|
||||
this.dialogVisibleEdit = false
|
||||
this.EquipmentList
|
||||
this.$refs.editForm.validate(valid => {
|
||||
if (valid) {
|
||||
let data = {
|
||||
unitName: this.editForm.unitName,
|
||||
unitChargeName: this.editForm.unitChargeName,
|
||||
@ -204,12 +211,18 @@ export default {
|
||||
editReceiptAndShipmentItem(data).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success('编辑成功!')
|
||||
this.dialogVisibleEdit = false
|
||||
this.getListData()
|
||||
} else {
|
||||
this.$message.success('编辑失败!')
|
||||
}
|
||||
})
|
||||
this.getListData()
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleClose(done) {
|
||||
done()
|
||||
@ -252,7 +265,7 @@ export default {
|
||||
},
|
||||
//删除按钮
|
||||
deleteBtn(val) {
|
||||
console.log(val,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
|
||||
console.log(val, '~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
|
||||
this.$confirm('确定删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
></el-pagination>
|
||||
</vue-scroll>
|
||||
</div>
|
||||
<el-dialog title="新增" :visible.sync="dialogVisibleAdd" width="30%" :before-close="handleClose">
|
||||
<el-dialog :modal-append-to-body="false" title="新增" :visible.sync="dialogVisibleAdd" width="30%" :before-close="handleClose">
|
||||
<el-form ref="form" :model="form" label-width="150px" :rules="addEditRules">
|
||||
<el-form-item label="车牌号码:" prop="licensePlate">
|
||||
<el-input v-model="form.licensePlate" style="width:350px" placeholder="请输入"></el-input>
|
||||
@ -98,8 +98,8 @@
|
||||
<el-button type="primary" @click="okAdd">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog title="编辑" :visible.sync="dialogVisibleEdit" width="30%" :before-close="handleClose">
|
||||
<el-form ref="form" :model="form" label-width="150px">
|
||||
<el-dialog :modal-append-to-body="false" title="编辑" :visible.sync="dialogVisibleEdit" width="30%" :before-close="handleClose">
|
||||
<el-form ref="editForm" :model="editForm" label-width="150px">
|
||||
<el-form-item label="车牌号码:" prop="licensePlate">
|
||||
<el-input v-model="editForm.licensePlate" style="width:350px" placeholder="请输入"></el-input>
|
||||
</el-form-item>
|
||||
@ -289,6 +289,8 @@ export default {
|
||||
})
|
||||
},
|
||||
okAdd() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
let data = {
|
||||
licensePlate: this.form.licensePlate,
|
||||
forwardingUnit: this.form.forwardingUnit,
|
||||
@ -311,10 +313,15 @@ export default {
|
||||
this.$message.success('新增失败!')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
okEdit() {
|
||||
this.dialogVisibleEdit = false
|
||||
this.EquipmentList
|
||||
this.$refs.editForm.validate(valid => {
|
||||
if (valid) {
|
||||
let data = {
|
||||
licensePlate: this.editForm.licensePlate,
|
||||
forwardingUnit: this.editForm.forwardingUnit,
|
||||
@ -330,11 +337,17 @@ export default {
|
||||
if (res.code == 200) {
|
||||
this.$message.success('编辑成功!')
|
||||
this.getListData()
|
||||
this.dialogVisibleEdit = false
|
||||
} else {
|
||||
this.$message.success('编辑失败!')
|
||||
}
|
||||
})
|
||||
this.getListData()
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
//编辑按钮
|
||||
editBtn(val) {
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
:total="Number(total)"
|
||||
></el-pagination>
|
||||
</vue-scroll>
|
||||
<el-dialog title="新增" :visible.sync="dialogVisibleAdd" width="30%" :before-close="handleClose">
|
||||
<el-dialog :modal-append-to-body="false" title="新增" :visible.sync="dialogVisibleAdd" width="30%" :before-close="handleClose">
|
||||
<el-form ref="form" :model="form" label-width="150px" :rules="addEditRules">
|
||||
<el-form-item label="收货单位:" prop="unitName">
|
||||
<el-input v-model="form.unitName" style="width:350px" placeholder="请输入"></el-input>
|
||||
@ -70,8 +70,8 @@
|
||||
<el-button type="primary" @click="okAdd">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog title="编辑" :visible.sync="dialogVisibleEdit" width="30%" :before-close="handleClose">
|
||||
<el-form ref="form" :model="form" label-width="150px">
|
||||
<el-dialog :modal-append-to-body="false" title="编辑" :visible.sync="dialogVisibleEdit" width="30%" :before-close="handleClose">
|
||||
<el-form ref="editForm" :model="editForm" label-width="150px" :rules="addEditRules">
|
||||
<el-form-item label="收货单位:" prop="unitName">
|
||||
<el-input v-model="editForm.unitName" style="width:350px" placeholder="请输入"></el-input>
|
||||
</el-form-item>
|
||||
@ -144,7 +144,6 @@ export default {
|
||||
},
|
||||
equipmentId: '',
|
||||
editId: '',
|
||||
EquipmentList: [],
|
||||
devId: '',
|
||||
fuel: ''
|
||||
}
|
||||
@ -164,6 +163,8 @@ export default {
|
||||
})
|
||||
},
|
||||
okAdd() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
let data = {
|
||||
projectSn: this.projectSn,
|
||||
unitName: this.form.unitName,
|
||||
@ -178,17 +179,22 @@ export default {
|
||||
this.$message.success('新增成功!')
|
||||
this.getListData()
|
||||
this.dialogVisibleAdd = false
|
||||
this.Object.keys(this.form).forEach(item => {
|
||||
form[item] = ''
|
||||
Object.keys(this.form).forEach(item => {
|
||||
this.form[item] = ''
|
||||
})
|
||||
} else {
|
||||
this.$message.success('新增失败!')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
okEdit() {
|
||||
this.dialogVisibleEdit = false
|
||||
this.EquipmentList
|
||||
this.$refs.editForm.validate(valid => {
|
||||
if (valid) {
|
||||
let data = {
|
||||
unitName: this.editForm.unitName,
|
||||
unitChargeName: this.editForm.unitChargeName,
|
||||
@ -203,11 +209,17 @@ export default {
|
||||
if (res.code == 200) {
|
||||
this.$message.success('编辑成功!')
|
||||
this.getListData()
|
||||
this.dialogVisibleEdit = false
|
||||
} else {
|
||||
this.$message.success('编辑失败!')
|
||||
}
|
||||
})
|
||||
this.getListData()
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleClose(done) {
|
||||
done()
|
||||
@ -250,7 +262,7 @@ export default {
|
||||
},
|
||||
//删除按钮
|
||||
deleteBtn(val) {
|
||||
console.log(val,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
|
||||
console.log(val, '~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
|
||||
this.$confirm('确定删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
:total="Number(total)"
|
||||
></el-pagination>
|
||||
</vue-scroll>
|
||||
<el-dialog title="新增" :visible.sync="dialogVisibleAdd" width="30%" :before-close="handleClose">
|
||||
<el-dialog :modal-append-to-body="false" title="新增" :visible.sync="dialogVisibleAdd" width="30%" :before-close="handleClose">
|
||||
<el-form ref="form" :model="form" label-width="150px" :rules="addEditRules">
|
||||
<el-form-item label="货名:" prop="goodsName">
|
||||
<el-input v-model="form.goodsName" style="width:350px" placeholder="请输入"></el-input>
|
||||
@ -70,8 +70,8 @@
|
||||
<el-button type="primary" @click="okAdd">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog title="编辑" :visible.sync="dialogVisibleEdit" width="30%" :before-close="handleClose">
|
||||
<el-form ref="form" :model="form" label-width="150px">
|
||||
<el-dialog :modal-append-to-body="false" title="编辑" :visible.sync="dialogVisibleEdit" width="30%" :before-close="handleClose">
|
||||
<el-form ref="editForm" :model="editForm" label-width="150px">
|
||||
<el-form-item label="货名:" prop="goodsName">
|
||||
<el-input v-model="editForm.goodsName" style="width:350px" placeholder="请输入"></el-input>
|
||||
</el-form-item>
|
||||
@ -158,6 +158,8 @@ export default {
|
||||
})
|
||||
},
|
||||
okAdd() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
let data = {
|
||||
projectSn: this.projectSn,
|
||||
goodsName: this.form.goodsName,
|
||||
@ -178,10 +180,16 @@ export default {
|
||||
this.$message.success('新增失败!')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
okEdit() {
|
||||
this.$refs.editForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.dialogVisibleEdit = false
|
||||
this.EquipmentList
|
||||
let data = {
|
||||
goodsName: this.editForm.goodsName,
|
||||
unitPrice: this.editForm.unitPrice,
|
||||
@ -200,6 +208,11 @@ export default {
|
||||
}
|
||||
})
|
||||
this.getListData()
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleClose(done) {
|
||||
done()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user