|
|
@@ -278,7 +278,7 @@
|
|
|
placeholder="请选择"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in options.supplierId"
|
|
|
+ v-for="item in suppList"
|
|
|
:key="item.id"
|
|
|
:label="item.name"
|
|
|
:value="item.id"
|
|
|
@@ -296,30 +296,34 @@
|
|
|
style="margin-right: 10px"
|
|
|
v-model="zcInfo.factoryRoomId1"
|
|
|
:augr="1"
|
|
|
+ @returnName="returnName1"
|
|
|
/>
|
|
|
<FactoryAreaSelect
|
|
|
placeholder="请选择厂房"
|
|
|
style="margin-right: 10px"
|
|
|
v-model="zcInfo.factoryRoomId2"
|
|
|
:augr="2"
|
|
|
+ @returnName="returnName2"
|
|
|
/>
|
|
|
<FactoryAreaSelect
|
|
|
placeholder="请选择车间"
|
|
|
style="margin-right: 10px"
|
|
|
v-model="zcInfo.factoryRoomId3"
|
|
|
:augr="3"
|
|
|
+ @returnName="returnName3"
|
|
|
/>
|
|
|
<FactoryAreaSelect
|
|
|
style="margin-right: 10px"
|
|
|
placeholder="请选择产线"
|
|
|
v-model="zcInfo.factoryRoomId4"
|
|
|
:augr="4"
|
|
|
+ @returnName="returnName4"
|
|
|
/>
|
|
|
<FactoryAreaSelect
|
|
|
style="margin-right: 10px"
|
|
|
placeholder="请输入工位"
|
|
|
v-model="zcInfo.factoryRoomId5"
|
|
|
- :augr="5"
|
|
|
+ @returnName="returnName5"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
@@ -814,6 +818,11 @@
|
|
|
factoryRoomId3: '',
|
|
|
factoryRoomId4: '',
|
|
|
factoryRoomId5: '',
|
|
|
+ factoryRoomName1: '',
|
|
|
+ factoryRoomName2: '',
|
|
|
+ factoryRoomName3: '',
|
|
|
+ factoryRoomName4: '',
|
|
|
+ factoryRoomName5: '',
|
|
|
// 固定资产编码
|
|
|
fixCode: '',
|
|
|
// 颜色
|
|
|
@@ -907,7 +916,8 @@
|
|
|
depList: [],
|
|
|
warehouseList: [],
|
|
|
areaList: [],
|
|
|
- shelvesList: []
|
|
|
+ shelvesList: [],
|
|
|
+ suppList: []
|
|
|
};
|
|
|
},
|
|
|
watch: {},
|
|
|
@@ -936,6 +946,21 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ returnName1(val) {
|
|
|
+ this.zcInfo.factoryRoomName1 = val;
|
|
|
+ },
|
|
|
+ returnName2(val) {
|
|
|
+ this.zcInfo.factoryRoomName2 = val;
|
|
|
+ },
|
|
|
+ returnName3(val) {
|
|
|
+ this.zcInfo.factoryRoomName3 = val;
|
|
|
+ },
|
|
|
+ returnName4(val) {
|
|
|
+ this.zcInfo.factoryRoomName4 = val;
|
|
|
+ },
|
|
|
+ returnName5(val) {
|
|
|
+ this.zcInfo.factoryRoomName5 = val;
|
|
|
+ },
|
|
|
async twoClick(val) {
|
|
|
this.positionInfo.workshopName = val.name;
|
|
|
const res = await warehouseDefinition.getListByAreaId(val.id);
|
|
|
@@ -1102,6 +1127,21 @@
|
|
|
if (!this.basicInfo && this.pageType == 'add') {
|
|
|
return this.$message.error('请选择物品编码');
|
|
|
}
|
|
|
+ if (!this.zcInfo.factoryRoomId1) {
|
|
|
+ return this.$message.error('请选择工厂');
|
|
|
+ }
|
|
|
+ if (!this.zcInfo.factoryRoomId2) {
|
|
|
+ return this.$message.error('请选择厂房');
|
|
|
+ }
|
|
|
+ if (!this.zcInfo.factoryRoomId3) {
|
|
|
+ return this.$message.error('请选择车间');
|
|
|
+ }
|
|
|
+ if (!this.zcInfo.factoryRoomId4) {
|
|
|
+ return this.$message.error('请选择产线');
|
|
|
+ }
|
|
|
+ if (!this.zcInfo.factoryRoomId5) {
|
|
|
+ return this.$message.error('请选择工位');
|
|
|
+ }
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
if (valid) {
|
|
|
console.log('ppp', this.positionInfo);
|
|
|
@@ -1155,8 +1195,19 @@
|
|
|
this.zcInfo.factoryRoomId5
|
|
|
];
|
|
|
const nonEmptyFactoryRoomIds = factoryRoomIds.filter((id) => id);
|
|
|
- par.position.pathIds = nonEmptyFactoryRoomIds.join(',');
|
|
|
-
|
|
|
+ par.factoryRoomId = nonEmptyFactoryRoomIds.join(',');
|
|
|
+ //---
|
|
|
+ const factoryRoomNames = [
|
|
|
+ this.zcInfo.factoryRoomName1,
|
|
|
+ this.zcInfo.factoryRoomName2,
|
|
|
+ this.zcInfo.factoryRoomName3,
|
|
|
+ this.zcInfo.factoryRoomName4,
|
|
|
+ this.zcInfo.factoryRoomName5
|
|
|
+ ];
|
|
|
+ const nonEmptyFactoryRoomNames = factoryRoomNames.filter(
|
|
|
+ (id) => id
|
|
|
+ );
|
|
|
+ par.factoryRoomName = nonEmptyFactoryRoomNames.join(',');
|
|
|
//==
|
|
|
par.deviceLocationName = par.location.toString();
|
|
|
// par.sss = par.position.detailPosition;
|
|
|
@@ -1216,6 +1267,9 @@
|
|
|
// 获取设备详情
|
|
|
async getInfo() {
|
|
|
const data = await getAssetInfo(this.id);
|
|
|
+ for (const key of Object.keys(this.zcInfo)) {
|
|
|
+ this.zcInfo[key] = data[key];
|
|
|
+ }
|
|
|
data.extInfoSelf = data.extInfoSelf || [];
|
|
|
this.form = data;
|
|
|
this.form.location = data.deviceLocationName.split(',');
|
|
|
@@ -1225,6 +1279,19 @@
|
|
|
this.cbexpirationTime = data.expirationTime;
|
|
|
this.sourceDICT = data.sourceDICT;
|
|
|
this.networkStatus = data.networkStatus;
|
|
|
+
|
|
|
+ if (data.factoryRoomId) {
|
|
|
+ const pathIds = data.factoryRoomId.split(',');
|
|
|
+ this.zcInfo.factoryRoomId1 = pathIds[0];
|
|
|
+
|
|
|
+ this.zcInfo.factoryRoomId2 = pathIds[1];
|
|
|
+
|
|
|
+ this.zcInfo.factoryRoomId3 = pathIds[2];
|
|
|
+
|
|
|
+ this.zcInfo.factoryRoomId4 = pathIds[3];
|
|
|
+
|
|
|
+ this.zcInfo.factoryRoomId5 = pathIds[4];
|
|
|
+ }
|
|
|
if (data.positionList?.length) {
|
|
|
this.positionInfo.detailPosition =
|
|
|
data.positionList[0].detailPosition;
|
|
|
@@ -1232,15 +1299,15 @@
|
|
|
const pathIds = data.positionList[0].pathIds.split(',');
|
|
|
const pathName = data.positionList[0].pathName.split(',');
|
|
|
|
|
|
- this.zcInfo.factoryRoomId1 = pathIds[0];
|
|
|
+ // this.zcInfo.factoryRoomId1 = pathIds[0];
|
|
|
|
|
|
- this.zcInfo.factoryRoomId2 = pathIds[1];
|
|
|
+ // this.zcInfo.factoryRoomId2 = pathIds[1];
|
|
|
|
|
|
- this.zcInfo.factoryRoomId3 = pathIds[2];
|
|
|
+ // this.zcInfo.factoryRoomId3 = pathIds[2];
|
|
|
|
|
|
- this.zcInfo.factoryRoomId4 = pathIds[3];
|
|
|
+ // this.zcInfo.factoryRoomId4 = pathIds[3];
|
|
|
|
|
|
- this.zcInfo.factoryRoomId5 = pathIds[4];
|
|
|
+ // this.zcInfo.factoryRoomId5 = pathIds[4];
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
// this.$refs.WorkshopSelectRef.getList();
|
|
|
@@ -1277,9 +1344,9 @@
|
|
|
this.isLink = true;
|
|
|
}
|
|
|
// // 资产信息
|
|
|
- // for (const key of Object.keys(this.zcInfo)) {
|
|
|
- // this.zcInfo[key] = data[key];
|
|
|
- // }
|
|
|
+ // this.zcInfo.codeNumber = data.codeNumber;
|
|
|
+ // this.zcInfo.fixCode = data.fixCode;
|
|
|
+
|
|
|
this.getwhbm();
|
|
|
this.getqsbm();
|
|
|
if (data.attUrl && data.attUrl.length > 0) {
|
|
|
@@ -1295,6 +1362,14 @@
|
|
|
// 物联参数
|
|
|
this.isIotEnable = data.isIotEnable;
|
|
|
this.iotId = data.iotId;
|
|
|
+ //供应商
|
|
|
+ const rep = await warehouseDefinition.eomContact({
|
|
|
+ type: 2,
|
|
|
+ status: 1,
|
|
|
+ size: -1,
|
|
|
+ pageNum: 1
|
|
|
+ });
|
|
|
+ this.suppList = rep.list;
|
|
|
},
|
|
|
// 设置标准产能
|
|
|
setbzcn(val) {
|