|
@@ -37,15 +37,16 @@
|
|
<el-table-column prop="modelName" label="模具名称" sortable></el-table-column>
|
|
<el-table-column prop="modelName" label="模具名称" sortable></el-table-column>
|
|
<el-table-column prop="modelNo" label="模具编号" width="120" align="center" sortable></el-table-column>
|
|
<el-table-column prop="modelNo" label="模具编号" width="120" align="center" sortable></el-table-column>
|
|
<el-table-column prop="companyName" label="公司名称" sortable></el-table-column>
|
|
<el-table-column prop="companyName" label="公司名称" sortable></el-table-column>
|
|
- <el-table-column label="云模盒状态" align="center" width="100" sortable>
|
|
|
|
|
|
+ <el-table-column label="代理商" width="120" sortable></el-table-column>
|
|
|
|
+ <el-table-column label="云模盒状态" align="center" width="120" sortable>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<span v-if="scope.row.isUse == 0">未启用</span>
|
|
<span v-if="scope.row.isUse == 0">未启用</span>
|
|
<span v-else>已启用</span>
|
|
<span v-else>已启用</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="操作" align="center" width="220" sortable>
|
|
|
|
|
|
+ <el-table-column label="操作" align="center" width="160" sortable>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button size="small" type="primary" @click="enable(scope.$index)" :disabled="scope.row.isUse == 1">启用</el-button>
|
|
|
|
|
|
+ <el-button size="small" type="primary" @click="openEnable(scope.$index)" :disabled="scope.row.isUse == 1">启用</el-button>
|
|
<el-button size="small" @click="showEdit(scope.$index, scope.row)">修改</el-button>
|
|
<el-button size="small" @click="showEdit(scope.$index, scope.row)">修改</el-button>
|
|
<!-- <el-button type="danger" size="small">删除</el-button> -->
|
|
<!-- <el-button type="danger" size="small">删除</el-button> -->
|
|
</template>
|
|
</template>
|
|
@@ -76,31 +77,38 @@
|
|
class="demo-form-inline"
|
|
class="demo-form-inline"
|
|
>
|
|
>
|
|
<el-form-item label="云模盒编号" prop="equipmentNo">
|
|
<el-form-item label="云模盒编号" prop="equipmentNo">
|
|
- <el-input v-model="newAllocation.equipmentNo" autocomplete="off" placeholder="请填写"></el-input>
|
|
|
|
|
|
+ <el-input v-model="newAllocation.equipmentNo" autocomplete="off" placeholder="请填写云模盒编号"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="所属公司" prop="belongCompanyId">
|
|
<el-form-item label="所属公司" prop="belongCompanyId">
|
|
- <el-select
|
|
|
|
- v-model="newAllocation.belongCompanyId"
|
|
|
|
- filterable
|
|
|
|
- clearable
|
|
|
|
- placeholder="请选择"
|
|
|
|
- style="width: 202px"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in companies"
|
|
|
|
- :key="item.id"
|
|
|
|
- :label="item.companyName"
|
|
|
|
- :value="item.id"
|
|
|
|
- ></el-option>
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="newAllocation.belongCompanyId"
|
|
|
|
+ filterable
|
|
|
|
+ clearable
|
|
|
|
+ placeholder="请选择所属公司"
|
|
|
|
+ style="width: 202px"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in companies"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.companyName"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="使用年限" prop="useLife">
|
|
<el-form-item label="使用年限" prop="useLife">
|
|
- <el-input
|
|
|
|
- v-model.number="newAllocation.useLife"
|
|
|
|
- type="age"
|
|
|
|
- autocomplete="off"
|
|
|
|
- placeholder="请填写"
|
|
|
|
- ></el-input>
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-model.number="newAllocation.useLife"
|
|
|
|
+ type="age"
|
|
|
|
+ autocomplete="off"
|
|
|
|
+ placeholder="请填写使用年限"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="代理商" prop="agent">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="newAllocation.agent"
|
|
|
|
+ autocomplete="off"
|
|
|
|
+ placeholder="请填写代理商"
|
|
|
|
+ ></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -152,12 +160,28 @@
|
|
placeholder="请填写"
|
|
placeholder="请填写"
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="代理商" prop="agent">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="newAllocation.agent"
|
|
|
|
+ autocomplete="off"
|
|
|
|
+ placeholder="请填写代理商"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button @click.native="editFormVisible = false">取消</el-button>
|
|
<el-button @click.native="editFormVisible = false">取消</el-button>
|
|
<el-button type="primary" @click="editMould(newAllocation.id)">提交</el-button>
|
|
<el-button type="primary" @click="editMould(newAllocation.id)">提交</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+
|
|
|
|
+ <!-- 启用弹窗 -->
|
|
|
|
+ <el-dialog title="启用" :visible.sync="operateDialogVisible" width="100" center>
|
|
|
|
+ <span>确定启用设备吗</span>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="operateDialogVisible = false">取消</el-button>
|
|
|
|
+ <el-button type="primary" @click="enable">启用</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
</section>
|
|
</section>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -173,7 +197,8 @@
|
|
useLife: "", //使用年限
|
|
useLife: "", //使用年限
|
|
equipmentName: "", //设备名称
|
|
equipmentName: "", //设备名称
|
|
id: "", //设备id
|
|
id: "", //设备id
|
|
- belongCompanyId: "" //所属公司ID
|
|
|
|
|
|
+ belongCompanyId: "", //所属公司ID
|
|
|
|
+ agent: "" //代理商
|
|
},
|
|
},
|
|
filters: {
|
|
filters: {
|
|
keyName: "",
|
|
keyName: "",
|
|
@@ -189,6 +214,9 @@
|
|
],
|
|
],
|
|
belongCompanyId: [
|
|
belongCompanyId: [
|
|
{ required: true, message: "请选择所属公司", trigger: ["blur", "change"] }
|
|
{ required: true, message: "请选择所属公司", trigger: ["blur", "change"] }
|
|
|
|
+ ],
|
|
|
|
+ agent: [
|
|
|
|
+ { required: true, message: "请填写代理商", trigger: "blur" }
|
|
]
|
|
]
|
|
},
|
|
},
|
|
listLoading: false,
|
|
listLoading: false,
|
|
@@ -199,7 +227,9 @@
|
|
size: 20,
|
|
size: 20,
|
|
tableHeight: 0,
|
|
tableHeight: 0,
|
|
addFormVisible: false,
|
|
addFormVisible: false,
|
|
- editFormVisible: false
|
|
|
|
|
|
+ editFormVisible: false,
|
|
|
|
+ operateDialogVisible: false,
|
|
|
|
+ activeIndex: 0
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -275,6 +305,7 @@
|
|
});
|
|
});
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+
|
|
//添加界面
|
|
//添加界面
|
|
showAllocation() {
|
|
showAllocation() {
|
|
this.addFormVisible = true;
|
|
this.addFormVisible = true;
|
|
@@ -282,7 +313,8 @@
|
|
id: "",
|
|
id: "",
|
|
useLife: "",
|
|
useLife: "",
|
|
equipmentNo: "",
|
|
equipmentNo: "",
|
|
- belongCompanyId: ""
|
|
|
|
|
|
+ belongCompanyId: "",
|
|
|
|
+ agent: ""
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
@@ -297,6 +329,7 @@
|
|
equipmentNo: this.newAllocation.equipmentNo,
|
|
equipmentNo: this.newAllocation.equipmentNo,
|
|
belongCompanyId: this.newAllocation.belongCompanyId,
|
|
belongCompanyId: this.newAllocation.belongCompanyId,
|
|
useLife: this.newAllocation.useLife
|
|
useLife: this.newAllocation.useLife
|
|
|
|
+ //这里应该有代理商agent
|
|
},
|
|
},
|
|
res => {
|
|
res => {
|
|
this.addLoading = false;
|
|
this.addLoading = false;
|
|
@@ -334,7 +367,8 @@
|
|
id: row.id,
|
|
id: row.id,
|
|
useLife: row.useLife,
|
|
useLife: row.useLife,
|
|
equipmentNo: row.equipmentNo,
|
|
equipmentNo: row.equipmentNo,
|
|
- belongCompanyId: row.belongCompanyId
|
|
|
|
|
|
+ belongCompanyId: row.belongCompanyId,
|
|
|
|
+ agent: ""//这里应该有代理商agent
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
@@ -349,6 +383,7 @@
|
|
equipmentName: this.newAllocation.equipmentName,
|
|
equipmentName: this.newAllocation.equipmentName,
|
|
belongCompanyId: this.newAllocation.belongCompanyId,
|
|
belongCompanyId: this.newAllocation.belongCompanyId,
|
|
useLife: this.newAllocation.useLife
|
|
useLife: this.newAllocation.useLife
|
|
|
|
+ //这里应该有代理商agent
|
|
},
|
|
},
|
|
res => {
|
|
res => {
|
|
this.editLoading = false;
|
|
this.editLoading = false;
|
|
@@ -378,11 +413,18 @@
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ //打开启用窗口
|
|
|
|
+ openEnable(index) {
|
|
|
|
+ this.operateDialogVisible = true;
|
|
|
|
+ this.activeIndex = index;
|
|
|
|
+ },
|
|
|
|
+
|
|
//启用设备
|
|
//启用设备
|
|
- enable(index) {
|
|
|
|
- this.allocations[index].isUse = 1;
|
|
|
|
|
|
+ enable() {
|
|
|
|
+ this.operateDialogVisible = false;
|
|
|
|
+ this.allocations[this.activeIndex].isUse = 1;
|
|
this.http.post( this.port.base.enableMould, {
|
|
this.http.post( this.port.base.enableMould, {
|
|
- id: this.allocations[index].id,
|
|
|
|
|
|
+ id: this.allocations[this.activeIndex].id,
|
|
isUse: 1
|
|
isUse: 1
|
|
},
|
|
},
|
|
res => {
|
|
res => {
|