|
|
|
@ -3,7 +3,7 @@ |
|
|
|
<div style="margin-top: 5px"> |
|
|
|
<el-button type="primary" @click="clickSaveBtn" v-if="orderNo">新增</el-button> |
|
|
|
<el-button type="primary" :loading="loading" v-if="orderNo" @click="clickSave">{{ attributeDialog?'编辑':'保存' }}</el-button> |
|
|
|
<!-- <el-button type="primary" @click="refreshPropertiesModal" v-if="attributeDialog">刷新属性模板</el-button>--> |
|
|
|
<el-button type="primary" @click="refreshPropertiesModal" v-if="attributeDialog">刷新属性模板</el-button> |
|
|
|
</div> |
|
|
|
<div class="rq " v-if="attributeDialog"> |
|
|
|
<el-table |
|
|
|
@ -90,7 +90,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import {propertiesList,refreshPropertiesModal,updatePropertiesList,getPropertiesListByPartAndCodeNo |
|
|
|
,searchPropertiesItemList |
|
|
|
,searchPropertiesItemList,saveSubPropertiesValueForAlone,deleteSubPropertiesValueForAlone |
|
|
|
|
|
|
|
} from "@/api/base/properties.js"; |
|
|
|
import { |
|
|
|
@ -319,6 +319,7 @@ export default { |
|
|
|
for (let i = 0; i <this.dataList2.length ; i++) { |
|
|
|
this.dataList2[i].itemNo= this.dataList2[i].propertiesItemNo |
|
|
|
} |
|
|
|
this.searchAttributeList({}) |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
@ -364,11 +365,17 @@ export default { |
|
|
|
saveTestPropertiesItem(params){ |
|
|
|
let i = 0; |
|
|
|
let arr = params.searchTableList.map(item=>{ |
|
|
|
item.testNo = this.testNo; |
|
|
|
item.seqNo = i++; |
|
|
|
item.partNo = this.orderNo; |
|
|
|
item.site = this.$store.state.user.site; |
|
|
|
item.codeNo = this.codeNo; |
|
|
|
item.recordType = this.functionType; |
|
|
|
return item |
|
|
|
}) |
|
|
|
saveTestPropertiesItem(arr).then(({data})=>{ |
|
|
|
for (let j = 0; j <arr.length ; j++) { |
|
|
|
arr[j].propertiesItemNo= arr[j].itemNo |
|
|
|
arr[j].itemNo=999 |
|
|
|
} |
|
|
|
saveSubPropertiesValueForAlone(arr).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
this.$message.success(data.msg); |
|
|
|
this.getProperties(params) |
|
|
|
@ -380,10 +387,15 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
removeTestPropertiesItem(params){ |
|
|
|
removeTestPropertiesItem(params.dataTableList).then(({data})=>{ |
|
|
|
for (let i = 0; i <params.dataTableList.length ; i++) { |
|
|
|
params.dataTableList[i].propertiesItemNo= params.dataTableList[i].itemNo |
|
|
|
params.dataTableList[i].itemNo=999 |
|
|
|
} |
|
|
|
deleteSubPropertiesValueForAlone(params.dataTableList).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
this.$message.success(data.msg); |
|
|
|
this.getProperties(params) |
|
|
|
|
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg); |
|
|
|
} |
|
|
|
|