|
@@ -15,6 +15,18 @@
|
|
|
<span class="text">件数:</span>
|
|
|
<el-input class="input" v-model="materialNumber"> </el-input>
|
|
|
</div>
|
|
|
+ <div class="materialNumber from">
|
|
|
+ <span class="text">理重(磅重)</span>
|
|
|
+ <el-input class="input" v-model="materialTheWeight" disabled> </el-input>
|
|
|
+ </div>
|
|
|
+ <div class="materialNumber from">
|
|
|
+ <span class="text">实重</span>
|
|
|
+ <el-input class="input" v-model="actuallyWeight"> </el-input>
|
|
|
+ </div>
|
|
|
+ <div class="materialNumber from">
|
|
|
+ <span class="text">备注</span>
|
|
|
+ <el-input class="input" v-model="remark"> </el-input>
|
|
|
+ </div>
|
|
|
<!-- 模态窗口 -->
|
|
|
<el-drawer :visible.sync="drawer" :direction="direction" size="40%">
|
|
|
<div style="margin-bottom: 10px">
|
|
@@ -88,7 +100,10 @@ export default {
|
|
|
second: {
|
|
|
requestUrl: "",
|
|
|
selectionType: "radio"
|
|
|
- }
|
|
|
+ },
|
|
|
+ materialTheWeight: 0,
|
|
|
+ actuallyWeight: 0,
|
|
|
+ remark: null
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -96,6 +111,9 @@ export default {
|
|
|
if (!val) {
|
|
|
this.input = null;
|
|
|
}
|
|
|
+ },
|
|
|
+ materialNumber() {
|
|
|
+ this.getTheoreticalByInfo();
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -104,6 +122,30 @@ export default {
|
|
|
this.endTime = new Date(this.startTime + 86400000);
|
|
|
},
|
|
|
methods: {
|
|
|
+ getTheoreticalByInfo() {
|
|
|
+ this.axios
|
|
|
+ .post(
|
|
|
+ "/api/v1/wms/getTheoreticalByInfo?warehouseId=" +
|
|
|
+ 1 +
|
|
|
+ "&materialCode=" +
|
|
|
+ this.materialCode +
|
|
|
+ "&materialSpecification=" +
|
|
|
+ this.materialSpecification +
|
|
|
+ "&materialModel=" +
|
|
|
+ this.materialModel +
|
|
|
+ "&num=" +
|
|
|
+ this.materialNumber +
|
|
|
+ "&status=1"
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.data == -1) {
|
|
|
+ this.$message.error("数量超出");
|
|
|
+ this.materialTheWeight = null;
|
|
|
+ } else {
|
|
|
+ this.materialTheWeight = parseFloat(res.data.data);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
formatDate(date, fmt) {
|
|
|
if (/(y+)/.test(fmt)) {
|
|
|
fmt = fmt.replace(
|
|
@@ -188,6 +230,10 @@ export default {
|
|
|
},
|
|
|
// 确认
|
|
|
onClickConfirm() {
|
|
|
+ if (!isNumber(this.actuallyWeight)) {
|
|
|
+ this.$message.error("实重填写不正确");
|
|
|
+ return;
|
|
|
+ }
|
|
|
// console.log(this.warehouseId,this.materialCode,this.materialNumber);
|
|
|
this.disabled = true;
|
|
|
this.axios
|
|
@@ -201,7 +247,13 @@ export default {
|
|
|
"&materialModel=" +
|
|
|
this.materialModel +
|
|
|
"&quantity=" +
|
|
|
- this.materialNumber
|
|
|
+ this.materialNumber +
|
|
|
+ "&actuallyWeight=" +
|
|
|
+ Number(parseFloat(this.actuallyWeight)) +
|
|
|
+ "&materialTheWeight=" +
|
|
|
+ Number(parseFloat(this.materialTheWeight)) +
|
|
|
+ "&remark=" +
|
|
|
+ this.remark
|
|
|
)
|
|
|
.then(res => {
|
|
|
console.log(res.data);
|