Commit f4416d07 by zhuxiaomei

样品名称和日期

parent 9fd0f344
......@@ -238,8 +238,7 @@
label-class="cus-field-class"
label-width="50%"
label-align="center"
name="sampleName"
v-model="formObj.sampleName"
v-model="sample.name"
label="样品名称"
></van-field>
</table-col>
......@@ -383,6 +382,7 @@
</table-col>
<table-col>
<van-field
readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
......@@ -747,6 +747,16 @@
<div class="bottom-btn">
<van-button block type="info" @click="_ok">保存</van-button>
</div>
<van-popup v-model="showPicker" position="bottom"
:safe-area-inset-bottom="true"
:close-on-popstate="true">
<van-datetime-picker
:type="type"
v-model="currentDate"
@confirm="_dateOnConfirm"
@cancel="showPicker = false"
></van-datetime-picker>
</van-popup>
</div>
</template>
......@@ -765,11 +775,13 @@
},
data() {
return {
showPicker:false,
currentDate:new Date(),
selectDateType:'',
formObj: {
samplingNum: '',
taskNum: '',
sampleName: '',
source: '',
taskType: '',
proName: '',
......@@ -808,6 +820,7 @@
placeRemark: '' //保存时单独赋值 根据环节取对应的placeRemarkN
},
sample: {
name:'',
trademark: '',
qrcode: '',
firstClass: '',
......@@ -985,6 +998,14 @@
this.$toast('编辑成功!')
this.$router.go(-1)
}
},
_selectDate(type){
this.selectDateType = type
this.showPicker = true
},
_dateOnConfirm(date) {
this.sample.sampleDate = this.$dateformat(date, this.format)
this.showPicker = false
}
}
}
......
......@@ -234,7 +234,7 @@
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="formObj.sampleName"
v-model="sample.name"
label="样品名称"
></van-field>
</table-col>
......@@ -377,11 +377,13 @@
</table-col>
<table-col>
<van-field
readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.sampleDate"
label=""
@click="_selectDate('sample.sampleDate')"
></van-field>
</table-col>
<table-col>
......@@ -741,6 +743,17 @@
<div class="bottom-btn">
<van-button block type="info" @click="_ok">保存</van-button>
</div>
<van-popup v-model="showPicker" position="bottom"
:safe-area-inset-bottom="true"
:close-on-popstate="true">
<van-datetime-picker
:type="type"
v-model="currentDate"
@confirm="_dateOnConfirm"
@cancel="showPicker = false"
></van-datetime-picker>
</van-popup>
</div>
</template>
......@@ -760,12 +773,14 @@
},
data() {
return {
showPicker:false,
currentDate:new Date(),
selectDateType:'',
formObj: {
samplingNum: '',
taskNum: '',
source: '',
taskType: '',
sampleName: '',
proName: '',
proAddress: '',
......@@ -807,6 +822,7 @@
place: '', //保存时单独赋值 从place字段分离出
},
sample: {
name:'',
trademark: '',
num: '',
batchNo: '',
......@@ -950,6 +966,14 @@
this.$toast('编辑成功!')
this.$router.go(-1)
}
},
_selectDate(type){
this.selectDateType = type
this.showPicker = true
},
_dateOnConfirm(date) {
this.sample.sampleDate = this.$dateformat(date, this.format)
this.showPicker = false
}
}
}
......
......@@ -238,8 +238,7 @@
label-class="cus-field-class"
label-width="50%"
label-align="center"
name="sampleName"
v-model="formObj.sampleName"
v-model="sample.name"
label="样品名称"
></van-field>
</table-col>
......@@ -770,7 +769,6 @@
samplingNum: '',
taskNum: '',
sampleName: '',
source: '',
taskType: '',
proName: '',
......@@ -809,6 +807,7 @@
placeRemark: '' //保存时单独赋值 根据环节取对应的placeRemarkN
},
sample: {
name:'',
trademark: '',
qrcode: '',
firstClass:'',
......
......@@ -234,7 +234,7 @@
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="formObj.sampleName"
v-model="sample.name"
label="样品名称"
></van-field>
</table-col>
......@@ -766,7 +766,6 @@
taskNum: '',
source: '',
taskType: '',
sampleName: '',
proName: '',
proAddress: '',
......@@ -808,6 +807,7 @@
place: '', //保存时单独赋值 从place字段分离出
},
sample: {
name:'',
trademark: '',
num: '',
batchNo:'',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment