diff --git a/src/pages/equipment/Inspection/details.vue b/src/pages/equipment/Inspection/details.vue index d92b61e..b4bfb5e 100644 --- a/src/pages/equipment/Inspection/details.vue +++ b/src/pages/equipment/Inspection/details.vue @@ -12,14 +12,14 @@
-
巡检任务: 巡检任务1
+
工单号: {{ detailsinfolist.orderCode }}
-
设备编码: {{ detailsinfo.itemq }}
-
设备名称: {{ detailsinfo.itemq }}
+
设备编码: {{ detailsinfolist.equipmentCode }}
+
设备名称: {{ detailsinfolist.equipmentName }}
-
车间: {{ detailsinfo.itemq }}
-
产线: {{ detailsinfo.itemq }}
+
车间: {{ detailsinfocontent.planWorkshop }}
+
工作中心: {{ detailsinfocontent.workCenterName }}
@@ -27,25 +27,27 @@ - -
检查项: {{ item.item3 }}
-
检查方法: {{ item.item4 }}
-
-
检查标准: {{ item.item5 }}
-
- - - {{ n.name }} - - + +
检查项: {{ item.itemName }}
+
检查方法: {{ item.itemMethod }}
+
+
+
检查标准: {{ item1.standardName }}
+
+ + + {{ n.name }} + + +
-
-
-
检查标准: {{ item.item5 }}
-
- 实际值: - - 单位:mm +
+
检查标准: {{ item1.standardName }}
+
+ 实际值: + + 单位:mm +
@@ -68,7 +70,7 @@ - + @@ -92,6 +94,7 @@ import { BasePage } from '@/components/base/page'; import model from './model'; import chooseOne from '@/components/choose-one/choose-one.vue'; import jPicker from '@/components/J-Picker/jPicker.vue'; +import { session } from '@/store/modules/session'; //import store from '@/store'; @Component({ components: { @@ -112,66 +115,33 @@ export default class ChangePalletNew extends BasePage { current: any = 0; shouciFocus = true; // 详细 - detailsinfo: any = []; - detailsinfolist: any = []; + detailsinfo: any = {}; + detailsinfolist: any = {}; + detailsinfocontent: any = {}; // 模态框 isshow = false; inputmodal = false; + isvalue = false; ischecked = false; radiomodal = false; + // 条码是否一样 + isaccord = false; // 设备信息 - equipmentdata: any = [ + equipmentdata: any = []; + listselect: any = [ { - itemq: '测试设备1', - item2: '已巡检', - item3: '2023-08-01 - 2023-08-31', - item4: '每月巡检', - item5: 'XXXXX', - item6: '未发现异常', - radiovalue: '符合标准', - value: 55, - imgUrlList1: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg', 'https://cdn.uviewui.com/uview/swiper/3.jpg'], - imgUrlList2: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg'], - listselect: [ - { - type: 1, - name: '符合标准', - radiovalue: null, - }, - { - type: 2, - name: '未达标', - radiovalue: null, - }, - ], - valuemax: 100, - valuemin: 50, + type: 0, + name: '符合标准', + radiovalue: null, + }, + { + type: 1, + name: '未达标', + radiovalue: null, }, - // { - // itemq: '测试设备2', - // item2: '已巡检', - // item3: '2023-08-01 - 2023-08-31', - // item4: '每月巡检', - // item5: 'XXXXX', - // item6: '未发现异常', - // radiovalue: '符合标准', - // value: 10, - // imgUrlList1: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg', 'https://cdn.uviewui.com/uview/swiper/3.jpg'], - // imgUrlList2: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg'], - // listselect: [ - // { - // name: '符合标准', - // }, - // { - // name: '未达标', - // }, - // ], - // valuemax: 50, - // valuemin: 10, - // }, ]; // 设备index equipment - equipmentindex: any = ''; + equipmentindex: any = []; orderNo: any = ''; location: any = ''; locationStatus: any = 1; @@ -181,22 +151,33 @@ export default class ChangePalletNew extends BasePage { fileList: any = []; filesArr: any = []; imgList: any = []; - imgUrlList: any = []; deleteimgUrlList: any = []; + deleteimgUrlListcope: any = []; orderNoItemList: any = {}; + picturePath: any = 'https://cdn.uviewui.com/uview/swiper/1.jpg,https://cdn.uviewui.com/uview/swiper/2.jpg'; + async onReady() { - await this.model.getDictList(); //await this.model.getpalletLocation(); //this.remove = this.model.WlList[0]; } // 输入框焦点 - blur(item, value, index) { + blur(item, value, index, index1) { + console.log(item, value, index, index1); this.radiomodal = false; this.inputmodal = false; - console.log(item, value, index); - if (value > item.valuemax || value < item.valuemin) { - this.equipmentindex = index; - this.imgUrlList = JSON.parse(JSON.stringify(item.imgUrlList2)); + if (value == null) { + this.isvalue == true; + } + if (value > item.detailUpLimit || value < item.detailDownLimit) { + this.equipmentindex = []; + this.equipmentindex.push(index); + this.equipmentindex.push(index1); + if (item.picturePath != null) { + this.imgList = JSON.parse(JSON.stringify(item.picturePath)); + this.imgList = this.imgList.split(','); + } else { + this.imgList = []; + } this.inputmodal = true; this.isshow = true; this.form = item; @@ -213,24 +194,35 @@ export default class ChangePalletNew extends BasePage { console.log(e, '11111'); } // 选中任一radio时,由radio-group触发 - radioGroupChange(item, value, index) { - console.log(item, value, index); + radioGroupChange(item, value, index, index1) { + console.log(item, value, index, index1); + this.equipmentindex = []; this.radiomodal = false; this.inputmodal = false; - this.equipmentindex = index; - this.imgUrlList = JSON.parse(JSON.stringify(item.imgUrlList1)); - if (value == '未达标') { + this.equipmentindex.push(index); + this.equipmentindex.push(index1); + if (item.picturePath != null) { + this.imgList = JSON.parse(JSON.stringify(item.picturePath)); + this.imgList = this.imgList.split(','); + } else { + this.imgList = []; + } + if (value == 1) { this.isshow = true; this.radiomodal = true; this.form = item; } } - onLoad(options) { + async onLoad(options) { let str = decodeURIComponent(options.listitem); if (str) { this.detailsinfo = JSON.parse(str); - this.detailsinfolist.push(this.detailsinfo); - console.log(this.detailsinfo); + let query = { + orderCode: this.detailsinfo.orderCode, + }; + await this.model.getInspectionOrderInfo(query); + this.detailsinfocontent = this.model.OrderInfList; + this.detailsinfolist = this.model.OrderInfList.equ; } } created() { @@ -241,21 +233,40 @@ export default class ChangePalletNew extends BasePage { } //模态框图片上传 confirm() { - console.log((this as any).uUpload, 'sssss'); + console.log((this as any).uUpload, 'sssss', this.equipmentindex); + console.log(this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]]); if (this.radiomodal) { - this.equipmentdata[this.equipmentindex].imgUrlList1 = this.imgUrlList; + if (this.imgList.length == 0) { + this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath = null; + } else { + this.imgList = this.imgList.join(','); + this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath = this.imgList; + console.log(this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]], this.imgList); + } } else if (this.inputmodal) { - this.equipmentdata[this.equipmentindex].imgUrlList2 = this.imgUrlList; + if (this.imgList.length == 0) { + this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath = null; + } else { + this.imgList = this.imgList.join(','); + this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath = this.imgList; + console.log(this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]], this.imgList); + } } } cancel() { - this.imgUrlList = this.deleteimgUrlList; + this.isshow = false; + if (this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath == null) { + this.imgList = []; + } else { + this.imgList = this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath; + this.imgList = this.imgList.split(','); + } } scrollLeft() { return 222 * (this.imgList.length + 1); } showScreenImg(i) { - let list = this.imgUrlList; + let list = this.imgList; uni.previewImage({ current: i, urls: list, @@ -263,72 +274,72 @@ export default class ChangePalletNew extends BasePage { }); } chooseImg() { - // if(!this.materialObj){ - // this.$refs.toastRef.show({ - // type:"error", - // text:"请选择物料!" - // }) - // return - // } - // uni.chooseImage({ - // count: 9, //默认9 - // // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 - // sourceType: ['album', 'camera'], - // success: (res) => { - // // uni.showLoading(); - // //console.log('/////',res); - // let tempFilePaths: any = res.tempFilePaths; - // let imgUrlList: any = res.tempFilePaths; - // tempFilePaths.map((item, index) => { - // uni.uploadFile({ - // url: 'http://192.168.202.20:9000/prod-api/file/upload', - // //url: '/dev-api/file/upload', - // fileType: 'image', - // filePath: item, - // header: { - // Authorization: 'Bearer ' + session.user?.access_token, - // // 'cosmo-env-sitecode': this.$store.state.siteCode - // }, - // name: 'file', - // // formData: { - // // materialCode: this.materialObj.materialCode, - // // }, - // success: (res) => { - // console.log(res); - // uni.hideLoading(); - // if (!res.data) { - // // this.$refs.toastRef.show({ - // // type:"error", - // // text:"上传失败!" - // // }) - // return; - // } - // let data = JSON.parse(res.data); - // console.log('123dddd', data); - // this.imgList = [...this.imgList, data.data.url]; - // //this.imgListName = [...this.imgListName,data.fileName]; - // this.imgUrlList = [...this.imgUrlList, imgUrlList[index]]; - // //this.picUrls = this.imgList.join(","); - // //this.picNames = this.imgListName.join(","); - // console.log('this.imgList', this.imgList); - // uni.hideLoading(); - // }, - // fail: (err) => { - // console.log(err); - // // this.$refs.toastRef.show({ - // // type:"error", - // // text:"上传失败!" - // // }) - // uni.hideLoading(); - // }, - // }); - // }); - // }, - // }); + uni.chooseImage({ + count: 9, //默认9 + // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], + success: (res) => { + // uni.showLoading(); + //console.log('/////',res); + let tempFilePaths: any = res.tempFilePaths; + + // (this.$refs.uToast as any).show({ + // title: '成功', + // type: 'success', + // }); + // uni.navigateBack({}); + // } else { + // (this.$refs.uToast as any).show({ + // title: '失败', + // type: 'error', + // }); + tempFilePaths.map((item) => { + uni.uploadFile({ + url: '/dev-api/file/upload', + //url: '/dev-api/file/upload', + fileType: 'image', + filePath: item, + header: { + Authorization: 'Bearer ' + session.user?.access_token, + // 'cosmo-env-sitecode': this.$store.state.siteCode + }, + name: 'file', + // formData: { + // materialCode: this.materialObj.materialCode, + // }, + success: (res) => { + uni.hideLoading(); + if (!res.data) { + // this.$refs.toastRef.show({ + // type:"error", + // text:res.msg + // }) + return; + } + let data = JSON.parse(res.data); + this.imgList = [...this.imgList, data.data.url]; + //this.imgListName = [...this.imgListName,data.fileName]; + //this.picUrls = this.imgList.join(","); + //this.picNames = this.imgListName.join(","); + uni.hideLoading(); + }, + fail: (err) => { + console.log(err); + // this.$refs.toastRef.show({ + // type:"error", + // text:"上传失败!" + // }) + uni.hideLoading(); + }, + }); + }); + }, + }); } deleteImg(index) { - this.deleteimgUrlList = JSON.parse(JSON.stringify(this.imgUrlList)); - this.imgUrlList.splice(index, 1); + this.imgList = JSON.parse(JSON.stringify(this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath)); + this.imgList = this.imgList.split(','); + this.imgList.splice(index, 1); } scanCodeOne() { uni.scanCode({ @@ -343,16 +354,39 @@ export default class ChangePalletNew extends BasePage { } async onSubmit() { if (this.orderNo == '' || this.orderNo.length == 0) { - this.customToast('请输入nficl'); + this.customToast('请扫码设备编码'); return; } - // if (this.badMeg == '') { - // this.customToast('请输入不良描述'); - // return; + if (this.isvalue) { + this.customToast('检查标准不能为空'); + return; + } + // this.detailsinfocontent.equ = this.detailsinfolist; + // let query = this.detailsinfocontent; + // await this.model.updateInspectionRecord(query); + // if (this.model.SubmitCode == '200') { + // (this.$refs.uToast as any).show({ + // title: '成功', + // type: 'success', + // }); + // uni.navigateBack({}); + // } else { + // (this.$refs.uToast as any).show({ + // title: '失败', + // type: 'error', + // }); // } } search(value) { console.log(value); + if (value == this.detailsinfolist.equipmentCode) { + this.isaccord = true; + } else { + (this.$refs.uToast as any).show({ + title: '失败', + type: '请扫码正确条码', + }); + } } } @@ -445,7 +479,7 @@ export default class ChangePalletNew extends BasePage { .item1 { margin-bottom: 3px; white-space: 1px; - font-size: 17px; + font-size: 15px; font-weight: 600; } .item2 { diff --git a/src/pages/equipment/Inspection/detailsview.vue b/src/pages/equipment/Inspection/detailsview.vue index 3442293..4368475 100644 --- a/src/pages/equipment/Inspection/detailsview.vue +++ b/src/pages/equipment/Inspection/detailsview.vue @@ -11,14 +11,14 @@
-
巡检任务: 巡检任务1
+
工单号: {{ detailsinfolist.orderCode }}
-
设备编码: {{ detailsinfo.itemq }}
-
设备名称: {{ detailsinfo.itemq }}
+
设备编码: {{ detailsinfolist.equipmentCode }}
+
设备名称: {{ detailsinfolist.equipmentName }}
-
车间: {{ detailsinfo.itemq }}
-
产线: {{ detailsinfo.itemq }}
+
车间: {{ detailsinfocontent.planWorkshop }}
+
工作中心: {{ detailsinfocontent.workCenterName }}
@@ -26,25 +26,27 @@ - -
检查项: {{ item.item3 }}
-
检查方法: {{ item.item4 }}
-
-
检查标准: {{ item.item5 }}
-
- - - {{ n.name }} - - + +
检查项: {{ item.itemName }}
+
检查方法: {{ item.itemMethod }}
+
+
+
检查标准: {{ item1.standardName }}
+
+ + + {{ n.name }} + + +
-
-
-
检查标准: {{ item.item5 }}
-
- 实际值: - - 单位:mm +
+
检查标准: {{ item1.standardName }}
+
+ 实际值: + + 单位:mm +
@@ -92,6 +94,7 @@ import { BasePage } from '@/components/base/page'; import model from './model'; import chooseOne from '@/components/choose-one/choose-one.vue'; import jPicker from '@/components/J-Picker/jPicker.vue'; +import { session } from '@/store/modules/session'; //import store from '@/store'; @Component({ components: { @@ -112,68 +115,32 @@ export default class ChangePalletNew extends BasePage { current: any = 0; shouciFocus = true; // 详细 - detailsinfo: any = []; - detailsinfolist: any = []; + detailsinfo: any = {}; + detailsinfolist: any = {}; + detailsinfocontent: any = {}; // 模态框 isshow = false; inputmodal = false; ischecked = false; radiomodal = false; + // 条码是否一样 + isaccord = false; // 设备信息 - equipmentdata: any = [ + equipmentdata: any = []; + listselect: any = [ { - itemq: '巡检任务1', - item2: '已巡检', - item3: '2023-08-01 - 2023-08-31', - item4: '每月巡检', - item5: 'XXXXX', - item6: '未发现异常', - radiovalue: '符合标准', - value: 55, - isdisabled: true, - imgUrlList1: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg', 'https://cdn.uviewui.com/uview/swiper/3.jpg'], - imgUrlList2: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg'], - listselect: [ - { - name: '符合标准', - disabled: false, - }, - { - name: '未达标', - disabled: true, - }, - ], - valuemax: 100, - valuemin: 50, + type: 0, + name: '符合标准', + radiovalue: null, }, { - itemq: '巡检任务2', - item2: '已巡检', - item3: '2023-08-01 - 2023-08-31', - item4: '每月巡检', - item5: 'XXXXX', - item6: '未发现异常', - radiovalue: '符合标准', - isdisabled: true, - value: 10, - imgUrlList1: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg', 'https://cdn.uviewui.com/uview/swiper/3.jpg'], - imgUrlList2: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg'], - listselect: [ - { - name: '符合标准', - disabled: false, - }, - { - name: '未达标', - disabled: true, - }, - ], - valuemax: 50, - valuemin: 10, + type: 1, + name: '未达标', + radiovalue: null, }, ]; // 设备index equipment - equipmentindex: any = ''; + equipmentindex: any = []; orderNo: any = ''; location: any = ''; locationStatus: any = 1; @@ -186,22 +153,28 @@ export default class ChangePalletNew extends BasePage { imgUrlList: any = []; deleteimgUrlList: any = []; orderNoItemList: any = {}; + picturePath: any = 'https://cdn.uviewui.com/uview/swiper/1.jpg,https://cdn.uviewui.com/uview/swiper/2.jpg'; + async onReady() { - await this.model.getDictList(); //await this.model.getpalletLocation(); //this.remove = this.model.WlList[0]; } // 输入框焦点 - blur(item, value, index) { + blur(item, value, index, index1) { this.radiomodal = false; this.inputmodal = false; - console.log(item, value, index); - if (value > item.valuemax || value < item.valuemin) { - this.equipmentindex = index; - this.imgUrlList = JSON.parse(JSON.stringify(item.imgUrlList2)); - this.inputmodal = true; - this.isshow = true; - this.form = item; + if (value > item.detailUpLimit || value < item.detailDownLimit) { + this.equipmentindex.push(index); + this.equipmentindex.push(index1); + if (item.picturePath != null) { + item.picturePath = item.picturePath.split(','); + this.imgUrlList = JSON.parse(JSON.stringify(item.picturePath)); + } else { + this.imgUrlList = []; + } + // this.inputmodal = true; + // this.isshow = true; + // this.form = item; } } changeinput(e) { @@ -215,24 +188,33 @@ export default class ChangePalletNew extends BasePage { console.log(e, '11111'); } // 选中任一radio时,由radio-group触发 - radioGroupChange(item, value, index) { - console.log(item, value, index); + radioGroupChange(item, value, index, index1) { this.radiomodal = false; this.inputmodal = false; - this.equipmentindex = index; - this.imgUrlList = JSON.parse(JSON.stringify(item.imgUrlList1)); - if (value == '未达标') { - this.isshow = true; - this.radiomodal = true; - this.form = item; + this.equipmentindex.push(index); + this.equipmentindex.push(index1); + if (item.picturePath != null) { + item.picturePath = item.picturePath.split(','); + this.imgUrlList = JSON.parse(JSON.stringify(item.picturePath)); + } else { + this.imgUrlList = []; } + // if (value == 1) { + // this.isshow = true; + // this.radiomodal = true; + // this.form = item; + // } } - onLoad(options) { + async onLoad(options) { let str = decodeURIComponent(options.listitem); if (str) { this.detailsinfo = JSON.parse(str); - this.ischecked = this.detailsinfo.ischecked; - console.log(this.detailsinfo); + let query = { + orderCode: this.detailsinfo.orderCode, + }; + await this.model.getInspectionOrderInfo(query); + this.detailsinfocontent = this.model.OrderInfList; + this.detailsinfolist = this.model.OrderInfList.equ; } } created() { @@ -243,11 +225,14 @@ export default class ChangePalletNew extends BasePage { } //模态框图片上传 confirm() { - console.log((this as any).uUpload, 'sssss'); + console.log((this as any).uUpload, 'sssss', this.equipmentindex); + console.log(this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]]); if (this.radiomodal) { - this.equipmentdata[this.equipmentindex].imgUrlList1 = this.imgUrlList; + this.imgUrlList = this.imgUrlList.join(); + this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath = this.imgUrlList; } else if (this.inputmodal) { - this.equipmentdata[this.equipmentindex].imgUrlList2 = this.imgUrlList; + this.imgUrlList = this.imgUrlList.join(); + this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath = this.imgUrlList; } } cancel() { @@ -265,68 +250,60 @@ export default class ChangePalletNew extends BasePage { }); } chooseImg() { - // if(!this.materialObj){ - // this.$refs.toastRef.show({ - // type:"error", - // text:"请选择物料!" - // }) - // return - // } - // uni.chooseImage({ - // count: 9, //默认9 - // // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 - // sourceType: ['album', 'camera'], - // success: (res) => { - // // uni.showLoading(); - // //console.log('/////',res); - // let tempFilePaths: any = res.tempFilePaths; - // let imgUrlList: any = res.tempFilePaths; - // tempFilePaths.map((item, index) => { - // uni.uploadFile({ - // url: 'http://192.168.202.20:9000/prod-api/file/upload', - // //url: '/dev-api/file/upload', - // fileType: 'image', - // filePath: item, - // header: { - // Authorization: 'Bearer ' + session.user?.access_token, - // // 'cosmo-env-sitecode': this.$store.state.siteCode - // }, - // name: 'file', - // // formData: { - // // materialCode: this.materialObj.materialCode, - // // }, - // success: (res) => { - // console.log(res); - // uni.hideLoading(); - // if (!res.data) { - // // this.$refs.toastRef.show({ - // // type:"error", - // // text:"上传失败!" - // // }) - // return; - // } - // let data = JSON.parse(res.data); - // console.log('123dddd', data); - // this.imgList = [...this.imgList, data.data.url]; - // //this.imgListName = [...this.imgListName,data.fileName]; - // this.imgUrlList = [...this.imgUrlList, imgUrlList[index]]; - // //this.picUrls = this.imgList.join(","); - // //this.picNames = this.imgListName.join(","); - // console.log('this.imgList', this.imgList); - // uni.hideLoading(); - // }, - // fail: (err) => { - // console.log(err); - // // this.$refs.toastRef.show({ - // // type:"error", - // // text:"上传失败!" - // // }) - // uni.hideLoading(); - // }, - // }); - // }); - // }, - // }); + uni.chooseImage({ + count: 9, //默认9 + // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], + success: (res) => { + // uni.showLoading(); + //console.log('/////',res); + let tempFilePaths: any = res.tempFilePaths; + tempFilePaths.map((item) => { + uni.uploadFile({ + url: 'http://192.168.202.20:9000/prod-api/file/upload', + //url: '/dev-api/file/upload', + fileType: 'image', + filePath: item, + header: { + Authorization: 'Bearer ' + session.user?.access_token, + // 'cosmo-env-sitecode': this.$store.state.siteCode + }, + name: 'file', + // formData: { + // materialCode: this.materialObj.materialCode, + // }, + success: (res) => { + console.log(res); + uni.hideLoading(); + if (!res.data) { + // this.$refs.toastRef.show({ + // type:"error", + // text:"上传失败!" + // }) + return; + } + let data = JSON.parse(res.data); + console.log('123dddd', data); + this.imgUrlList = [...this.imgList, data.data.url]; + //this.imgListName = [...this.imgListName,data.fileName]; + // this.imgUrlList = [...this.imgUrlList, imgUrlList[index]]; + //this.picUrls = this.imgList.join(","); + //this.picNames = this.imgListName.join(","); + console.log('this.imgList', this.imgList); + uni.hideLoading(); + }, + fail: (err) => { + console.log(err); + // this.$refs.toastRef.show({ + // type:"error", + // text:"上传失败!" + // }) + uni.hideLoading(); + }, + }); + }); + }, + }); } deleteImg(index) { this.deleteimgUrlList = JSON.parse(JSON.stringify(this.imgUrlList)); @@ -353,6 +330,12 @@ export default class ChangePalletNew extends BasePage { // return; // } } + search(value) { + console.log(value); + if (value == this.detailsinfolist.equipmentCode) { + this.isaccord = true; + } + } }