|
@@ -82,6 +82,7 @@
|
|
:precision="4"
|
|
:precision="4"
|
|
:controls="false"
|
|
:controls="false"
|
|
:min="1"
|
|
:min="1"
|
|
|
|
+ onmousewheel="return false;"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</template>
|
|
</template>
|
|
@@ -422,35 +423,9 @@ const submitForm = () => {
|
|
}
|
|
}
|
|
)
|
|
)
|
|
.then(() => {
|
|
.then(() => {
|
|
- const arr = [];
|
|
|
|
- for (
|
|
|
|
- let i = 0;
|
|
|
|
- i < formData.data.supplierPriceList.length;
|
|
|
|
- i++
|
|
|
|
- ) {
|
|
|
|
- const iele = formData.data.supplierPriceList[i];
|
|
|
|
- for (
|
|
|
|
- let j = 0;
|
|
|
|
- j < res.existSupplierPriceList.length;
|
|
|
|
- j++
|
|
|
|
- ) {
|
|
|
|
- const jele = res.existSupplierPriceList[j];
|
|
|
|
- if (iele.productInfoId === jele.productInfoId) {
|
|
|
|
- jele.price = iele.price;
|
|
|
|
- arr.push(jele);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- formData.data.supplierPriceList = arr.map((x) => ({
|
|
|
|
- productInfoId: x.productInfoId,
|
|
|
|
- price: x.price,
|
|
|
|
- }));
|
|
|
|
- formData.data.renewWhileItExists = true;
|
|
|
|
|
|
+ submitData.renewWhileItExists = true;
|
|
proxy
|
|
proxy
|
|
- .post(
|
|
|
|
- "/supplierPrice/" + modalType.value,
|
|
|
|
- formData.data
|
|
|
|
- )
|
|
|
|
|
|
+ .post("/supplierPrice/" + modalType.value, submitData)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
if (res.addSuccess) {
|
|
if (res.addSuccess) {
|
|
ElMessage({
|
|
ElMessage({
|
|
@@ -463,7 +438,9 @@ const submitForm = () => {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
})
|
|
})
|
|
- .catch(() => {});
|
|
|
|
|
|
+ .catch(() => {
|
|
|
|
+ submitLoading.value = false;
|
|
|
|
+ });
|
|
}
|
|
}
|
|
},
|
|
},
|
|
(err) => {
|
|
(err) => {
|
|
@@ -477,9 +454,8 @@ const submitForm = () => {
|
|
formData.data.price = formData.data.supplierPriceList[0].price;
|
|
formData.data.price = formData.data.supplierPriceList[0].price;
|
|
delete formData.data.supplierPriceList;
|
|
delete formData.data.supplierPriceList;
|
|
delete formData.data.supplierInfoIdCopy;
|
|
delete formData.data.supplierInfoIdCopy;
|
|
- proxy
|
|
|
|
- .post("/supplierPrice/" + modalType.value, formData.data)
|
|
|
|
- .then((res) => {
|
|
|
|
|
|
+ proxy.post("/supplierPrice/" + modalType.value, formData.data).then(
|
|
|
|
+ (res) => {
|
|
ElMessage({
|
|
ElMessage({
|
|
message: "修改成功",
|
|
message: "修改成功",
|
|
type: "success",
|
|
type: "success",
|
|
@@ -487,7 +463,11 @@ const submitForm = () => {
|
|
getList();
|
|
getList();
|
|
dialogVisible.value = false;
|
|
dialogVisible.value = false;
|
|
submitLoading.value = false;
|
|
submitLoading.value = false;
|
|
- });
|
|
|
|
|
|
+ },
|
|
|
|
+ (err) => {
|
|
|
|
+ submitLoading.value = false;
|
|
|
|
+ }
|
|
|
|
+ );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|