|
@@ -3,54 +3,71 @@
|
|
<div class="shipTransport">
|
|
<div class="shipTransport">
|
|
<page-title>返回</page-title>
|
|
<page-title>返回</page-title>
|
|
<!-- 第一部分 -->
|
|
<!-- 第一部分 -->
|
|
- <div class="top">
|
|
|
|
- <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
|
|
|
|
- <el-button type="primary" class="btn" @click="onclick()">
|
|
|
|
- <i class="el-icon-search"></i>查询
|
|
|
|
- </el-button>
|
|
|
|
- </div>
|
|
|
|
- <dilTable v-bind.sync="option" @radio-change="currentRadioChange">
|
|
|
|
- </dilTable>
|
|
|
|
|
|
+ <div class="top">
|
|
|
|
+ <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
|
|
|
|
+ <el-button type="primary" class="btn" @click="onclick()">
|
|
|
|
+ <i class="el-icon-search"></i>查询
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <dilTable v-bind.sync="option" @radio-change="currentRadioChange">
|
|
|
|
+ </dilTable>
|
|
<div class="form">
|
|
<div class="form">
|
|
<!-- 第二部分 -->
|
|
<!-- 第二部分 -->
|
|
<div class="form_box">
|
|
<div class="form_box">
|
|
- <dil-form :formId="128" v-model="form"></dil-form>
|
|
|
|
|
|
+ <dil-form :formId="128" v-model="form"></dil-form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 下方内容 -->
|
|
<!-- 下方内容 -->
|
|
<div class="other">
|
|
<div class="other">
|
|
<el-form :inline="true">
|
|
<el-form :inline="true">
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <label class="el-form-item__label" style="width: auto;">含水率</label>
|
|
|
|
|
|
+ <label class="el-form-item__label" style="width: auto">含水率</label>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-input placeholder="" v-model="resultMoistureContent"></el-input>
|
|
|
|
|
|
+ <el-input placeholder="" v-model="resultMoistureContent"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
-
|
|
|
|
- <el-form-item>
|
|
|
|
- <label class="el-form-item__label" style="width: auto;">合同水分值</label>
|
|
|
|
|
|
+
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <label class="el-form-item__label" style="width: auto"
|
|
|
|
+ >合同水分值</label
|
|
|
|
+ >
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-input placeholder="" v-model="contractMoistureValue" :disabled="true"></el-input>
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder=""
|
|
|
|
+ v-model="contractMoistureValue"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ ></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <label class="el-form-item__label" style="width: auto;">实装吨位</label>
|
|
|
|
|
|
+ <label class="el-form-item__label" style="width: auto"
|
|
|
|
+ >实装吨位</label
|
|
|
|
+ >
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-input placeholder="" v-model="realWeight" :disabled="true"></el-input>
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder=""
|
|
|
|
+ v-model="realWeight"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ ></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <label class="el-form-item__label" style="width: auto;">水分吨位</label>
|
|
|
|
|
|
+ <label class="el-form-item__label" style="width: auto"
|
|
|
|
+ >水分吨位</label
|
|
|
|
+ >
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-input placeholder="" v-model="moistureTonnage" :disabled="true"></el-input>
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder=""
|
|
|
|
+ v-model="moistureTonnage"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ ></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
- <el-button type="primary" @click="makeSure">新增水分质检信息</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="makeSure">新增水分质检信息</el-button>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -61,11 +78,12 @@ export default {
|
|
components: { PageTitle },
|
|
components: { PageTitle },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- resultMoistureContent:'',
|
|
|
|
- contractMoistureValue:'',
|
|
|
|
- realWeight:'',
|
|
|
|
- moistureTonnage:'',
|
|
|
|
- input:'',
|
|
|
|
|
|
+ resultMoistureContent: null,
|
|
|
|
+ contractMoistureValue: "",
|
|
|
|
+ realWeight: "",
|
|
|
|
+ batchId: null,
|
|
|
|
+ moistureTonnage: "",
|
|
|
|
+ input: "",
|
|
restaurants: [],
|
|
restaurants: [],
|
|
state: "",
|
|
state: "",
|
|
form: {},
|
|
form: {},
|
|
@@ -74,124 +92,139 @@ export default {
|
|
requestUrl: "/api/v1/tms/getCapacityList?apiId=138",
|
|
requestUrl: "/api/v1/tms/getCapacityList?apiId=138",
|
|
// 控制显示当选列
|
|
// 控制显示当选列
|
|
selectionType: "radio",
|
|
selectionType: "radio",
|
|
- waterQualityMap:[],
|
|
|
|
- },
|
|
|
|
|
|
+ waterQualityMap: []
|
|
|
|
+ }
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- mounted() {
|
|
|
|
|
|
+ watch: {
|
|
|
|
+ resultMoistureContent() {
|
|
|
|
+ this.pipeiContarct();
|
|
|
|
+ },
|
|
|
|
+ batchId() {
|
|
|
|
+ this.pipeiContarct();
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
+ mounted() {},
|
|
methods: {
|
|
methods: {
|
|
currentRadioChange(row) {
|
|
currentRadioChange(row) {
|
|
- this.waterQualityMap=row
|
|
|
|
- //console.log("waterQualityMap",this.waterQualityMap)
|
|
|
|
- if(this.resultMoistureContent!=null&&this.resultMoistureContent!=''){
|
|
|
|
-
|
|
|
|
- let map={
|
|
|
|
- batchId:this.waterQualityMap.batchId,
|
|
|
|
- resultMoistureContent:this.resultMoistureContent
|
|
|
|
|
|
+ this.waterQualityMap = row;
|
|
|
|
+ this.batchId = this.waterQualityMap.batchId;
|
|
|
|
+ this.pipeiContarct();
|
|
|
|
+ },
|
|
|
|
+ pipeiContarct() {
|
|
|
|
+ if (
|
|
|
|
+ this.resultMoistureContent != null &&
|
|
|
|
+ this.resultMoistureContent != ""
|
|
|
|
+ ) {
|
|
|
|
+ let map = {
|
|
|
|
+ batchId: this.waterQualityMap.batchId,
|
|
|
|
+ resultMoistureContent: this.resultMoistureContent
|
|
};
|
|
};
|
|
- console.log(map)
|
|
|
|
this.axios
|
|
this.axios
|
|
- .post(
|
|
|
|
- "/api/v1/tms/getMoistureAndInstallations",map
|
|
|
|
- )
|
|
|
|
- .then((res) => {
|
|
|
|
|
|
+ .post("/api/v1/tms/getMoistureAndInstallations", map)
|
|
|
|
+ .then(res => {
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
- console.log("res",res.data.data)
|
|
|
|
- this.contractMoistureValue=res.data.data.purchaseContractMoisture;
|
|
|
|
- this.realWeight=res.data.data.resultActualInstallations;
|
|
|
|
- this.moistureTonnage=res.data.data.resultWaterTonnage;
|
|
|
|
|
|
+ this.contractMoistureValue =
|
|
|
|
+ res.data.data.purchaseContractMoisture;
|
|
|
|
+ this.realWeight = res.data.data.resultActualInstallations;
|
|
|
|
+ this.moistureTonnage = res.data.data.resultWaterTonnage;
|
|
// this.$refs.table.refreshData();
|
|
// this.$refs.table.refreshData();
|
|
} else {
|
|
} else {
|
|
this.$message.error("失败!");
|
|
this.$message.error("失败!");
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
},
|
|
},
|
|
// 新增
|
|
// 新增
|
|
makeSure() {
|
|
makeSure() {
|
|
let mapVal = {
|
|
let mapVal = {
|
|
- resultPlannedDate: sjTime(
|
|
|
|
- this.form.planDate
|
|
|
|
- ),
|
|
|
|
- expectNoticeDate:sjTime(
|
|
|
|
- this.form.expectNoticeDate
|
|
|
|
- ),
|
|
|
|
|
|
+ resultPlannedDate: sjTime(this.form.planDate),
|
|
|
|
+ expectNoticeDate: sjTime(this.form.expectNoticeDate),
|
|
resultEmptyHeavyWaterMeter: this.form.resultEmptyHeavyWaterMeter,
|
|
resultEmptyHeavyWaterMeter: this.form.resultEmptyHeavyWaterMeter,
|
|
- resultMoistureContent:this.resultMoistureContent,
|
|
|
|
|
|
+ resultMoistureContent: this.resultMoistureContent,
|
|
resultInspectionFees: this.form.resultInspectionFees,
|
|
resultInspectionFees: this.form.resultInspectionFees,
|
|
- contractMoistureValue:this.contractMoistureValue,
|
|
|
|
- realWeight:this.realWeight,
|
|
|
|
- moistureTonnage:this.moistureTonnage
|
|
|
|
|
|
+ contractMoistureValue: this.contractMoistureValue,
|
|
|
|
+ realWeight: this.realWeight,
|
|
|
|
+ moistureTonnage: this.moistureTonnage
|
|
};
|
|
};
|
|
- console.log(mapVal);
|
|
|
|
- if (mapVal.resultPlannedDate==null||
|
|
|
|
- mapVal.resultEmptyHeavyWaterMeter==null||
|
|
|
|
- mapVal.resultMoistureContent==null||
|
|
|
|
- mapVal.resultInspectionFees==null||
|
|
|
|
- mapVal.contractMoistureValue==null||
|
|
|
|
- mapVal.realWeight==null||
|
|
|
|
- mapVal.moistureTonnage==null
|
|
|
|
- ) this.$message.error("存在空值!");
|
|
|
|
|
|
+ //判断放货数量是否为数字
|
|
|
|
+ function isNumber() {
|
|
|
|
+ var value = mapVal.resultMoistureContent;
|
|
|
|
+ //验证是否为数字
|
|
|
|
+ var patrn = /^(-)?\d+(\.\d+)?$/;
|
|
|
|
+ if (patrn.exec(value) == null || value == "") {
|
|
|
|
+ return false;
|
|
|
|
+ } else {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ var val = this.value;
|
|
|
|
+
|
|
|
|
+ if (
|
|
|
|
+ mapVal.resultPlannedDate == null ||
|
|
|
|
+ mapVal.resultEmptyHeavyWaterMeter == null ||
|
|
|
|
+ mapVal.resultMoistureContent == null ||
|
|
|
|
+ mapVal.resultInspectionFees == null ||
|
|
|
|
+ mapVal.contractMoistureValue == null ||
|
|
|
|
+ mapVal.realWeight == null ||
|
|
|
|
+ mapVal.moistureTonnage == null
|
|
|
|
+ )
|
|
|
|
+ this.$message.error("存在空值!");
|
|
|
|
+ else if (!isNumber(val)) this.$message.warning("含水率必须为数字");
|
|
else
|
|
else
|
|
- this.axios
|
|
|
|
- .post(
|
|
|
|
- "/api/v1/tms/addWaterQualityResult",
|
|
|
|
- {
|
|
|
|
|
|
+ this.axios
|
|
|
|
+ .post("/api/v1/tms/addWaterQualityResult", {
|
|
mapVal: mapVal,
|
|
mapVal: mapVal,
|
|
waterQualityMap: this.waterQualityMap
|
|
waterQualityMap: this.waterQualityMap
|
|
- }
|
|
|
|
- )
|
|
|
|
- .then((res) => {
|
|
|
|
- if (res.data.code == 200) {
|
|
|
|
- this.$message({
|
|
|
|
- type: "success",
|
|
|
|
- message: "新增成功!",
|
|
|
|
- });
|
|
|
|
- // this.$refs.table.refreshData();
|
|
|
|
- this.$router.go(-1);
|
|
|
|
- } else {
|
|
|
|
- this.$message.error("新增失败!");
|
|
|
|
- }
|
|
|
|
- this.$refs['table'].resetField();
|
|
|
|
- });
|
|
|
|
|
|
+ })
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "新增成功!"
|
|
|
|
+ });
|
|
|
|
+ // this.$refs.table.refreshData();
|
|
|
|
+ this.$router.go(-1);
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error("新增失败!");
|
|
|
|
+ }
|
|
|
|
+ this.$refs["table"].resetField();
|
|
|
|
+ });
|
|
},
|
|
},
|
|
loadAll() {
|
|
loadAll() {
|
|
- return [
|
|
|
|
-
|
|
|
|
- ];
|
|
|
|
|
|
+ return [];
|
|
},
|
|
},
|
|
handleSelect(item) {
|
|
handleSelect(item) {
|
|
console.log(item);
|
|
console.log(item);
|
|
},
|
|
},
|
|
onclick() {
|
|
onclick() {
|
|
- this.option.requestUrl = "/api/v1/tms/getCapacityList?apiId=138&con=" + this.input
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
|
|
+ this.option.requestUrl =
|
|
|
|
+ "/api/v1/tms/getCapacityList?apiId=138&con=" + this.input;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
-<style lang='scss' scoped>
|
|
|
|
-.shipTransport{
|
|
|
|
- .form{
|
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
+.shipTransport {
|
|
|
|
+ .form {
|
|
display: flex;
|
|
display: flex;
|
|
- .form_box{
|
|
|
|
|
|
+ .form_box {
|
|
width: 320px;
|
|
width: 320px;
|
|
margin-left: 35%;
|
|
margin-left: 35%;
|
|
margin-top: 30px;
|
|
margin-top: 30px;
|
|
margin-right: 20px;
|
|
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;
|
|
display: inline-block;
|
|
width: 70px !important;
|
|
width: 70px !important;
|
|
}
|
|
}
|
|
- .el-form-item__content{
|
|
|
|
- .el-select{
|
|
|
|
|
|
+ .el-form-item__content {
|
|
|
|
+ .el-select {
|
|
width: 250px;
|
|
width: 250px;
|
|
}
|
|
}
|
|
- .el-input{
|
|
|
|
|
|
+ .el-input {
|
|
width: 250px;
|
|
width: 250px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -207,31 +240,31 @@ export default {
|
|
margin-right: 1.25rem;
|
|
margin-right: 1.25rem;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .button_box{
|
|
|
|
|
|
+ .button_box {
|
|
margin-left: 45%;
|
|
margin-left: 45%;
|
|
}
|
|
}
|
|
- .other{
|
|
|
|
|
|
+ .other {
|
|
width: 320px;
|
|
width: 320px;
|
|
- margin-left: 35%;
|
|
|
|
- margin-right: 20px;
|
|
|
|
- .el-form{
|
|
|
|
- .preview-group{
|
|
|
|
- .el-form-item{
|
|
|
|
- .el-form-item__label{
|
|
|
|
- display: inline-block;
|
|
|
|
- width: 70px !important;
|
|
|
|
|
|
+ margin-left: 35%;
|
|
|
|
+ margin-right: 20px;
|
|
|
|
+ .el-form {
|
|
|
|
+ .preview-group {
|
|
|
|
+ .el-form-item {
|
|
|
|
+ .el-form-item__label {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ width: 70px !important;
|
|
|
|
+ }
|
|
|
|
+ .el-form-item__content {
|
|
|
|
+ .el-select {
|
|
|
|
+ width: 250px;
|
|
}
|
|
}
|
|
- .el-form-item__content{
|
|
|
|
- .el-select{
|
|
|
|
- width: 250px;
|
|
|
|
- }
|
|
|
|
- .el-input{
|
|
|
|
- width: 250px;
|
|
|
|
- }
|
|
|
|
|
|
+ .el-input {
|
|
|
|
+ width: 250px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
|
|
+</style>
|