|
@@ -38,7 +38,10 @@
|
|
|
@click.native="openCode"
|
|
@click.native="openCode"
|
|
|
:disabled="status == 0"
|
|
:disabled="status == 0"
|
|
|
/> -->
|
|
/> -->
|
|
|
- <el-input v-model="form.code" :disabled="status == 0 || isReadOnly">
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="form.code"
|
|
|
|
|
+ :disabled="status == 0 || isReadOnly"
|
|
|
|
|
+ >
|
|
|
<template slot="append" v-if="status != 0 && !isReadOnly">
|
|
<template slot="append" v-if="status != 0 && !isReadOnly">
|
|
|
<el-link :underline="false" @click.native="getCodeOpen"
|
|
<el-link :underline="false" @click.native="getCodeOpen"
|
|
|
>申请编码
|
|
>申请编码
|
|
@@ -195,7 +198,11 @@
|
|
|
trigger: 'change'
|
|
trigger: 'change'
|
|
|
}"
|
|
}"
|
|
|
>
|
|
>
|
|
|
- <el-input v-model="form.specification" @input="inputSpe" :disabled="isReadOnly" />
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="form.specification"
|
|
|
|
|
+ @input="inputSpe"
|
|
|
|
|
+ :disabled="isReadOnly"
|
|
|
|
|
+ />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
@@ -306,7 +313,11 @@
|
|
|
}"
|
|
}"
|
|
|
>
|
|
>
|
|
|
<div class="form-line">
|
|
<div class="form-line">
|
|
|
- <el-input v-model="form.roughWeight" @input="handleInput2" :disabled="isReadOnly" />
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="form.roughWeight"
|
|
|
|
|
+ @input="handleInput2"
|
|
|
|
|
+ :disabled="isReadOnly"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -323,7 +334,11 @@
|
|
|
}"
|
|
}"
|
|
|
>
|
|
>
|
|
|
<div class="form-line">
|
|
<div class="form-line">
|
|
|
- <el-input v-model="form.netWeight" @input="handleInput3" :disabled="isReadOnly" />
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="form.netWeight"
|
|
|
|
|
+ @input="handleInput3"
|
|
|
|
|
+ :disabled="isReadOnly"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -472,7 +487,9 @@
|
|
|
:disabled="f.extAttribute?.disabled || isReadOnly"
|
|
:disabled="f.extAttribute?.disabled || isReadOnly"
|
|
|
clearable
|
|
clearable
|
|
|
:isProhibit="
|
|
:isProhibit="
|
|
|
- f.modelType == 'dict' ? f.extAttribute?.disabled || isReadOnly : false
|
|
|
|
|
|
|
+ f.modelType == 'dict'
|
|
|
|
|
+ ? f.extAttribute?.disabled || isReadOnly
|
|
|
|
|
+ : false
|
|
|
"
|
|
"
|
|
|
:dictName="f.modelType == 'dict' ? f.label : ''"
|
|
:dictName="f.modelType == 'dict' ? f.label : ''"
|
|
|
></component>
|
|
></component>
|
|
@@ -483,23 +500,35 @@
|
|
|
<template v-if="industryAttribute == 1">
|
|
<template v-if="industryAttribute == 1">
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="性味与归经">
|
|
<el-form-item label="性味与归经">
|
|
|
- <el-input v-model="form.propertiesChannelTropism" :disabled="isReadOnly" />
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="form.propertiesChannelTropism"
|
|
|
|
|
+ :disabled="isReadOnly"
|
|
|
|
|
+ />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="功能与主治">
|
|
<el-form-item label="功能与主治">
|
|
|
- <el-input v-model="form.actionsAndUses" :disabled="isReadOnly" />
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="form.actionsAndUses"
|
|
|
|
|
+ :disabled="isReadOnly"
|
|
|
|
|
+ />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="用法与用量">
|
|
<el-form-item label="用法与用量">
|
|
|
- <el-input v-model="form.usageAndDosage" :disabled="isReadOnly" />
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="form.usageAndDosage"
|
|
|
|
|
+ :disabled="isReadOnly"
|
|
|
|
|
+ />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</template>
|
|
</template>
|
|
|
<el-col :span="8" v-if="clientEnvironmentId == 5">
|
|
<el-col :span="8" v-if="clientEnvironmentId == 5">
|
|
|
<el-form-item label="需要序列号">
|
|
<el-form-item label="需要序列号">
|
|
|
- <el-radio-group v-model="form.extTagField.needProductSequence" :disabled="isReadOnly">
|
|
|
|
|
|
|
+ <el-radio-group
|
|
|
|
|
+ v-model="form.extTagField.needProductSequence"
|
|
|
|
|
+ :disabled="isReadOnly"
|
|
|
|
|
+ >
|
|
|
<el-radio :label="1">是</el-radio>
|
|
<el-radio :label="1">是</el-radio>
|
|
|
<el-radio :label="0">否</el-radio>
|
|
<el-radio :label="0">否</el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
@@ -512,7 +541,11 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
<el-form-item label="产品图片">
|
|
<el-form-item label="产品图片">
|
|
|
- <ImgUpload ref="imgUploadRef" v-model="form.imgUrl" :disabled="isReadOnly" />
|
|
|
|
|
|
|
+ <ImgUpload
|
|
|
|
|
+ ref="imgUploadRef"
|
|
|
|
|
+ v-model="form.imgUrl"
|
|
|
|
|
+ :disabled="isReadOnly"
|
|
|
|
|
+ />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
@@ -523,7 +556,10 @@
|
|
|
<!-- {{ form.extTagField }} -->
|
|
<!-- {{ form.extTagField }} -->
|
|
|
<el-form label-width="100px">
|
|
<el-form label-width="100px">
|
|
|
<el-form-item label="是否消耗品">
|
|
<el-form-item label="是否消耗品">
|
|
|
- <el-radio-group v-model="form.extTagField.isConsumables" :disabled="isReadOnly">
|
|
|
|
|
|
|
+ <el-radio-group
|
|
|
|
|
+ v-model="form.extTagField.isConsumables"
|
|
|
|
|
+ :disabled="isReadOnly"
|
|
|
|
|
+ >
|
|
|
<el-radio :label="1">是</el-radio>
|
|
<el-radio :label="1">是</el-radio>
|
|
|
<el-radio :label="0">否</el-radio>
|
|
<el-radio :label="0">否</el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
@@ -562,7 +598,11 @@
|
|
|
:disabled="isReadOnly"
|
|
:disabled="isReadOnly"
|
|
|
/>
|
|
/>
|
|
|
<!-- 生产信息 -->
|
|
<!-- 生产信息 -->
|
|
|
- <ProductionInfo ref="productionRefs" :form="categoryMes" :disabled="isReadOnly" />
|
|
|
|
|
|
|
+ <ProductionInfo
|
|
|
|
|
+ ref="productionRefs"
|
|
|
|
|
+ :form="categoryMes"
|
|
|
|
|
+ :disabled="isReadOnly"
|
|
|
|
|
+ />
|
|
|
<!-- 计划 -->
|
|
<!-- 计划 -->
|
|
|
<PlanInfo ref="planRefs" :form="categoryAps" :disabled="isReadOnly" />
|
|
<PlanInfo ref="planRefs" :form="categoryAps" :disabled="isReadOnly" />
|
|
|
<!-- 质量配置 -->
|
|
<!-- 质量配置 -->
|
|
@@ -571,7 +611,11 @@
|
|
|
<!-- 舟皿信息 -->
|
|
<!-- 舟皿信息 -->
|
|
|
<BoatInfo :form="categoryPallet" :disabled="isReadOnly" />
|
|
<BoatInfo :form="categoryPallet" :disabled="isReadOnly" />
|
|
|
<!-- 周转车信息 -->
|
|
<!-- 周转车信息 -->
|
|
|
- <TurnoverInfo ref="turnoverRefs" :form="categoryVehicle" :disabled="isReadOnly" />
|
|
|
|
|
|
|
+ <TurnoverInfo
|
|
|
|
|
+ ref="turnoverRefs"
|
|
|
|
|
+ :form="categoryVehicle"
|
|
|
|
|
+ :disabled="isReadOnly"
|
|
|
|
|
+ />
|
|
|
<!-- 模具信息 -->
|
|
<!-- 模具信息 -->
|
|
|
<MoldInfo ref="moldRefs" :form="categoryMold" :disabled="isReadOnly" />
|
|
<MoldInfo ref="moldRefs" :form="categoryMold" :disabled="isReadOnly" />
|
|
|
<!-- 备注信息 -->
|
|
<!-- 备注信息 -->
|
|
@@ -816,7 +860,7 @@
|
|
|
categoryQms: [...copyObj(defCategoryQms)],
|
|
categoryQms: [...copyObj(defCategoryQms)],
|
|
|
categoryVehicle: {},
|
|
categoryVehicle: {},
|
|
|
categoryWms: {
|
|
categoryWms: {
|
|
|
- isUnpack: 0,
|
|
|
|
|
|
|
+ isUnpack: 1,
|
|
|
isWarn: 1,
|
|
isWarn: 1,
|
|
|
inventoryMode: '',
|
|
inventoryMode: '',
|
|
|
secureInventory: '1',
|
|
secureInventory: '1',
|
|
@@ -916,7 +960,7 @@
|
|
|
|
|
|
|
|
this.categoryVehicle = {};
|
|
this.categoryVehicle = {};
|
|
|
this.categoryWms = {
|
|
this.categoryWms = {
|
|
|
- isUnpack: 0,
|
|
|
|
|
|
|
+ isUnpack: 1,
|
|
|
isWarn: 1,
|
|
isWarn: 1,
|
|
|
inventoryMode: this.form.isConsumable,
|
|
inventoryMode: this.form.isConsumable,
|
|
|
minPackageCell: '',
|
|
minPackageCell: '',
|
|
@@ -1011,8 +1055,15 @@
|
|
|
},
|
|
},
|
|
|
async activated() {
|
|
async activated() {
|
|
|
this.status = this.$route.query.status;
|
|
this.status = this.$route.query.status;
|
|
|
- this.isReadOnly = this.$route.query.readOnly === 'true' || this.$route.query.readOnly === true;
|
|
|
|
|
- console.log('activated - isReadOnly 状态:', this.isReadOnly, 'readOnly参数:', this.$route.query.readOnly);
|
|
|
|
|
|
|
+ this.isReadOnly =
|
|
|
|
|
+ this.$route.query.readOnly === 'true' ||
|
|
|
|
|
+ this.$route.query.readOnly === true;
|
|
|
|
|
+ console.log(
|
|
|
|
|
+ 'activated - isReadOnly 状态:',
|
|
|
|
|
+ this.isReadOnly,
|
|
|
|
|
+ 'readOnly参数:',
|
|
|
|
|
+ this.$route.query.readOnly
|
|
|
|
|
+ );
|
|
|
this.form.categoryLevelId = this.$route.query.categoryLevelId;
|
|
this.form.categoryLevelId = this.$route.query.categoryLevelId;
|
|
|
this.form.categoryLevelName = this.$route.query.categoryLevelName;
|
|
this.form.categoryLevelName = this.$route.query.categoryLevelName;
|
|
|
this.form.categoryLevelPath = this.$route.query.categoryLevelPath;
|
|
this.form.categoryLevelPath = this.$route.query.categoryLevelPath;
|
|
@@ -1036,16 +1087,23 @@
|
|
|
if (res.value) {
|
|
if (res.value) {
|
|
|
this.isNetWeight = res.value;
|
|
this.isNetWeight = res.value;
|
|
|
if (this.clientEnvironmentId != 5) {
|
|
if (this.clientEnvironmentId != 5) {
|
|
|
- if (this.isNetWeight == 1) {
|
|
|
|
|
|
|
+ if (this.isNetWeight == 1 && !this.$route.query.id) {
|
|
|
console.log('dadada');
|
|
console.log('dadada');
|
|
|
- this.$set(this.categoryWms, 'isUnpack', 1);
|
|
|
|
|
|
|
+ this.setDefaultUnpackByConsumable();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- this.isReadOnly = this.$route.query.readOnly === 'true' || this.$route.query.readOnly === true;
|
|
|
|
|
- console.log('详情页 isReadOnly 状态:', this.isReadOnly, 'readOnly参数:', this.$route.query.readOnly);
|
|
|
|
|
|
|
+ this.isReadOnly =
|
|
|
|
|
+ this.$route.query.readOnly === 'true' ||
|
|
|
|
|
+ this.$route.query.readOnly === true;
|
|
|
|
|
+ console.log(
|
|
|
|
|
+ '详情页 isReadOnly 状态:',
|
|
|
|
|
+ this.isReadOnly,
|
|
|
|
|
+ 'readOnly参数:',
|
|
|
|
|
+ this.$route.query.readOnly
|
|
|
|
|
+ );
|
|
|
|
|
|
|
|
parameterGetByCode({
|
|
parameterGetByCode({
|
|
|
code: 'mandatory_field'
|
|
code: 'mandatory_field'
|
|
@@ -1109,12 +1167,19 @@
|
|
|
mounted() {
|
|
mounted() {
|
|
|
if (this.clientEnvironmentId == 4) {
|
|
if (this.clientEnvironmentId == 4) {
|
|
|
this.form.measureType = 3;
|
|
this.form.measureType = 3;
|
|
|
- this.$set(this.categoryWms, 'isUnpack', 0);
|
|
|
|
|
- } else if (this.clientEnvironmentId == 5) {
|
|
|
|
|
- this.$set(this.categoryWms, 'isUnpack', 0);
|
|
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getDefaultIsUnpackByConsumable(isConsumable) {
|
|
|
|
|
+ return Number(isConsumable) === 1 ? 0 : 1;
|
|
|
|
|
+ },
|
|
|
|
|
+ setDefaultUnpackByConsumable() {
|
|
|
|
|
+ this.$set(
|
|
|
|
|
+ this.categoryWms,
|
|
|
|
|
+ 'isUnpack',
|
|
|
|
|
+ this.getDefaultIsUnpackByConsumable(this.form.isConsumable)
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
inputSpe(val) {
|
|
inputSpe(val) {
|
|
|
if (this.form.measuringUnit == '立方') {
|
|
if (this.form.measuringUnit == '立方') {
|
|
|
if (!val || typeof val !== 'string') {
|
|
if (!val || typeof val !== 'string') {
|
|
@@ -1169,12 +1234,6 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
changeMeasureType() {
|
|
changeMeasureType() {
|
|
|
- if (this.form.measureType == 1) {
|
|
|
|
|
- console.log('7897979');
|
|
|
|
|
- this.$set(this.categoryWms, 'isUnpack', 1);
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$set(this.categoryWms, 'isUnpack', 0);
|
|
|
|
|
- }
|
|
|
|
|
this.setNetWeight();
|
|
this.setNetWeight();
|
|
|
},
|
|
},
|
|
|
handleInput(value) {
|
|
handleInput(value) {
|
|
@@ -1191,6 +1250,7 @@
|
|
|
},
|
|
},
|
|
|
changeConsumable() {
|
|
changeConsumable() {
|
|
|
this.$set(this.categoryWms, 'inventoryMode', this.form.isConsumable);
|
|
this.$set(this.categoryWms, 'inventoryMode', this.form.isConsumable);
|
|
|
|
|
+ this.setDefaultUnpackByConsumable();
|
|
|
},
|
|
},
|
|
|
changeWeightUnit() {
|
|
changeWeightUnit() {
|
|
|
if (
|
|
if (
|