yangan
2024-12-05 b63dc8ccc6163e73b9f4e4b79f9497070e8ba5ec
feat:PVC流程代码提交
7个文件已修改
486 ■■■■■ 已修改文件
api/globalApi.js 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/driver-index.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/loadUnload-page/selectTarget/selectTarget.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
store/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
subPages/pvcSplicePage/kuguan.vue 351 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
subPages/pvcSplicePage/view.vue 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/globalApi.js
@@ -783,6 +783,33 @@
    oneClickLoading:{
        url: '/wrzs/warehouse/oneClickLoading',
        methods: 'POST'
    }
    },
    //司机接单后的pvc可拼单列表
    pvcSplicingList:{
        url: '/wrzs/tmtaskcoalpvcpd/pvcSplicingList',
        methods: 'GET'
    },
    //司机Pvc拼单接口
    pvcSplicingOfDriver:{
        url: '/wrzs/tmtaskcoalpvcpd/pvcSplicingOfDriver',
        methods: 'POST'
    },
    //司机取消拼单接口
    cancelPindan:{
        url: '/wrzs/tmtaskcoalpvcpd/cancelPindan',
        methods: 'POST'
    },
        //id查询pvc的拼单表
    getPdListByMainTmTaskCoalId:{
        url: '/wrzs/tmtaskcoalpvcpd/getPdListByMainTmTaskCoalId',
        methods: 'GET'
    },
    //pvc库管装卸
    pvcConfirmLoadAndUnload:{
        url: '/wrzs/warehouse/pvcConfirmLoadAndUnload',
        methods: 'POST'
    },
}
pages.json
@@ -734,7 +734,30 @@
                        "navigationBarTitleText": "合卡订单",
                        "enablePullDownRefresh": false
                    }
                }
                },
                {
                "path":"pvcSplicePage/index",
                    "style": {
                        "navigationBarTitleText": "拼单列表",
                        "enablePullDownRefresh": false,
                        "disableSwipeBack": true
                    }
                },
                {
                    "path":"pvcSplicePage/view",
                        "style": {
                            "navigationBarTitleText": "拼单查看",
                            "enablePullDownRefresh": true
                        }
                },
                {
                    "path":"pvcSplicePage/kuguan",
                        "style": {
                            "navigationBarTitleText": "确认装卸",
                            "enablePullDownRefresh": true
                        }
                    }
            ]
        }
pages/driver-page/driver-index/driver-index.vue
@@ -162,6 +162,11 @@
                            </view>
                            <view class="fifth-line">
                                <view class="button-img"
                                     v-if="$store.state.pvcIdList.includes(item.productId)"
                                    @click.stop="PvcpinDan(item)">拼单</view>
                                <view class="button-img"
                                    @click.stop="toAppointmentClick(item)">立即预约</view>
                                <view class="button-img"
                                    v-if="item.isDanger === 1 && !item.idCardEscort"
                                    @click.stop="cancelCerifCate(item)">
                                    剧毒通行证
@@ -170,8 +175,6 @@
                                    @click.stop="cancelAppoint(item)">
                                    请求退单
                                </view>
                                <view class="button-img"
                                    @click.stop="toAppointmentClick(item)">立即预约</view>
                            </view>
                        </view>
                    </view>
@@ -285,6 +288,9 @@
                                </view>
                            </view>
                            <view class="fourth-line">
                                <view class="button-img"
                                     v-if="$store.state.pvcIdList.includes(item.productId)  "
                                    @click.stop="PvcpinDan(item)">拼单</view>
                                    <view class="button-img"
                                    v-if="item.isDanger === 1"
                                        @click.stop="cancelCerifCate(item)">
@@ -862,6 +868,13 @@
                this.isFirstShow  = false;
                console.log(this.jiedanObj,'jiedan')
                this.qiangDanBtn(this.jiedanObj)
            },
            //pvc拼单
            PvcpinDan(item){
                uni.navigateTo({
                    url: `/subPages/pvcSplicePage/index?item=${JSON.stringify(item)  }`
                })
            }
    }
        
pages/loadUnload-page/selectTarget/selectTarget.vue
@@ -139,7 +139,7 @@
                         <uni-td  align="center">
                    <view class="btnBox"> 
                        <!--   -->
                        <!-- <u-button   text='查看'  @click="viewDetail(subItem)"></u-button> -->
                        <u-button  size='mini' v-if="item.isPindan === 1 && $store.state.pvcIdList.includes(subItem.productId) "   type='primary' text='查看拼单'  @click.native.stop="toViewPindan(subItem)"></u-button>
                        <u-button type='primary' text='确认装卸'  size='mini' v-if="subItem.flag && isBtnShow(item) && !( item.tmTaskCoalList.length >1 && !item.tmTaskCoalList.find(item=>item.isWeight !== 0) &&  item.packingType !== 1)" @click.native.stop="enterOk(item,subItem)"></u-button>
                        </view></uni-td>
                        <uni-td align="left">
@@ -823,6 +823,12 @@
            close(){
            },
            toViewPindan(item){
                uni.navigateTo({
                    url: `/subPages/pvcSplicePage/view?item=${JSON.stringify(item) }`
                });
            },
            uploadFilePromise(url, num) {
                return new Promise((resolve, reject) => {
                    let a = uni.uploadFile({
@@ -913,7 +919,13 @@
            },
            enterOk(parintItem,item){
                this.yelvFlag = false;
                if(parintItem.isPindan === 1 && this.$store.state.pvcIdList.includes( item.productId) ){
                    uni.navigateTo({
                    url: `/subPages/pvcSplicePage/kuguan?id=${parintItem.id}&item=${JSON.stringify(parintItem)}`
                });
                }else{
                    this.yelvFlag = false;
                console.log(parintItem,'priintItem')
                // uni.request({
                //     url: `${BaseUrl}/admin/dict/type/tray_weight`,
@@ -1015,6 +1027,8 @@
                // }
            this.enterZx = true;
                }
                
            },
            closeModal(){
store/index.js
@@ -315,6 +315,7 @@
        filedId:'', //场地id
        bunkerList:'', //仓库list
        samplingPersonList:'', //采样员list
        pvcIdList:['1818242458023153665'],
    },
    mutations: {
        setUserInfo(state, identity) {
subPages/pvcSplicePage/kuguan.vue
@@ -1,6 +1,169 @@
<template>
<div class="warp">
    库管装卸
    <view class="history-information"
            >
                            <view class="first">
                                <view class="">{{ pageData.carNo || '' }}</view>
                                <view class=""></view>
                            </view>
                            <view class="second">
                                <view class="coal-name">{{ pageData.productNames?limitString(pageData.productNames,20,'...'):'' || ''}}</view>
                                <view class="order-type">{{ pageData.orderType || '' }}</view>
                            </view>
                            <view class="third">
                                <view class="third-line">
                                    <view class="third-line_text">客户名称:</view>
                                    <view>{{ pageData.customerName }}</view>
                                </view>
                                    <view class="third-line" v-if="/聚氯乙烯树脂/.test(pageData.productName)">
                                    <view class="third-line_text">包装类型:</view>
                                    <view>{{ proType[pageData.packingType] }}</view>
                                </view>
                                <view class="third-line"  v-if="pageData.productName === '二氯乙烷(EDC)'">
                                    <view class="third-line_text">质检状态:</view>
                                    <view> <u-tag :text="checkStatusList[pageData.checkStatus]" plain > </u-tag></view>
                                </view>
                            </view>
                            <view class="fourth">
                                <view class="fourth-icon">
                                    <view
                                        style="width: 24rpx;height: 24rpx;line-height: 24rpx;background: url('https://wrzs.czjlchem.com:9090/appimg/image/banner/clock.png') no-repeat;background-size: cover">
                                    </view>
                                </view>
                                <view class="senddate">{{ pageData.sendDate }}</view>
                            </view>
                            <view class="fourth">
                                <view class="fourth-icon">
                                    <view
                                        style="width: 26rpx;height: 26rpx;line-height: 26rpx;background: url('https://wrzs.czjlchem.com:9090/appimg/image/banner/carnNUm.png') no-repeat;background-size: cover;">
                                    </view>
                                </view>
                                <view class="senddate">{{ pageData.orderCode }}</view>
                            </view>
                                                 <view class="table">
            <uni-table border stripe
            emptyText="暂无更多数据">
                    <uni-tr>
                        <uni-th align="center" width='800'>产品</uni-th>
                         <uni-th align="center" width='200'>包装</uni-th>
                        <!-- <uni-th align="center" width='100'>皮重</uni-th>
                        <uni-th align="center" width='100'>毛重</uni-th>
                        <uni-th align="center" width='100'>净重</uni-th>
                        <uni-th align="center" width='100'>数量</uni-th>  -->
                        <!-- <uni-th align="center"  width='120'>确认量</uni-th>  -->
                        <uni-th align="center"  width='120'>计划量</uni-th>
                        <uni-th align="center"  width='100'>计重方式</uni-th>
                        <uni-th align="center"  width='250'>请输入</uni-th>
                         <!-- <uni-th align="center"  width='100'>实际量</uni-th>  -->
                    </uni-tr>
                    <uni-tr v-for="(subItem, index) in detailData" :key="index">
                        <uni-td align="left">
                            <view style="font-size: 25rpx;">{{ subItem.productName  +  ( subItem.productGrade  ? '-' + subItem.productGrade :'')   }}</view></uni-td>
                    <!-- <uni-td>
                        <view>{{ subItem.bunkerName }}</view>
                    </uni-td>
                    <uni-td>
                        <view class="name" v-if="subItem.skin">{{ Number(subItem.skin).toFixed(2) || ''  }}</view>
                    </uni-td>
                    <uni-td>
                        <view class="name" v-if="subItem.hair"> {{  Number(subItem.hair).toFixed(2) || ''  }}</view>
                    </uni-td>
                        <uni-td>
                        <view class="name" v-if="(subItem.clean || (subItem.clean && subItem.clean === 0))">{{ Number(subItem.clean).toFixed(2) || ''}}</view>
                    </uni-td>
                    <uni-td>
                        <view class="name">{{ subItem.productQuantity }}</view>
                    </uni-td> -->
                    <uni-td align="center">
                        <view class="name"  style="font-size: 25rpx;" >{{ proType[subItem.packingType] }}</view>
                    </uni-td>
                    <!-- <uni-td align="right">
                        <view class="name"  style="font-size: 25rpx;">{{ subItem.productQuantity }}</view>
                    </uni-td> -->
                    <uni-td align="center">
                        <view class="name"  style="font-size: 25rpx;">{{ subItem.planMeasure }}</view>
                    </uni-td>
                    <uni-td >
                            <u-tag :text="'计数'" plain v-if="subItem.isWeight==0"></u-tag>
                            <u-tag  :text="'称重'"  plain v-else-if="subItem.isWeight==1"></u-tag>
                            <u-tag :text="'称重计数'"  plain v-else-if="subItem.isWeight==2"></u-tag>
                            <u-tag v-else></u-tag>
                    </uni-td>
                    <uni-td align="right">
                        <view style="border:  solid 1rpx red;"><u--input
                                 type='digit'
                                :placeholder="'请输入'"
                                v-model="subItem.productQuantity"
                            >
                            </u--input></view>
                    </uni-td>
                    <!-- <uni-td>
                        <view class="name">{{ subItem.realityMeasure }}</view>
                    </uni-td> -->
<!--
                    <uni-td align="center">
                    <view>{{ subItem.bunkerName }}</view></uni-td> -->
                      <!-- <uni-td align="center">
                    <view  class="name">{{ subItem.statusView }}</view></uni-td> -->
                </uni-tr>
                </uni-table>
                <view style="display:flex;margin-top:20rpx;width: 30%;">是否空车出厂: <u-radio-group
                                v-model="isEmptyCar"
                                 placement="row"
                                 iconPlacement="right"
                                 style="justify-content: space-evenly"
                            >
                                <u-radio
                                :key="1"
                                :label="'是'"
                                :name="'1'"
                                shape="circle"
                                iconSize="32"
                                label-size="32"
                                size="40"
                                >
                                </u-radio>
                                <u-radio
                                :key="0"
                                :label="'否'"
                                :name="'0'"
                                shape="circle"
                                iconSize="32"
                                label-size="32"
                                size="40"
                                >
                                </u-radio>
                            </u-radio-group></view>
                            <view  class="footerBtn">
                                <u-button type="primary"
                                @click="confirmLoad"
                                :size="300" text="确认装卸"></u-button>
                            </view>
         </view>
                    </view>
                        <!-- 场内接单弹窗 -->
                <view class="">
                    <u-modal :show="insideConnectShow"
                        title="提示"
                        showCancelButton
                        content="是否确认装卸"
                        @confirm="insideConnectConfirm"
                        @cancel="insideConnectCancel"></u-modal>
                </view>
</div>  
</template>
@@ -8,15 +171,27 @@
export default {
    data() {
        return {
            pageData:[],
            pageData:{},
            insideConnectShow:false,
            id:'',
            detailData:[],
            proType:['散装','液氯瓶装','罐装','PVC25','PVC80','PVC1150','PVc1200'],
                coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入仓库', '出仓库', '放空', '作废', '入场申请',
                    '进入场院', '异常审核中', '返回加减吨', '超时', '打印中', '打印中', '填写', '放空确认中', '超最大毛重确认中','补打','入场检查','质检中',
                    '离场检查','已打印','装卸','返回加减吨确认中'
                ],
        }
    },
    onLoad(params){
        this.pageData = JSON.parse(params.item)
        console.log(params,'123')
        this.id = params.id;
        this.init(params.id);
        if(this.pageData.orderType === '外购'){
                    this.isEmptyCar = '1';
                }else if(this.pageData.orderType === '外销' || this.pageData.orderType === '外购退'){
                    this.isEmptyCar = '0';
                }
    },
    onShow(){
@@ -26,17 +201,185 @@
        init(id){
            this.$reqGet('getPdListByMainTmTaskCoalId',{mainTmTaskCoalId:id}).then((res) => {
                console.log(res,'res')
                this.detailData = res.data;
            })
        }
        },
        limitString(str, limit, suffix = '...') {
                            if (str.length <= limit) return str;
                            return str.slice(0, limit) + suffix;
        },
        //点击装卸
        confirmLoad(){
            this.insideConnectShow = true;
        },
        insideConnectConfirm(){
            let mainPQ,subPQjoin =  ''; // 1主 2子
            this.detailData.forEach(item=>{
                if(item.isPindan === 1){
                    mainPQ = item.productQuantity;
                }else if(item.isPindan === 2){
                    let str = item.id + ':' + item.productQuantity + ',';
                    subPQjoin  += str;
                }
            })
            console.log(mainPQ,subPQjoin,'131313')
            this.insideConnectShow = false;
            this.$reqPost('pvcConfirmLoadAndUnload',{
                    id: this.pageData.id,
                    productQuantity:mainPQ || '',
                    isEmptyCar:this.isEmptyCar,
                    isPretendDischar:this.pageData.isPretendDischar,
                    productId: this.pageData.productId ,
                    pdZiDanPq:subPQjoin || '',
                 },'json').then(res=>{
                    uni.hideLoading();
                    console.log(res,'rez')
                    this.checkNum = '';
                    if(res.code === 1){
                        console.log('触发')
                        this.$u.toast(res.msg || '失败');
                        uni.hideLoading();
                    }else{
                      this.$u.toast('操作成功');
                      setTimeout(() => {
                        this.init();
                        uni.switchTab({
                                url: '/pages/tabbar-page/index-tabbar/index-tabbar'
                            })
                    }, 500);
                    }
                });
        },
        insideConnectCancel(){
            this.insideConnectShow = false;
        }
    },
}
</script>
<style lang="scss" scoped>
    .table{
    width: 100%;
    margin-top: 30rpx;
  /deep/ .uni-table{
    min-width: 0!important;
    margin-left: 20rpx;
    width: auto;
  }
}
.footerBtn{
    width: 300rpx;
    margin-top: 30rpx;
    float: right;
    font-size: 26rpx;
    height: 100rpx;
}
.warp{
    width: 100%;
    height: calc(100vh - 75px);
    .history-information {
                    position: relative;
            margin-bottom:30rpx;
            margin-top: 10rpx;
            background: #ffffff;
            border-radius: 20rpx;
            @include flex flex-direction: column;
            padding: 10px;
            align-items: flex-start;
            justify-content: space-evenly;
            box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
            .first {
                width: 96%;
                height: 34rpx;
                font-size: 32rpx;
                font-weight: 300;
                color: #303030;
                @include flex;
                margin: vww(10) vww(10) 0;
            }
            .second {
                width: 100%;
                height: 31rpx;
                font-size: 30rpx;
                font-weight: 300;
                color: #515151;
                margin: vww(10) vww(10) 0;
                margin-bottom: 15rpx;
                @include flex;
                justify-content: flex-start;
                .coal-name {
                    min-width: vww(20);
                    height: vww(20);
                    margin-right: vww(21);
                }
                .order-type {
                    height: 45rpx;
                    color: #035cfb;
                    border: 2px solid #035cfb;
                    border-radius: 4rpx;
                    padding: vww(2) vww(4);
                    margin-left: 70%;
                    text-align: center;
                }
            }
            .third {
                width: 96%;
                height:  auto;
                font-size: 30rpx;
                font-weight: 300;
                color: #515151;
                margin: vww(10) vww(10) 0;
                @include flex;
                flex-direction: column;
                .third-line {
                    @include flex;
                    align-items: center;;
                    &_text {
                        color: #919090;
                    }
                    &_num {
                        color: #035cfb;
                    }
                }
            }
            .fourth {
                width: 100%;
                height: 31rpx;
                font-size: 30rpx;
                font-weight: 300;
                color: #515151;
                position: relative;
                margin: vww(10) vww(10) 0;
                @include flex;
                .fourth-icon {
                    width: vww(13);
                    height: vww(13);
                    margin-right: vww(14);
                }
                .senddate {
                    flex: 1;
                }
            }
        }
}
subPages/pvcSplicePage/view.vue
@@ -2,7 +2,7 @@
    <div class="warp">
        <!-- 司机待拼单列表 -->
         <div class="daiPin">
            <combined-title title="待拼单日计划">
            <combined-title title="拼单详情">
            </combined-title>
            <view class="table">
                <uni-table border
@@ -12,48 +12,24 @@
                        <!-- <uni-th align="center">编号</uni-th> -->
                        <uni-th align="center">产品</uni-th>
                        <uni-th align="center">客户</uni-th>
                        <uni-th align="center">操作</uni-th>
                        <uni-th align="center">计划量</uni-th>
                        <uni-th align="center">确认量</uni-th>
                    </uni-tr>
                    <uni-tr v-for="(item, index) in daiPageList"
                        :key="item.id">
        
                        <uni-td align="center">{{ item.productName || '' }}</uni-td>
                        <uni-td align="center">{{ item.customerName || '' }}</uni-td>
                        <!-- <uni-td align="center"><u-button text="选择"
                                type="primary"
                                :disabled="item.carNum == item.carNum1&&!isRCSQ"
                                @click="enterOk(item)"></u-button></uni-td> -->
                        <uni-td align="center">{{ item.planMeasure || '' }}</uni-td>
                        <uni-td align="center"><view class="name">{{ item.productQuantity }}</view></uni-td>
                    </uni-tr>
                </uni-table>
            </view>
         </div>
           <!-- 司机已拼单列表 -->
          <!-- <div class="border"></div> -->
           <div class="yiPin">
            <combined-title title="已拼单列表"></combined-title>
            <view class="table">
                <uni-table border
                    stripe
                    emptyText="暂无更多数据">
                    <uni-tr>
                        <!-- <uni-th align="center">编号</uni-th> -->
                        <uni-th align="center">产品</uni-th>
                        <uni-th align="center">客户</uni-th>
                        <uni-th align="center">操作</uni-th>
                    </uni-tr>
                    <uni-tr v-for="(item, index) in yiPageList"
                        :key="item.id">
                        <uni-td align="center">{{ item.productName || '' }}</uni-td>
                        <uni-td align="center">{{ item.customerName || '' }}</uni-td>
                        <!-- <uni-td  align="center"><u-button text="删除"
                                type="error"
                                v-if="item.mainTmTaskId"
                                @click="deletePvcOrder(item)"></u-button></uni-td> -->
                    </uni-tr>
                </uni-table>
            </view>
           </div>
           <!-- 确认吨数弹框 -->
           <u-popup :show="showLing"
                    @close="closeling"
@@ -166,10 +142,9 @@
        },
        methods: {
            init(){
                this.$reqGet('pvcSplicingList').then((res) => {
                this.$reqGet('getPdListByMainTmTaskCoalId',{mainTmTaskCoalId:this.mainTmTaskId }).then((res) => {
                    console.log(res,'res')
                    this.daiPageList = res.data.list1;
                    this.yiPageList = res.data.list2;
                    this.daiPageList = res.data;
    
                })
            },
@@ -294,7 +269,7 @@
        justify-content: space-between;
        .daiPin{
            display: flex;
            flex:  0 1 48%;
            // flex:  0 1 48%;
            flex-direction: column;
            
        }