修复物料管理

This commit is contained in:
严妍 2023-03-28 15:31:18 +08:00
parent 959afef0e8
commit 1c21113ebc
4 changed files with 204 additions and 153 deletions

View File

@ -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,52 +164,65 @@ export default {
})
},
okAdd() {
let data = {
projectSn: this.projectSn,
unitName: this.form.unitName,
unitChargeName: this.form.unitChargeName,
chargePhone: this.form.chargePhone,
unitAddress: this.form.unitAddress,
socialCode: this.form.socialCode,
type: 1
}
addReceiptAndShipmentItem(data).then(res => {
if (res.code == 200) {
this.$message.success('新增成功!')
this.getListData()
this.dialogVisibleAdd = false
console.log("11111",this.form);
Object.keys(this.form).forEach(item => {
this.form[item] = ''
this.$refs.form.validate(valid => {
if (valid) {
let data = {
projectSn: this.projectSn,
unitName: this.form.unitName,
unitChargeName: this.form.unitChargeName,
chargePhone: this.form.chargePhone,
unitAddress: this.form.unitAddress,
socialCode: this.form.socialCode,
type: 1
}
addReceiptAndShipmentItem(data).then(res => {
if (res.code == 200) {
this.$message.success('新增成功!')
this.getListData()
this.dialogVisibleAdd = false
console.log('11111', this.form)
Object.keys(this.form).forEach(item => {
this.form[item] = ''
})
console.log('222222', this.form)
} else {
this.$message.success('新增失败!')
}
})
console.log("222222",this.form);
} else {
this.$message.success('新增失败!')
console.log('error submit!!')
return false
}
})
},
okEdit() {
this.dialogVisibleEdit = false
this.EquipmentList
let data = {
unitName: this.editForm.unitName,
unitChargeName: this.editForm.unitChargeName,
chargePhone: this.editForm.chargePhone,
unitAddress: this.editForm.unitAddress,
socialCode: this.editForm.socialCode,
projectSn: this.projectSn,
type: 1,
id: this.editId
}
editReceiptAndShipmentItem(data).then(res => {
if (res.code == 200) {
this.$message.success('编辑成功!')
this.$refs.editForm.validate(valid => {
if (valid) {
let data = {
unitName: this.editForm.unitName,
unitChargeName: this.editForm.unitChargeName,
chargePhone: this.editForm.chargePhone,
unitAddress: this.editForm.unitAddress,
socialCode: this.editForm.socialCode,
projectSn: this.projectSn,
type: 1,
id: this.editId
}
editReceiptAndShipmentItem(data).then(res => {
if (res.code == 200) {
this.$message.success('编辑成功!')
this.dialogVisibleEdit = false
this.getListData()
} else {
this.$message.success('编辑失败!')
}
})
this.getListData()
} else {
this.$message.success('编辑失败!')
console.log('error submit!!')
return false
}
})
this.getListData()
},
handleClose(done) {
done()
@ -252,7 +265,7 @@ export default {
},
//
deleteBtn(val) {
console.log(val,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
console.log(val, '~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
this.$confirm('确定删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',

View File

@ -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,52 +289,65 @@ export default {
})
},
okAdd() {
let data = {
licensePlate: this.form.licensePlate,
forwardingUnit: this.form.forwardingUnit,
receivingUnit: this.form.receivingUnit,
goodsName: this.form.goodsName,
specifications: this.form.specifications,
reserve: this.form.reserve,
weighingType: this.form.weighingType,
projectSn: this.projectSn
}
addMakeAnAppointmentItem(data).then(res => {
if (res.code == 200) {
this.$message.success('新增成功!')
this.getListData()
this.dialogVisibleAdd = false
Object.keys(this.form).forEach(item => {
this.form[item] = ''
this.$refs.form.validate(valid => {
if (valid) {
let data = {
licensePlate: this.form.licensePlate,
forwardingUnit: this.form.forwardingUnit,
receivingUnit: this.form.receivingUnit,
goodsName: this.form.goodsName,
specifications: this.form.specifications,
reserve: this.form.reserve,
weighingType: this.form.weighingType,
projectSn: this.projectSn
}
addMakeAnAppointmentItem(data).then(res => {
if (res.code == 200) {
this.$message.success('新增成功!')
this.getListData()
this.dialogVisibleAdd = false
Object.keys(this.form).forEach(item => {
this.form[item] = ''
})
} else {
this.$message.success('新增失败!')
}
})
} else {
this.$message.success('新增失败!')
console.log('error submit!!')
return false
}
})
},
okEdit() {
this.dialogVisibleEdit = false
this.EquipmentList
let data = {
licensePlate: this.editForm.licensePlate,
forwardingUnit: this.editForm.forwardingUnit,
receivingUnit: this.editForm.receivingUnit,
goodsName: this.editForm.goodsName,
specifications: this.editForm.specifications,
reserve: this.editForm.reserve,
weighingType: this.editForm.weighingType,
projectSn: this.projectSn,
id: this.editId
}
editMakeAnAppointmentItem(data).then(res => {
if (res.code == 200) {
this.$message.success('编辑成功!')
this.$refs.editForm.validate(valid => {
if (valid) {
let data = {
licensePlate: this.editForm.licensePlate,
forwardingUnit: this.editForm.forwardingUnit,
receivingUnit: this.editForm.receivingUnit,
goodsName: this.editForm.goodsName,
specifications: this.editForm.specifications,
reserve: this.editForm.reserve,
weighingType: this.editForm.weighingType,
projectSn: this.projectSn,
id: this.editId
}
editMakeAnAppointmentItem(data).then(res => {
if (res.code == 200) {
this.$message.success('编辑成功!')
this.getListData()
this.dialogVisibleEdit = false
} else {
this.$message.success('编辑失败!')
}
})
this.getListData()
} else {
this.$message.success('编辑失败!')
console.log('error submit!!')
return false
}
})
this.getListData()
},
//
editBtn(val) {

View File

@ -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,50 +163,63 @@ export default {
})
},
okAdd() {
let data = {
projectSn: this.projectSn,
unitName: this.form.unitName,
unitChargeName: this.form.unitChargeName,
chargePhone: this.form.chargePhone,
unitAddress: this.form.unitAddress,
socialCode: this.form.socialCode,
type: 2
}
addReceiptAndShipmentItem(data).then(res => {
if (res.code == 200) {
this.$message.success('新增成功!')
this.getListData()
this.dialogVisibleAdd = false
this.Object.keys(this.form).forEach(item => {
form[item] = ''
this.$refs.form.validate(valid => {
if (valid) {
let data = {
projectSn: this.projectSn,
unitName: this.form.unitName,
unitChargeName: this.form.unitChargeName,
chargePhone: this.form.chargePhone,
unitAddress: this.form.unitAddress,
socialCode: this.form.socialCode,
type: 2
}
addReceiptAndShipmentItem(data).then(res => {
if (res.code == 200) {
this.$message.success('新增成功!')
this.getListData()
this.dialogVisibleAdd = false
Object.keys(this.form).forEach(item => {
this.form[item] = ''
})
} else {
this.$message.success('新增失败!')
}
})
} else {
this.$message.success('新增失败!')
console.log('error submit!!')
return false
}
})
},
okEdit() {
this.dialogVisibleEdit = false
this.EquipmentList
let data = {
unitName: this.editForm.unitName,
unitChargeName: this.editForm.unitChargeName,
chargePhone: this.editForm.chargePhone,
unitAddress: this.editForm.unitAddress,
socialCode: this.editForm.socialCode,
projectSn: this.projectSn,
type: 2,
id: this.editId
}
editReceiptAndShipmentItem(data).then(res => {
if (res.code == 200) {
this.$message.success('编辑成功!')
this.$refs.editForm.validate(valid => {
if (valid) {
let data = {
unitName: this.editForm.unitName,
unitChargeName: this.editForm.unitChargeName,
chargePhone: this.editForm.chargePhone,
unitAddress: this.editForm.unitAddress,
socialCode: this.editForm.socialCode,
projectSn: this.projectSn,
type: 2,
id: this.editId
}
editReceiptAndShipmentItem(data).then(res => {
if (res.code == 200) {
this.$message.success('编辑成功!')
this.getListData()
this.dialogVisibleEdit = false
} else {
this.$message.success('编辑失败!')
}
})
this.getListData()
} else {
this.$message.success('编辑失败!')
console.log('error submit!!')
return false
}
})
this.getListData()
},
handleClose(done) {
done()
@ -250,7 +262,7 @@ export default {
},
//
deleteBtn(val) {
console.log(val,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
console.log(val, '~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
this.$confirm('确定删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',

View File

@ -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,48 +158,61 @@ export default {
})
},
okAdd() {
let data = {
projectSn: this.projectSn,
goodsName: this.form.goodsName,
unitPrice: this.form.unitPrice,
foldSquare: this.form.foldSquare,
goodsBuckledHeavily: this.form.goodsBuckledHeavily,
goodsInventory: this.form.goodsInventory
}
addTradeNameItem(data).then(res => {
if (res.code == 200) {
this.$message.success('新增成功!')
this.getListData()
this.dialogVisibleAdd = false
Object.keys(this.form).forEach(item => {
this.form[item] = ''
this.$refs.form.validate(valid => {
if (valid) {
let data = {
projectSn: this.projectSn,
goodsName: this.form.goodsName,
unitPrice: this.form.unitPrice,
foldSquare: this.form.foldSquare,
goodsBuckledHeavily: this.form.goodsBuckledHeavily,
goodsInventory: this.form.goodsInventory
}
addTradeNameItem(data).then(res => {
if (res.code == 200) {
this.$message.success('新增成功!')
this.getListData()
this.dialogVisibleAdd = false
Object.keys(this.form).forEach(item => {
this.form[item] = ''
})
} else {
this.$message.success('新增失败!')
}
})
} else {
this.$message.success('新增失败!')
console.log('error submit!!')
return false
}
})
},
okEdit() {
this.dialogVisibleEdit = false
this.EquipmentList
let data = {
goodsName: this.editForm.goodsName,
unitPrice: this.editForm.unitPrice,
foldSquare: this.editForm.foldSquare,
goodsBuckledHeavily: this.editForm.goodsBuckledHeavily,
goodsInventory: this.editForm.goodsInventory,
projectSn: this.projectSn,
id: this.editId
}
editTradeNameItem(data).then(res => {
if (res.code == 200) {
this.$message.success('编辑成功!')
this.$refs.editForm.validate(valid => {
if (valid) {
this.dialogVisibleEdit = false
let data = {
goodsName: this.editForm.goodsName,
unitPrice: this.editForm.unitPrice,
foldSquare: this.editForm.foldSquare,
goodsBuckledHeavily: this.editForm.goodsBuckledHeavily,
goodsInventory: this.editForm.goodsInventory,
projectSn: this.projectSn,
id: this.editId
}
editTradeNameItem(data).then(res => {
if (res.code == 200) {
this.$message.success('编辑成功!')
this.getListData()
} else {
this.$message.success('编辑失败!')
}
})
this.getListData()
} else {
this.$message.success('编辑失败!')
console.log('error submit!!')
return false
}
})
this.getListData()
},
handleClose(done) {
done()