|
@@ -1371,6 +1371,21 @@ const querySearch = (queryString, callback) => {
|
|
|
const handleSubmit = async () => {
|
|
|
let status = await submit.value.handleSubmit(() => {});
|
|
|
if (status) {
|
|
|
+ // 合同交接单不可大于待采购数量
|
|
|
+ if (route.query.type == 1) {
|
|
|
+ for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
|
|
|
+ const ele = formData.data.purchaseProductList[i];
|
|
|
+ for (let j = 0; j < ele.purchaseProductMountingsList.length; j++) {
|
|
|
+ const jele = ele.purchaseProductMountingsList[j];
|
|
|
+ if (j == 0) {
|
|
|
+ if (Number(jele.quantity) > Number(jele.oldQuantity)) {
|
|
|
+ ElMessage("采购数量不能大于待采购数量");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if (
|
|
|
formData.data.purchaseArrivalList &&
|
|
|
formData.data.purchaseArrivalList.length > 0
|
|
@@ -1486,6 +1501,7 @@ onMounted(() => {
|
|
|
productName: item.productName,
|
|
|
productModel: item.productModel,
|
|
|
quantity: item.expendQuantity,
|
|
|
+ oldQuantity: item.expendQuantity,
|
|
|
price: "",
|
|
|
amount: "",
|
|
|
remark: "",
|
|
@@ -1500,6 +1516,7 @@ onMounted(() => {
|
|
|
productName: item.productName,
|
|
|
productModel: item.productModel,
|
|
|
quantity: item.expendQuantity,
|
|
|
+ oldQuantity: item.expendQuantity,
|
|
|
price: undefined,
|
|
|
amount: "",
|
|
|
remark: "",
|