Commit c6768904 authored by dragondean@qq.com's avatar dragondean@qq.com
parents af527592 77145243
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('预计提单补料时间')"> <el-form-item :label="$t('补料时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="bookingObj.ladingBillTime"></el-date-picker> <el-date-picker type="datetime" :placeholder="$t('请选择日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="bookingObj.ladingBillTime"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('预计报关时间')"> <el-form-item :label="$t('VGM提交时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="bookingObj.customsTime"></el-date-picker> <el-date-picker type="datetime" :placeholder="$t('请选择日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="bookingObj.customsTime"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('预计截关时间')"> <el-form-item :label="$t('截关时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="bookingObj.cutOffTime"></el-date-picker> <el-date-picker type="datetime" :placeholder="$t('请选择日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="bookingObj.cutOffTime"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
......
...@@ -491,6 +491,10 @@ export default { ...@@ -491,6 +491,10 @@ export default {
this.total = data.dataList?.total ?? 0; this.total = data.dataList?.total ?? 0;
this.unloadStatistics = data.unloadStatistics ?? {}; this.unloadStatistics = data.unloadStatistics ?? {};
this.toBePreLoading = false; this.toBePreLoading = false;
if(this.toBePreList.length == 0&&this.total!=0){
--this.pageParam.pageNo
this.getPreLoad()
}
}); });
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
...@@ -695,7 +699,6 @@ export default { ...@@ -695,7 +699,6 @@ export default {
}, },
/* 查询所有数据 */ /* 查询所有数据 */
queryAllData() { queryAllData() {
this.pageParam.pageNo = 1;
this.getSecGoods(); this.getSecGoods();
this.getPreLoad(); this.getPreLoad();
}, },
......
...@@ -87,13 +87,13 @@ ...@@ -87,13 +87,13 @@
<el-input v-model="form.name" :placeholder="$t('请输入柜型名称')" /> <el-input v-model="form.name" :placeholder="$t('请输入柜型名称')" />
</el-form-item> </el-form-item>
<el-form-item label="体积(m³)" prop="volume"> <el-form-item label="体积(m³)" prop="volume">
<el-input v-model.number="form.volume" :placeholder="$t('请输入体积')" /> <el-input v-model.trim="form.volume" @input="limitInput($event,'volume')" :placeholder="$t('请输入体积')" />
</el-form-item> </el-form-item>
<el-form-item label="重量(Kg)" prop="weight"> <el-form-item label="重量(Kg)" prop="weight">
<el-input v-model.number="form.weight" :placeholder="$t('请输入重量')" /> <el-input v-model.trim="form.weight" @input="limitInput($event,'weight')" :placeholder="$t('请输入重量')" />
</el-form-item> </el-form-item>
<el-form-item label="提单补料(CBM)" prop="ladingBill"> <el-form-item label="提单补料(CBM)" prop="ladingBill">
<el-input v-model.number="form.ladingBill" :placeholder="$t('请输入提单补料')" /> <el-input v-model.trim="form.ladingBill" @input="limitInput($event,'ladingBill')" :placeholder="$t('请输入提单补料')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('是否启用')" prop="status"> <el-form-item :label="$t('是否启用')" prop="status">
...@@ -146,7 +146,11 @@ export default { ...@@ -146,7 +146,11 @@ export default {
status: null, status: null,
}, },
// 表单参数 // 表单参数
form: {}, form: {
volume: 0,
weight: 0,
ladingBill:0
},
// 表单校验 // 表单校验
rules: { rules: {
name: [{ required: true, message: this.$t("柜型名称不能为空"), trigger: "blur" }], name: [{ required: true, message: this.$t("柜型名称不能为空"), trigger: "blur" }],
...@@ -182,8 +186,9 @@ export default { ...@@ -182,8 +186,9 @@ export default {
this.form = { this.form = {
id: undefined, id: undefined,
name: undefined, name: undefined,
volume: undefined, volume: 0,
weight: undefined, weight: 0,
ladingBill:0,
status: undefined, status: undefined,
sort: undefined, sort: undefined,
}; };
...@@ -264,6 +269,25 @@ export default { ...@@ -264,6 +269,25 @@ export default {
this.$download.excel(response, '机柜配置.xls'); this.$download.excel(response, '机柜配置.xls');
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); }).catch(() => {});
},
limitInput(value, name) {
let val = (value && value.split("")) || [];
let reg1 = /\d/;
let reg2 = /\./;
// 第一个字符不能为小数点
if (val[0] == ".") {
this.form[name] = "";
return;
}
// 过滤掉除数字和小数点外的字符
val = val.filter((e) => reg1.test(e) || reg2.test(e));
// 匹配小数点后只能有两位小数
// 解释一下这个match正则规格
// ^\d* 是指以数字开头,后面允许输入0到多位数字
// (\.?) 是指只允许一个小数点
// \d{0,2} 是指只允许0到2位小数
this.form[name] = val.join("").match(/^\d*(\.?\d{0,2})/g)[0] || null;
} }
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment