|
|
|
@ -110,27 +110,26 @@
|
|
|
|
|
</u-radio-group>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- <div v-for="(item1, index1) in item.standardList" :key="index1">
|
|
|
|
|
<div class="item1 item2" v-if="item1.standardType == 'qualitative'">
|
|
|
|
|
<div>检查标准: {{ item1.standardName }}</div>
|
|
|
|
|
<div class="select">
|
|
|
|
|
<u-radio-group v-model="item1.detailReach" @change="radioGroupChange(item1, item1.detailReach, index, index1)">
|
|
|
|
|
<u-radio @change="radioChange" v-for="(n, indexn) in listselect" :key="indexn" :name="n.type" :disabled="n.disabled">
|
|
|
|
|
{{ n.name }}
|
|
|
|
|
</u-radio>
|
|
|
|
|
</u-radio-group>
|
|
|
|
|
<div class="upload-name">
|
|
|
|
|
<!-- <div class="name">检查标准:{{ form.item5 }}</div> -->
|
|
|
|
|
<!-- <u-upload :before-upload="beforeUpload" ref="uUpload" :fileList="fileList" @on-error='errorUpload($event)' :action="action" @on-remove="removePic($event, item)" @on-success="successUpload($event)" :deletable="true"></u-upload> -->
|
|
|
|
|
<scroll-view class="scroll-view_H" scroll-x="true" :scroll-left="scrollLeft(item.files)">
|
|
|
|
|
<view class="photoList">
|
|
|
|
|
<view class="itemBox photoBox" v-for="(img, index1) in item.files" :key="index1">
|
|
|
|
|
<view class="closeBtn" @click="deleteImg(index1)">
|
|
|
|
|
<image class="img" src="../../../static/images/iconCloseGray.svg" mode="scaleToFill"></image>
|
|
|
|
|
</view>
|
|
|
|
|
<image class="img" :src="img" mode="aspectFit" @click="showScreenImg(index1, item.files)"></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="itemBox chooseBtn" @click="chooseImg(index, item.files)">
|
|
|
|
|
<view class="inner">
|
|
|
|
|
<image class="img" src="../../../static/images/upload-pic-icon.svg" mode="scaleToFill"></image>
|
|
|
|
|
<text class="desc">添加照片</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</scroll-view>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item1 item2" v-if="item1.standardType == 'quantify'">
|
|
|
|
|
<div>检查标准: {{ item1.standardName }}</div>
|
|
|
|
|
<div class="input-box" id="input-box1">
|
|
|
|
|
实际值:
|
|
|
|
|
<input class="input" v-model="item1.actualValue" @focus="focus()" @blur="blur(item1, item1.actualValue, index, index1)" @change="changeinput(item1)" @input="input(item1)" type="text" name="" id="" />
|
|
|
|
|
单位:mm
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- sampleQuality:抽样数量
|
|
|
|
@ -307,6 +306,7 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
isshow2 = false;
|
|
|
|
|
isshow3 = false;
|
|
|
|
|
incomeBatchNo: any = {};
|
|
|
|
|
files: any = [];
|
|
|
|
|
//收货按钮
|
|
|
|
|
tagClick(index) {
|
|
|
|
|
this.tagslist.splice(index, 1);
|
|
|
|
@ -381,6 +381,7 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
item.factoryCode = session.PoolName;
|
|
|
|
|
item.checkType = this.selectList.value;
|
|
|
|
|
item.orderCode = this.clickitem.orderNo;
|
|
|
|
|
item.files = [];
|
|
|
|
|
});
|
|
|
|
|
this.show = true;
|
|
|
|
|
}
|
|
|
|
@ -474,6 +475,13 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
this.isquality = true;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.detaillistceshi.forEach((item) => {
|
|
|
|
|
if (item.files.length > 0) {
|
|
|
|
|
item.files = [];
|
|
|
|
|
} else {
|
|
|
|
|
item.files = [];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
console.log(this.detaillistceshi, this.isvalue, this.isquality);
|
|
|
|
|
if (this.isvalue) {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
@ -513,9 +521,11 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
sampleQuality: this.formdata.sampleQuality,
|
|
|
|
|
updateBy: session.userName,
|
|
|
|
|
factoryCode: session.PoolName,
|
|
|
|
|
updateByName: session.userName,
|
|
|
|
|
typeCode: this.selectList.value,
|
|
|
|
|
checkType: this.selectList.value,
|
|
|
|
|
orderCode: this.clickitem.orderNo,
|
|
|
|
|
workorderCodeSap: this.clickitem.workorderCodeSap,
|
|
|
|
|
qcCheckTaskDetails: this.detaillistceshi,
|
|
|
|
|
defects: this.detaillistdefects,
|
|
|
|
|
incomeBatchNo: incomeBatchNo,
|
|
|
|
@ -557,6 +567,101 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
this.tagsvalue = null;
|
|
|
|
|
}
|
|
|
|
|
//查询货单关联采购单信息
|
|
|
|
|
// 照片上传
|
|
|
|
|
scrollLeft(files) {
|
|
|
|
|
return 222 * (files.length + 1);
|
|
|
|
|
}
|
|
|
|
|
showScreenImg(i, files) {
|
|
|
|
|
let list = files;
|
|
|
|
|
uni.previewImage({
|
|
|
|
|
current: i,
|
|
|
|
|
urls: list,
|
|
|
|
|
// loop: true
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
chooseImg(index, files) {
|
|
|
|
|
uni.chooseImage({
|
|
|
|
|
count: 9, //默认9
|
|
|
|
|
// sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
|
|
|
|
sourceType: ['album', 'camera'],
|
|
|
|
|
success: (res) => {
|
|
|
|
|
// uni.showLoading();
|
|
|
|
|
//console.log('/////',res);
|
|
|
|
|
let tempFilePaths: any = res.tempFilePaths;
|
|
|
|
|
console.log(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: '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) => {
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
if (!res.data) {
|
|
|
|
|
// this.$refs.toastRef.show({
|
|
|
|
|
// type:"error",
|
|
|
|
|
// text:res.msg
|
|
|
|
|
// })
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let data = JSON.parse(res.data);
|
|
|
|
|
files = [...files, data.data.url];
|
|
|
|
|
this.detaillistceshi[index].files = files;
|
|
|
|
|
this.detaillistceshi[index].fileListStr = files.join(',');
|
|
|
|
|
//this.filesName = [...this.filesName,data.fileName];
|
|
|
|
|
//this.picUrls = this.files.join(",");
|
|
|
|
|
//this.picNames = this.filesName.join(",");
|
|
|
|
|
console.log(files, this.detaillistceshi[index]);
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
},
|
|
|
|
|
fail: (err) => {
|
|
|
|
|
console.log(err);
|
|
|
|
|
// this.$refs.toastRef.show({
|
|
|
|
|
// type:"error",
|
|
|
|
|
// text:"上传失败!"
|
|
|
|
|
// })
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
deleteImg(index) {
|
|
|
|
|
this.detaillistceshi[index].files.splice(index, 1);
|
|
|
|
|
this.detaillistceshi[index].fileListStr = this.detaillistceshi[index].files.join(',');
|
|
|
|
|
}
|
|
|
|
|
scanCodeOne() {
|
|
|
|
|
uni.scanCode({
|
|
|
|
|
scanType: ['barCode'],
|
|
|
|
|
success: (res) => {
|
|
|
|
|
this.orderNo = res.result;
|
|
|
|
|
},
|
|
|
|
|
fail(result) {
|
|
|
|
|
this.customToast(result);
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|