Browse Source

工具的代码

master
DouDou 12 months ago
parent
commit
69d77f6dc7
  1. 10
      src/views/modules/tooling/components/com_tool_property_show.vue
  2. 17
      src/views/modules/tooling/components/orderProperties.vue
  3. 2
      src/views/modules/tooling/manuf_tool.vue

10
src/views/modules/tooling/components/com_tool_property_show.vue

@ -25,7 +25,7 @@
<!--工具属性的使用记录--> <!--工具属性的使用记录-->
<fieldset class="customer-fieldset" style="width: 650px;"> <fieldset class="customer-fieldset" style="width: 650px;">
<legend>属性维护</legend> <legend>属性维护</legend>
<propertyTable ref="propertyTable" v-if="visible" :order-no="dataNo" :code-no="propertyNo" :function-type="propertyType"></propertyTable>
<propertyTable ref="propertyTable" v-if="visible" :site="site" :order-no="dataNo" :code-no="propertyNo" :function-type="propertyType"></propertyTable>
</fieldset> </fieldset>
</el-form> </el-form>
</el-container> </el-container>
@ -48,6 +48,7 @@ export default {
propertyType: 'TL', propertyType: 'TL',
propertyNo: 'TL01', propertyNo: 'TL01',
dataNo: '1001',// dataNo: '1001',//
site: '',
visible: false, visible: false,
showFlag: false, showFlag: false,
pageData: { pageData: {
@ -63,14 +64,15 @@ export default {
// //
init(toolInfo, dataType) { init(toolInfo, dataType) {
//
//site
this.site = toolInfo.site;
if(dataType === 'TL'){ if(dataType === 'TL'){
this.showFlag = false; this.showFlag = false;
this.dataNo = toolInfo.toolId; this.dataNo = toolInfo.toolId;
this.propertyNo = toolInfo.propertyNo; this.propertyNo = toolInfo.propertyNo;
this.propertyType = 'TL'; this.propertyType = 'TL';
this.titleCon = '工具属性维护'; this.titleCon = '工具属性维护';
this.pageData.site = '*';
this.pageData.site = toolInfo.site;
this.pageData.toolId = toolInfo.toolId; this.pageData.toolId = toolInfo.toolId;
this.pageData.toolInstance = ''; this.pageData.toolInstance = '';
}else if(dataType === 'TLI'){ }else if(dataType === 'TLI'){
@ -79,7 +81,7 @@ export default {
this.propertyNo = toolInfo.propertyNo; this.propertyNo = toolInfo.propertyNo;
this.propertyType = 'TLI'; this.propertyType = 'TLI';
this.titleCon = '工具实例属性维护'; this.titleCon = '工具实例属性维护';
this.pageData.site = '*';
this.pageData.site = toolInfo.site;
this.pageData.toolId = toolInfo.toolId; this.pageData.toolId = toolInfo.toolId;
this.pageData.toolInstance = toolInfo.toolInstance; this.pageData.toolInstance = toolInfo.toolInstance;
} }

17
src/views/modules/tooling/components/orderProperties.vue

@ -74,10 +74,7 @@
<el-dialog title="属性项目" v-drag :visible.sync="attributeSaveDialog" append-to-body> <el-dialog title="属性项目" v-drag :visible.sync="attributeSaveDialog" append-to-body>
<transfer-table v-if="attributeSaveDialog" <transfer-table v-if="attributeSaveDialog"
v-model="dataList2" v-model="dataList2"
:data-list="searchDataList"
@add="saveTestPropertiesItem"
@delete="removeTestPropertiesItem"
@search="searchAttributeList"></transfer-table>
:data-list="searchDataList"> </transfer-table>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="attributeSaveDialog = false">关闭</el-button> <el-button type="primary" @click="attributeSaveDialog = false">关闭</el-button>
</el-footer> </el-footer>
@ -90,7 +87,6 @@
<script> <script>
import {propertiesList,refreshPropertiesModal,updatePropertiesList,getPropertiesListByPartAndCodeNo import {propertiesList,refreshPropertiesModal,updatePropertiesList,getPropertiesListByPartAndCodeNo
,searchPropertiesItemList,saveSubPropertiesValueForAlone,deleteSubPropertiesValueForAlone ,searchPropertiesItemList,saveSubPropertiesValueForAlone,deleteSubPropertiesValueForAlone
} from "@/api/base/properties.js"; } from "@/api/base/properties.js";
import { import {
removeTestPropertiesItem, removeTestPropertiesItem,
@ -99,11 +95,13 @@ import {
} from "@/api/test/testProperties.js"; } from "@/api/test/testProperties.js";
import TransferTable from "../../common/transferTable.vue"; import TransferTable from "../../common/transferTable.vue";
export default { export default {
name: "orderAttribute", name: "orderAttribute",
components: {TransferTable}, components: {TransferTable},
props:{ props:{
site:{
type:String,
},
orderNo:{ orderNo:{
type:String, type:String,
}, },
@ -279,7 +277,6 @@ export default {
}, },
}, },
methods:{ methods:{
refreshPropertiesModal(){ refreshPropertiesModal(){
this.$confirm(`是否刷新至最新模板界面,已填数据会更新到新模板中,若旧属性在新模板中被删除,该条数据会消失。`, '提示', { this.$confirm(`是否刷新至最新模板界面,已填数据会更新到新模板中,若旧属性在新模板中被删除,该条数据会消失。`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -309,7 +306,7 @@ export default {
}, },
getProperties(){ getProperties(){
let params = { let params = {
site: '*',
site: this.site,
partNo: this.orderNo, partNo: this.orderNo,
codeNo: this.codeNo, codeNo: this.codeNo,
recordType: this.functionType, recordType: this.functionType,
@ -369,7 +366,7 @@ export default {
let i = 0; let i = 0;
let arr = params.searchTableList.map(item=>{ let arr = params.searchTableList.map(item=>{
item.partNo = this.orderNo; item.partNo = this.orderNo;
item.site = this.$store.state.user.site;
item.site = this.site;
item.codeNo = this.codeNo; item.codeNo = this.codeNo;
item.recordType = this.functionType; item.recordType = this.functionType;
return item return item
@ -414,7 +411,7 @@ export default {
this.searchDataList = []; this.searchDataList = [];
} }
let inData={ let inData={
site: '*',
site: this.site,
functionType: this.functionType, functionType: this.functionType,
list :this.dataList, list :this.dataList,
} }

2
src/views/modules/tooling/manuf_tool.vue

@ -81,7 +81,7 @@
</el-pagination> </el-pagination>
<el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick"> <el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
<el-tab-pane label="工具实例" name="detail" style="margin-left: -10px;"> <el-tab-pane label="工具实例" name="detail" style="margin-left: -10px;">
<el-form label-position="top" style="margin-top: -15px; margin-left: 2px;">
<el-form label-position="top" style="margin-top: 5px; margin-left: 5px;">
<el-button type="primary" @click="addToolInstanceModal()">新增</el-button> <el-button type="primary" @click="addToolInstanceModal()">新增</el-button>
</el-form> </el-form>
<el-table <el-table

Loading…
Cancel
Save