|
@@ -4,11 +4,16 @@
|
|
|
<page-title>返回</page-title>
|
|
|
<div class="form">
|
|
|
<div class="form_box">
|
|
|
- <dil-form :formId="112" v-model="form1" ref="from1" @change="onchange"></dil-form>
|
|
|
+ <dil-form
|
|
|
+ :formId="112"
|
|
|
+ v-model="form1"
|
|
|
+ ref="from1"
|
|
|
+ @change="onchange"
|
|
|
+ ></dil-form>
|
|
|
</div>
|
|
|
<div class="liulan">
|
|
|
- <el-button type="primary" class="btn" @click="onDrawer">浏览</el-button>
|
|
|
- </div>
|
|
|
+ <el-button type="primary" class="btn" @click="onDrawer">浏览</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<!-- 确定和取消 -->
|
|
|
<div class="button_box">
|
|
@@ -22,100 +27,175 @@
|
|
|
:before-close="handleClose"
|
|
|
size="50%"
|
|
|
>
|
|
|
- <el-input placeholder="请输入内容" v-model="input" style="margin-top:10px;margin-left:20px;width:250px" clearable> </el-input>
|
|
|
- <el-button type="primary" class="btn" @click="onclick()" style="margin-bottom:15px">
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入内容"
|
|
|
+ v-model="input"
|
|
|
+ style="margin-top: 10px; margin-left: 20px; width: 250px"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ class="btn"
|
|
|
+ @click="onclick()"
|
|
|
+ style="margin-bottom: 15px"
|
|
|
+ >
|
|
|
<i class="el-icon-search"></i>查询
|
|
|
</el-button>
|
|
|
- <dilTable v-bind.sync="options" @radio-change="currentRadioChange1" ></dilTable>
|
|
|
+ <dilTable
|
|
|
+ v-bind.sync="options"
|
|
|
+ @radio-change="currentRadioChange1"
|
|
|
+ ></dilTable>
|
|
|
</el-drawer>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import PageTitle from "@/components/Page/Title";
|
|
|
-import { sjTime,isNumber } from "@/utils/sharedJsFile";
|
|
|
+import { sjTime, isNumber } from "@/utils/sharedJsFile";
|
|
|
import { getCookie } from "@/utils/util.js";
|
|
|
export default {
|
|
|
components: { PageTitle },
|
|
|
data() {
|
|
|
return {
|
|
|
- input:'',
|
|
|
- drawer:false,
|
|
|
- direction:"rtl",
|
|
|
- batchId:"",
|
|
|
+ input: "",
|
|
|
+ drawer: false,
|
|
|
+ direction: "rtl",
|
|
|
+ batchId: "",
|
|
|
form1: {},
|
|
|
- options:{
|
|
|
- requestUrl:"/api/v1/tms/getBatchListForAttorney?apiId=375",
|
|
|
- selectionType:"radio",
|
|
|
- maplist:[]
|
|
|
+ options: {
|
|
|
+ requestUrl: "/api/v1/tms/getBatchListForAttorney?apiId=375",
|
|
|
+ selectionType: "radio",
|
|
|
+ maplist: [],
|
|
|
},
|
|
|
value: undefined,
|
|
|
+ value2: undefined,
|
|
|
+ value4: undefined,
|
|
|
+ value5: undefined,
|
|
|
+ value6: undefined,
|
|
|
+ value7: undefined,
|
|
|
+ value8: undefined,
|
|
|
};
|
|
|
},
|
|
|
mounted() {},
|
|
|
methods: {
|
|
|
- onDrawer(){
|
|
|
- this.drawer = true
|
|
|
- },
|
|
|
- onchange(val){
|
|
|
-
|
|
|
+ onDrawer() {
|
|
|
+ this.drawer = true;
|
|
|
},
|
|
|
- onclick(){
|
|
|
- this.options.requestUrl = "/api/v1/tms/getBatchList?apiId=375&con=" + this.input
|
|
|
+ onchange(val) {},
|
|
|
+ onclick() {
|
|
|
+ this.options.requestUrl =
|
|
|
+ "/api/v1/tms/getBatchList?apiId=375&con=" + this.input;
|
|
|
},
|
|
|
- currentRadioChange1(selection){
|
|
|
- this.maplist = selection
|
|
|
- this.form1 = { batchId:selection.resultForeignShipName + selection.materialName}
|
|
|
- this.batchId = selection.batchId;
|
|
|
+ currentRadioChange1(selection) {
|
|
|
+ this.maplist = selection;
|
|
|
+ this.form1 = {
|
|
|
+ batchId: selection.resultForeignShipName + selection.materialName,
|
|
|
+ };
|
|
|
+ this.batchId = selection.batchId;
|
|
|
},
|
|
|
- handleClose(done){
|
|
|
- done();
|
|
|
+ handleClose(done) {
|
|
|
+ done();
|
|
|
},
|
|
|
- makeSure() {
|
|
|
+ makeSure() {
|
|
|
// 判断批次号选择是否为空
|
|
|
- if(this.batchId==""||this.batchId==undefined){
|
|
|
- this.$message.warning("请选择批次号")
|
|
|
- return
|
|
|
+ if (this.batchId == "" || this.batchId == undefined) {
|
|
|
+ this.$message.warning("请选择批次号");
|
|
|
+ return;
|
|
|
}
|
|
|
let map = {
|
|
|
- carrierId:this.form1.carrierId,
|
|
|
- requesterGroupId:this.form1.requesterGroupId,
|
|
|
- noticeCommerceMethod:this.form1.noticeCommerceMethod,
|
|
|
- noticeHandoverMethod:this.form1.noticeHandoverMethod,
|
|
|
- portId:this.form1.portId,
|
|
|
- noticePortConstructionFee:this.form1.noticePortConstructionFee,
|
|
|
- noticeDeliveryTime:sjTime(this.form1.noticeDeliveryTime),
|
|
|
- noticePileFreeDays:this.form1.noticePileFreeDays,
|
|
|
- batchId:this.batchId,
|
|
|
- purchaseContractUnitPrice:this.form1.purchaseContractUnitPrice,
|
|
|
- purchaseContractMoisture:this.form1.purchaseContractMoisture,
|
|
|
- purchaseContractQualityindex:this.form1.purchaseContractQualityindex,
|
|
|
- //微元素含量
|
|
|
- tfeContent:this.form1.tfeContent,
|
|
|
- silicaContent:this.form1.silicaContent,
|
|
|
- aluminaContent:this.form1.aluminaContent,
|
|
|
- phosphorusContent:this.form1.phosphorusContent,
|
|
|
- manganeseContent:this.form1.manganeseContent,
|
|
|
- userId:getCookie("userId")
|
|
|
-
|
|
|
+ carrierId: this.form1.carrierId,
|
|
|
+ requesterGroupId: this.form1.requesterGroupId,
|
|
|
+ noticeCommerceMethod: this.form1.noticeCommerceMethod,
|
|
|
+ noticeHandoverMethod: this.form1.noticeHandoverMethod,
|
|
|
+ portId: this.form1.portId,
|
|
|
+ noticePortConstructionFee: this.form1.noticePortConstructionFee,
|
|
|
+ noticeDeliveryTime: sjTime(this.form1.noticeDeliveryTime),
|
|
|
+ noticePileFreeDays: this.form1.noticePileFreeDays,
|
|
|
+ batchId: this.batchId,
|
|
|
+ purchaseContractUnitPrice: this.form1.purchaseContractUnitPrice,
|
|
|
+ purchaseContractMoisture: this.form1.purchaseContractMoisture,
|
|
|
+ //微元素含量
|
|
|
+ tfeContent: this.form1.tfeContent,
|
|
|
+ silicaContent: this.form1.silicaContent,
|
|
|
+ aluminaContent: this.form1.aluminaContent,
|
|
|
+ phosphorusContent: this.form1.phosphorusContent,
|
|
|
+ manganeseContent: this.form1.manganeseContent,
|
|
|
+ userId: getCookie("userId"),
|
|
|
};
|
|
|
- console.log(map)
|
|
|
+
|
|
|
+ //判断放货数量是否为数字
|
|
|
+ function isNumber() {
|
|
|
+ var value = map.noticePileFreeDays;
|
|
|
+ var value2 = map.purchaseContractUnitPrice;
|
|
|
+ var value4 = map.tfeContent;
|
|
|
+ var value5 = map.silicaContent;
|
|
|
+ var value6 = map.aluminaContent;
|
|
|
+ var value7 = map.phosphorusContent;
|
|
|
+ var value8 = map.manganeseContent;
|
|
|
+ //验证是否为数字
|
|
|
+ var patrn = /^(-)?\d+(\.\d+)?$/;
|
|
|
+ if (patrn.exec(value) == null || value == "") {
|
|
|
+ return false;
|
|
|
+ } else if (patrn.exec(value2) == null || value2 == "") {
|
|
|
+ return false;
|
|
|
+ } else if (patrn.exec(value4) == null || value4 == "") {
|
|
|
+ return false;
|
|
|
+ } else if (patrn.exec(value5) == null || value5 == "") {
|
|
|
+ return false;
|
|
|
+ } else if (patrn.exec(value6) == null || value6 == "") {
|
|
|
+ return false;
|
|
|
+ } else if (patrn.exec(value7) == null || value7 == "") {
|
|
|
+ return false;
|
|
|
+ } else if (patrn.exec(value8) == null || value8 == "") {
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //定义变量
|
|
|
+ var val = this.value;
|
|
|
+ var val2 = this.value2;
|
|
|
+ var val4 = this.value4;
|
|
|
+ var val5 = this.value5;
|
|
|
+ var val6 = this.value6;
|
|
|
+ var val7 = this.value7;
|
|
|
+ var val8 = this.value8;
|
|
|
if (
|
|
|
- // AmsshipDeliveryAttorney.attorneyId==null||
|
|
|
- // AmsshipDeliveryAttorney.downSwimPortId==null||
|
|
|
- // AmsshipDeliveryAttorney.attorenyPickupIdcard==null||
|
|
|
- // AmsshipDeliveryAttorney.attorneyContactTelephone==null||
|
|
|
- // AmsshipDeliveryAttorney.attorneyTime==null||
|
|
|
- // AmsshipDeliveryAttorney.attorneyPdffile==null
|
|
|
- map.noticeHandoverMethod==null
|
|
|
- ) this.$message.error("存在空值!");
|
|
|
+ map.noticeCommerceMethod == null ||
|
|
|
+ map.noticeHandoverMethod == null ||
|
|
|
+ map.noticePortConstructionFee == null ||
|
|
|
+ map.noticeDeliveryTime == null ||
|
|
|
+ map.noticePileFreeDays == null ||
|
|
|
+ map.purchaseContractUnitPrice == null ||
|
|
|
+ map.purchaseContractMoisture == null ||
|
|
|
+ map.tfeContent == null ||
|
|
|
+ map.silicaContent == null ||
|
|
|
+ map.aluminaContent == null ||
|
|
|
+ map.phosphorusContent == null ||
|
|
|
+ map.manganeseContent == null
|
|
|
+ )
|
|
|
+ this.$message.error("存在空值!");
|
|
|
+ else if (!isNumber(val)) this.$message.warning("免堆天数必须为数字");
|
|
|
+ else if (!isNumber(val2)) this.$message.warning("单价必须为数字");
|
|
|
+ else if (!isNumber(val4)) this.$message.warning("TFe含量必须为数字");
|
|
|
+ else if (!isNumber(val5)) this.$message.warning("二氧化硅含量必须为数字");
|
|
|
+ else if (!isNumber(val6)) this.$message.warning("氧化铝含量必须为数字");
|
|
|
+ else if (!isNumber(val7)) this.$message.warning("磷含量必须为数字");
|
|
|
+ else if (!isNumber(val8)) this.$message.warning("锰含量必须为数字");
|
|
|
else
|
|
|
- this.axios
|
|
|
- .post(
|
|
|
- "/api/v1/tms/insertDeliveryNotice",
|
|
|
- map
|
|
|
- )
|
|
|
- .then((res) => {
|
|
|
+ this.axios.post("/api/v1/tms/insertDeliveryNotice", map).then((res) => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ // this.$router.push("/ship/cargoResult");
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "新增成功",
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.data.data,
|
|
|
+ });
|
|
|
+ }
|
|
|
this.$router.go(-1);
|
|
|
});
|
|
|
},
|
|
@@ -127,26 +207,26 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style lang='scss'>
|
|
|
-.shipTransport{
|
|
|
- .form{
|
|
|
+.shipTransport {
|
|
|
+ .form {
|
|
|
display: flex;
|
|
|
- .form_box{
|
|
|
+ .form_box {
|
|
|
width: 320px;
|
|
|
margin-left: 35%;
|
|
|
margin-top: 30px;
|
|
|
margin-right: 20px;
|
|
|
- .el-form{
|
|
|
- .preview-group{
|
|
|
- .el-form-item{
|
|
|
- .el-form-item__label{
|
|
|
+ .el-form {
|
|
|
+ .preview-group {
|
|
|
+ .el-form-item {
|
|
|
+ .el-form-item__label {
|
|
|
display: inline-block;
|
|
|
width: 70px !important;
|
|
|
}
|
|
|
- .el-form-item__content{
|
|
|
- .el-select{
|
|
|
+ .el-form-item__content {
|
|
|
+ .el-select {
|
|
|
width: 250px;
|
|
|
}
|
|
|
- .el-input{
|
|
|
+ .el-input {
|
|
|
width: 250px;
|
|
|
}
|
|
|
}
|
|
@@ -155,24 +235,24 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .liulan{
|
|
|
- width: 120px;
|
|
|
- margin-top: 30px;
|
|
|
- .el-button{
|
|
|
- width: 100px !important;
|
|
|
- margin: auto;
|
|
|
- }
|
|
|
- .btn{
|
|
|
- margin-top: 0px;
|
|
|
- }
|
|
|
- .btn1{
|
|
|
- margin-top: 13px;
|
|
|
- }
|
|
|
- .btn2{
|
|
|
- margin-top: 67px;
|
|
|
- }
|
|
|
+ .liulan {
|
|
|
+ width: 120px;
|
|
|
+ margin-top: 30px;
|
|
|
+ .el-button {
|
|
|
+ width: 100px !important;
|
|
|
+ margin: auto;
|
|
|
+ }
|
|
|
+ .btn {
|
|
|
+ margin-top: 0px;
|
|
|
+ }
|
|
|
+ .btn1 {
|
|
|
+ margin-top: 13px;
|
|
|
+ }
|
|
|
+ .btn2 {
|
|
|
+ margin-top: 67px;
|
|
|
+ }
|
|
|
}
|
|
|
- .button_box{
|
|
|
+ .button_box {
|
|
|
margin-left: 45%;
|
|
|
}
|
|
|
}
|