|
|
@@ -46,293 +46,7 @@
|
|
|
defaultNum != 'w08' && defaultNum != 'w02' && defaultNum != 'w03'
|
|
|
"
|
|
|
>
|
|
|
- <el-tabs v-model="activeName" type="card">
|
|
|
- <el-tab-pane
|
|
|
- label="匹配产品"
|
|
|
- name="product"
|
|
|
- v-if="defaultNum == 'w06' || defaultNum == 'w04'"
|
|
|
- >
|
|
|
- <el-button type="primary" @click="clickAdd([4], '选择产品')"
|
|
|
- >添加</el-button
|
|
|
- >
|
|
|
- <el-table
|
|
|
- :data="productData"
|
|
|
- class="table-box"
|
|
|
- :header-cell-style="{ background: '#F0F3F3', border: 'none' }"
|
|
|
- >
|
|
|
- <el-table-column type="index" label="序号" width="50">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="informationCode" label="物品编码">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="informationName"
|
|
|
- label="物品名称"
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="brandNum" label="牌号">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="modelType" label="型号">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="物品类型"
|
|
|
- prop="classificationCode"
|
|
|
- :formatter="classificationCodeFormatter"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="classificationUrl"
|
|
|
- show-overflow-tooltip
|
|
|
- label="分类"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- @click="handleDelete(scope.$index, scope.row)"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane
|
|
|
- label="匹配模具"
|
|
|
- name="mould"
|
|
|
- v-if="defaultNum == 'w01' || defaultNum == 'w07'"
|
|
|
- >
|
|
|
- <el-button type="primary" @click="clickAdd([6], '选择模具')"
|
|
|
- >添加</el-button
|
|
|
- >
|
|
|
- <el-table
|
|
|
- :data="mouldData"
|
|
|
- class="table-box"
|
|
|
- :header-cell-style="{ background: '#F0F3F3', border: 'none' }"
|
|
|
- >
|
|
|
- <el-table-column type="index" label="序号" width="50">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="informationCode"
|
|
|
- label="物品编码"
|
|
|
- width="120"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="informationName"
|
|
|
- label="物品名称"
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="brandNum" label="牌号">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="modelType" label="型号">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="shrinkageCoefficient"
|
|
|
- label="收缩系数"
|
|
|
- :formatter="shrinkFormatter"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="dieBodyModel"
|
|
|
- width="120"
|
|
|
- label="大模体型号"
|
|
|
- :formatter="modleFormatter"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="物品类型"
|
|
|
- prop="classificationCode"
|
|
|
- :formatter="classificationCodeFormatter"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="classificationUrl"
|
|
|
- show-overflow-tooltip
|
|
|
- label="分类"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- @click="handleDelete(scope.$index, scope.row)"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane
|
|
|
- label="匹配备品备件"
|
|
|
- name="part"
|
|
|
- v-if="defaultNum == 'w01'"
|
|
|
- >
|
|
|
- <el-button type="primary" @click="clickAdd([7], '选择备品备件')"
|
|
|
- >添加</el-button
|
|
|
- >
|
|
|
- <el-table
|
|
|
- :data="partData"
|
|
|
- class="table-box"
|
|
|
- :header-cell-style="{ background: '#F0F3F3', border: 'none' }"
|
|
|
- >
|
|
|
- <el-table-column type="index" label="序号" width="50">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="informationCode" label="物品编码">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="informationName"
|
|
|
- label="物品名称"
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="modelType" label="型号">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="物品类型"
|
|
|
- prop="classificationCode"
|
|
|
- :formatter="classificationCodeFormatter"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="classificationUrl"
|
|
|
- show-overflow-tooltip
|
|
|
- label="分类"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- @click="handleDelete(scope.$index, scope.row)"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="BOM表" name="bom" v-if="defaultNum == 'w07'">
|
|
|
- <div class="bom-top">
|
|
|
- <el-button type="primary" @click="clickAdd([3], '选择物料')"
|
|
|
- >添加</el-button
|
|
|
- >
|
|
|
- <div class="top-input">
|
|
|
- <span>基本数量</span>
|
|
|
- <el-input
|
|
|
- class="input-box"
|
|
|
- @input="handleEdit"
|
|
|
- v-model="itemForm.basicNum"
|
|
|
- placeholder="请输入"
|
|
|
- ></el-input>
|
|
|
- <span>{{ itemForm.measuringUnit }}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <el-table
|
|
|
- :data="bomData"
|
|
|
- class="table-box"
|
|
|
- :header-cell-style="{ background: '#F0F3F3', border: 'none' }"
|
|
|
- >
|
|
|
- <el-table-column type="index" label="序号" width="50">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="informationCode"
|
|
|
- label="物品编码"
|
|
|
- width="120"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="informationName"
|
|
|
- label="物品名称"
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="brandNum" label="牌号">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="物品类型"
|
|
|
- prop="classificationCode"
|
|
|
- :formatter="classificationCodeFormatter"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="classificationUrl"
|
|
|
- label="分类"
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="num" label="数量" width="120">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-input
|
|
|
- type="number"
|
|
|
- v-model="scope.row.num"
|
|
|
- placeholder="请输入"
|
|
|
- oninput="value=value.replace(/[^0-9.]/g,'')"
|
|
|
- ></el-input>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="计量单位" prop="measuringUnit">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- @click="handleDelete(scope.$index, scope.row)"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane
|
|
|
- label="匹配设备"
|
|
|
- name="facility"
|
|
|
- v-if="defaultNum == 'w04' || defaultNum == 'w05'"
|
|
|
- >
|
|
|
- <el-button type="primary" @click="clickAdd([1], '选择设备')"
|
|
|
- >添加</el-button
|
|
|
- >
|
|
|
- <el-table
|
|
|
- :data="facilityData"
|
|
|
- class="table-box"
|
|
|
- :header-cell-style="{ background: '#F0F3F3', border: 'none' }"
|
|
|
- >
|
|
|
- <el-table-column type="index" label="序号" width="50">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="informationCode" label="物品编码">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="informationName"
|
|
|
- label="物品名称"
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="modelType" label="型号">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="物品类型"
|
|
|
- prop="classificationCode"
|
|
|
- :formatter="classificationCodeFormatter"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="classificationUrl"
|
|
|
- label="分类"
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- @click="handleDelete(scope.$index, scope.row)"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
+ <ItemMatch ref="itemMatchRef" :defaultNum="defaultNum"></ItemMatch>
|
|
|
</div>
|
|
|
<div class="page-footer-btn mt20">
|
|
|
<el-button @click="goBack">取消</el-button>
|
|
|
@@ -340,22 +54,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <!-- 选择添加 -->
|
|
|
- <AddDialog
|
|
|
- ref="addDialogRef"
|
|
|
- @submit="selectedEquipment"
|
|
|
- :typeValue="typeValue"
|
|
|
- :dialogTitle="dialogTitle"
|
|
|
- :mapList="mapList"
|
|
|
- />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import ItemForm from './components/ItemForm';
|
|
|
import RowForm from './components/RowForm';
|
|
|
- import AddDialog from './components/AddDialog.vue';
|
|
|
+ import ItemMatch from './components/item-match';
|
|
|
import {
|
|
|
informationAdd,
|
|
|
getDetails,
|
|
|
@@ -363,8 +68,8 @@
|
|
|
getOrderNo
|
|
|
} from '@/api/classifyManage/itemInformation';
|
|
|
export default {
|
|
|
- components: { ItemForm, RowForm, AddDialog },
|
|
|
- data() {
|
|
|
+ components: { ItemForm, RowForm, ItemMatch },
|
|
|
+ data () {
|
|
|
return {
|
|
|
pageTitle: '',
|
|
|
typeList: [
|
|
|
@@ -406,28 +111,18 @@
|
|
|
expirationDateUnit: 'minute',
|
|
|
takeStockPattern: 1
|
|
|
},
|
|
|
- activeName: 'mould',
|
|
|
- productData: [],
|
|
|
- mouldData: [],
|
|
|
- partData: [],
|
|
|
- bomData: [],
|
|
|
- facilityData: [],
|
|
|
- bomNumber: null,
|
|
|
defaultNum: 'w01',
|
|
|
selectNode: null,
|
|
|
classList: [],
|
|
|
changeData: [],
|
|
|
urlIdList: [],
|
|
|
requestData: {},
|
|
|
- typeValue: [],
|
|
|
- mapList: [],
|
|
|
uneditable: false,
|
|
|
- currentItem: null,
|
|
|
dialogTitle: '',
|
|
|
newCode: ''
|
|
|
};
|
|
|
},
|
|
|
- created() {
|
|
|
+ created () {
|
|
|
this.pageTitle = this.$route.query.pageTitle;
|
|
|
if (this.pageTitle == '新建物品') {
|
|
|
this.selectNode = JSON.parse(this.$route.query.selectNode);
|
|
|
@@ -439,18 +134,10 @@
|
|
|
code = this.selectNode.type;
|
|
|
this.typeList.map((item) => {
|
|
|
if (item.code == code) {
|
|
|
- this.currentItem = item;
|
|
|
this.defaultNum = item.prefix;
|
|
|
this.setDefault(this.defaultNum);
|
|
|
}
|
|
|
});
|
|
|
- } else {
|
|
|
- this.currentItem = {
|
|
|
- id: 1,
|
|
|
- value: 'w01 生产设备',
|
|
|
- prefix: 'w01',
|
|
|
- code: 1
|
|
|
- };
|
|
|
}
|
|
|
this.getTreeData(code);
|
|
|
}
|
|
|
@@ -465,8 +152,8 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- async getOrderCode() {
|
|
|
- const res = await getOrderNo({ prefix: this.defaultNum });
|
|
|
+ async getOrderCode () {
|
|
|
+ const res = await getOrderNo(this.defaultNum);
|
|
|
if (res.success) {
|
|
|
this.newCode = res.data;
|
|
|
this.$set(this.itemForm, 'itemCode', res.data.substring(3));
|
|
|
@@ -474,7 +161,7 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- getCode(code) {
|
|
|
+ getCode (code) {
|
|
|
this.typeList.map((item) => {
|
|
|
if (item.code == code) {
|
|
|
this.defaultNum = item.prefix;
|
|
|
@@ -484,17 +171,17 @@
|
|
|
},
|
|
|
|
|
|
// 在 Input 值改变时触发
|
|
|
- handleEdit(e) {
|
|
|
+ handleEdit (e) {
|
|
|
let value = e.replace(/^(0+)|[^\d]+/g, ''); // 以0开头或者输入非数字,会被替换成空
|
|
|
value = value.replace(/(\d{15})\d*/, '$1'); // 最多保留15位整数
|
|
|
},
|
|
|
- goBack() {
|
|
|
+ goBack () {
|
|
|
this.$router.go(-1);
|
|
|
},
|
|
|
|
|
|
// 获取详情
|
|
|
- async getDetilInfo(id) {
|
|
|
- const res = await getDetails({ id: id });
|
|
|
+ async getDetilInfo (id) {
|
|
|
+ const res = await getDetails(id);
|
|
|
if (res.success) {
|
|
|
this.defaultNum = res.data.classificationCode;
|
|
|
this.chooseItem(res.data.classificationCode);
|
|
|
@@ -533,31 +220,31 @@
|
|
|
: 'false';
|
|
|
this.itemForm.isUnpack = res.data.isUnpack ? 'true' : 'false';
|
|
|
for (const key in this.itemForm.informationRelationMap) {
|
|
|
- this.matchList(key, this.itemForm.informationRelationMap);
|
|
|
+ this.$refs.itemMatchRef &&
|
|
|
+ this.$refs.itemMatchRef.matchList(
|
|
|
+ key,
|
|
|
+ this.itemForm.informationRelationMap
|
|
|
+ );
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
|
|
|
// 改变物品类型
|
|
|
- chooseItem(val) {
|
|
|
- if (this.currentItem && this.currentItem.prefix != val) {
|
|
|
- this.initItemForm();
|
|
|
- this.$refs.itemFormRef.$refs.formName.resetFields();
|
|
|
- this.getOrderCode();
|
|
|
- }
|
|
|
+ chooseItem (val) {
|
|
|
+ this.initItemForm();
|
|
|
+ this.$refs.itemFormRef.$refs.formName.resetFields();
|
|
|
+ this.getOrderCode();
|
|
|
this.typeList.map((item) => {
|
|
|
if (item.prefix == val) {
|
|
|
- this.currentItem = item;
|
|
|
- this.defaultNum = item.prefix;
|
|
|
- this.itemForm.classificationCode = this.defaultNum;
|
|
|
+ this.itemForm.classificationCode = item.prefix;
|
|
|
this.selectNode = null;
|
|
|
this.getTreeData(item.code);
|
|
|
+ this.setDefault(item.prefix);
|
|
|
}
|
|
|
});
|
|
|
- this.setDefault(this.defaultNum);
|
|
|
},
|
|
|
|
|
|
- submit() {
|
|
|
+ submit () {
|
|
|
const a1 = new Promise((resolve, reject) => {
|
|
|
this.$refs.itemFormRef.validateForm((valid) => {
|
|
|
if (valid) resolve();
|
|
|
@@ -569,7 +256,8 @@
|
|
|
});
|
|
|
});
|
|
|
Promise.all([a1, a2]).then(() => {
|
|
|
- this.mapAddList();
|
|
|
+ this.$refs.itemMatchRef && this.$refs.itemMatchRef.mapAddList();
|
|
|
+
|
|
|
this.requestData = this.itemForm;
|
|
|
const { pathName, pathId } = this.$refs.itemFormRef.getText();
|
|
|
this.requestData.classificationUrl = pathName;
|
|
|
@@ -594,11 +282,10 @@
|
|
|
this.requestData.univalence = this.itemForm.univalence
|
|
|
? this.itemForm.univalence
|
|
|
: null;
|
|
|
- this.mapList.map((item) => {
|
|
|
- item.informationId = item.id;
|
|
|
- delete item.id;
|
|
|
- });
|
|
|
- this.requestData.informationRelation = this.mapList;
|
|
|
+ this.requestData.informationRelation =
|
|
|
+ (this.$refs.itemMatchRef && this.$refs.itemMatchRef.getMapList()) ||
|
|
|
+ [];
|
|
|
+
|
|
|
if (this.pageTitle == '编辑物品') {
|
|
|
this.requestData.mainInformationId = this.$route.query.id;
|
|
|
delete this.requestData.informationRelationMap;
|
|
|
@@ -636,77 +323,7 @@
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- handleDelete(index, row) {
|
|
|
- this.$confirm(`确认删除[${row.informationName}]吗?`)
|
|
|
- .then(async () => {
|
|
|
- switch (this.activeName) {
|
|
|
- case 'product': {
|
|
|
- this.productData.splice(index, 1);
|
|
|
- break;
|
|
|
- }
|
|
|
- case 'mould': {
|
|
|
- this.mouldData.splice(index, 1);
|
|
|
- break;
|
|
|
- }
|
|
|
- case 'part': {
|
|
|
- this.partData.splice(index, 1);
|
|
|
- break;
|
|
|
- }
|
|
|
- case 'bom': {
|
|
|
- this.bomData.splice(index, 1);
|
|
|
- break;
|
|
|
- }
|
|
|
- case 'facility': {
|
|
|
- this.facilityData.splice(index, 1);
|
|
|
- break;
|
|
|
- }
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- this.mapAddList();
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
- },
|
|
|
-
|
|
|
- //点击添加打开弹窗
|
|
|
- clickAdd(val, name) {
|
|
|
- this.$refs.addDialogRef.equipmentdialog = true;
|
|
|
- if (val) {
|
|
|
- this.typeValue = val;
|
|
|
- this.dialogTitle = name;
|
|
|
- this.mapAddList();
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- // 选择的设备
|
|
|
- selectedEquipment(val) {
|
|
|
- switch (this.activeName) {
|
|
|
- case 'product': {
|
|
|
- this.productData = val;
|
|
|
- break;
|
|
|
- }
|
|
|
- case 'mould': {
|
|
|
- this.mouldData = val;
|
|
|
- break;
|
|
|
- }
|
|
|
- case 'part': {
|
|
|
- this.partData = val;
|
|
|
- break;
|
|
|
- }
|
|
|
- case 'bom': {
|
|
|
- this.bomData = val;
|
|
|
- break;
|
|
|
- }
|
|
|
- case 'facility': {
|
|
|
- this.facilityData = val;
|
|
|
- break;
|
|
|
- }
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- async getTreeData(code) {
|
|
|
+ async getTreeData (code) {
|
|
|
// try {
|
|
|
// const res = await common.getClassify({
|
|
|
// type: code,
|
|
|
@@ -730,7 +347,7 @@
|
|
|
// } catch (error) {}
|
|
|
},
|
|
|
|
|
|
- convertTreeData(data) {
|
|
|
+ convertTreeData (data) {
|
|
|
this.changeData = data;
|
|
|
for (let i = 0; i < this.changeData.length; i++) {
|
|
|
if (this.changeData[i].children != undefined) {
|
|
|
@@ -742,7 +359,7 @@
|
|
|
},
|
|
|
|
|
|
// 子节点处理
|
|
|
- deepEach(parentId) {
|
|
|
+ deepEach (parentId) {
|
|
|
this.changeData.map((item, index) => {
|
|
|
if (item.id == parentId) {
|
|
|
this.urlIdList.push(item.id);
|
|
|
@@ -751,46 +368,12 @@
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- setDefault(val) {
|
|
|
- switch (val) {
|
|
|
- case 'w06': {
|
|
|
- this.activeName = 'product';
|
|
|
- break;
|
|
|
- }
|
|
|
- case 'w01': {
|
|
|
- this.activeName = 'mould';
|
|
|
- break;
|
|
|
- }
|
|
|
- case 'w07': {
|
|
|
- this.activeName = 'mould';
|
|
|
- break;
|
|
|
- }
|
|
|
- case 'w04': {
|
|
|
- this.activeName = 'product';
|
|
|
- break;
|
|
|
- }
|
|
|
- case 'w05': {
|
|
|
- this.activeName = 'facility';
|
|
|
- break;
|
|
|
- }
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- // 物品类型格式化
|
|
|
- classificationCodeFormatter(row) {
|
|
|
- let itemName = '';
|
|
|
- this.typeList.map((item) => {
|
|
|
- if (item.prefix == row.classificationCode) {
|
|
|
- itemName = item.name;
|
|
|
- }
|
|
|
- });
|
|
|
- return itemName;
|
|
|
+ setDefault (val) {
|
|
|
+ this.$refs.itemMatchRef && this.$refs.itemMatchRef.setDefault(val);
|
|
|
},
|
|
|
|
|
|
// 收缩系数格式化
|
|
|
- shrinkFormatter(row) {
|
|
|
+ shrinkFormatter (row) {
|
|
|
let shrink = '';
|
|
|
let extendField = JSON.parse(row.extendField);
|
|
|
if (extendField.hasOwnProperty('shrinkageCoefficient')) {
|
|
|
@@ -799,7 +382,7 @@
|
|
|
return shrink;
|
|
|
},
|
|
|
|
|
|
- modleFormatter(row) {
|
|
|
+ modleFormatter (row) {
|
|
|
let modle = '';
|
|
|
let extendField = JSON.parse(row.extendField);
|
|
|
if (extendField.hasOwnProperty('dieBodyModel')) {
|
|
|
@@ -808,49 +391,7 @@
|
|
|
return modle;
|
|
|
},
|
|
|
|
|
|
- mapAddList() {
|
|
|
- this.mapList = [];
|
|
|
- if (this.defaultNum == 'w01') {
|
|
|
- this.mapList = this.partData.concat(this.mouldData);
|
|
|
- } else if (this.defaultNum == 'w04') {
|
|
|
- this.mapList = this.facilityData.concat(this.productData);
|
|
|
- } else if (this.defaultNum == 'w05') {
|
|
|
- this.mapList = this.facilityData;
|
|
|
- } else if (this.defaultNum == 'w06') {
|
|
|
- this.mapList = this.productData;
|
|
|
- } else if (this.defaultNum == 'w07') {
|
|
|
- this.mapList = this.mouldData.concat(this.bomData);
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- matchList(key, data) {
|
|
|
- switch (key) {
|
|
|
- case 'w01': {
|
|
|
- this.facilityData = data[key];
|
|
|
- break;
|
|
|
- }
|
|
|
- case 'w04': {
|
|
|
- this.mouldData = data[key];
|
|
|
- break;
|
|
|
- }
|
|
|
- case 'w05': {
|
|
|
- this.partData = data[key];
|
|
|
- break;
|
|
|
- }
|
|
|
- case 'w07': {
|
|
|
- this.productData = data[key];
|
|
|
- break;
|
|
|
- }
|
|
|
- case 'w06': {
|
|
|
- this.bomData = data[key];
|
|
|
- break;
|
|
|
- }
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- initItemForm() {
|
|
|
+ initItemForm () {
|
|
|
this.itemForm = {
|
|
|
classificationUrlId: [],
|
|
|
addList: [],
|