新购到货新增2

This commit is contained in:
zzyuan 2024-11-06 17:13:40 +08:00
parent 39a97186b0
commit c28fcbab24
2 changed files with 19 additions and 18 deletions

View File

@ -27,6 +27,15 @@ export function addPurchaseCheckInfo(data) {
})
}
// 新购到货-编辑
export function updatePurchaseCheckInfo(data) {
return request({
url: '/material/purchase_check_info',
method: 'put',
data: data,
})
}
//通知人员列表
export function getNoticePeople(query) {
return request({
@ -44,8 +53,6 @@ export function delPeople(ids) {
})
}
// 人员管理--新增
export function addNoticeUser(data) {
return request({

View File

@ -40,7 +40,7 @@
<el-date-picker
v-model="maForm.productionTime"
style="width: 240px"
value-format="yyyy-MM-dd hh:mm:ss"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
type="date"
placeholder="请选择出厂日期"
@ -200,9 +200,8 @@
<el-date-picker
v-model="scope.row.productionTime"
style="width: 100%"
value-format="yyyy-MM-dd hh:mm:ss"
type="date"
range-separator="-"
value-format="yyyy-MM-dd"
type="date"
placeholder="出厂日期"
clearable
></el-date-picker>
@ -630,7 +629,7 @@ export default {
this.maForm.remark = response.data.purchaseCheckInfo.remark
this.maForm.taxRate = response.data.purchaseCheckInfo.taxRate
// this.maForm.purchaseNumber = response.data.purchaseNumber
this.maForm.productionTime = response.data.purchaseCheckInfo.productionTime
// this.maForm.productionTime = response.data.purchaseCheckInfo.productionTime
this.equipmentList = response.data.purchaseCheckDetailsList
console.log(this.equipmentList)
// this.loading = false;
@ -730,11 +729,8 @@ export default {
if (this.equipmentList.length > 0) {
this.$refs['maForm'].validate((valid) => {
if (valid) {
this.maForm.taskId = this.taskId
this.maForm.checkDetailsList = this.equipmentList
// console.log(this.maForm)
if (this.equipmentList.length > 0) {
// this.maForm.checkDetailsList = this.equipmentList
this.$modal
.confirm('是否确认保存当前页面')
.then(function () {})
@ -743,7 +739,7 @@ export default {
console.log('编辑')
this.loading = true
updatePurchaseCheckInfo(
this.maForm,
{purchaseCheckDetailsList: this.equipmentList,purchaseCheckInfo:this.maForm}
).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess(
@ -763,7 +759,7 @@ export default {
console.log('新增')
this.loading = true
addPurchaseCheckInfo(
{purchaseCheckDetailsList: this.maForm.checkDetailsList,purchaseCheckInfo:this.maForm}
{purchaseCheckDetailsList: this.equipmentList,purchaseCheckInfo:this.maForm}
).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess(
@ -782,14 +778,12 @@ export default {
}
})
.catch(() => {})
} else {
this.$modal.msgError(
'请先选择并添加机具类型!!!',
)
}
}
})
} else {
this.$modal.msgError('请先添加机具类型')
}
},