<template>
|
<view>
|
<view class="headTitle">浙江优步体育用品股份有限公司工序SOP</view>
|
<uni-forms ref="form" :modelValue="form" class="headForm">
|
<uni-forms-item label="工单编号" label-width='100' class="headFormItem">
|
<uni-easyinput v-model="form.mesordercode" type="text" placeholder="请输入" :clearable='false' />
|
</uni-forms-item>
|
<uni-forms-item label="产品名称" label-width='100' class="headFormItem">
|
<uni-easyinput v-model="form.partname" type="text" placeholder="请输入" :clearable='false' />
|
</uni-forms-item>
|
<uni-forms-item label="工序sop" label-width='100' class="headFormItem">
|
<uni-data-select v-model="form.filepath" :localdata="selectArr" :clearable='false'
|
@change="filepathChange"></uni-data-select>
|
</uni-forms-item>
|
<uni-forms-item label="版本号" label-width='100' class="headFormItem">
|
<uni-easyinput v-model="form.v" type="text" placeholder="请输入" :clearable='false' />
|
</uni-forms-item>
|
</uni-forms>
|
|
<button type="primary" @click="goBack" size="mini" class="goback">返 回</button>
|
|
|
<web-view class="my-web-view"
|
:src="'https://view.xdocin.com/view?src=' + encodeURIComponent(baseUrl+form.filepath)"></web-view>
|
|
</view>
|
</template>
|
|
<script>
|
export default {
|
onLoad(option) {
|
this.sopArr = JSON.parse(option.sopArr)
|
this.mesOrderObj = JSON.parse(option.mesOrderObj)
|
},
|
data() {
|
return {
|
selectArr: [],
|
sopArr: [],
|
mesOrderObj: {},
|
form: {
|
partname: '',
|
mesordercode: '',
|
filepath: '',
|
v: ''
|
},
|
baseUrl: this.$baseUrl.split('api')[0],
|
}
|
},
|
|
mounted() {
|
this.selectArr = this.sopArr.map(({
|
filename,
|
filepath
|
}) => ({
|
text: filename,
|
value: filepath
|
}))
|
this.form = {
|
partname: this.mesOrderObj.partname,
|
mesordercode: this.mesOrderObj.wo_code,
|
filepath: this.sopArr[0].filepath,
|
v: this.sopArr[0].version
|
}
|
},
|
methods: {
|
filepathChange(val) {
|
console.log(val)
|
},
|
goBack() {
|
// uni.navigateBack()
|
uni.navigateTo({
|
url: './index'
|
})
|
}
|
}
|
|
}
|
</script>
|
|
<style scoped>
|
.goback {
|
position: absolute;
|
right: 3vw;
|
top: 6.5vh;
|
}
|
|
.my-web-view {
|
height: 86vh;
|
margin-top: 13vh;
|
|
}
|
|
.headTitle {
|
height: 6vh;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
font-size: 40rpx;
|
font-weight: bolder;
|
font-family: Arial;
|
}
|
|
.headForm {
|
height: 6vh;
|
border-bottom: 2rpx solid #000;
|
|
span {
|
display: flex;
|
justify-content: space-evenly;
|
align-items: center;
|
}
|
|
.headFormItem {
|
width: 500rpx;
|
}
|
|
.uniui-clear {
|
display: none;
|
}
|
}
|
</style>
|