+
+
+
-
+
-
+
@@ -343,12 +344,12 @@
-
-
- 删除
-
-
+
保存
@@ -782,6 +783,7 @@ export default {
// this.queryParams.createBy = this.user.name
// this.queryParams.companyId = this.companyId
this.queryParams.backApplyInfo = {
+ id:this.rowId,
backPerson: this.queryParams.backPerson,
phone: this.queryParams.phone,
remark: this.queryParams.remark,
@@ -792,7 +794,6 @@ export default {
}
if (this.rowId != '') {
let params = {
- id:this.rowId,
backApplyInfo: this.queryParams.backApplyInfo,
backApplyDetailsList:
this.queryParams.equipmentList,
@@ -878,7 +879,7 @@ export default {
const obj = JSON.parse(JSON.stringify(z.data))
console.log(obj)
obj.typeModel = obj.typeName
- obj.typeName = deviceTypeList[2].data.typeName
+ obj.typeName = obj.materialName
obj.preNum = 0
obj.apDetection = ''
obj.remark = ''
@@ -927,71 +928,107 @@ export default {
template.useNum = node.data.useNum
return template
},
- //编码下拉选数据
- getMachineById(typeId){
+
+ // changeMachine(val){
+ // console.log(val)
+ // this.maData = this.machineList.find(option => option.maId == val);
+ // // = this.machineList[index]
+ // },
+ //编码数据
+ async getMachineById(typeId){
let param = {
unitId:this.queryParams.unitId,
proId:this.queryParams.proId,
typeId:typeId
}
- getMachineById(param).then((res) => {
+ await getMachineById(param).then((res) => {
this.machineList=res.data
+ this.machineList.forEach((item)=>{
+ item.bmFileInfos=[];
+ item.apDetection=""
+ })
})
},
- changeMachine(val){
- console.log(val)
- this.maData = this.machineList.find(option => option.maId == val);
- // = this.machineList[index]
- },
//编码类型-弹窗
- openAddCode(row){
- this.rowData=row;
- this.getMachineById(row.typeId)
- this.maId=""
- this.maCodeList=[]
- if(this.rowData.maCodeList&&this.rowData.maCodeList.length>0){
- this.maCodeList = this.rowData.maCodeList
- }
+ async openAddCode(row){
+ this.rowData=row;
+ await this.getMachineById(row.typeId)
+ // this.maId=""
+ if(this.rowData.maCodeList&&this.rowData.maCodeList.length>0){
+ this.maCodeList = this.rowData.maCodeList;
+ // console.log(this.maCodeList)
+ // console.log(this.machineList)
+ if (this.rowId != '') {//编辑插入已选数据后再回显勾选
+ this.maCodeList.forEach((item)=>{
+ this.machineList.unshift(item)//插入
+ this.$nextTick(() => {
+ this.$refs.codeTableList.toggleRowSelection(item,true);
+ })
+ })
+ }else{//新增回显勾选
+ // console.log("新增")
+ this.machineList.forEach((item)=>{
+ this.maCodeList.forEach((sub)=>{
+ if(sub.maId==item.maId){
+ this.$nextTick(() => {
+ setTimeout(()=>{
+ this.$refs.codeTableList.toggleRowSelection(item,true);
+ },500)
+ })
+ }
+ })
+ })
+ }
+ }else{
+ this.maCodeList=[]
+ }
this.open=true;
},
+ codeSelectionChange(selection) {
+ this.maCodeList=selection
+ // console.log(selection)
+
+ // this.queryParams.equipmentList = selection
+ },
//查询添加
handleAddCode(){
- console.log(this.rowData)
- console.log(this.maId)
- console.log(this.maData)
- if(this.maId!=""){
- let obj = {
- materialName:this.maData.materialName,
- typeId:this.maData.typeId,
- typeName:this.maData.typeName,
- maId:this.maData.maId,
- maCode:this.maData.maCode,
- maStatus:this.maData.maStatus,
- bmFileInfos:[],
- apDetection:"",
- }
- let index = this.maCodeList.findIndex(v=>v.maId==this.maId)
- if(index>-1){
- this.$message.error('设备编码已存在!')
- }else{
- this.maCodeList.push(obj)
- }
- }else{
- this.$message.error('请先填写设备编码!')
- }
- },
- /** 删除按钮操作 */
- handleDeleteCode(row) {
- this.maCodeList.splice(row.index, 1)
- },
- // 弹窗保存
- saveDevCode(){
// console.log(this.rowData)
// console.log(this.maCodeList)
+ // console.log(this.maId)
+ // console.log(this.maData)
+ // if(this.maId!=""){
+ // let obj = {
+ // materialName:this.maData.materialName,
+ // typeId:this.maData.typeId,
+ // typeName:this.maData.typeName,
+ // maId:this.maData.maId,
+ // maCode:this.maData.maCode,
+ // maStatus:this.maData.maStatus,
+ // bmFileInfos:[],
+ // apDetection:"",
+ // }
+ // let index = this.maCodeList.findIndex(v=>v.maId==this.maId)
+ // if(index>-1){
+ // this.$message.error('设备编码已存在!')
+ // }else{
+ // this.maCodeList.push(obj)
+ // }
+ // }else{
+ // this.$message.error('请先填写设备编码!')
+ // }
+ },
+ // /** 删除按钮操作 */
+ // handleDeleteCode(row) {
+ // this.maCodeList.splice(row.index, 1)
+ // },
+ // 弹窗保存
+ saveDevCode(){
+ console.log(this.rowData)
+ console.log(this.maCodeList)
this.rowData.maCodeList = this.maCodeList;
this.rowData.preNum = this.maCodeList.length;
this.open=false
- // console.log(this.equipmentList)
+ console.log(this.equipmentList)
},
//文件上传前
beforeFileUpload(row){
@@ -1006,19 +1043,19 @@ export default {
}
let index = this.equipmentList.findIndex(v=>v.typeId==this.fileData.typeId)
this.equipmentList[index].bmFileInfos=[obj]
-
}
},
// 文件上传成功处理-编码弹窗上传
handleFileSuccess2(response, file, fileList) {
+ console.log(1111)
if(response.code==200){
let obj = {
"name": response.data.name,
"url": response.data.url,
}
- let index = this.maCodeList.findIndex(v=>v.maCode==this.fileData.maCode)
- this.maCodeList[index].bmFileInfos=[obj]
-
+ let index = this.machineList.findIndex(v=>v.maCode==this.fileData.maCode)
+ this.machineList[index].bmFileInfos=[obj]
+ console.log(this.machineList)
}
},
//图片查看
diff --git a/src/views/material/back/component/home.vue b/src/views/material/back/component/home.vue
index 078762b9..0de1573a 100644
--- a/src/views/material/back/component/home.vue
+++ b/src/views/material/back/component/home.vue
@@ -28,9 +28,9 @@
style="width: 240px"
/>
-
+
{
- return backApplyRemove(row.id)
+ return backApplyRemove({id:row.id})
})
.then(() => {
this.getList()
diff --git a/src/views/material/purchase/goodsAccept/index.vue b/src/views/material/purchase/goodsAccept/index.vue
index 880d6ed3..ad4bd623 100644
--- a/src/views/material/purchase/goodsAccept/index.vue
+++ b/src/views/material/purchase/goodsAccept/index.vue
@@ -81,7 +81,7 @@
-
+