Commit 2b061b66 authored by 和慭琛's avatar 和慭琛

DATE 日期 选择器

parent ade0a4a2
...@@ -109,6 +109,17 @@ ...@@ -109,6 +109,17 @@
@cancel="PRODUCT_NUMBERonCancel" @cancel="PRODUCT_NUMBERonCancel"
ref="selector" ref="selector"
></w-picker> ></w-picker>
<mx-date-picker
:show="is_DATE_show"
:type="type"
:value="value"
:show-tips="true"
:begin-text="'入住'"
:end-text="'离店'"
:show-seconds="true"
@confirm="onSelected"
@cancel="onSelected" />
<!--template> <!--template>
<u-select v-model="is_SPECIFICATIONS_picker_show" mode="single-column" :list="list" @confirm="confirm"></u-select> <u-select v-model="is_SPECIFICATIONS_picker_show" mode="single-column" :list="list" @confirm="confirm"></u-select>
</template> </template>
...@@ -120,7 +131,9 @@ ...@@ -120,7 +131,9 @@
</template> </template>
<script> <script>
import MxDatePicker from "@/components/mx-datepicker/mx-datepicker.vue";
export default { export default {
components: {MxDatePicker},
data() { data() {
return { return {
icon_arrow_right:'', icon_arrow_right:'',
...@@ -152,7 +165,11 @@ ...@@ -152,7 +165,11 @@
}, },
PRODUCT_NUMBER_list:[], PRODUCT_NUMBER_list:[],
current_PRODUCT_NUMBER_Id:'', current_PRODUCT_NUMBER_Id:'',
is_DATE_show:false,
type: 'date',
date: '2020/01/01',
value: '',
currentIndex:0
} }
}, },
onLoad(e) { onLoad(e) {
...@@ -334,7 +351,7 @@ ...@@ -334,7 +351,7 @@
//日期 DATE //日期 DATE
if(item.fieldsType == 'DATE'){ if(item.fieldsType == 'DATE'){
this.selectDate(item,ikey)
} }
//服务措施 SERVICE_MEASURES //服务措施 SERVICE_MEASURES
...@@ -561,6 +578,28 @@ ...@@ -561,6 +578,28 @@
}); });
}, },
//日期 选择 显示
selectDate: function (item,ikey,type){
this.currentIndex = ikey;
this.type = type;
this.is_DATE_show = true;
this.value = this[type];
},
//选择
onSelected(e) {
this.is_DATE_show = false;
if(e) {
this[this.type] = e.value;
//选择的值
console.log('value => '+ e.value);
//原始的Date对象
console.log('date => ' + e.date);
this.updateInfo(this.currentIndex,'DATE',e.value)
}
},
//输入类 事件处理 //输入类 事件处理
inputTypeInput: function (e,item,ikey) { inputTypeInput: function (e,item,ikey) {
console.log('更新的选项:') console.log('更新的选项:')
......
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