|
@@ -114,7 +114,8 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="净重">
|
|
|
|
|
|
|
+ <el-form-item label="净重"
|
|
|
|
|
+ :rules="{ required: form.measuringUnit == form.weightUnit, trigger: ['blur', 'change'] }">
|
|
|
<div class="form-line">
|
|
<div class="form-line">
|
|
|
<el-input v-model="form.netWeight" @input="handleInput3" />
|
|
<el-input v-model="form.netWeight" @input="handleInput3" />
|
|
|
</div>
|
|
</div>
|
|
@@ -165,7 +166,7 @@
|
|
|
<!-- 仓储配置 -->
|
|
<!-- 仓储配置 -->
|
|
|
<WarehouseInfo ref="warehouseRefs" v-if="isShow" :form="categoryWms" :measuringUnit="form.measuringUnit"
|
|
<WarehouseInfo ref="warehouseRefs" v-if="isShow" :form="categoryWms" :measuringUnit="form.measuringUnit"
|
|
|
:packingUnit="form.packingUnit" :packageDispositionVOList="packageDispositionVOList"
|
|
:packingUnit="form.packingUnit" :packageDispositionVOList="packageDispositionVOList"
|
|
|
- @change="changePackagingSpecification" />
|
|
|
|
|
|
|
+ @change="changePackagingSpecification" @changeType="changeType" />
|
|
|
<!-- 销售配置 -->
|
|
<!-- 销售配置 -->
|
|
|
<SalesInfos ref="salesRefs" :form="categorySales" />
|
|
<SalesInfos ref="salesRefs" :form="categorySales" />
|
|
|
<!-- 采购信息 -->
|
|
<!-- 采购信息 -->
|
|
@@ -305,7 +306,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
categoryVehicle: {},
|
|
categoryVehicle: {},
|
|
|
categoryWms: {
|
|
categoryWms: {
|
|
|
- isUnpack: 1,
|
|
|
|
|
|
|
+ isUnpack: '',
|
|
|
isWarn: 1,
|
|
isWarn: 1,
|
|
|
inventoryMode: '',
|
|
inventoryMode: '',
|
|
|
secureInventory: '1',
|
|
secureInventory: '1',
|
|
@@ -387,7 +388,7 @@ export default {
|
|
|
this.categoryQms = {};
|
|
this.categoryQms = {};
|
|
|
this.categoryVehicle = {};
|
|
this.categoryVehicle = {};
|
|
|
this.categoryWms = {
|
|
this.categoryWms = {
|
|
|
- isUnpack: 1,
|
|
|
|
|
|
|
+ isUnpack: '',
|
|
|
isWarn: 1,
|
|
isWarn: 1,
|
|
|
inventoryMode: this.form.isConsumable,
|
|
inventoryMode: this.form.isConsumable,
|
|
|
minPackageCell: '',
|
|
minPackageCell: '',
|
|
@@ -460,20 +461,25 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
inputSpe(val) {
|
|
inputSpe(val) {
|
|
|
- if (!val || typeof val !== 'string') {
|
|
|
|
|
- this.form.volume = 0;
|
|
|
|
|
- return;
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ if (this.form.measuringUnit == '立方') {
|
|
|
|
|
+ if (!val || typeof val !== 'string') {
|
|
|
|
|
+ this.form.volume = 0;
|
|
|
|
|
+ return;
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
- let modelArr = val.split('*');
|
|
|
|
|
- let modelLong = modelArr[0]; // model规格长度
|
|
|
|
|
- let modeWide = modelArr[1]; // model规格宽度
|
|
|
|
|
- let modeHight = modelArr[2]?.substr(0, modelArr[2].indexOf('cm')); // model规格高度
|
|
|
|
|
- modeHight = Number(modeHight);
|
|
|
|
|
|
|
+ let modelArr = val.split('*');
|
|
|
|
|
+ let modelLong = modelArr[0]; // model规格长度
|
|
|
|
|
+ let modeWide = modelArr[1]; // model规格宽度
|
|
|
|
|
+ let modeHight = modelArr[2]?.substr(0, modelArr[2].indexOf('cm')); // model规格高度
|
|
|
|
|
+ modeHight = Number(modeHight);
|
|
|
|
|
+
|
|
|
|
|
+ let aa = (modelLong * modeWide * modeHight) / 1000000;
|
|
|
|
|
+ console.log(aa, 'aa')
|
|
|
|
|
+ this.form.volume = aa;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.form.volume = '';
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- let aa = (modelLong * modeWide * modeHight) / 1000000;
|
|
|
|
|
- console.log(aa, 'aa')
|
|
|
|
|
- this.form.volume = aa;
|
|
|
|
|
},
|
|
},
|
|
|
handleInput(value) {
|
|
handleInput(value) {
|
|
|
// this.form.volume = this.$handleInputPublicHasPoint(value);
|
|
// this.form.volume = this.$handleInputPublicHasPoint(value);
|
|
@@ -482,13 +488,14 @@ export default {
|
|
|
this.form.roughWeight = this.$handleInputPublicHasPoint(value);
|
|
this.form.roughWeight = this.$handleInputPublicHasPoint(value);
|
|
|
},
|
|
},
|
|
|
handleInput3(value) {
|
|
handleInput3(value) {
|
|
|
- this.form.netWeight = this.$handleInputPublicHasPoint(value);
|
|
|
|
|
|
|
+ // this.form.netWeight = this.$handleInputPublicHasPoint(value);
|
|
|
if (this.form.weightUnit == this.form.measuringUnit) {
|
|
if (this.form.weightUnit == this.form.measuringUnit) {
|
|
|
this.$refs.warehouseRefs.changeNetWeight(this.form.netWeight);
|
|
this.$refs.warehouseRefs.changeNetWeight(this.form.netWeight);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
changeConsumable() {
|
|
changeConsumable() {
|
|
|
- this.categoryWms.inventoryMode = this.form.isConsumable;
|
|
|
|
|
|
|
+ this.$set(this.categoryWms, 'inventoryMode', this.form.isConsumable);
|
|
|
|
|
+ this.$set(this.categoryWms, 'isUnpack', this.form.isConsumable === 1 ? 0 : 1);
|
|
|
},
|
|
},
|
|
|
changeWeightUnit() {
|
|
changeWeightUnit() {
|
|
|
if (this.form.measuringUnit && this.form.packingUnit && this.form.netWeight) {
|
|
if (this.form.measuringUnit && this.form.packingUnit && this.form.netWeight) {
|
|
@@ -500,8 +507,11 @@ export default {
|
|
|
|
|
|
|
|
if (this.form.measuringUnit) {
|
|
if (this.form.measuringUnit) {
|
|
|
// 计量单位是‘立方’ 体积单位默认是‘立方’
|
|
// 计量单位是‘立方’ 体积单位默认是‘立方’
|
|
|
- if (this.form.measuringUnit == '立方') {
|
|
|
|
|
|
|
+ if (this.form.measuringUnit == '立方' && this.form.specification != '') {
|
|
|
this.form.volumeUnit = '立方';
|
|
this.form.volumeUnit = '立方';
|
|
|
|
|
+ this.inputSpe(this.form.specification)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.form.volume = 0;
|
|
|
}
|
|
}
|
|
|
this.categoryPurchase.measuringUnit = this.form.measuringUnit;
|
|
this.categoryPurchase.measuringUnit = this.form.measuringUnit;
|
|
|
console.log(this.categoryPurchase.measuringUnit, '采购信息');
|
|
console.log(this.categoryPurchase.measuringUnit, '采购信息');
|
|
@@ -527,8 +537,13 @@ export default {
|
|
|
this.isShow = true;
|
|
this.isShow = true;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ changeType(val) {
|
|
|
|
|
+ this.$set(this.form, 'isConsumable', val == 1 ? 0 : 1);
|
|
|
|
|
+ this.$set(this.categoryWms, 'inventoryMode', val == 1 ? 0 : 1);
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
changePackagingSpecification(val) {
|
|
changePackagingSpecification(val) {
|
|
|
- console.log('changePackagingSpecification---', val);
|
|
|
|
|
|
|
+ console.log('changePackagingSpecification--------默认包装组', val);
|
|
|
this.packagingSpecificationList = val;
|
|
this.packagingSpecificationList = val;
|
|
|
},
|
|
},
|
|
|
async _getDetails() {
|
|
async _getDetails() {
|