| | |
| | | <view class="main-flex">
|
| | | <view class="carNum-box">
|
| | | <view>计划车数:</view>
|
| | | <!-- <u--input placeholder="请输入发运车数" border="surround" v-model="item.numPlan" @change="inputChange" @focus="faYunPlanCarsFocus(item)"></u--input> -->
|
| | | <view class="planCars" :style="{color:item.numPlan ? '#111':'#ccc'}" @click="faYunPlanCarsFocus(item)">
|
| | | <text v-model="item.numPlan">{{ item.numPlan || '点击输入数量' }}</text>
|
| | | <view class="cursor" v-if="isCursor && fayunPlanFocusId == item.orderId"><image src="@/static/cursor.gif" mode=""><image></view>
|
| | | </view>
|
| | | <u--input
|
| | | placeholder="请输入发运车数"
|
| | | border="surround"
|
| | | v-model="item.numPlan"
|
| | | @change="inputChange(item)"
|
| | | @focus="faYunPlanCarsFocus(item)"
|
| | | type="number" pattern="[0-9]*"></u--input>
|
| | |
|
| | | <!-- <view class="planCars" :style="{color:item.numPlan ? '#111':'#ccc'}" @click="faYunPlanCarsFocus(item)">
|
| | | <text v-model="item.numPlan">{{ item.numPlan || '点击输入数量' }}</text>
|
| | | <!– <text v-model="item.numPlan">{{ item.numPlan || '点击输入数量' }}</text>–>
|
| | | <view class="cursor" v-if="isCursor && fayunPlanFocusId == item.orderId"><image src="@/static/cursor.gif" mode=""><image></view>
|
| | | </view>-->
|
| | | </view>
|
| | | <view style="margin-right:10px">实际发车数:{{ item.numReal || '暂无' }}</view>
|
| | | </view>
|
| | | </view>
|
| | | <u-keyboard |
| | | <u-keyboard
|
| | | @change="valChange"
|
| | | @backspace="backspace"
|
| | | @confirm="keyBoardConfirm"
|
| | |
| | | :overlay="false"
|
| | | :closeOnClickOverlay="false"
|
| | | :dotDisabled="true"
|
| | | zIndex="100000" |
| | | zIndex="100000"
|
| | | ></u-keyboard>
|
| | | </view>
|
| | |
|
| | |
| | | <view class="main-flex">
|
| | | <view class="carNum-box">
|
| | | <view>计划车数:</view>
|
| | | <!-- <u--input placeholder="请输入发运车数" border="surround" v-model="item.numPlan" @change="inputTotalChange(item)" @focus="faYunPlanCarsFocus(item)"></u--input> -->
|
| | | <view class="planCars" :style="{color:item.numPlan ? '#111':'#ccc'}" @click="faYunPlanCarsFocus(item)">
|
| | | <u--input
|
| | | placeholder="请输入发运车数"
|
| | | border="surround"
|
| | | v-model="item.numPlan"
|
| | | @change="inputTotalChange(item)"
|
| | | @focus="faYunPlanCarsFocus(item)"
|
| | | type="number" pattern="[0-9]*"></u--input>
|
| | | <!-- <view class="planCars" :style="{color:item.numPlan ? '#111':'#ccc'}" @click="faYunPlanCarsFocus(item)">
|
| | | <text v-model="item.numPlan">{{ item.numPlan || '点击输入数量' }}</text>
|
| | | <view class="cursor" v-if="isCursor && fayunPlanFocusId == item.orderId">
|
| | | <image src="@/static/cursor.gif" mode="" />
|
| | | </view>
|
| | | </view>
|
| | | </view>-->
|
| | | </view>
|
| | | <view style="margin-right:10px">实际发车数:{{ item.numReal == null ? '暂无' : item.numReal }}</view>
|
| | | </view>
|
| | | </view>
|
| | | <u-keyboard
|
| | | <!-- <u-keyboard
|
| | | @change="valChange"
|
| | | @backspace="backspace"
|
| | | @confirm="keyBoardConfirm"
|
| | |
| | | :closeOnClickOverlay="false"
|
| | | :dotDisabled="true"
|
| | | zIndex="100000"
|
| | | ></u-keyboard>
|
| | | ></u-keyboard>-->
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | | |
| | |
|
| | | <!-- 修改弹出框 -->
|
| | | <u-popup :show="editPopupShow" @close="editPopupClose" @open="editPopupOpen" mode="top" round="10">
|
| | | <view class="editPopup">
|
| | | <view class="editPopup__title"><text>计划车数</text></view>
|
| | | <view class="editPopup__input"><u--input v-model="keyBoardValue" @change="change" placeholder="请输入内容" type="number" border="surround"></u--input></view>
|
| | | <view class="editPopup__input"><u--input v-model="keyBoardValue" placeholder="请输入内容" type="number" border="surround"></u--input></view>
|
| | | <!-- <view class="editPopup__btn"><u-button text="确定" type="primary" @click="popupDetermineClick"></u-button></view> -->
|
| | | </view>
|
| | | </u-popup>
|
| | |
| | | <script>
|
| | | import popupMenu from '@/components/common/popup-menu/popup-menu.vue';
|
| | | import tool from '@/utils/tool.js';
|
| | | import { TrackOpTypes } from "vue"; |
| | | import { TrackOpTypes } from "vue";
|
| | | import row from "../../uni_modules/uview-ui/libs/config/props/row";
|
| | | export default {
|
| | | components: {
|
| | | popupMenu
|
| | |
| | | return {
|
| | | radioValue: '全部',
|
| | | tabList: [
|
| | | { |
| | | {
|
| | | name: '今日发运计划'
|
| | | },
|
| | | {
|
| | |
| | | onPageScroll(e) {
|
| | | // 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
|
| | | this.scrollTop = e.scrollTop;
|
| | | // console.log('屏幕滚动监听事件',this.scrollTop);
|
| | | },
|
| | | // 点击导航栏菜单后
|
| | | onNavigationBarButtonTap(e) {
|
| | |
| | | },
|
| | | deep: true,
|
| | | immediate: true
|
| | | },
|
| | | scrollTop: {
|
| | | handler: function(newV, oldV) {
|
| | | if (newV != oldV) {
|
| | | this.keyBoardClose();
|
| | | // this.keyBoardShow = false;
|
| | | }
|
| | | }
|
| | | },
|
| | | deep: true,
|
| | | immediate: true
|
| | | }
|
| | | // scrollTop: {
|
| | | // handler: function(newV, oldV) {
|
| | | // if (newV != oldV) {
|
| | | // this.keyBoardClose();
|
| | | // // this.keyBoardShow = false;
|
| | | // }
|
| | | // },
|
| | | // deep: true,
|
| | | // immediate: true
|
| | | // }
|
| | | },
|
| | | methods: {
|
| | | init() {
|
| | |
| | | fyList() {
|
| | | this.overlayShow = true;
|
| | | //列表查询
|
| | | uni.showLoading({ |
| | | uni.showLoading({
|
| | | title: '正在加载...'
|
| | | });
|
| | | let compId = uni.getStorageSync('userInfo').compId;
|
| | |
| | | //提交
|
| | | dataFormSubmit() {
|
| | | this.overlayShow = true;
|
| | | uni.showLoading({
|
| | | title:'加载中...'
|
| | | })
|
| | | this.fyData.forEach(e => {
|
| | | if(!e.shippingDate && e.numPlan){
|
| | | e.shippingDate = this.info.shippingDate
|
| | | }
|
| | | });
|
| | | this.$reqPost('addObj', this.fyData).then(res => {
|
| | | this.$reqPost('xscarshippingdayplanAddObj', this.fyData).then(res => {
|
| | | uni.hideLoading();
|
| | | if(res.code == 0){
|
| | | setTimeout(()=>{
|
| | | uni.showToast({
|
| | | title:'更新成功!',
|
| | | icon:'none',
|
| | | duration:1000
|
| | | })
|
| | | },0)
|
| | | this.fyList();
|
| | | setTimeout(()=>{
|
| | | uni.showToast({
|
| | | title:'更新成功!',
|
| | | icon:'none',
|
| | | duration:1000
|
| | | })
|
| | | },0)
|
| | | }
|
| | | });
|
| | | },
|
| | |
| | | // 修改弹出框
|
| | | editPopupClose(){
|
| | | console.log('修改弹出框Close');
|
| | | // this.editPopupShow = false;
|
| | | this.editPopupShow = false;
|
| | | this.keyBoardShow = false;
|
| | | },
|
| | | editPopupOpen(){
|
| | | console.log('修改弹出框Open');
|
| | | },
|
| | | // 切换全部和已设置
|
| | | groupChange(n) {
|
| | | this.initVariable();
|
| | | this.isTomJihua = n;
|
| | | if (n == '已设置的计划') {
|
| | | this.xscarshippingdayplan();
|
| | |
| | | },
|
| | | //切换今日和明日
|
| | | tabClick(item) {
|
| | | this.initVariable();
|
| | | if (item.index == 1) {
|
| | | this.info.shippingDate = this.tomorrowDate();
|
| | | if (this.isTomJihua == '已设置的计划') {
|
| | |
| | | }
|
| | | }
|
| | | },
|
| | | inputChange(val) {
|
| | | console.log('全部计划', val);
|
| | | // 初始化变量
|
| | | initVariable(){
|
| | | this.keyBoardShow = false;
|
| | | this.keyBoardValue = null;
|
| | | this.fayunPlanFocusId = null;
|
| | | uni.pageScrollTo({
|
| | | scrollTop: 0,
|
| | | duration: 300
|
| | | });
|
| | | },
|
| | | inputChange(item) {
|
| | | if(item.numPlan) {
|
| | | let total = Math.floor(item.order.executiveSurplus / Number(34));
|
| | | let max = total + (item.numReal ? item.numReal : 0) + 1
|
| | | if(item.numPlan > max) {
|
| | | this.$nextTick(() => {
|
| | | item.numPlan = max
|
| | | this.$set(item,'numPlan',max)
|
| | | })
|
| | | uni.showToast({
|
| | | title:`该订单最大设置车数为:${max}`,
|
| | | icon:'none',
|
| | | duration:1000
|
| | | })
|
| | | }
|
| | | }
|
| | | },
|
| | | changeIn(val) {
|
| | | console.log(val,'val=====')
|
| | | },
|
| | | inputTotalChange(val) {
|
| | | console.log(val, 'val2=======val2,已设置计划');
|
| | | this.editRow = val;
|
| | | }, |
| | | },
|
| | | // input获取焦点
|
| | | faYunPlanCarsFocus(item) {
|
| | | // 获取该焦点在页面的位置
|
| | | // let boxBottom = document.getElementById('#u-dropdown');
|
| | | // console.log('元素',boxBottom);
|
| | | // let bottom = this.$refs.planViewRef.offsetHeight
|
| | | this.keyBoardShow = true;
|
| | | console.log(item,'发运车数计划------------===========')
|
| | | this.fayunPlanFocusId = item.orderId;
|
| | | this.keyBoardValue = item.numPlan + '';
|
| | | if(this.isTomJihua == '已设置的计划'){
|
| | |
| | | } else{
|
| | | this.isCursor = true;
|
| | | }
|
| | |
|
| | | // 根据列表下标,使屏幕滚动到相应可视位置
|
| | | // for(let i = 0;i<this.fyData.length;i++){
|
| | | // if(this.fyData[i].orderId == item.orderId){
|
| | | // uni.pageScrollTo({
|
| | | // scrollTop: i*144,
|
| | | // duration: 300
|
| | | // });
|
| | | // }
|
| | | // }
|
| | |
|
| | | },
|
| | | // 键盘
|
| | | valChange(val) {
|
| | |
| | | }
|
| | | };
|
| | | </script>
|
| | |
|
| | | <style>
|
| | | input{-webkit-appearance: none;}
|
| | | </style>
|
| | | <style lang="scss" scoped>
|
| | | .ceshi-box{
|
| | | width: 100%;
|
| | | display: flex;
|
| | | flex-direction: column;
|
| | | }
|
| | | ::v-deep {
|
| | | .u-tabs__wrapper__nav {
|
| | | padding-left: vww(75.5);
|
| | |
| | | width: vww(100);
|
| | | z-index: 1;
|
| | | }
|
| | | |
| | |
|
| | | .u-radio-group--row {
|
| | | height: 100%;
|
| | | width: 100%;
|
| | |
| | | // transform: translateX(-50%);
|
| | | // border-radius: vww(20);
|
| | | // }
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | .jihua-main {
|
| | | display: flex;
|
| | | flex-direction: column;
|
| | | width: 100%;
|
| | | padding: vww(44) vww(10) vww(70) vww(10);
|
| | | padding: vww(44) vww(10) vww(270) vww(10);
|
| | | box-sizing: border-box;
|
| | | .main-inside {
|
| | | width: 100%;
|
| | |
| | |
|
| | | .main-block-box {
|
| | | box-shadow: 0px 0px 8px 0px rgba(216, 218, 238, 0.8);
|
| | | height: vww(120);
|
| | | //height: vww(120);
|
| | | padding: vww(10);
|
| | | box-sizing: border-box;
|
| | | margin-top: vww(12);
|
| | |
| | | border: 1px solid #dddddd;
|
| | | border-radius: vww(4);
|
| | | padding: vww(1) vww(10);
|
| | | |
| | | |
| | |
|
| | |
|
| | | // 输入焦点图片
|
| | | .cursor {
|
| | | // float: left;
|
| | |
| | | // }
|
| | | // }
|
| | | }
|
| | | </style> |
| | | </style>
|