<template>
|
<view class="edc-sampling-form-wrap">
|
<u--form
|
labelPosition="left"
|
:model="modelForm"
|
:rules="rules"
|
ref="uForm"
|
labelAlign="right"
|
labelWidth="20%"
|
>
|
<u-form-item
|
label="车牌:"
|
prop="carNo"
|
borderBottom
|
ref="item1"
|
>
|
<u--input
|
v-model="modelForm.carNo"
|
border="none"
|
></u--input>
|
</u-form-item>
|
<u-form-item
|
label="供应商:"
|
prop="customerName"
|
borderBottom
|
ref="item1"
|
>
|
<u--input
|
v-model="modelForm.customerName"
|
border="none"
|
></u--input>
|
</u-form-item>
|
<u-form-item
|
label="批次:"
|
prop="batchNumber"
|
borderBottom
|
ref="item1"
|
>
|
<u--input
|
v-model="modelForm.batchNumber"
|
border="none"
|
></u--input>
|
</u-form-item>
|
<u-form-item
|
label="检验日期:"
|
prop="startTime"
|
borderBottom
|
ref="item1"
|
>
|
<u--input
|
v-model="modelForm.startTime"
|
border="none"
|
></u--input>
|
</u-form-item>
|
<u-form-item
|
label="采样地点:"
|
prop="bunkerName"
|
borderBottom
|
ref="item1"
|
>
|
<u--input
|
v-model="modelForm.bunkerName"
|
border="none"
|
></u--input>
|
</u-form-item>
|
<u-form-item
|
label="取样人:"
|
prop="samplingPerson"
|
borderBottom
|
ref="item1"
|
>
|
<u--input
|
v-model="modelForm.samplingPerson"
|
border="none"
|
></u--input>
|
</u-form-item>
|
</u--form>
|
</view>
|
</template>
|
|
<script>
|
const dayjs = require('dayjs')
|
|
export default {
|
name: "edc-sampling-form",
|
data() {
|
return {
|
modelForm: {
|
id:'',
|
carNo:'',
|
customerName:'',
|
batchNumber: '',
|
startTime: '',
|
bunkerName:'',
|
samplingPerson: '',
|
type: 1, //1 EDC、2 聚氯乙烯树脂、3 硫酸、4 氢氧化钠 5 液氯 6、原盐钙镁 7、原盐TOC 8、原盐全检
|
},
|
checkId:'',
|
rules: {
|
|
}
|
}
|
},
|
onLoad(opt) {
|
if(opt.checkId) {
|
this.checkId = opt.checkId
|
console.log(this.checkId,'接收到上个页面传过来的参数===')
|
}
|
this.getByIdAndSubList()
|
},
|
methods: {
|
getByIdAndSubList() {
|
uni.showLoading({
|
title:'加载中'
|
})
|
// this.$reqGet2('getByIdAndSubList',this.checkId).then(res => {
|
//
|
// })
|
uni.request({ //获取deptId
|
url: `/wrzs/zjqualitycheck/getByIdAndSubList/${this.checkId}`,
|
method: 'GET',
|
header: {
|
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'),
|
clientToc: 'Y',
|
'CLIENT_TOC': 'Y',
|
},
|
success: res => {
|
console.log(res,'res====')
|
if(res.data.code == 0) {
|
uni.hideLoading()
|
this.modelForm = res.data.data
|
this.modelForm.startTime = this.dayjs().format('YYYY-MM-DD')
|
|
}
|
// console.log(res,'shuj------')
|
// this.filedId = res.data?.data.length > 0 ? res.data.data[0].id : '';
|
// this.getFiledIdCoalBunker()
|
}
|
})
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.edc-sampling-form-wrap{
|
width: 100%;
|
padding: 0 40rpx;
|
box-sizing: border-box;
|
::v-deep{
|
.u-form{
|
padding-top: 20rpx;
|
}
|
.u-form-item{
|
margin-bottom: 20rpx;
|
.u-line {
|
border-bottom-width: 0!important;
|
}
|
.u-form-item__body__right{
|
padding-left: 20rpx;
|
}
|
}
|
|
}
|
}
|
</style>
|