564 lines
22 KiB
Vue
564 lines
22 KiB
Vue
<template>
|
|
<div class="app-container">
|
|
<el-form ref="form" :model="form" size="mini" :rules="rules" label-width="80px">
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
|
<el-col :span="24" style=" border-right: 1px solid #e6ebf5;padding-right: 20px;">
|
|
<div class="head-container">
|
|
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
|
<el-col :span="7">
|
|
<!-- @keyup.enter.native="handleScanInput" -->
|
|
<el-form-item label="进仓单号" prop="inNo">
|
|
<el-input v-model="form.inNo" clearable="" placeholder="单号输入后按回车" disabled >
|
|
<i slot="suffix" class="iconfont"></i>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="进仓后缀" prop="inBatchNo">
|
|
<el-input v-model="form.inBatchNo" placeholder="例如:001" />
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
|
|
</div>
|
|
<el-collapse v-model="activeNames">
|
|
|
|
|
|
<el-collapse-item title="" name="2">
|
|
<template slot="title">
|
|
<div class="form-group-title"><span class="title">{{ $t('货物明细') }}</span></div>
|
|
</template>
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
|
<el-col :span="24">
|
|
<div style="display:inline-flex">
|
|
<!-- <div>申报货物列表</div> -->
|
|
<!-- style="cursor:hand;font-weight:700;border:1px dotted #e2d8d8;padding: 2px 5px;font-size: 12px;" -->
|
|
|
|
<div>
|
|
<el-button
|
|
size="mini"
|
|
type="primary"
|
|
class="iconfont icon-add"
|
|
@click="handleAddGoods"
|
|
>{{ $t('添加货物') }}
|
|
</el-button>
|
|
<!-- <GoodsTablePicker style="cursor:hand;font-weight:700;border:1px dotted #e2d8d8;padding: 2px 5px;font-size: 12px;" v-model="form.goodsType" @onChange="onGoodsChange" placeholder=""></GoodsTablePicker> -->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div >
|
|
<el-table
|
|
class="cargoList"
|
|
:cell-style="{
|
|
'padding': '0px!important',
|
|
'padding-left': '0px!important',
|
|
'padding-right': '0px!important',
|
|
'font-size':'12px'
|
|
}"
|
|
:header-cell-style="{
|
|
'font-size':'12x'
|
|
}"
|
|
border
|
|
stripe
|
|
:data="form.cargoList"
|
|
size="mini"
|
|
style="width: 100%"
|
|
|
|
>
|
|
<!-- max-height="400px" -->
|
|
|
|
<el-table-column :label="$t('序号')" align="center" width="60">
|
|
<template slot-scope="scope">
|
|
<span > {{scope.$index+1}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="goodsName" label="品名" align="center" width="120" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<GoodsInput v-model="scope.row.goodsName" size="mini" ></GoodsInput>
|
|
<!-- <el-input v-model="scope.row.goodsName" size="mini" placeholder=""></el-input> -->
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="cargoQty" :label="$t('件数')" align="center" width="60">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.cargoQty" size="mini" ></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="length" :label="$t('长(cm)')" align="center" width="80">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.length" size="mini" ></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="width" :label="$t('宽(cm)')" align="center" width="80">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.width" size="mini" ></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="height" :label="$t('高(cm)')" align="center" width="80">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.height" size="mini" ></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
<!-- <el-table-column prop="goodsModel" label="规格型号" align="center" width="80" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.goodsModel" size="mini" ></el-input>
|
|
</template>
|
|
</el-table-column> -->
|
|
<el-table-column prop="goodsName" label="品牌" align="center" width="80" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.brand" size="mini"></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
<!--
|
|
<el-table-column prop="hscode" label="海关编码" align="center" width="80" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.hscode" size="mini" placeholder=""></el-input>
|
|
</template>
|
|
</el-table-column> -->
|
|
|
|
<el-table-column prop="material" label="材质" align="center" width="60" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.material" size="mini" ></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="purpose" label="用途" align="center" width="60" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.purpose" size="mini"></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="ingredients" label="成分" align="center" width="60" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.ingredients" size="mini" ></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="supplier" label="供应商" align="center" width="80" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.supplier" size="mini" ></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
<!-- <el-table-column prop="netWeight" label="净重" align="center" width="60" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.netWeight" size="mini" placeholder=""></el-input>
|
|
</template>
|
|
</el-table-column> -->
|
|
|
|
|
|
<!-- <el-table-column prop="price" label="单价" align="center" width="80" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.price" size="mini"></el-input>
|
|
</template>
|
|
</el-table-column> -->
|
|
<!-- <el-table-column prop="volume" :label="$t('体积(m³)')" align="center" width="80">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.volume" size="mini" disabled></el-input>
|
|
</template>
|
|
</el-table-column> -->
|
|
|
|
|
|
<el-table-column :label="$t('操作')" align="left" min-width="50">
|
|
<template slot-scope="scope">
|
|
<span class="icon iconfont"
|
|
style="cursor: pointer;font-size: 21px;color: #6e6e6e;"
|
|
@click="()=>deleteGoodsItem(scope.row,scope.$index)"></span>
|
|
<span class="icon iconfont"
|
|
style="cursor: pointer;font-size: 21px;color: #6e6e6e;"
|
|
@click="()=>copyGoodsItem(scope.row,scope.$index)"></span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
|
|
</div>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;margin-top: 20px;">
|
|
|
|
<el-col :span="4">
|
|
<el-form-item :label="$t('总件数')" prop="parcelQty" label-width="70px">
|
|
<el-input v-model="form.parcelQty" style="text-align: right;" placeholder="" />
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item :label="$t('总重量')" prop="billWeight" label-width="70px">
|
|
<el-input v-model="form.billWeight" style="text-align: right;" placeholder="" >
|
|
<span slot="suffix">(kg)</span>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="16"></el-col>
|
|
<el-col :span="4">
|
|
<el-form-item :label="$t('总体积')" prop="totalVolume" label-width="70px" >
|
|
<div style="">
|
|
<el-input v-model="form.totalVolume" style="text-align: right;" placeholder="体积" >
|
|
<span slot="suffix">(m³)</span>
|
|
</el-input>
|
|
</div>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="20"></el-col>
|
|
|
|
<!-- <el-col :span="6">
|
|
<el-form-item :label="$t('包装类型')" prop="packType" label-width="70px">
|
|
<el-select multiple="" v-model="form.packType" placeholder="">
|
|
<el-option
|
|
v-for="dict in dict.type.emis_tab_packing_type"
|
|
:key="dict.value"
|
|
:label="dict.label"
|
|
:value="dict.value"
|
|
></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col> -->
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;margin-top: 20px;">
|
|
|
|
<el-col :span="5">
|
|
<el-form-item label="快递公司" prop="prepareInExpress">
|
|
<el-select
|
|
style="width:100%"
|
|
filterable
|
|
clearable
|
|
v-model="form.prepareInExpress"
|
|
>
|
|
<el-option v-for="item in dict.type.emis_express_code" :key="item.value" :label="item.label" :value="item.value" />
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="5">
|
|
<el-form-item label="快递单号" prop="prepareInBillCode">
|
|
<el-input v-model="form.prepareInBillCode" placeholder="请输入快递单号" />
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="是否代垫运费" prop="blPrepareInFreight" label-width="100px">
|
|
<el-radio-group v-model="form.blPrepareInFreight">
|
|
<el-radio label="1">是</el-radio>
|
|
<el-radio label="0">否</el-radio>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="5" v-if="form.blPrepareInFreight==1">
|
|
<el-form-item label="代垫运费" prop="prepareInEstFee">
|
|
<el-input v-model="form.prepareInEstFee" placeholder="" />
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="5">
|
|
<el-form-item label="自定义标识" prop="prepareInRemark">
|
|
<el-input v-model="form.prepareInRemark" placeholder="请输入自定义标识" />
|
|
</el-form-item>
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
</el-col>
|
|
|
|
</el-row >
|
|
</el-collapse-item>
|
|
|
|
|
|
<el-collapse-item title="" name="3">
|
|
<template slot="title">
|
|
<div class="form-group-title"><span class="title">{{ $t('收货图片') }}</span></div>
|
|
</template>
|
|
|
|
<div>
|
|
<el-row :gutter="24">
|
|
<el-col :span="24">
|
|
<el-form-item label="收货图片" prop="xxx" label-width="80px">
|
|
<ImageUpload ref="imageUpload" v-model="form.picUrl" :fileSize="1" :limit="20" @input="handleInput" ></ImageUpload>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row >
|
|
</div>
|
|
|
|
</el-collapse-item>
|
|
|
|
|
|
<!-- <el-collapse-item title="" name="3">
|
|
<template slot="title">
|
|
<div class="form-group-title"><span class="title">{{ $t('历史进仓列表') }}</span></div>
|
|
</template>
|
|
</el-collapse-item> -->
|
|
</el-collapse>
|
|
|
|
<div style="text-align: center;margin-bottom: 50px;margin-top: 50px;">
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
</div>
|
|
|
|
</el-col>
|
|
<!-- <el-col :span="24">
|
|
<div class="head-container">
|
|
<div>历史进仓列表</div>
|
|
</div>
|
|
</el-col> -->
|
|
</el-row>
|
|
</el-form>
|
|
|
|
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { registerWarehouseInInfo,listEmisWarehouseInBatch, getEmisWarehouseInBatch, delEmisWarehouseInBatch, addEmisWarehouseInBatch, updateEmisWarehouseInBatch } from "@/api/emis/emisWarehouseInBatch";
|
|
import { getWarehouseInInfo,listEmisWarehouseIn, getEmisWarehouseIn, delEmisWarehouseIn, addEmisWarehouseIn, updateEmisWarehouseIn } from "@/api/emis/emisWarehouseIn";
|
|
import GoodsInput from '@/views/emis/EmisBaseTools/GoodsInput.vue';
|
|
|
|
export default {
|
|
name: "WarehouseStockIn",
|
|
props:{
|
|
inNo:{
|
|
type:String
|
|
}
|
|
},
|
|
components: { GoodsInput },
|
|
dicts: ['emis_tab_packing_type','emis_express_code'],
|
|
data() {
|
|
return {
|
|
activeNames:['1','2','3'],
|
|
id:null,
|
|
|
|
emisWarehouseInBatchOptions: [],
|
|
// 遮罩层
|
|
loading: true,
|
|
|
|
action:null,
|
|
addFrom:null,
|
|
|
|
// 表单参数
|
|
form: {},
|
|
// 表单校验
|
|
rules: {
|
|
inNo: [
|
|
{ required: true, message: "进仓单号不能为空", trigger: "blur" }
|
|
],
|
|
totalVolume: [
|
|
{ required: true, message: "总体积不能为空", trigger: "blur" }
|
|
],
|
|
parcelQty: [
|
|
{ required: true, message: "总件数不能为空", trigger: "blur" }
|
|
],
|
|
billWeight: [
|
|
{ required: true, message: "总重量不能为空", trigger: "blur" }
|
|
],
|
|
|
|
}
|
|
};
|
|
},
|
|
|
|
watch: {
|
|
inNo(newVal){
|
|
this.initData();
|
|
}
|
|
},
|
|
created() {
|
|
this.initData();
|
|
},
|
|
|
|
methods: {
|
|
handleScanInput(){
|
|
if(this.form.inNo==null || this.form.inNo==''){
|
|
this.$modal.msgError("输入进仓单号后回车");
|
|
return;
|
|
}
|
|
|
|
this.initData();
|
|
|
|
},
|
|
|
|
initData() {
|
|
|
|
this.reset();
|
|
// 获取总入仓单信息
|
|
if(this.inNo !=null) {
|
|
this.loading = true;
|
|
getWarehouseInInfo(this.inNo).then(response => {
|
|
let obj= response.data;
|
|
this.form.inNo=obj.inNo;
|
|
// inBatchNo: null,
|
|
this.form.customerCode=obj.customerCode;
|
|
this.form.customerName=obj.customerName;
|
|
this.form.orderSn=obj.orderSn;
|
|
this.form.billCode=obj.billCode;
|
|
// this.form.transCarNo=obj.billCode;
|
|
// this.form.entryDate=obj.billCode;
|
|
// this.form.confirmStatus: null,
|
|
// this.form.confirmDate: null,
|
|
// this.form.status: null,
|
|
// this.form.totalParcelQty: null,
|
|
// this.form.totalVolume: null,
|
|
// this.form.totalWeight: null,
|
|
|
|
console.log("====>emisWarehouseInBatchOptions===>",this.form )
|
|
|
|
// 如果订单有货物数据,直接带过来
|
|
this.form.cargoList=[];
|
|
this.loading = false;
|
|
});
|
|
|
|
|
|
}else{
|
|
this.reset();
|
|
}
|
|
// this.getTreeselect();
|
|
},
|
|
|
|
handleInitGoods(){
|
|
if(!this.form.cargoList){
|
|
this.form.cargoList=[];
|
|
}
|
|
|
|
for(let i=0;i<20;i++){
|
|
let cargo={
|
|
"goodsCode": "",
|
|
"goodsName": "",
|
|
"cargoQty": 1,
|
|
"length": 0,
|
|
"width": 0,
|
|
"height": 0,
|
|
"volume": 0,
|
|
}
|
|
this.form.cargoList.push(cargo);
|
|
}
|
|
},
|
|
|
|
handleAddGoods(){
|
|
if(!this.form.cargoList){
|
|
this.form.cargoList=[];
|
|
}
|
|
|
|
let cargo={
|
|
"goodsCode": "",
|
|
"goodsName": "填写货物名称",
|
|
"cargoQty": 1,
|
|
"length": 0,
|
|
"width": 0,
|
|
"height": 0,
|
|
"volume": 0,
|
|
}
|
|
this.form.cargoList.push(cargo);
|
|
},
|
|
// 取消按钮
|
|
cancel() {
|
|
this.reset();
|
|
this.$emit("on-cancel");
|
|
},
|
|
// 表单重置
|
|
reset() {
|
|
this.form = {
|
|
id: null,
|
|
serialNo: null,
|
|
inNo: null,
|
|
inBatchNo: null,
|
|
customerCode: null,
|
|
customerName: null,
|
|
orderSn: null,
|
|
billCode: null,
|
|
transCarNo: null,
|
|
entryDate: null,
|
|
confirmStatus: null,
|
|
confirmDate: null,
|
|
status: null,
|
|
blPrepareInFreight: null,
|
|
prepareInEstFee: null,
|
|
prepareInRealFee: null,
|
|
prepareInExpress: null,
|
|
prepareInBillCode: null,
|
|
prepareInRemark: null,
|
|
prepareInSupplier: null,
|
|
packType: null,
|
|
totalParcelQty: null,
|
|
totalVolume: null,
|
|
totalWeight: null,
|
|
picUrl: null,
|
|
remark: null,
|
|
tenantId: null,
|
|
cargoList:[],
|
|
};
|
|
this.resetForm("form");
|
|
},
|
|
/** 提交按钮 */
|
|
submitForm() {
|
|
this.$refs["form"].validate(valid => {
|
|
if (valid) {
|
|
registerWarehouseInInfo(this.form).then(response => {
|
|
this.$modal.msgSuccess("入仓登记成功");
|
|
this.$emit("on-changed");
|
|
});
|
|
}
|
|
});
|
|
},
|
|
async handleInput(item, size){
|
|
|
|
},
|
|
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
|
|
.el-collapse {
|
|
border-top: none!important;
|
|
border-bottom: none!important;
|
|
}
|
|
|
|
.el-table .el-table__cell:first-child .cell {
|
|
padding: 0px;
|
|
}
|
|
|
|
.el-table .cell {
|
|
padding: 0px;
|
|
}
|
|
|
|
.cargoList{
|
|
.el-input__inner {
|
|
height: 28px;
|
|
line-height: 28px;
|
|
border: none;
|
|
background: #ffffcd;
|
|
font-size: 10px;
|
|
padding: 0px;
|
|
text-align: center;
|
|
}
|
|
|
|
// .el-input-number--mini {
|
|
// width: 100%;
|
|
// line-height: 26px;
|
|
// }
|
|
|
|
.el-input-number {
|
|
width: 100%!important;
|
|
}
|
|
|
|
.el-input-number.is-without-controls .el-input__inner {
|
|
height: 28px;
|
|
line-height: 28px;
|
|
border: none;
|
|
background: #ffffcd;
|
|
font-size: 10px;
|
|
padding: 0px;
|
|
text-align: center;
|
|
}
|
|
}
|
|
|
|
.el-collapse-item__content {
|
|
padding-bottom: 0px;
|
|
}
|
|
.el-collapse-item__header{
|
|
pointer-events: none;
|
|
}
|
|
|
|
.el-collapse-item__arrow {
|
|
pointer-events: auto;
|
|
}
|
|
|
|
</style>
|