...
|
...
|
@@ -3,9 +3,9 @@ |
|
|
<el-card style="background-color: #F5F7FA">
|
|
|
<el-row class="toolbar" style="height:auto">
|
|
|
<el-form :model="addForm" :rules="rules" ref="addForm" :inline="true">
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i> 货物信息</el-divider>
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i> 货物信息 <el-tag type="info">流水号: {{addForm.serialnumber}}</el-tag></el-divider>
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
<el-col :span="6" v-if="false">
|
|
|
<el-form-item label=" " :label-width="formLabelWidth" prop="serialnumber">
|
|
|
<el-input v-model="addForm.serialnumber" autocomplete="off" suffix-icon="el-icon-files" disabled>
|
|
|
<template slot="prepend">流  水</template>
|
...
|
...
|
@@ -29,14 +29,30 @@ |
|
|
<el-col :span="6">
|
|
|
<el-form-item label=" " :label-width="formLabelWidth" prop="pcs">
|
|
|
<el-input v-model.number="addForm.pcs" autocomplete="off" suffix-icon="el-icon-files" clearable >
|
|
|
<template slot="prepend">件  数</template>
|
|
|
<template slot="prepend">总 件 数</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label=" " :label-width="formLabelWidth" prop="weight">
|
|
|
<el-input v-model="addForm.weight" autocomplete="off" suffix-icon="el-icon-files" clearable>
|
|
|
<template slot="prepend">重  量</template>
|
|
|
<template slot="prepend">总 重 量</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label=" " :label-width="formLabelWidth" prop="pcs">
|
|
|
<el-input v-model.number="addForm.pcs" autocomplete="off" suffix-icon="el-icon-files" clearable >
|
|
|
<template slot="prepend">入库件数</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label=" " :label-width="formLabelWidth" prop="weight">
|
|
|
<el-input v-model="addForm.weight" autocomplete="off" suffix-icon="el-icon-files" clearable>
|
|
|
<template slot="prepend">入库重量</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
...
|
...
|
@@ -68,43 +84,54 @@ |
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label=" " :label-width="formLabelWidth" prop="vol">
|
|
|
<div class="my-text-area">
|
|
|
<div class="el-input-group__prepend prepand">体  积</div>
|
|
|
<el-input v-model="addForm.vol"
|
|
|
type="textarea"
|
|
|
autosize
|
|
|
placeholder="请输入体积"
|
|
|
style="float: left;width:calc(100% - 89px)"
|
|
|
>
|
|
|
</el-input>
|
|
|
</div>
|
|
|
<el-tooltip class="item" effect="dark" content="单位:厘米,每行录入一个体积信息格式如:1x2x3x4(长x宽x高x件数),回车换行" placement="right">
|
|
|
<div class="my-text-area">
|
|
|
<div class="el-input-group__prepend prepand">体  积</div>
|
|
|
<el-input v-model="addForm.vol"
|
|
|
type="textarea"
|
|
|
autosize
|
|
|
placeholder="请输入体积"
|
|
|
style="float: left;width:calc(100% - 89px)"
|
|
|
>
|
|
|
</el-input>
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-divider content-position="left"><i class="el-icon-house"></i> 入库相关</el-divider>
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label=" " :label-width="formLabelWidth" prop="area">
|
|
|
<el-autocomplete
|
|
|
v-model="addForm.area"
|
|
|
:fetch-suggestions="areaQuerySearch"
|
|
|
placeholder="请输入库区编号"
|
|
|
:trigger-on-focus="false"
|
|
|
value-key = "areano"
|
|
|
clearable
|
|
|
highlight-first-item
|
|
|
style="width: 100%"
|
|
|
>
|
|
|
<template slot="prepend">库  区</template>
|
|
|
<template slot-scope="{ item }">
|
|
|
<div class="name" style="float: left">{{ item.areano }}</div>
|
|
|
<div class="addr" style="float: right">{{ item.areaname }}</div>
|
|
|
</template>
|
|
|
</el-autocomplete>
|
|
|
<el-form-item label=" " :label-width="formLabelWidth" prop="volValue">
|
|
|
<el-input v-model="addForm.volValue" autocomplete="off" suffix-icon="el-icon-files" disabled>
|
|
|
<template slot="prepend">入库体积</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-divider content-position="left"><i class="el-icon-house"></i> 入库相关</el-divider>
|
|
|
<el-row>
|
|
|
<!-- <el-col :span="6">-->
|
|
|
<!-- <el-form-item label=" " :label-width="formLabelWidth" prop="area">-->
|
|
|
<!-- <el-autocomplete-->
|
|
|
<!-- v-model="addForm.area"-->
|
|
|
<!-- :fetch-suggestions="areaQuerySearch"-->
|
|
|
<!-- placeholder="请输入库区编号"-->
|
|
|
<!-- :trigger-on-focus="false"-->
|
|
|
<!-- value-key = "areano"-->
|
|
|
<!-- clearable-->
|
|
|
<!-- highlight-first-item-->
|
|
|
<!-- style="width: 100%"-->
|
|
|
<!-- >-->
|
|
|
<!-- <template slot="prepend">库  区</template>-->
|
|
|
<!-- <template slot-scope="{ item }">-->
|
|
|
<!-- <div class="name" style="float: left">{{ item.areano }}</div>-->
|
|
|
<!-- <div class="addr" style="float: right">{{ item.areaname }}</div>-->
|
|
|
<!-- </template>-->
|
|
|
<!-- </el-autocomplete>-->
|
|
|
<!-- </el-form-item>-->
|
|
|
<!-- </el-col>-->
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label=" " :label-width="formLabelWidth" prop="location">
|
|
|
<el-autocomplete
|
...
|
...
|
@@ -606,6 +633,27 @@ |
|
|
export default {
|
|
|
name: "inventroyrecord",
|
|
|
data() {
|
|
|
var checkInputArea = (rule, value, callback) => {
|
|
|
let tempVol = 0
|
|
|
if (!value) {
|
|
|
return callback(new Error('体积信息必填'));
|
|
|
}
|
|
|
setTimeout(() => {
|
|
|
var lineStr = value.replace('\r').split('\n')
|
|
|
lineStr.forEach(((v,index) => {
|
|
|
var pattern = /^[0-9\.]+x[0-9\.]+x[0-9\.]+x[0-9\.]+$/;
|
|
|
if(!pattern.test(v)){
|
|
|
callback(new Error('行:'+index+'的值:'+v+'的体积格式输入错误,格式为1x1x1x1支持小数点'));
|
|
|
}else {
|
|
|
const volV = this.multiply(v)
|
|
|
tempVol += volV
|
|
|
}
|
|
|
}))
|
|
|
|
|
|
callback();
|
|
|
this.addForm.volValue = (tempVol/1000000).toFixed(2)
|
|
|
}, 200);
|
|
|
};
|
|
|
return {
|
|
|
queryInfo: {
|
|
|
waybill:'',
|
...
|
...
|
@@ -658,6 +706,7 @@ |
|
|
transcar: '',
|
|
|
transtype:'销售入库',
|
|
|
vol:'',
|
|
|
volValue:0,
|
|
|
waybillmaster:'',
|
|
|
waybillsub:'',
|
|
|
//随货文件
|
...
|
...
|
@@ -734,6 +783,11 @@ |
|
|
],
|
|
|
opter: [
|
|
|
{ required: true, message: '必须包含经办人信息', trigger: 'blur' }
|
|
|
],
|
|
|
vol:[
|
|
|
// { required: true, message: '体积信息必填', trigger: 'blur' },
|
|
|
{ validator: checkInputArea, trigger: 'blur' },
|
|
|
// { pattern: /^[0-9\.x]+$/gm, message: '体积信息只能输入数字和(.)点符号与x小写字母' }
|
|
|
]
|
|
|
},
|
|
|
}
|
...
|
...
|
@@ -874,8 +928,8 @@ |
|
|
const res = response.data
|
|
|
this.$message.success(res.msg)
|
|
|
this.getList()
|
|
|
}).catch(error => {
|
|
|
this.$message.error(res.msg)
|
|
|
}).catch(err => {
|
|
|
this.$message.error(err.toString())
|
|
|
})
|
|
|
}).catch(() => {
|
|
|
})
|
...
|
...
|
@@ -1077,9 +1131,6 @@ |
|
|
let ld = this.$loading({
|
|
|
text:"图片数据上传中..."
|
|
|
})
|
|
|
const para = {
|
|
|
file:formData
|
|
|
}
|
|
|
upfileWithPost(formData).then((response)=>{
|
|
|
let res = response.data;
|
|
|
if (res.code !== '200') {
|
...
|
...
|
@@ -1121,6 +1172,14 @@ |
|
|
}
|
|
|
|
|
|
|
|
|
},
|
|
|
multiply(str){
|
|
|
var everyNum = str.replace('X','x').split('x');
|
|
|
let tempNum = 1;
|
|
|
everyNum.forEach(item =>{
|
|
|
tempNum = tempNum*item
|
|
|
})
|
|
|
return tempNum;
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
...
|
...
|
|