修改bug
This commit is contained in:
parent
04f091d6c4
commit
03efda8ce4
|
|
@ -12,21 +12,6 @@
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-button @click="handleCheckWuliao">选择物料</a-button>
|
<a-button @click="handleCheckWuliao">选择物料</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- <a-col :span="24">
|
|
||||||
<a-form-item label="物料" v-bind="validateInfos.wlId" id="BlWarehouseMaterialInfoForm-wlId" name="wlId" >
|
|
||||||
<j-select-multiple type="list_multi" v-model:value="formData.wlId" dictCode="nu_config_material_info,material_name,id,iz_enabled = '0' and del_flag = '0'" placeholder="请选择物料" :disabled="formData.id != ''" :triggerChange="false"/>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24">
|
|
||||||
<a-form-item label="物料上限" v-bind="validateInfos.upperLimit" id="BlWarehouseMaterialInfoForm-upperLimit" name="upperLimit">
|
|
||||||
<a-input v-model:value="formData.upperLimit" placeholder="请输入物料上限" ></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24">
|
|
||||||
<a-form-item label="物料下限" v-bind="validateInfos.lowerLimit" id="BlWarehouseMaterialInfoForm-lowerLimit" name="lowerLimit">
|
|
||||||
<a-input v-model:value="formData.lowerLimit" placeholder="请输入物料下限" ></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col> -->
|
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -39,10 +24,10 @@
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ column, text ,record }">
|
<template #bodyCell="{ column, text ,record }">
|
||||||
<template v-if="column.dataIndex === 'upperLimit'">
|
<template v-if="column.dataIndex === 'upperLimit'">
|
||||||
<a-input-number :value="text" placeholder="物料上限" min="0" max="999" @change="(value) => handleInputChange(record, 'arrivalPrice', value)" />
|
<a-input-number :value="text" placeholder="物料上限" min="0" max="999" @change="(value) => handleInputChange(record, 'upperLimit', value)" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'lowerLimit'">
|
<template v-if="column.dataIndex === 'lowerLimit'">
|
||||||
<a-input-number :value="text" placeholder="物料上限" min="0" max="999" @change="(value) => handleInputChange(record, 'arrivalPrice', value)" />
|
<a-input-number :value="text" placeholder="物料上限" min="0" max="999" @change="(value) => handleInputChange(record, 'lowerLimit', value)" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'action'">
|
<template v-if="column.dataIndex === 'action'">
|
||||||
<a @click="deleteWlxx(record)">删除</a>
|
<a @click="deleteWlxx(record)">删除</a>
|
||||||
|
|
@ -110,6 +95,7 @@
|
||||||
|
|
||||||
//修改物料上限下限
|
//修改物料上限下限
|
||||||
const handleInputChange = (record, field, value) => {
|
const handleInputChange = (record, field, value) => {
|
||||||
|
console.log("🚀 ~ handleInputChange ~ record, field, value:", record, field, value)
|
||||||
// 更新当前行的数据
|
// 更新当前行的数据
|
||||||
record[field] = value;
|
record[field] = value;
|
||||||
};
|
};
|
||||||
|
|
@ -174,7 +160,18 @@ function deleteWlxx(record){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var list2 = [];
|
var list2 = [];
|
||||||
|
var sfjx = "0";
|
||||||
for(let item of list){
|
for(let item of list){
|
||||||
|
if(!item.upperLimit){
|
||||||
|
createMessage.error('您有未填写的物料上限,请检查后提交!');
|
||||||
|
sfjx = "1";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(!item.lowerLimit){
|
||||||
|
createMessage.error('您有未填写的物料下限,请检查后提交!');
|
||||||
|
sfjx = "1";
|
||||||
|
break;
|
||||||
|
}
|
||||||
var insParams = {}
|
var insParams = {}
|
||||||
insParams.nuId = formData.nuId;
|
insParams.nuId = formData.nuId;
|
||||||
insParams.wlId = item.id;
|
insParams.wlId = item.id;
|
||||||
|
|
@ -183,6 +180,9 @@ function deleteWlxx(record){
|
||||||
insParams.kcsl = '0';
|
insParams.kcsl = '0';
|
||||||
list2.push(insParams);
|
list2.push(insParams);
|
||||||
}
|
}
|
||||||
|
if(sfjx == "1"){
|
||||||
|
return;
|
||||||
|
}
|
||||||
defHttp.post({url:'/invoicing/blWarehouseMaterialInfo/addBatch',params:list2}).then(res=>{
|
defHttp.post({url:'/invoicing/blWarehouseMaterialInfo/addBatch',params:list2}).then(res=>{
|
||||||
console.log("🚀 ~ submitForm ~ res:", res)
|
console.log("🚀 ~ submitForm ~ res:", res)
|
||||||
emit('ok');
|
emit('ok');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue