|
@@ -178,7 +178,7 @@
|
|
|
<!-- 确定和取消 -->
|
|
|
<div class="button_box">
|
|
|
<el-button @click="cancel">取消</el-button>
|
|
|
- <el-button type="primary" @click="makeSure">确定</el-button>
|
|
|
+ <el-button type="primary" @click="makeSure" :loading="isLoading">确定</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -191,10 +191,11 @@ export default {
|
|
|
components: { PageTitle },
|
|
|
data() {
|
|
|
return {
|
|
|
+ isLoading:false,
|
|
|
a: 1,
|
|
|
cargoPictureUrl: "",
|
|
|
shippingCertificate: "",
|
|
|
- portId:"",
|
|
|
+ portId:null,
|
|
|
ports:[],
|
|
|
materialType: "",
|
|
|
receiver: "",
|
|
@@ -349,16 +350,20 @@ export default {
|
|
|
// this.$message.warning("请选择送达单位");
|
|
|
// return;
|
|
|
// }
|
|
|
+ this.isLoading=true;
|
|
|
if (this.second2.mapList3.length == 0) {
|
|
|
this.$message.warning("请选择收货人");
|
|
|
+ this.isLoading=false;
|
|
|
return;
|
|
|
}
|
|
|
if (this.second3.mapList4.length == 0) {
|
|
|
this.$message.warning("请选择物资品类");
|
|
|
+ this.isLoading=false;
|
|
|
return;
|
|
|
}
|
|
|
if (this.second5.mapList5.length == 0) {
|
|
|
this.$message.warning("请选择批次");
|
|
|
+ this.isLoading=false;
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -428,7 +433,7 @@ export default {
|
|
|
map.resultContactPerson == null ||
|
|
|
map.resultTelephoneFax == null ||
|
|
|
map.resultNumberOfLoans == null ||
|
|
|
- //map.carrierId == null ||
|
|
|
+ map.portId == null ||
|
|
|
map.groupId == null ||
|
|
|
map.inFactoryShipName == null ||
|
|
|
map.isNeedPortDisCharge == null ||
|
|
@@ -437,10 +442,12 @@ export default {
|
|
|
// map.materialId==null
|
|
|
) {
|
|
|
this.$message.error("存在空值!");
|
|
|
+ this.isLoading=false;
|
|
|
return;
|
|
|
}
|
|
|
if (!isTelePhone(val2)) {
|
|
|
this.$message.warning("电话号码或传真格式不正确");
|
|
|
+ this.isLoading=false;
|
|
|
return;
|
|
|
}
|
|
|
if (
|
|
@@ -448,6 +455,7 @@ export default {
|
|
|
!isNumber(map.noticePortConstructionFee)
|
|
|
) {
|
|
|
this.$message.error("港建费金额得为数字");
|
|
|
+ this.isLoading=false;
|
|
|
return;
|
|
|
}
|
|
|
if (
|
|
@@ -455,6 +463,7 @@ export default {
|
|
|
!isNumber(map.purchaseContractMoisture)
|
|
|
) {
|
|
|
this.$message.error("合同水分得为数字");
|
|
|
+ this.isLoading=false;
|
|
|
return;
|
|
|
}
|
|
|
if (
|
|
@@ -462,6 +471,7 @@ export default {
|
|
|
!isNumber(map.noticePortConstructionFee)
|
|
|
) {
|
|
|
this.$message.error("港建费金额得为数字");
|
|
|
+ this.isLoading=false;
|
|
|
return;
|
|
|
}
|
|
|
if (
|
|
@@ -469,6 +479,7 @@ export default {
|
|
|
!isNumber(map.noticePileFreeDays)
|
|
|
) {
|
|
|
this.$message.error("免堆天数得为数字");
|
|
|
+ this.isLoading=false;
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -477,10 +488,12 @@ export default {
|
|
|
!isNumber(map.purchaseContractUnitPrice)
|
|
|
) {
|
|
|
this.$message.error("单价得为数字");
|
|
|
+ this.isLoading=false;
|
|
|
return;
|
|
|
}
|
|
|
if (typeof map.tfeContent != "undefined" && !isNumber(map.tfeContent)) {
|
|
|
this.$message.error("tfe含量得为数字");
|
|
|
+ this.isLoading=false;
|
|
|
return;
|
|
|
}
|
|
|
if (
|
|
@@ -488,6 +501,7 @@ export default {
|
|
|
!isNumber(map.silicaContent)
|
|
|
) {
|
|
|
this.$message.error("二氧化硅含量得为数字");
|
|
|
+ this.isLoading=false;
|
|
|
return;
|
|
|
}
|
|
|
if (
|
|
@@ -495,6 +509,7 @@ export default {
|
|
|
!isNumber(map.aluminaContent)
|
|
|
) {
|
|
|
this.$message.error("氧化铝含量得为数字");
|
|
|
+ this.isLoading=false;
|
|
|
return;
|
|
|
}
|
|
|
if (
|
|
@@ -502,6 +517,7 @@ export default {
|
|
|
!isNumber(map.phosphorusContent)
|
|
|
) {
|
|
|
this.$message.error("含磷量得为数字");
|
|
|
+ this.isLoading=false;
|
|
|
return;
|
|
|
}
|
|
|
if (
|
|
@@ -509,6 +525,7 @@ export default {
|
|
|
!isNumber(map.resultNumberOfLoans)
|
|
|
) {
|
|
|
this.$message.error("放货数量得为数字");
|
|
|
+ this.isLoading=false;
|
|
|
return;
|
|
|
} else
|
|
|
this.axios.post("/api/v1/tms/insertDeliveryNotice", map).then((res) => {
|
|
@@ -517,13 +534,14 @@ export default {
|
|
|
type: "success",
|
|
|
message: "新增成功",
|
|
|
});
|
|
|
+ this.cancel();
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
message: res.data.data,
|
|
|
});
|
|
|
}
|
|
|
- this.$router.go(-1);
|
|
|
+ this.isLoading=false;
|
|
|
});
|
|
|
},
|
|
|
// 取消
|