fix:销售出库、销售退货、转移调拨、装箱管理、SN码、外协发料、外协入库、工艺流程和检测模板的单位名称问题解决

This commit is contained in:
zhangxuanming 2025-02-08 16:35:13 +08:00
parent bcbd1ee603
commit 4d5ea536e7
10 changed files with 142 additions and 133 deletions

View File

@ -82,7 +82,7 @@
</el-table-column> </el-table-column>
<el-table-column label="产品物料名称" width="150px" align="center" prop="itemName" :show-overflow-tooltip="true"/> <el-table-column label="产品物料名称" width="150px" align="center" prop="itemName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/> <el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
<el-table-column label="单位" align="center" prop="unitOfMeasure" /> <el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="操作" align="center" v-if="optType !='view'" width="100px" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" v-if="optType !='view'" width="100px" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -129,8 +129,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="单位" prop="unitOfMeasure"> <el-form-item label="单位" prop="unitName">
<el-input v-model="form.unitOfMeasure" placeholder="请选择产品" disabled/> <el-input v-model="form.unitName" placeholder="请选择产品" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -283,6 +283,7 @@ export default {
this.form.itemName = obj.itemName; this.form.itemName = obj.itemName;
this.form.specification = obj.specification; this.form.specification = obj.specification;
this.form.unitOfMeasure = obj.unitOfMeasure; this.form.unitOfMeasure = obj.unitOfMeasure;
this.form.unitName = obj.unitName
} }
}, },
// //

View File

@ -19,7 +19,7 @@
<el-table-column label="BOM物料编号" width="120" align="center" prop="itemCode" /> <el-table-column label="BOM物料编号" width="120" align="center" prop="itemCode" />
<el-table-column label="BOM物料名称" width="200" align="center" prop="itemName" :show-overflow-tooltip="true"/> <el-table-column label="BOM物料名称" width="200" align="center" prop="itemName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="itemSpc" :show-overflow-tooltip="true"/> <el-table-column label="规格型号" align="center" prop="itemSpc" :show-overflow-tooltip="true"/>
<el-table-column label="单位" align="center" prop="unitOfMeasure" /> <el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="物料/产品" align="center" prop="itemOrProduct" > <el-table-column label="物料/产品" align="center" prop="itemOrProduct" >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.mes_item_product" :value="scope.row.itemOrProduct"/> <dict-tag :options="dict.type.mes_item_product" :value="scope.row.itemOrProduct"/>

View File

@ -42,7 +42,7 @@
<el-table-column label="产品物料名称" align="center" width="120px" prop="itemName" :show-overflow-tooltip="true"/> <el-table-column label="产品物料名称" align="center" width="120px" prop="itemName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/> <el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
<el-table-column label="最低检测数" align="center" width="100px" prop="quantityCheck" /> <el-table-column label="最低检测数" align="center" width="100px" prop="quantityCheck" />
<el-table-column label="单位" align="center" width="100px" prop="unitOfMeasure" /> <el-table-column label="单位" align="center" width="100px" prop="unitName" />
<el-table-column label="最大不合格数" align="center" prop="quantityUnqualified" /> <el-table-column label="最大不合格数" align="center" prop="quantityUnqualified" />
<el-table-column label="最大致命缺陷率" align="center" prop="crRate" > <el-table-column label="最大致命缺陷率" align="center" prop="crRate" >
<template slot-scope="scope"> <template slot-scope="scope">
@ -126,8 +126,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="单位" prop="unitOfMeasure"> <el-form-item label="单位" prop="unitName">
<el-input v-model="form.unitOfMeasure" readonly="readonly" /> <el-input v-model="form.unitName" readonly="readonly" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -351,6 +351,7 @@ export default {
this.form.itemName = obj.itemName; this.form.itemName = obj.itemName;
this.form.specification = obj.specification; this.form.specification = obj.specification;
this.form.unitOfMeasure = obj.unitOfMeasure; this.form.unitOfMeasure = obj.unitOfMeasure;
this.form.unitName = obj.unitName
} }
}, },
} }

View File

@ -41,7 +41,7 @@
<el-table-column label="产品物料编码" width="120px" align="center" prop="itemCode" /> <el-table-column label="产品物料编码" width="120px" align="center" prop="itemCode" />
<el-table-column label="产品物料名称" width="120px" align="center" prop="itemName" :show-overflow-tooltip="true"/> <el-table-column label="产品物料名称" width="120px" align="center" prop="itemName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/> <el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
<el-table-column label="单位" align="center" prop="unitOfMeasure" /> <el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="领料数量" align="center" prop="quantityIssued" /> <el-table-column label="领料数量" align="center" prop="quantityIssued" />
<el-table-column label="批次号" align="center" prop="batchCode" /> <el-table-column label="批次号" align="center" prop="batchCode" />
<el-table-column label="仓库名称" align="center" prop="warehouseName" /> <el-table-column label="仓库名称" align="center" prop="warehouseName" />
@ -110,8 +110,8 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="单位" prop="unitOfMeasure"> <el-form-item label="单位" prop="unitName">
<el-input v-model="form.unitOfMeasure" readonly="readonly" /> <el-input v-model="form.unitName" readonly="readonly" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -366,6 +366,7 @@ export default {
this.form.areaName = obj.areaName; this.form.areaName = obj.areaName;
this.form.quantityIssued = obj.quantityOnhand; this.form.quantityIssued = obj.quantityOnhand;
this.form.quantityMax = obj.quantityOnhand; this.form.quantityMax = obj.quantityOnhand;
this.form.unitName = obj.unitName
} }
}, },
} }

View File

@ -41,7 +41,7 @@
<el-table-column label="产品物料编码" width="120" align="center" prop="itemCode" /> <el-table-column label="产品物料编码" width="120" align="center" prop="itemCode" />
<el-table-column label="产品物料名称" width="150" align="center" prop="itemName" /> <el-table-column label="产品物料名称" width="150" align="center" prop="itemName" />
<el-table-column label="规格型号" align="center" prop="specification" /> <el-table-column label="规格型号" align="center" prop="specification" />
<el-table-column label="单位" align="center" prop="unitOfMeasure" /> <el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="入库数量" align="center" prop="quantityRecived" /> <el-table-column label="入库数量" align="center" prop="quantityRecived" />
<el-table-column label="批次号" width="100" align="center" prop="batchCode" /> <el-table-column label="批次号" width="100" align="center" prop="batchCode" />
<el-table-column label="仓库" width="100" align="center" prop="warehouseName" /> <el-table-column label="仓库" width="100" align="center" prop="warehouseName" />
@ -104,8 +104,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="单位" prop="unitOfMeasure"> <el-form-item label="单位" prop="unitName">
<el-input v-model="form.unitOfMeasure" readonly="readonly" /> <el-input v-model="form.unitName" readonly="readonly" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -427,6 +427,7 @@ export default {
this.form.itemName = obj.itemName; this.form.itemName = obj.itemName;
this.form.specification = obj.specification; this.form.specification = obj.specification;
this.form.unitOfMeasure = obj.unitOfMeasure; this.form.unitOfMeasure = obj.unitOfMeasure;
this.form.unitName = obj.unitName
} }
}, },
//IQC //IQC

View File

@ -31,10 +31,10 @@
<el-table-column label="产品物料编码" width="120px" align="center" prop="itemCode" /> <el-table-column label="产品物料编码" width="120px" align="center" prop="itemCode" />
<el-table-column label="产品物料名称" width="150px" align="center" prop="itemName" :show-overflow-tooltip="true"/> <el-table-column label="产品物料名称" width="150px" align="center" prop="itemName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" width="150px" align="center" prop="specification" :show-overflow-tooltip="true"/> <el-table-column label="规格型号" width="150px" align="center" prop="specification" :show-overflow-tooltip="true"/>
<el-table-column label="单位" align="center" prop="unitOfMeasure" /> <el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="装箱数量" align="center" prop="quantityPackage" /> <el-table-column label="装箱数量" align="center" prop="quantityPackage" />
<el-table-column label="生产工单编号" width="150px" align="center" prop="workorderCode" /> <el-table-column label="生产工单编号" width="150px" align="center" prop="workorderCode" />
<el-table-column label="批次号" align="center" prop="batchCode" /> <el-table-column label="批次号" align="center" prop="batchCode" />
<el-table-column label="有效期" align="center" prop="expireDate" width="180"> <el-table-column label="有效期" align="center" prop="expireDate" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.expireDate, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.expireDate, '{y}-{m}-{d}') }}</span>
@ -59,7 +59,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -103,8 +103,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="单位" prop="unitOfMeasure"> <el-form-item label="单位" prop="unitName">
<el-input v-model="form.unitOfMeasure" readonly="readonly" /> <el-input v-model="form.unitName" readonly="readonly" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -290,6 +290,7 @@ export default {
this.form.itemName = row.productName; this.form.itemName = row.productName;
this.form.specification = row.specification; this.form.specification = row.specification;
this.form.unitOfMeasure = row.unitOfMeasure; this.form.unitOfMeasure = row.unitOfMeasure;
this.form.unitName = obj.unitName
} }
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */

View File

@ -41,7 +41,7 @@
<el-table-column label="产品编码" width="120px" align="center" prop="itemCode" /> <el-table-column label="产品编码" width="120px" align="center" prop="itemCode" />
<el-table-column label="产品名称" width="150px" align="center" prop="itemName" :show-overflow-tooltip="true"/> <el-table-column label="产品名称" width="150px" align="center" prop="itemName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/> <el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
<el-table-column label="单位" align="center" prop="unitOfMeasure" /> <el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="出库数量" align="center" prop="quantitySalse" /> <el-table-column label="出库数量" align="center" prop="quantitySalse" />
<el-table-column label="批次号" width="120px" align="center" prop="batchCode" /> <el-table-column label="批次号" width="120px" align="center" prop="batchCode" />
<el-table-column label="仓库名称" align="center" prop="warehouseName" /> <el-table-column label="仓库名称" align="center" prop="warehouseName" />
@ -94,8 +94,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="单位" prop="unitOfMeasure"> <el-form-item label="单位" prop="unitName">
<el-input v-model="form.unitOfMeasure" placeholder="请输入单位" /> <el-input v-model="form.unitName" placeholder="请输入单位" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -421,6 +421,7 @@ export default {
this.form.areaName = obj.areaName; this.form.areaName = obj.areaName;
this.form.quantitySalse = obj.quantityOnhand; this.form.quantitySalse = obj.quantityOnhand;
this.form.quantityMax = obj.quantityOnhand; this.form.quantityMax = obj.quantityOnhand;
this.form.unitName = obj.unitName
} }
}, },
//OQC //OQC

View File

@ -30,7 +30,7 @@
<el-table-column label="产品编码" width="120" align="center" prop="itemCode" /> <el-table-column label="产品编码" width="120" align="center" prop="itemCode" />
<el-table-column label="产品名称" width="150" align="center" prop="itemName" /> <el-table-column label="产品名称" width="150" align="center" prop="itemName" />
<el-table-column label="规格型号" width="150" align="center" prop="specification" :show-overflow-tooltip="true"/> <el-table-column label="规格型号" width="150" align="center" prop="specification" :show-overflow-tooltip="true"/>
<el-table-column label="单位" align="center" prop="unitOfMeasure" /> <el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="退货数量" align="center" prop="quantityRted" /> <el-table-column label="退货数量" align="center" prop="quantityRted" />
<el-table-column label="批次号" align="center" prop="batchCode" /> <el-table-column label="批次号" align="center" prop="batchCode" />
<el-table-column label="仓库" align="center" prop="warehouseName" /> <el-table-column label="仓库" align="center" prop="warehouseName" />
@ -88,8 +88,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="单位" prop="unitOfMeasure"> <el-form-item label="单位" prop="unitName">
<el-input v-model="form.unitOfMeasure" placeholder="请输入单位" /> <el-input v-model="form.unitName" placeholder="请输入单位" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -266,6 +266,7 @@ export default {
this.form.itemName = obj.itemName; this.form.itemName = obj.itemName;
this.form.specification = obj.specification; this.form.specification = obj.specification;
this.form.unitOfMeasure = obj.unitOfMeasure; this.form.unitOfMeasure = obj.unitOfMeasure;
this.form.unitName = obj.unitName
} }
}, },
// //

View File

@ -68,7 +68,7 @@
<el-table-column label="产品编码" align="center" prop="itemCode" /> <el-table-column label="产品编码" align="center" prop="itemCode" />
<el-table-column label="产品名称" align="center" prop="itemName" /> <el-table-column label="产品名称" align="center" prop="itemName" />
<el-table-column label="规格型号" align="center" prop="specification" /> <el-table-column label="规格型号" align="center" prop="specification" />
<el-table-column label="单位" align="center" prop="unitOfMeasure" /> <el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="批次号" align="center" prop="batchCode" /> <el-table-column label="批次号" align="center" prop="batchCode" />
<el-table-column label="SN码数量" align="center" prop="snNum" > <el-table-column label="SN码数量" align="center" prop="snNum" >
<template slot-scope="scope"> <template slot-scope="scope">
@ -308,6 +308,7 @@ export default {
this.form.itemName = obj.itemName; this.form.itemName = obj.itemName;
this.form.specification = obj.specification; this.form.specification = obj.specification;
this.form.unitOfMeasure = obj.unitOfMeasure; this.form.unitOfMeasure = obj.unitOfMeasure;
this.form.unitName = obj.unitName
} }
}, },
} }

View File

@ -12,7 +12,7 @@
v-hasPermi="['mes:wm:transfer:add']" v-hasPermi="['mes:wm:transfer:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="danger" type="danger"
@ -29,21 +29,21 @@
</el-row> </el-row>
<el-table v-loading="loading" :data="transferlineList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="transferlineList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="产品物料编码" width="120px" align="center" prop="itemCode" /> <el-table-column label="产品物料编码" width="120px" align="center" prop="itemCode" />
<el-table-column label="产品物料名称" width="150px" align="center" prop="itemName" /> <el-table-column label="产品物料名称" width="150px" align="center" prop="itemName" />
<el-table-column label="规格型号" align="center" prop="specification" /> <el-table-column label="规格型号" align="center" prop="specification" />
<el-table-column label="单位" align="center" prop="unitOfMeasure" /> <el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="转移数量" align="center" prop="quantityTransfer" /> <el-table-column label="转移数量" align="center" prop="quantityTransfer" />
<el-table-column label="生产工单" align="center" prop="workorderCode" /> <el-table-column label="生产工单" align="center" prop="workorderCode" />
<el-table-column label="供应商编码" width="100px" align="center" prop="vendorCode" /> <el-table-column label="供应商编码" width="100px" align="center" prop="vendorCode" />
<el-table-column label="供应商简称" width="100px" align="center" prop="vendorNick" /> <el-table-column label="供应商简称" width="100px" align="center" prop="vendorNick" />
<el-table-column label="批次号" width="150px" align="center" prop="batchCode" /> <el-table-column label="批次号" width="150px" align="center" prop="batchCode" />
<el-table-column label="移出仓库" align="center" prop="fromWarehouseName" /> <el-table-column label="移出仓库" align="center" prop="fromWarehouseName" />
<el-table-column label="移出库区" width="120px" align="center" prop="fromLocationName" /> <el-table-column label="移出库区" width="120px" align="center" prop="fromLocationName" />
<el-table-column label="移出库位" align="center" prop="fromAreaName" /> <el-table-column label="移出库位" align="center" prop="fromAreaName" />
<el-table-column label="移入仓库" align="center" prop="toWarehouseName" /> <el-table-column label="移入仓库" align="center" prop="toWarehouseName" />
<el-table-column label="移入库区" width="120px" align="center" prop="toLocationName" /> <el-table-column label="移入库区" width="120px" align="center" prop="toLocationName" />
<el-table-column label="移入库位" align="center" prop="toAreaName" /> <el-table-column label="移入库位" align="center" prop="toAreaName" />
<el-table-column label="操作" v-if="optType != 'view'" width="120px" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" v-if="optType != 'view'" width="120px" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
@ -64,7 +64,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -75,7 +75,7 @@
<!-- 添加或修改转移单行对话框 --> <!-- 添加或修改转移单行对话框 -->
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="产品物料" prop="itemCode"> <el-form-item label="产品物料" prop="itemCode">
@ -91,8 +91,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="单位" prop="unitOfMeasure"> <el-form-item label="单位" prop="unitName">
<el-input v-model="form.unitOfMeasure" readonly="readonly" /> <el-input v-model="form.unitName" readonly="readonly" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -132,7 +132,7 @@
:options="warehouseOptions" :options="warehouseOptions"
:props="warehouseProps" :props="warehouseProps"
@change="handleToWarehouseChanged" @change="handleToWarehouseChanged"
> >
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -206,40 +206,40 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
transferId: this.transferId, transferId: this.transferId,
materialStockId: null, materialStockId: null,
itemId: null, itemId: null,
itemCode: null, itemCode: null,
itemName: null, itemName: null,
specification: null, specification: null,
unitOfMeasure: null, unitOfMeasure: null,
quantityTransfer: null, quantityTransfer: null,
quantityMax: null, quantityMax: null,
workorderId: null, workorderId: null,
workorderCode: null, workorderCode: null,
batchCode: null, batchCode: null,
fromWarehouseId:null, fromWarehouseId:null,
fromWarehouseCode: null, fromWarehouseCode: null,
fromWarehouseName: null, fromWarehouseName: null,
fromLocationId: null, fromLocationId: null,
fromLocationCode: null, fromLocationCode: null,
fromLocationName: null, fromLocationName: null,
fromAreaId: null, fromAreaId: null,
fromAreaCode: null, fromAreaCode: null,
fromAreaName: null, fromAreaName: null,
toWarehouseId: null, toWarehouseId: null,
toWarehouseCode: null, toWarehouseCode: null,
toWarehouseName: null, toWarehouseName: null,
toLocationId: null, toLocationId: null,
toLocationCode: null, toLocationCode: null,
toLocationName: null, toLocationName: null,
toAreaId: null, toAreaId: null,
toAreaCode: null, toAreaCode: null,
toAreaName: null, toAreaName: null,
expireDate: null, expireDate: null,
vendorId: null, vendorId: null,
vendorCode: null, vendorCode: null,
vendorName: null, vendorName: null,
vendorNick: null, vendorNick: null,
}, },
// //
form: {}, form: {},
@ -247,10 +247,10 @@ export default {
rules: { rules: {
itemCode: [ itemCode: [
{ required: true, message: "请选择移出的物资", trigger: "blur" } { required: true, message: "请选择移出的物资", trigger: "blur" }
], ],
toWarehouseId: [ toWarehouseId: [
{ required: true, message: "请指定移入仓库", trigger: "blur" } { required: true, message: "请指定移入仓库", trigger: "blur" }
], ],
quantityTransfer: [ quantityTransfer: [
{ required: true, message: "转移数量不能为空", trigger: "blur" } { required: true, message: "转移数量不能为空", trigger: "blur" }
], } ], }
@ -271,16 +271,16 @@ export default {
}); });
}, },
getWarehouseList(){ getWarehouseList(){
getTreeList().then( response =>{ getTreeList().then( response =>{
this.warehouseOptions = response.data; this.warehouseOptions = response.data;
this.warehouseOptions.map(w =>{ this.warehouseOptions.map(w =>{
w.children.map(l =>{ w.children.map(l =>{
let lstr =JSON.stringify(l.children).replace(/locationId/g,'lId').replace(/areaId/g, 'pId').replace(/areaName/g,'pName'); let lstr =JSON.stringify(l.children).replace(/locationId/g,'lId').replace(/areaId/g, 'pId').replace(/areaName/g,'pName');
l.children = JSON.parse(lstr); l.children = JSON.parse(lstr);
}); });
let wstr = JSON.stringify(w.children).replace(/warehouseId/g,'wId').replace(/locationId/g, 'pId').replace(/locationName/g,'pName'); let wstr = JSON.stringify(w.children).replace(/warehouseId/g,'wId').replace(/locationId/g, 'pId').replace(/locationName/g,'pName');
w.children = JSON.parse(wstr); w.children = JSON.parse(wstr);
}); });
let ostr=JSON.stringify(this.warehouseOptions).replace(/warehouseId/g,'pId').replace(/warehouseName/g, 'pName'); let ostr=JSON.stringify(this.warehouseOptions).replace(/warehouseId/g,'pId').replace(/warehouseName/g, 'pName');
@ -295,50 +295,50 @@ export default {
// //
reset() { reset() {
this.form = { this.form = {
lineId: null, lineId: null,
transferId: this.transferId, transferId: this.transferId,
materialStockId: null, materialStockId: null,
itemId: null, itemId: null,
itemCode: null, itemCode: null,
itemName: null, itemName: null,
specification: null, specification: null,
unitOfMeasure: null, unitOfMeasure: null,
quantityTransfer: null, quantityTransfer: null,
workorderId: null, workorderId: null,
workorderCode: null, workorderCode: null,
batchCode: null, batchCode: null,
fromWarehouseId: this.fromWarehouseId, fromWarehouseId: this.fromWarehouseId,
fromWarehouseCode: null, fromWarehouseCode: null,
fromWarehouseName: null, fromWarehouseName: null,
fromLocationId: null, fromLocationId: null,
fromLocationCode: null, fromLocationCode: null,
fromLocationName: null, fromLocationName: null,
fromAreaId: null, fromAreaId: null,
fromAreaCode: null, fromAreaCode: null,
fromAreaName: null, fromAreaName: null,
toWarehouseId: this.toWarehouseId, toWarehouseId: this.toWarehouseId,
toWarehouseCode: null, toWarehouseCode: null,
toWarehouseName: null, toWarehouseName: null,
toLocationId: null, toLocationId: null,
toLocationCode: null, toLocationCode: null,
toLocationName: null, toLocationName: null,
toAreaId: null, toAreaId: null,
toAreaCode: null, toAreaCode: null,
toAreaName: null, toAreaName: null,
expireDate: null, expireDate: null,
vendorId: null, vendorId: null,
vendorCode: null, vendorCode: null,
vendorName: null, vendorName: null,
vendorNick: null, vendorNick: null,
remark: null, remark: null,
attr1: null, attr1: null,
attr2: null, attr2: null,
attr3: null, attr3: null,
attr4: null, attr4: null,
createBy: null, createBy: null,
createTime: null, createTime: null,
updateBy: null, updateBy: null,
updateTime: null updateTime: null
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -371,8 +371,8 @@ export default {
getTransferline(lineId).then(response => { getTransferline(lineId).then(response => {
this.form = response.data; this.form = response.data;
this.fromWarehouse = response.data.fromWarehouseName+" / "+response.data.fromLocationName+" / "+response.data.fromAreaName; this.fromWarehouse = response.data.fromWarehouseName+" / "+response.data.fromLocationName+" / "+response.data.fromAreaName;
this.warehouseInfo[0] = response.data.toWarehouseId; this.warehouseInfo[0] = response.data.toWarehouseId;
this.warehouseInfo[1] = response.data.toLocationId; this.warehouseInfo[1] = response.data.toLocationId;
this.warehouseInfo[2] = response.data.toAreaId; this.warehouseInfo[2] = response.data.toAreaId;
this.open = true; this.open = true;
this.title = "修改转移单行"; this.title = "修改转移单行";
@ -380,9 +380,9 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
debugger; debugger;
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.lineId != null) { if (this.form.lineId != null) {
updateTransferline(this.form).then(response => { updateTransferline(this.form).then(response => {
@ -423,7 +423,7 @@ export default {
this.form.itemCode = obj.itemCode; this.form.itemCode = obj.itemCode;
this.form.itemName = obj.itemName; this.form.itemName = obj.itemName;
this.form.specification = obj.specification; this.form.specification = obj.specification;
this.form.unitOfMeasure = obj.unitOfMeasure; this.form.unitOfMeasure = obj.unitOfMeasure;
this.form.batchCode = obj.batchCode; this.form.batchCode = obj.batchCode;
this.form.quantityTransfer = obj.quantityOnhand; this.form.quantityTransfer = obj.quantityOnhand;
this.form.quantityMax = obj.quantityOnhand; this.form.quantityMax = obj.quantityOnhand;
@ -440,12 +440,13 @@ export default {
this.form.vendorCode = obj.vendorCode; this.form.vendorCode = obj.vendorCode;
this.form.vendorName = obj.vendorName; this.form.vendorName = obj.vendorName;
this.form.workorderId = obj.workorderId; this.form.workorderId = obj.workorderId;
this.form.workorderCode = obj.workorderCode; this.form.workorderCode = obj.workorderCode;
this.fromWarehouse = obj.warehouseName +" / "+ obj.locationName +" / "+ obj.areaName; this.fromWarehouse = obj.warehouseName +" / "+ obj.locationName +" / "+ obj.areaName;
this.form.unitName = obj.unitName
} }
}, },
// //
handleToWarehouseChanged(obj){ handleToWarehouseChanged(obj){
if(obj !=null){ if(obj !=null){
this.form.toWarehouseId = obj[0]; this.form.toWarehouseId = obj[0];
this.form.toLocationId = obj[1]; this.form.toLocationId = obj[1];