|
@@ -146,7 +146,7 @@
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="form.volume"
|
|
v-model="form.volume"
|
|
|
style="width: calc(100% - 100px)"
|
|
style="width: calc(100% - 100px)"
|
|
|
- @input="handleInputPublicHasPoint"
|
|
|
|
|
|
|
+ @input="handleInput1"
|
|
|
/>
|
|
/>
|
|
|
<DictSelection
|
|
<DictSelection
|
|
|
dictName="体积单位"
|
|
dictName="体积单位"
|
|
@@ -162,7 +162,7 @@
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="毛重">
|
|
<el-form-item label="毛重">
|
|
|
<div class="form-line">
|
|
<div class="form-line">
|
|
|
- <el-input v-model="form.roughWeight" />
|
|
|
|
|
|
|
+ <el-input v-model="form.roughWeight" @input="handleInput2" />
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -170,7 +170,7 @@
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="净重">
|
|
<el-form-item label="净重">
|
|
|
<div class="form-line">
|
|
<div class="form-line">
|
|
|
- <el-input v-model="form.netWeight" />
|
|
|
|
|
|
|
+ <el-input v-model="form.netWeight" @input="handleInput3" />
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -213,23 +213,6 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
-
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="属性类型:" prop="attributeType">
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-model="form.attributeType"
|
|
|
|
|
- filterable
|
|
|
|
|
- class="ele-block"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in attributeList"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :value="item.value"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- ></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</el-card>
|
|
</el-card>
|
|
@@ -244,7 +227,6 @@
|
|
|
<!-- 分类选择弹窗 -->
|
|
<!-- 分类选择弹窗 -->
|
|
|
<CategoryDialog ref="categoryRefs" @chooseCategory="confirmCategory" />
|
|
<CategoryDialog ref="categoryRefs" @chooseCategory="confirmCategory" />
|
|
|
<!-- 仓储配置 -->
|
|
<!-- 仓储配置 -->
|
|
|
- <<<<<<< HEAD
|
|
|
|
|
<WarehouseInfo
|
|
<WarehouseInfo
|
|
|
ref="warehouseRefs"
|
|
ref="warehouseRefs"
|
|
|
v-if="isShow"
|
|
v-if="isShow"
|
|
@@ -254,24 +236,10 @@
|
|
|
:packageDispositionVOList="packageDispositionVOList"
|
|
:packageDispositionVOList="packageDispositionVOList"
|
|
|
@change="changePackagingSpecification"
|
|
@change="changePackagingSpecification"
|
|
|
/>
|
|
/>
|
|
|
- =======
|
|
|
|
|
- <WarehouseInfo
|
|
|
|
|
- ref="warehouseRefs"
|
|
|
|
|
- :form="categoryWms"
|
|
|
|
|
- :measuringUnit="form.measuringUnit"
|
|
|
|
|
- :packingUnit="form.packingUnit"
|
|
|
|
|
- :packageDispositionVOList="packageDispositionVOList"
|
|
|
|
|
- @change="changePackagingSpecification"
|
|
|
|
|
- />
|
|
|
|
|
- >>>>>>> 778152e35a1d73386814551d9d6194caae9cf792
|
|
|
|
|
<!-- 销售配置 -->
|
|
<!-- 销售配置 -->
|
|
|
<SalesInfos ref="salesRefs" :form="categorySales" />
|
|
<SalesInfos ref="salesRefs" :form="categorySales" />
|
|
|
<!-- 采购信息 -->
|
|
<!-- 采购信息 -->
|
|
|
- <PurchasingInfo
|
|
|
|
|
- ref="PurchasingInfoRefs"
|
|
|
|
|
- v-if="categoryPurchase"
|
|
|
|
|
- :form="categoryPurchase"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <PurchasingInfo ref="PurchasingInfoRefs" :form="categoryPurchase" />
|
|
|
<!-- 生产信息 -->
|
|
<!-- 生产信息 -->
|
|
|
<ProductionInfo ref="productionRefs" :form="categoryMes" />
|
|
<ProductionInfo ref="productionRefs" :form="categoryMes" />
|
|
|
<!-- 计划 -->
|
|
<!-- 计划 -->
|
|
@@ -323,39 +291,6 @@
|
|
|
import { deepClone } from '@/utils/index';
|
|
import { deepClone } from '@/utils/index';
|
|
|
import { finishPageTab, reloadPageTab } from '@/utils/page-tab-util';
|
|
import { finishPageTab, reloadPageTab } from '@/utils/page-tab-util';
|
|
|
|
|
|
|
|
- <<<<<<< HEAD
|
|
|
|
|
- export default {
|
|
|
|
|
- name: 'product',
|
|
|
|
|
- components: {
|
|
|
|
|
- SalesInfos,
|
|
|
|
|
- PurchasingInfo,
|
|
|
|
|
- linkMsg,
|
|
|
|
|
- GroupDialog,
|
|
|
|
|
- deptSelect,
|
|
|
|
|
- personSelect,
|
|
|
|
|
- WarehouseInfo,
|
|
|
|
|
- ProcureInfo,
|
|
|
|
|
- ProductionInfo,
|
|
|
|
|
- PlanInfo,
|
|
|
|
|
- SalesInfo,
|
|
|
|
|
- QualityInfo,
|
|
|
|
|
- BoatInfo,
|
|
|
|
|
- TurnoverInfo,
|
|
|
|
|
- MoldInfo,
|
|
|
|
|
- RemarkInfo,
|
|
|
|
|
- CategoryDialog,
|
|
|
|
|
- CodeDialog
|
|
|
|
|
- },
|
|
|
|
|
- data() {
|
|
|
|
|
- return {
|
|
|
|
|
- isShow: true,
|
|
|
|
|
- packagingSpecificationList: [],
|
|
|
|
|
- loading: false,
|
|
|
|
|
- levelOptions: [
|
|
|
|
|
- {
|
|
|
|
|
- label: '特级',
|
|
|
|
|
- value: '特级'
|
|
|
|
|
- =======
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'product',
|
|
name: 'product',
|
|
|
components: {
|
|
components: {
|
|
@@ -380,6 +315,7 @@
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ isShow: true,
|
|
|
packagingSpecificationList: [],
|
|
packagingSpecificationList: [],
|
|
|
loading: false,
|
|
loading: false,
|
|
|
levelOptions: [
|
|
levelOptions: [
|
|
@@ -400,24 +336,6 @@
|
|
|
value: '三级'
|
|
value: '三级'
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
- attributeList: [
|
|
|
|
|
- {
|
|
|
|
|
- label: '总装',
|
|
|
|
|
- value: 1
|
|
|
|
|
- >>>>>>> 778152e35a1d73386814551d9d6194caae9cf792
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '部件',
|
|
|
|
|
- value: 2
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '零',
|
|
|
|
|
- value: 3
|
|
|
|
|
- },{
|
|
|
|
|
- label: '原材料',
|
|
|
|
|
- value: 4
|
|
|
|
|
- }
|
|
|
|
|
- ],
|
|
|
|
|
form: {
|
|
form: {
|
|
|
categoryLevelGroupName: '',
|
|
categoryLevelGroupName: '',
|
|
|
categoryLevelName: '',
|
|
categoryLevelName: '',
|
|
@@ -425,7 +343,7 @@
|
|
|
measuringUnit: '',
|
|
measuringUnit: '',
|
|
|
weightUnit: '',
|
|
weightUnit: '',
|
|
|
packingUnit: '',
|
|
packingUnit: '',
|
|
|
- attributeType:'',
|
|
|
|
|
|
|
+
|
|
|
extField: {}
|
|
extField: {}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -433,39 +351,24 @@
|
|
|
remarkAttach: []
|
|
remarkAttach: []
|
|
|
},
|
|
},
|
|
|
categorySales: {},
|
|
categorySales: {},
|
|
|
- categoryPurchase: { purchaseMultiplier: 1 },
|
|
|
|
|
|
|
+ categoryPurchase: { purchaseMultiplier: 1, measuringUnit: '' },
|
|
|
categoryAps: {},
|
|
categoryAps: {},
|
|
|
categoryMes: {},
|
|
categoryMes: {},
|
|
|
categoryMold: {},
|
|
categoryMold: {},
|
|
|
categoryPallet: {},
|
|
categoryPallet: {},
|
|
|
- categoryQms: {},
|
|
|
|
|
|
|
+ categoryQms: {
|
|
|
|
|
+ isComeCheck: '1'
|
|
|
|
|
+ },
|
|
|
categoryVehicle: {},
|
|
categoryVehicle: {},
|
|
|
categoryWms: {
|
|
categoryWms: {
|
|
|
- isUnpack: 1
|
|
|
|
|
|
|
+ isUnpack: 1,
|
|
|
|
|
+ isWarn: 1,
|
|
|
|
|
+ inventoryMode: ''
|
|
|
},
|
|
},
|
|
|
packageDispositionVOList: [],
|
|
packageDispositionVOList: [],
|
|
|
categoryLevelPathId: null,
|
|
categoryLevelPathId: null,
|
|
|
|
|
|
|
|
- remarkform: {
|
|
|
|
|
- remarkAttach: []
|
|
|
|
|
- },
|
|
|
|
|
- categorySales: {},
|
|
|
|
|
- categoryPurchase: { purchaseMultiplier: 1, measuringUnit: '' },
|
|
|
|
|
- categoryAps: {},
|
|
|
|
|
- categoryMes: {},
|
|
|
|
|
- categoryMold: {},
|
|
|
|
|
- categoryPallet: {},
|
|
|
|
|
- categoryQms: {
|
|
|
|
|
- isComeCheck: '1'
|
|
|
|
|
- },
|
|
|
|
|
- categoryVehicle: {},
|
|
|
|
|
- categoryWms: {
|
|
|
|
|
- isUnpack: 1,
|
|
|
|
|
- isWarn: 1,
|
|
|
|
|
- inventoryMode: ''
|
|
|
|
|
- },
|
|
|
|
|
- packageDispositionVOList: [],
|
|
|
|
|
- categoryLevelPathId: null,
|
|
|
|
|
|
|
+ dictList: [],
|
|
|
|
|
|
|
|
fileList: [],
|
|
fileList: [],
|
|
|
// 表单验证规则
|
|
// 表单验证规则
|
|
@@ -521,6 +424,7 @@
|
|
|
packingUnit: '',
|
|
packingUnit: '',
|
|
|
extField: {}
|
|
extField: {}
|
|
|
};
|
|
};
|
|
|
|
|
+ this.categorySales = {};
|
|
|
this.purchaseInfo = {};
|
|
this.purchaseInfo = {};
|
|
|
this.remarkform = {
|
|
this.remarkform = {
|
|
|
remarkAttach: []
|
|
remarkAttach: []
|
|
@@ -532,140 +436,16 @@
|
|
|
this.categoryQms = {};
|
|
this.categoryQms = {};
|
|
|
this.categoryVehicle = {};
|
|
this.categoryVehicle = {};
|
|
|
this.categoryWms = {
|
|
this.categoryWms = {
|
|
|
- isUnpack: 1
|
|
|
|
|
|
|
+ isUnpack: 1,
|
|
|
|
|
+ isWarn: 1,
|
|
|
|
|
+ inventoryMode: this.form.isConsumable
|
|
|
};
|
|
};
|
|
|
this.packageDispositionVOList = [];
|
|
this.packageDispositionVOList = [];
|
|
|
this.categoryLevelPathId = null;
|
|
this.categoryLevelPathId = null;
|
|
|
|
|
|
|
|
- status: null
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
- watch: {
|
|
|
|
|
- '$route.query.id': {
|
|
|
|
|
- handler(id) {
|
|
|
|
|
- if (id) {
|
|
|
|
|
- this._getDetails();
|
|
|
|
|
- } else {
|
|
|
|
|
- this.form = {
|
|
|
|
|
- categoryLevelGroupName: '',
|
|
|
|
|
- // categoryLevelName: '',
|
|
|
|
|
- isConsumable: 1,
|
|
|
|
|
- measuringUnit: '',
|
|
|
|
|
- weightUnit: '',
|
|
|
|
|
- packingUnit: '',
|
|
|
|
|
- extField: {}
|
|
|
|
|
- };
|
|
|
|
|
- this.categorySales = {};
|
|
|
|
|
- this.purchaseInfo = {};
|
|
|
|
|
- this.remarkform = {
|
|
|
|
|
- remarkAttach: []
|
|
|
|
|
- };
|
|
|
|
|
- this.categoryAps = {};
|
|
|
|
|
- this.categoryMes = {};
|
|
|
|
|
- this.categoryMold = {};
|
|
|
|
|
- this.categoryPallet = {};
|
|
|
|
|
- this.categoryQms = {};
|
|
|
|
|
- this.categoryVehicle = {};
|
|
|
|
|
- this.categoryWms = {
|
|
|
|
|
- isUnpack: 1,
|
|
|
|
|
- isWarn: 1,
|
|
|
|
|
- inventoryMode: this.form.isConsumable
|
|
|
|
|
- };
|
|
|
|
|
- this.packageDispositionVOList = [];
|
|
|
|
|
- this.categoryLevelPathId = null;
|
|
|
|
|
-
|
|
|
|
|
- this.dictList = [];
|
|
|
|
|
-
|
|
|
|
|
- this.fileList = [];
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- deep: true,
|
|
|
|
|
- immediate: true
|
|
|
|
|
-
|
|
|
|
|
- },
|
|
|
|
|
- async activated() {
|
|
|
|
|
- this.status = this.$route.query.status;
|
|
|
|
|
- this.form.categoryLevelId = this.$route.query.categoryLevelId;
|
|
|
|
|
- this.form.categoryLevelName = this.$route.query.categoryLevelName;
|
|
|
|
|
- this.form.categoryLevelPath = this.$route.query.categoryLevelPath;
|
|
|
|
|
- this.form.categoryLevelPathId = this.$route.query.categoryLevelPathId;
|
|
|
|
|
-
|
|
|
|
|
- this.ruleCode = this.$route.query.ruleCode;
|
|
|
|
|
- if (this.ruleCode && this.ruleCode != '自定义' && this.status != 0) {
|
|
|
|
|
- const code = await getCode(this.ruleCode);
|
|
|
|
|
- this.$set(this.form, 'code', code);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- this.getFieldModel();
|
|
|
|
|
-
|
|
|
|
|
- this.getDictList('productionType');
|
|
|
|
|
- },
|
|
|
|
|
- async created() {
|
|
|
|
|
- //新增
|
|
|
|
|
-
|
|
|
|
|
- this.$set(
|
|
|
|
|
- this.form,
|
|
|
|
|
- 'categoryLevelId',
|
|
|
|
|
- this.$route.query.categoryLevelId
|
|
|
|
|
- );
|
|
|
|
|
- this.$set(
|
|
|
|
|
- this.form,
|
|
|
|
|
- 'categoryLevelName',
|
|
|
|
|
- this.$route.query.categoryLevelName
|
|
|
|
|
- );
|
|
|
|
|
- this.$set(
|
|
|
|
|
- this.form,
|
|
|
|
|
- 'categoryLevelPath',
|
|
|
|
|
- this.$route.query.categoryLevelPath
|
|
|
|
|
- );
|
|
|
|
|
- this.$set(
|
|
|
|
|
- this.form,
|
|
|
|
|
- 'categoryLevelPathId',
|
|
|
|
|
- this.$route.query.categoryLevelPathId
|
|
|
|
|
- );
|
|
|
|
|
- this.status = this.$route.query.status;
|
|
|
|
|
- this.ruleCode = this.$route.query.ruleCode;
|
|
|
|
|
- if (this.ruleCode && this.ruleCode != '自定义' && this.status != 0) {
|
|
|
|
|
- const code = await getCode(this.ruleCode);
|
|
|
|
|
- this.$set(this.form, 'code', code);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.dictList = [];
|
|
|
|
|
|
|
|
- this.getFieldModel();
|
|
|
|
|
-
|
|
|
|
|
- this.getDictList('productionType');
|
|
|
|
|
- },
|
|
|
|
|
- methods: {
|
|
|
|
|
- handleInputPublicHasPoint(value) {
|
|
|
|
|
- const filteredValue = value.replace(/[^0-9.]/g, '');
|
|
|
|
|
- let finalValue = '';
|
|
|
|
|
- const dotIndex = filteredValue.indexOf('.');
|
|
|
|
|
- if (dotIndex !== -1) {
|
|
|
|
|
- finalValue = filteredValue.slice(0, dotIndex + 3);
|
|
|
|
|
- } else {
|
|
|
|
|
- finalValue = filteredValue;
|
|
|
|
|
- }
|
|
|
|
|
- this.form.volume = finalValue;
|
|
|
|
|
- },
|
|
|
|
|
- changeConsumable() {
|
|
|
|
|
- this.categoryWms.inventoryMode = this.form.isConsumable;
|
|
|
|
|
- },
|
|
|
|
|
- changeUnit() {
|
|
|
|
|
- if (this.$route.query.id == '' || this.$route.query.id == null) {
|
|
|
|
|
- if (this.form.measuringUnit) {
|
|
|
|
|
- this.categoryPurchase.measuringUnit = this.form.measuringUnit;
|
|
|
|
|
- // 如果有计量单位和包装单位 默认添加包装组
|
|
|
|
|
- if (this.form.packingUnit) {
|
|
|
|
|
- this.$refs.warehouseRefs.defaultBuild(this.form.packingUnit);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- this.isShow = false;
|
|
|
|
|
- if (this.form.measuringUnit && this.form.packingUnit) {
|
|
|
|
|
- console.log(this.form.measuringUnit, 'this.form.measuringUnit');
|
|
|
|
|
- console.log(this.form.packingUnit, 'this.form.packingUnit');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- this.isShow = true;
|
|
|
|
|
|
|
+ this.fileList = [];
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
deep: true,
|
|
deep: true,
|
|
@@ -721,15 +501,42 @@
|
|
|
|
|
|
|
|
this.getFieldModel();
|
|
this.getFieldModel();
|
|
|
|
|
|
|
|
- // if (this.$route.query.id) {
|
|
|
|
|
- // this._getDetails();
|
|
|
|
|
- // }
|
|
|
|
|
this.getDictList('productionType');
|
|
this.getDictList('productionType');
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ handleInput(value) {
|
|
|
|
|
+ this.form.volume = this.$handleInputPublicHasPoint(value);
|
|
|
|
|
+ },
|
|
|
|
|
+ handleInput2(value) {
|
|
|
|
|
+ this.form.roughWeight = this.$handleInputPublicHasPoint(value);
|
|
|
|
|
+ },
|
|
|
|
|
+ handleInput3(value) {
|
|
|
|
|
+ this.form.netWeight = this.$handleInputPublicHasPoint(value);
|
|
|
|
|
+ },
|
|
|
|
|
+ changeConsumable() {
|
|
|
|
|
+ this.categoryWms.inventoryMode = this.form.isConsumable;
|
|
|
|
|
+ },
|
|
|
changeUnit() {
|
|
changeUnit() {
|
|
|
- if (this.form.measuringUnit && this.form.packingUnit) {
|
|
|
|
|
- this.$refs.warehouseRefs.defaultBuild(this.form.packingUnit);
|
|
|
|
|
|
|
+ if (this.$route.query.id == '' || this.$route.query.id == null) {
|
|
|
|
|
+ if (this.form.measuringUnit) {
|
|
|
|
|
+ this.categoryPurchase.measuringUnit = this.form.measuringUnit;
|
|
|
|
|
+ console.log(this.categoryPurchase.measuringUnit, '采购信息');
|
|
|
|
|
+ // 如果有计量单位和包装单位 默认添加包装组
|
|
|
|
|
+ if (this.form.packingUnit) {
|
|
|
|
|
+ this.$refs.warehouseRefs.defaultBuild(this.form.packingUnit);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.isShow = false;
|
|
|
|
|
+ if (this.form.measuringUnit) {
|
|
|
|
|
+ this.categoryPurchase.measuringUnit = this.form.measuringUnit;
|
|
|
|
|
+
|
|
|
|
|
+ if (this.form.packingUnit) {
|
|
|
|
|
+ console.log(this.form.measuringUnit, 'this.form.measuringUnit');
|
|
|
|
|
+ console.log(this.form.packingUnit, 'this.form.packingUnit');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ this.isShow = true;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
changePackagingSpecification(val) {
|
|
changePackagingSpecification(val) {
|
|
@@ -744,6 +551,9 @@
|
|
|
...info.category
|
|
...info.category
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ // if (this.form.measuringUnit && this.form.packingUnit) {
|
|
|
|
|
+ // this.$refs.warehouseRefs.defaultBuild(this.form.packingUnit);
|
|
|
|
|
+ // }
|
|
|
this.categoryLevelPathId = info.category.categoryLevelPathIdParent;
|
|
this.categoryLevelPathId = info.category.categoryLevelPathIdParent;
|
|
|
this.judgeSet(info);
|
|
this.judgeSet(info);
|
|
|
|
|
|
|
@@ -760,6 +570,7 @@
|
|
|
// 判断字段类型并赋值
|
|
// 判断字段类型并赋值
|
|
|
judgeSet(info) {
|
|
judgeSet(info) {
|
|
|
console.log('info-------', info);
|
|
console.log('info-------', info);
|
|
|
|
|
+
|
|
|
if (typeof info.categoryAps == 'string') {
|
|
if (typeof info.categoryAps == 'string') {
|
|
|
this.categoryAps = {};
|
|
this.categoryAps = {};
|
|
|
} else {
|
|
} else {
|
|
@@ -866,17 +677,9 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- <<<<<<< HEAD
|
|
|
|
|
- // if (this.form.measuringUnit && this.form.packingUnit) {
|
|
|
|
|
- // this.$refs.warehouseRefs.defaultBuild(this.form.packingUnit);
|
|
|
|
|
- // }
|
|
|
|
|
- this.categoryLevelPathId = info.category.categoryLevelPathIdParent;
|
|
|
|
|
- this.judgeSet(info);
|
|
|
|
|
- =======
|
|
|
|
|
openCategory() {
|
|
openCategory() {
|
|
|
this.$refs.categoryRefs.open();
|
|
this.$refs.categoryRefs.open();
|
|
|
},
|
|
},
|
|
|
- >>>>>>> 778152e35a1d73386814551d9d6194caae9cf792
|
|
|
|
|
|
|
|
|
|
openCode() {
|
|
openCode() {
|
|
|
this.codeShow = true;
|
|
this.codeShow = true;
|
|
@@ -888,78 +691,6 @@
|
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- <<<<<<< HEAD
|
|
|
|
|
- this.$forceUpdate();
|
|
|
|
|
- },
|
|
|
|
|
- // 判断字段类型并赋值
|
|
|
|
|
- judgeSet(info) {
|
|
|
|
|
- console.log('info-------', info);
|
|
|
|
|
-
|
|
|
|
|
- if (typeof info.categoryAps == 'string') {
|
|
|
|
|
- this.categoryAps = {};
|
|
|
|
|
- } else {
|
|
|
|
|
- this.categoryAps = info.categoryAps;
|
|
|
|
|
- }
|
|
|
|
|
- if (typeof info.categoryMes == 'string') {
|
|
|
|
|
- this.categoryMes = {};
|
|
|
|
|
- } else {
|
|
|
|
|
- this.categoryMes = info.categoryMes;
|
|
|
|
|
- }
|
|
|
|
|
- if (typeof info.categoryMold == 'string') {
|
|
|
|
|
- this.categoryMold = {};
|
|
|
|
|
- } else {
|
|
|
|
|
- this.categoryMold = info.categoryMold;
|
|
|
|
|
- }
|
|
|
|
|
- if (typeof info.categoryPallet == 'string') {
|
|
|
|
|
- this.categoryPallet = {};
|
|
|
|
|
- } else {
|
|
|
|
|
- this.categoryPallet = info.categoryPallet;
|
|
|
|
|
- }
|
|
|
|
|
- if (typeof info.categorySales == 'string') {
|
|
|
|
|
- this.categorySales = {};
|
|
|
|
|
- } else {
|
|
|
|
|
- this.categorySales = info.categorySales;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (typeof info.categoryPurchase == 'string') {
|
|
|
|
|
- this.categoryPurchase = {};
|
|
|
|
|
- } else {
|
|
|
|
|
- this.categoryPurchase = info.categoryPurchase;
|
|
|
|
|
- }
|
|
|
|
|
- if (typeof info.categoryQms == 'string') {
|
|
|
|
|
- this.categoryQms = {};
|
|
|
|
|
- } else {
|
|
|
|
|
- this.categoryQms = info.categoryQms;
|
|
|
|
|
- }
|
|
|
|
|
- if (typeof info.categoryVehicle == 'string') {
|
|
|
|
|
- this.categoryVehicle = {};
|
|
|
|
|
- } else {
|
|
|
|
|
- this.categoryVehicle = info.categoryVehicle;
|
|
|
|
|
- }
|
|
|
|
|
- if (typeof info.categoryWms == 'string') {
|
|
|
|
|
- this.categoryWms = {};
|
|
|
|
|
- } else {
|
|
|
|
|
- this.categoryWms = info.categoryWms;
|
|
|
|
|
- }
|
|
|
|
|
- if (typeof info.packageDispositionVOList == 'string') {
|
|
|
|
|
- this.packageDispositionVOList = [];
|
|
|
|
|
- } else {
|
|
|
|
|
- this.packageDispositionVOList = info.packageDispositionVOList;
|
|
|
|
|
- console.log(
|
|
|
|
|
- 'this.packageDispositionVOList---!!!----',
|
|
|
|
|
- this.packageDispositionVOList
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- getFieldModel() {
|
|
|
|
|
- fieldModel({ relevance: 't_main_category' }).then((res) => {
|
|
|
|
|
- this.fileList = res;
|
|
|
|
|
-
|
|
|
|
|
- this.fileList.forEach((f) => {
|
|
|
|
|
- this.$set(this.form.extField, f.prop, ''); // 初始化动态模型属性
|
|
|
|
|
- });
|
|
|
|
|
- =======
|
|
|
|
|
cancel() {
|
|
cancel() {
|
|
|
// finishPageTab();
|
|
// finishPageTab();
|
|
|
// this.$router.go(-1);
|
|
// this.$router.go(-1);
|
|
@@ -969,7 +700,6 @@
|
|
|
query: {
|
|
query: {
|
|
|
categoryLevelId: this.form.categoryLevelId
|
|
categoryLevelId: this.form.categoryLevelId
|
|
|
}
|
|
}
|
|
|
- >>>>>>> 778152e35a1d73386814551d9d6194caae9cf792
|
|
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
@@ -977,213 +707,6 @@
|
|
|
query: {
|
|
query: {
|
|
|
categoryLevelId: this.form.categoryLevelId
|
|
categoryLevelId: this.form.categoryLevelId
|
|
|
}
|
|
}
|
|
|
- <<<<<<< HEAD
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- this.$forceUpdate();
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- async getDictList(code) {
|
|
|
|
|
- let { data: res } = await getByCode(code);
|
|
|
|
|
- this.dictList = res.map((item) => {
|
|
|
|
|
- let values = Object.keys(item);
|
|
|
|
|
- return {
|
|
|
|
|
- value: Number(values[0]),
|
|
|
|
|
- label: item[values[0]]
|
|
|
|
|
- };
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- openCategory() {
|
|
|
|
|
- this.$refs.categoryRefs.open();
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- openCode() {
|
|
|
|
|
- this.codeShow = true;
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- chooseCode(code) {
|
|
|
|
|
- this.$set(this.form, 'code', code);
|
|
|
|
|
- this.codeShow = false;
|
|
|
|
|
- this.$forceUpdate();
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- cancel() {
|
|
|
|
|
- // finishPageTab();
|
|
|
|
|
- // this.$router.go(-1);
|
|
|
|
|
- if (this.$route.query.rootTreeId == 9) {
|
|
|
|
|
- this.$router.push({
|
|
|
|
|
- path: '/product/oneProduct',
|
|
|
|
|
- query: {
|
|
|
|
|
- categoryLevelId: this.form.categoryLevelId
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$router.push({
|
|
|
|
|
- path: '/material/product',
|
|
|
|
|
- query: {
|
|
|
|
|
- categoryLevelId: this.form.categoryLevelId
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- // 保存
|
|
|
|
|
- submit() {
|
|
|
|
|
- this.$refs.manageForm.validate(async (valid) => {
|
|
|
|
|
- let productionValid = await this.$refs.productionRefs.getFormValid();
|
|
|
|
|
- let warehouseValid = await this.$refs.warehouseRefs.getFormValid();
|
|
|
|
|
-
|
|
|
|
|
- if (!valid || !productionValid || !warehouseValid) {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- let packageDispositionVOList = [];
|
|
|
|
|
- if (this.packagingSpecificationList.length > 0) {
|
|
|
|
|
- packageDispositionVOList = this.packagingSpecificationList.map(
|
|
|
|
|
- (item) => {
|
|
|
|
|
- let obj = {
|
|
|
|
|
- code: item.code,
|
|
|
|
|
- name: item.name
|
|
|
|
|
- };
|
|
|
|
|
- return [
|
|
|
|
|
- {
|
|
|
|
|
- ...obj,
|
|
|
|
|
- id: item.id0,
|
|
|
|
|
- sort: 0,
|
|
|
|
|
- status: item.status,
|
|
|
|
|
- packageCell: 1,
|
|
|
|
|
- packageUnit: item.packageUnit,
|
|
|
|
|
- conversionUnit: item.packageUnit
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- ...obj,
|
|
|
|
|
- id: item.id1,
|
|
|
|
|
- sort: 1,
|
|
|
|
|
- packageCell: item.minPackageCell,
|
|
|
|
|
- packageUnit: item.packageUnit,
|
|
|
|
|
- conversionUnit: item.minConversionUnit,
|
|
|
|
|
- status: item.status
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- ...obj,
|
|
|
|
|
- id: item.id2,
|
|
|
|
|
- sort: 2,
|
|
|
|
|
- packageCell: item.inPackageCell,
|
|
|
|
|
- packageUnit: item.minConversionUnit,
|
|
|
|
|
- conversionUnit: item.inConversionUnit,
|
|
|
|
|
- status: item.status
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- ...obj,
|
|
|
|
|
- id: item.id3,
|
|
|
|
|
- sort: 3,
|
|
|
|
|
- packageCell: item.outPackageCell,
|
|
|
|
|
- packageUnit: item.inConversionUnit,
|
|
|
|
|
- conversionUnit: item.outConversionUnit,
|
|
|
|
|
- status: item.status
|
|
|
|
|
- }
|
|
|
|
|
- ];
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
- let packagingSpecificationList =
|
|
|
|
|
- this.packagingSpecificationList.filter(
|
|
|
|
|
- (item) => item.status == 1
|
|
|
|
|
- );
|
|
|
|
|
- this.form.extField.packingSpecification = packagingSpecificationList
|
|
|
|
|
- .map((item) => {
|
|
|
|
|
- return [
|
|
|
|
|
- `${item.minPackageCell}${item.packageUnit}/${item.minConversionUnit}`,
|
|
|
|
|
- `${item.inPackageCell}${item.minConversionUnit}/${item.inConversionUnit}`,
|
|
|
|
|
- `${item.outPackageCell}${item.inConversionUnit}/${item.outConversionUnit}`
|
|
|
|
|
- ];
|
|
|
|
|
- })
|
|
|
|
|
- .flat()
|
|
|
|
|
- .join(',');
|
|
|
|
|
- } else {
|
|
|
|
|
- this.form.extField.packingSpecification = '';
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- this.loading = true;
|
|
|
|
|
- // const imgList = this.remarkform.imgList;
|
|
|
|
|
- // const arr = [];
|
|
|
|
|
- // if (imgList.length) {
|
|
|
|
|
- // imgList.map((item) => {
|
|
|
|
|
- // arr.push(item.storePath);
|
|
|
|
|
- // });
|
|
|
|
|
- // this.form.remarkAttach = arr.join(',');
|
|
|
|
|
- // }
|
|
|
|
|
- // this.form.remark = this.remarkform.remark
|
|
|
|
|
- // ? this.remarkform.remark
|
|
|
|
|
- // : '';
|
|
|
|
|
-
|
|
|
|
|
- const data = {
|
|
|
|
|
- categorySales: this.categorySales,
|
|
|
|
|
- categoryPurchase: this.categoryPurchase,
|
|
|
|
|
- categoryWms: this.categoryWms,
|
|
|
|
|
- categoryAps: this.categoryAps,
|
|
|
|
|
- categoryMes: this.categoryMes,
|
|
|
|
|
- categoryMold: this.categoryMold,
|
|
|
|
|
- categoryPallet: this.categoryPallet,
|
|
|
|
|
- categoryQms: this.categoryQms,
|
|
|
|
|
- categoryVehicle: this.categoryVehicle,
|
|
|
|
|
- category: {
|
|
|
|
|
- ...this.form,
|
|
|
|
|
- ...this.remarkform,
|
|
|
|
|
- ...this.PathInfo
|
|
|
|
|
- },
|
|
|
|
|
- packageDispositionVOList: packageDispositionVOList.flat()
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- if (this.$route.query.status == 1) {
|
|
|
|
|
- data.categorySales.id = null;
|
|
|
|
|
- data.categoryPurchase.id = null;
|
|
|
|
|
- data.category.id = null;
|
|
|
|
|
- data.categoryWms.id = null;
|
|
|
|
|
- data.categoryAps.id = null;
|
|
|
|
|
- data.categoryMes.id = null;
|
|
|
|
|
- data.categoryMold.id = null;
|
|
|
|
|
- data.categoryPallet.id = null;
|
|
|
|
|
- data.categoryQms.id = null;
|
|
|
|
|
- data.categoryVehicle.id = null;
|
|
|
|
|
- data.packageDispositionVOList = data.packageDispositionVOList.map(
|
|
|
|
|
- (item) => {
|
|
|
|
|
- return {
|
|
|
|
|
- ...item,
|
|
|
|
|
- id: null
|
|
|
|
|
- };
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
- console.log('保存', data);
|
|
|
|
|
- addMaterial(data)
|
|
|
|
|
- .then((msg) => {
|
|
|
|
|
- this.loading = false;
|
|
|
|
|
- this.$message.success(msg);
|
|
|
|
|
- // reloadPageTab({ fullPath: '/material/product' });
|
|
|
|
|
- // this.$router.go(-1);
|
|
|
|
|
- this.cancel();
|
|
|
|
|
- // if (this.$route.query.rootTreeId == 9) {
|
|
|
|
|
- // this.$router.push({
|
|
|
|
|
- // path: '/product/oneProduct',
|
|
|
|
|
- // query: {
|
|
|
|
|
- // categoryLevelId: this.form.categoryLevelId
|
|
|
|
|
- // }
|
|
|
|
|
- // });
|
|
|
|
|
- // } else {
|
|
|
|
|
- // this.$router.push({
|
|
|
|
|
- // path: '/material/product',
|
|
|
|
|
- // query: {
|
|
|
|
|
- // categoryLevelId: this.form.categoryLevelId
|
|
|
|
|
- // }
|
|
|
|
|
- // });
|
|
|
|
|
- // }
|
|
|
|
|
- })
|
|
|
|
|
- .catch((e) => {
|
|
|
|
|
- this.loading = false;
|
|
|
|
|
- });
|
|
|
|
|
- =======
|
|
|
|
|
- >>>>>>> 778152e35a1d73386814551d9d6194caae9cf792
|
|
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -1192,8 +715,9 @@
|
|
|
submit() {
|
|
submit() {
|
|
|
this.$refs.manageForm.validate(async (valid) => {
|
|
this.$refs.manageForm.validate(async (valid) => {
|
|
|
let productionValid = await this.$refs.productionRefs.getFormValid();
|
|
let productionValid = await this.$refs.productionRefs.getFormValid();
|
|
|
|
|
+ let warehouseValid = await this.$refs.warehouseRefs.getFormValid();
|
|
|
|
|
|
|
|
- if (!valid || !productionValid) {
|
|
|
|
|
|
|
+ if (!valid || !productionValid || !warehouseValid) {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|