付延余
2022-07-26 7c3218e12105b87cab21e9ced57c99c339ffac10
tatolpage
15个文件已修改
1个文件已添加
3722 ■■■■■ 已修改文件
components/common/popup-menu/popup-menu.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/approval-history/approval-history.vue 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/check-the-schedule/check-the-schedule.vue 67 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/edit-my-application/edit-my-application.vue 2235 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.vue 281 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/login.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/my-application/my-application.vue 87 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/my-have-todo/my-have-todo.vue 145 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/my-todo/my-todo.vue 285 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/new-application-form-data/new-application-form-data.vue 145 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/new-application/new-application.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/the-form-data/the-form-data.vue 243 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
store/index.js 补丁 | 查看 | 原始文档 | blame | 历史
utils/api.js 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/request.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/common/popup-menu/popup-menu.vue
@@ -69,7 +69,7 @@
        };
    },
    onShow() {
        alert(111)
        alert(111);
    },
    methods: {
        menuClick(){
@@ -85,7 +85,22 @@
        },
        menuPopupClick(){
            this.menuShow = false;
            uni.request({
                url:'/auth/token/logout',
                method:'DELETE',
                header:{
                    'TENANT-ID': 5,
                    Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
                    VERSION: 'zzl'
                }
            }).then(res=>{
            redirectLogin();
            }).catch(err=>{
                uni.showToast({
                    title:'退出失败!',
                })
            })
        }
    }
};
pages.json
@@ -23,37 +23,45 @@
        {
            "path": "pages/my-todo/my-todo",
            "style": {
                "navigationBarTitleText": "我的待办"
                "navigationBarTitleText": "我的待办",
                "enablePullDownRefresh": true,
                "onReachBottomDistance": 10 //距离底部多少距离的时候触发
            }
        },
        {
            "path": "pages/my-have-todo/my-have-todo",
            "style": {
                "navigationBarTitleText": "我的已办 "
                "navigationBarTitleText": "我的已办 ",
                "enablePullDownRefresh": true,
                "onReachBottomDistance": 10 //距离底部多少距离的时候触发
            }
        },
        {
            "path": "pages/check-the-schedule/check-the-schedule",
            "style": {
                "navigationBarTitleText": "查看进度"
                "navigationBarTitleText": "查看进度",
                "enablePullDownRefresh": false
            }
        },
        {
            "path": "pages/the-form-data/the-form-data",
            "style": {
                "navigationBarTitleText": "表单数据"
                "navigationBarTitleText": "表单数据",
                "enablePullDownRefresh": false
            }
        },
        {
            "path": "pages/approval-history/approval-history",
            "style": {
                "navigationBarTitleText": "审批历史"
                "navigationBarTitleText": "审批历史",
                "enablePullDownRefresh": false
            }
        },
        {
            "path": "pages/new-application/new-application",
            "style": {
                "navigationBarTitleText": "新增申请 "
                "navigationBarTitleText": "新增申请 ",
                "enablePullDownRefresh": false
            }
        }, {
            "path": "pages/new-application-form-data/new-application-form-data",
@@ -68,6 +76,13 @@
                "navigationBarTitleText": "日发运计划"
            }
        }, {
            "path": "pages/edit-my-application/edit-my-application",
            "style": {
                "navigationBarTitleText": "修改",
                "enablePullDownRefresh": false
            }
        }
    ],
    "globalStyle": {
pages/approval-history/approval-history.vue
@@ -1,41 +1,58 @@
<template>
    <!-- 审批历史 -->
    <view class="approval-history">
        <combined-title title="查看进度"></combined-title>
        <view class="historyTable">
        <combined-title title="审批历史"></combined-title>
        <u-empty v-if="scheduleData.length == 0"
                mode="data"
                icon="http://cdn.uviewui.com/uview/empty/data.png"
                        width="100px"
                        height="150px"
        >
        </u-empty>
        <view class="scheduleTable" v-for="(item,index) in scheduleData" :key="index">
            <uni-table border stripe emptyText="暂无更多数据">
                <!-- 表格数据行 -->
                <uni-tr>
                    <uni-th align="center">任务名称</uni-th>
                    <uni-td>{{yibanData.renwu}}</uni-td>
                    <uni-td>{{ item.name }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="center">处理人</uni-th>
                    <uni-td>XXX XXX XXX XXX</uni-td>
                    <uni-td>
                        <view class="">
                            <u-tag :text="role.nickname" type="primary" size="mini" style="display:inline-block;margin-left: 5%;" plain v-for="(role,roleIndex) in item.assignees" :key="roleIndex"></u-tag>
                        </view>
                    </uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="center">审批操作</uni-th>
                    <uni-td>——</uni-td>
                    <uni-td>{{item.deleteReason}}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="center">审批意见</uni-th>
                    <uni-td>{{yibanData.shenpiyijian}}</uni-td>
                    <uni-td>{{ item.comment }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="center">耗时</uni-th>
                    <uni-td>{{yibanData.haoshi}}</uni-td>
                    <uni-td>{{
                        item.duration >= 86400000
                                        ? parseInt(item.duration / 86400000 + '天' + parseInt(item.duration % 86400000) / 3600000 + '时' + parseInt(item.duration % 3600000) / 60000 + '分')
                                        : item.duration >= 3600000
                                        ? parseInt(item.duration / 3600000) + '时' + parseInt((item.duration / 3600000) % 3600000) + '分'
                                        : parseInt(item.duration / 60000) + '分'
                                        }}
                                        </uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="center">创建时间</uni-th>
                    <uni-td>{{yibanData.createTime}}</uni-td>
                    <uni-td>{{ item.createTime }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="center">完成时间</uni-th>
                    <uni-td>——</uni-td>
                    <uni-td>{{ item.endTime }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="center">状态</uni-th>
                    <uni-td style="color:#007AFF" >待处理</uni-td>
                    <uni-td :style="{color:(item.endTime==null?'#969696':'#007AFF')}">{{ item.endTime ==null? '待处理' : '已办理' }}</uni-td>
                </uni-tr>
            </uni-table>
        </view>
@@ -51,57 +68,75 @@
    export default {
        data() {
            return {
                yibanData:
                    {
                        meizhongshenqing:'葛泉矿申请:煤矸石',
                        renwu:'发运审批',
                        liucheng:'发运通知单',
                        faqiren:'葛泉矿',
                        shenpiCaozuo:'审批通过',
                        shenpiyijian:'同意',
                        haoshi:'19秒',
                        createTime:'2022-5-25 12:06:15'
                    },
                menuShow:false
            scheduleData: [],
                // meizhongshenqing: '葛泉矿申请:煤矸石',
                // renwu: '发运审批',
                // liucheng: '发运通知单',
                // faqiren: '葛泉矿',
                // shenpiCaozuo: '审批通过',
                // shenpiyijian: '同意',
                // haoshi: '19秒',
                // createTime: '2022-5-25 12:06:15'
            applicationId:null,
            menuShow:false,
            ifEmpty:false
            };
    },
    onLoad(options){
        this.applicationId = JSON.parse(options.index);
        },
        // 点击导航栏菜单后
        onNavigationBarButtonTap(e) {
            // console.log(e);
            this.$refs.menuRef.menuClick()
        this.$refs.menuRef.menuClick();
        },
        onShow(){
            if(this.menuShow == true){
                this.$refs.menuRef.menuClick()
            }
        this.init();
        },
        components: {
            combinedTitle,
            popupMenu
        },
        methods:{
        init(){
            this.historicFlow()
        },
        historicFlow(){
            this.$reqGet('historicFlow',{},this.applicationId).then(res=>{
                console.log('审批历史',res);
                if(res.code == 0){
                    if(res.data == null){
                        this.ifEmpty = true
                    } else{
                        this.scheduleData = res.data
                    }
                }
            })
        },
            menushow(e){
                this.menuShow = e
            }
        }
    }
};
</script>
<style lang="scss" scoped>
.approval-history{
::v-deep.approval-history {
    width: 100%;
    height: 100%;
    // 表格
    .historyTable{
        margin:0 auto;
    .scheduleTable {
        margin: vww(10) auto 0;
        width:91%;
        .uni-table{
            .uni-table-tr{
                .uni-table-th{
                    width:vww(88);
                    height:vww(40);
                    background-color: #F5F5F5;
                    background-color: #f5f5f5;
                    color:#111111;
                    font-size:vww(13);
                    font-weight: 500;
@@ -109,7 +144,7 @@
                .uni-table-td{
                    width:vww(240);
                    height:vww(40);
                    background-color: #FFFFFF;
                    background-color: #ffffff;
                    color:#111111;
                    font-size:vww(13);
                }
pages/check-the-schedule/check-the-schedule.vue
@@ -1,40 +1,50 @@
<template>
    <view class="check-the-schedule">
        <combined-title title="查看进度"></combined-title>
        <view class="scheduleTable">
        <view class="scheduleTable" v-for="(item,index) in scheduleData">
            <uni-table border stripe emptyText="暂无更多数据">
                <!-- 表格数据行 -->
                <uni-tr>
                    <uni-th align="center">任务名称</uni-th>
                    <uni-td>{{ yibanData.renwu }}</uni-td>
                    <uni-td>{{ item.name }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="center">处理人</uni-th>
                    <uni-td>XXX XXX XXX XXX</uni-td>
                    <uni-td>
                        <view class="">
                            <u-tag :text="role.nickname" type="primary" size="mini" style="display:inline-block;margin-left: 5%;" plain v-for="(role,roleIndex) in item.assignees" :key="roleIndex"></u-tag>
                        </view>
                    </uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="center">审批操作</uni-th>
                    <uni-td>——</uni-td>
                    <uni-td>{{item.deleteReason}}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="center">审批意见</uni-th>
                    <uni-td>{{ yibanData.shenpiyijian }}</uni-td>
                    <uni-td>{{ item.comment }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="center">耗时</uni-th>
                    <uni-td>{{ yibanData.haoshi }}</uni-td>
                    <uni-td>
                    <text>{{item.duration >= 86400000
                                        ? parseInt(item.duration / 86400000 + '天' + parseInt(item.duration % 86400000) / 3600000 + '时' + parseInt(item.duration % 3600000) / 60000 + '分')
                                        : item.duration >= 3600000
                                        ? parseInt(item.duration / 3600000) + '时' + parseInt((item.duration / 3600000) % 3600000) + '分'
                                        : parseInt(item.duration / 60000) + '分'}}</text>
                    </uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="center">创建时间</uni-th>
                    <uni-td>{{ yibanData.createTime }}</uni-td>
                    <uni-td>{{ item.createTime }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="center">完成时间</uni-th>
                    <uni-td>——</uni-td>
                    <uni-td>{{ item.endTime }}</uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="center">状态</uni-th>
                    <uni-td style="color:#007AFF">待处理</uni-td>
                    <uni-td :style="{color:(item.endTime==null?'#969696':'#007AFF')}">{{ item.endTime ==null? '待处理' : '已办理' }}</uni-td>
                </uni-tr>
            </uni-table>
        </view>
@@ -50,17 +60,22 @@
export default {
    data() {
        return {
            yibanData: {
                meizhongshenqing: '葛泉矿申请:煤矸石',
                renwu: '发运审批',
                liucheng: '发运通知单',
                faqiren: '葛泉矿',
                shenpiCaozuo: '审批通过',
                shenpiyijian: '同意',
                haoshi: '19秒',
                createTime: '2022-5-25 12:06:15'
            }
            scheduleData: {
                // meizhongshenqing: '葛泉矿申请:煤矸石',
                // renwu: '发运审批',
                // liucheng: '发运通知单',
                // faqiren: '葛泉矿',
                // shenpiCaozuo: '审批通过',
                // shenpiyijian: '同意',
                // haoshi: '19秒',
                // createTime: '2022-5-25 12:06:15'
            },
            applicationId:null,
            menuShow:false
        };
    },
    onLoad(options){
        this.applicationId = JSON.parse(options.index);
    },
    // 点击导航栏菜单后
    onNavigationBarButtonTap(e) {
@@ -71,12 +86,24 @@
        if(this.menuShow == true){
            this.$refs.menuRef.menuClick()
        }
        this.init();
    },
    components: {
        combinedTitle,
        popupMenu
    },
    methods: {
        init(){
            this.historicFlow()
        },
        historicFlow(){
            this.$reqGet('historicFlow',{},this.applicationId).then(res=>{
                console.log('查看进度',res);
                if(res.code == 0){
                    this.scheduleData = res.data
                }
            })
        },
        menushow(e){
            this.menuShow = e
        }
@@ -89,7 +116,7 @@
    width: 100%;
    height: 100%;
    .scheduleTable {
        margin: 0 auto;
        margin: vww(10) auto 0;
        width: 91%;
        .uni-table {
            .uni-table-tr {
pages/edit-my-application/edit-my-application.vue
New file
@@ -0,0 +1,2235 @@
<template>
    <!-- 新增申请表单 -->
    <view class="new-application-form-data">
        <!-- page-mete的page-style属性相当于HTML的body属性 -->
        <!-- <page-meta :page-style="spanStyle"></page-meta> -->
        <!-- 表单 -->
        <combination-title class="newApplicationTitle" title="新增"></combination-title>
        <!-- 注意,如果需要兼容微信小程序,最好通过setRules方法设置rules规则 -->
        <!-- <u-notify :message="accountMsg" :show="trueMsg" :type="accountMsgType"></u-notify> -->
        <!-- <u-alert :title="accountMsg" :type="accountMsgType" :description="accountMsgType"></u-alert> -->
        <view class="formDataContaniner">
            <u--form labelPosition="left" :model="newFormData" :rules="rules" ref="formRef">
                <u-form-item labelWidth="20%" label="结算客户" prop="customerName" borderBottom ref="customerNameRef">
                    <u--input v-model="newFormData.customerName" disabled disabledColor="#ffffff" border="none"></u--input>
                </u-form-item>
                <u-form-item  labelWidth="20%" label="合同编号" prop="contractNum" borderBottom ref="contractNumRef">
                    <u--input v-model="newFormData.contractNum" disabled disabledColor="#ffffff" border="none"></u--input>
                </u-form-item>
                <u-form-item labelWidth="20%" label="合同名称" borderBottom ref="contractNameRef">
                    <u--input disabled disabledColor="#ffffff" v-model="newFormData.contractName" border="none"></u--input>
                </u-form-item>
                <u-form-item labelWidth="20%" label="付款方式" borderBottom ref="payTypeRef">
                    <u--input :value="newFormData.payType == '0' ? '现汇':'承兑'" disabled disabledColor="#ffffff" placeholder="请选择付款方式" border="none"></u--input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
                <u-form-item @click="timeShow = true" prop="startDate" labelWidth="20%" label="日期" borderBottom ref="timeDataRef">
                    <u--input v-model="timeDataStr" border="none" placeholder="请选择范围日期"></u--input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
                <u-form-item labelWidth="20%" label="编号" borderBottom>
                    <u--input border="none" disabled disabledColor="#ffffff" value="自动生成" placeholder="请输入编号"></u--input>
                </u-form-item>
            </u--form>
        </view>
        <!-- 申请日历、范围时间 -->
        <u-calendar :show="timeShow" :mode="mode" @confirm="confirmTime" @close="timeClose" rowHeight="110" :maxDate="maxDate"></u-calendar>
        <!-- 申请付款方式弹出菜单 -->
        <!-- <u-action-sheet :show="showPayType" :actions="actions" title="请选择付款方式" @close="showPayType = false" @select="sexSelect"></u-action-sheet> -->
        <!-- 选择客户弹框 -->
        <!--  @touchmove.stop.prevent="moveHandleCustomer":防止图层穿透 -->
        <!-- <view class="selectCustomerPopup">
            <u-popup :show="selectCustomerShow" @close="selectCustomerClose" @open="selectCustomerOpen" mode="bottom" round="22">
                <scroll-view scroll-y="true" style="height:100%;">
                    <combination-title class="selectCustomerTitle" title="选择客户"></combination-title>
                    <view class="selectCustomerContainer">
                        <view class="searchContainer">
                            <u--form labelPosition="left" :model="searchCustomerForm" ref="selectformRef">
                                <u-form-item labelWidth="12%" label="单位" borderBottom ref="compRef">
                                    <u--input @focus="selectCustomerCompShow = true" v-model="searchCustomerForm.compName" placeholder="点击选择单位" border="none"></u--input>
                                    <u-icon slot="right" name="close-circle-fill" v-show="searchCustomerForm.compName != ''" @click="searchCustomerForm.compName = ''"></u-icon>
                                </u-form-item>
                                <u-form-item labelWidth="20%" label="客户名称" borderBottom ref="timeDataRef">
                                    <u--input v-model="selectCustomerData.customerName" border="none" placeholder="输入客户名称"></u--input>
                                    <u-icon slot="right" name="close-circle-fill" v-show="selectCustomerData.customerName != ''" @click="selectCustomerData.customerName = ''"></u-icon>
                                </u-form-item>
                                <u-form-item labelWidth="20%" label="客户级别" borderBottom>
                                    <u--input @focus="selectLevelShow = true" border="none" v-model="searchCustomerForm.levelText" placeholder="点击选择级别"></u--input>
                                    <u-icon slot="right" name="close-circle-fill" v-show="searchCustomerForm.levelText != ''" @click="searchCustomerForm.levelText = ''"></u-icon>
                                </u-form-item>
                            </u--form>
                        </view>
                        <view class="searchCustomerBtn">
                            <u-button text="搜索" type="primary" @click="selectCustomer()"></u-button>
                            <u-button text="清空" @click="selectCustomerResetFields"></u-button>
                        </view> -->
                        <!-- 客户列表 -->
                        <!-- <view class="searchResultList">
                            <u-cell-group :right-icon="false">
                                <u-cell v-for="(item, index) in customerData" :title="item.customerFullName" :arrow="false">
                                    <text slot="value" class="u-slot-value">
                                        <button
                                            class="mini-btn"
                                            type="default"
                                            size="mini"
                                            style="background: #007aff;
                                            color: #ffffff;
                                            margin: auto 0;
                                            height: 20px;
                                            line-height:20px;
                                            width: 43px;
                                            font-size: 10px;
                                            padding: 0;"
                                            @click="selectCustomerOkClick(item)"
                                        >
                                            选择
                                        </button>
                                    </text>
                                </u-cell>
                            </u-cell-group>
                        </view>
                        <view class="loadmoreClass">
                            <u-loadmore loadmoreText="点击加载更多" nomoreText="无更多数据!!!" :status="status" @loadmore="loadingCustomer" fontSize="20" height="30px"/>
                        </view> -->
                        <!-- 选择用户菜单项 -->
                        <!-- <view class="selectCustomerCompSheet">
                            <u-action-sheet
                                :show="selectCustomerCompShow"
                                :actions="selectCustomerActions"
                                title="请选择单位"
                                @close="selectCustomerCompShow = false"
                                @select="selectCustomerSelect"
                            ></u-action-sheet>
                        </view> -->
                        <!-- 级别菜单项 -->
                        <!-- <view class="selectLevelSheet">
                            <u-action-sheet :show="selectLevelShow" :actions="levelList" title="请选择级别" @close="selectLevelShow = false" @select="selectLevelSelect"></u-action-sheet>
                        </view>
                    </view>
                </scroll-view>
            </u-popup>
        </view> -->
        <!-- 选择合同 -->
        <!-- @touchmove.stop.prevent="moveHandleContract" -->
        <!-- <view class="selectCustomerPopup">
            <u-popup :show="selectContractShow" @close="selectContractClose" @open="selectContractOpen" mode="bottom" round="22">
                <scroll-view scroll-y="true" style="height:100%;">
                    <combination-title class="selectCustomerTitle" title="选择合同"></combination-title>
                    <view class="selectCustomerContainer">
                        <view class="searchContainer">
                            <u--form labelPosition="left" :model="searchContractForm" ref="selectformRef">
                                <u-form-item labelWidth="18%" label="合同编号" borderBottom ref="compRef">
                                    <u--input v-model="searchContractForm.num" placeholder="请输入合同编号" border="none"></u--input>
                                    <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.num != ''" @click="searchContractForm.num = ''"></u-icon>
                                </u-form-item>
                                <u-form-item labelWidth="18%" label="客户名称" borderBottom ref="compRef">
                                    <u--input v-model="searchContractForm.customerName" placeholder="请输入客户名称" border="none"></u--input>
                                    <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.customerName != ''" @click="searchContractForm.customerName = ''"></u-icon>
                                </u-form-item>
                                <u-form-item labelWidth="18%" label="合同类型" borderBottom ref="compRef">
                                    <u--input v-model="searchContractForm.type" placeholder="请输入合同类型" border="none" @focus="searchContractFormTypeFocus"></u--input>
                                    <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.type != ''" @click="searchContractForm.type = ''"></u-icon>
                                </u-form-item>
                                <u-form-item labelWidth="18%" label="签订日期" borderBottom ref="compRef">
                                    <u--input @focus="selectContractStartTimeShow = true" v-model="searchContractForm.startDate" placeholder="点击选择签订日期" border="none"></u--input>
                                    <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.startDate != ''" @click="searchContractForm.startDate = ''"></u-icon>
                                </u-form-item>
                                <u-form-item labelWidth="18%" label="结束日期" borderBottom ref="compRef">
                                    <u--input @focus="selectContractEndTimeShow = true" v-model="searchContractForm.endDate" placeholder="点击选择结束日期" border="none"></u--input>
                                    <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.endDate != ''" @click="searchContractForm.endDate = ''"></u-icon>
                                </u-form-item>
                            </u--form>
                        </view>
                        <view class="searchCustomerBtn">
                            <u-button text="搜索" type="primary" @click="selectContractOpen()"></u-button>
                            <u-button text="清空" @click="selectContractResetFields"></u-button>
                        </view> -->
                        <!-- 合同列表 -->
                        <!-- <view class="tableContract">
                            <view class="tableBody">
                                <uni-table border emptyText="暂无更多数据">
                                    <uni-tr>
                                        <uni-th width="100" align="center">组织结构</uni-th>
                                        <uni-th width="250" align="center">客户名称</uni-th>
                                        <uni-th width="180" align="center">煤种名称</uni-th>
                                        <uni-th width="220" align="center">合同编号</uni-th>
                                        <uni-th width="90" align="center">合同类型</uni-th>
                                        <uni-th width="130" align="center">签订日期</uni-th>
                                        <uni-th width="130" align="center">终止日期</uni-th>
                                        <uni-th width="100" align="center">合同总量</uni-th>
                                        <uni-th width="100" align="center">合同金额</uni-th>
                                        <uni-th width="70" align="center">状态</uni-th>
                                    </uni-tr>
                                    <uni-tr v-for="(item, index) in contractData" :key="index">
                                        <uni-td align="center">
                                            <view :style="tdStyle">{{ item.compName }}</view>
                                        </uni-td>
                                        <uni-td align="left">
                                            <view :style="tdStyle">{{ item.customerName }}</view>
                                        </uni-td>
                                        <uni-td align="center">
                                            <view :style="tdStyle">{{ item.coalNames }}</view>
                                        </uni-td>
                                        <uni-td align="left">
                                            <view :style="tdStyle">{{ item.num }}</view>
                                        </uni-td>
                                        <uni-td align="center">
                                            <view :style="tdStyle">{{ item.type }}</view>
                                        </uni-td>
                                        <uni-td align="center">
                                            <view :style="tdStyle">{{ item.startDate }}</view>
                                        </uni-td>
                                        <uni-td align="center">
                                            <view :style="tdStyle">{{ item.endDate }}</view>
                                        </uni-td>
                                        <uni-td align="center">
                                            <view :style="tdStyle">{{ item.countExecutive }}</view>
                                        </uni-td>
                                        <uni-td align="center">
                                            <view :style="tdStyle">{{ item.executive }}</view>
                                        </uni-td>
                                        <uni-td align="center">
                                            <view :style="tdStyle">{{ item.status }}</view>
                                        </uni-td>
                                    </uni-tr>
                                </uni-table>
                            </view>
                            <view class="TableUtilBtn">
                                <uni-table border emptyText="暂无更多数据">
                                    <uni-tr><uni-th align="center">操作</uni-th></uni-tr>
                                    <uni-tr v-for="(item, index) in contractData" :key="index">
                                        <uni-td align="center"> -->
                                            <!-- 选择合同 -->
                                            <!-- <view class="TableUtilBtnContainer"><u-button type="primary" @click="selectContractClick(item)" icon="checkbox-mark" size="mini"></u-button></view>
                                        </uni-td>
                                    </uni-tr>
                                </uni-table>
                            </view>
                        </view> -->
                        <!-- 合同类型选择器 -->
                        <!-- <view class="selectContractTypePicker">
                            <u-picker
                                :closeOnClickOverlay="true"
                                @close="selectContractTypeClose"
                                @cancel="selectContractTypeShow = false"
                                @confirm="selectContractTypeConfirm"
                                :show="selectContractTypeShow"
                                :columns="selectContractTypeData"
                            ></u-picker>
                        </view> -->
                        <!-- 时间选择器 -->
                        <!-- <view class="selectContractStartTime">
                            <u-calendar
                                :show="selectContractStartTimeShow"
                                @close="selectContractStartTimeClose"
                                :mode="selectContractTimeMode"
                                @confirm="selectContractStartTimeConfirm"
                            ></u-calendar>
                        </view>
                        <view class="selectContractEndTime">
                            <u-calendar :show="selectContractEndTimeShow" @close="selectContractEndTimeClose" :mode="selectContractTimeMode" @confirm="selectContractEndTimeConfirm"></u-calendar>
                        </view>
                    </view>
                </scroll-view>
            </u-popup>
        </view>
 -->
        <!-- 添加合同子项 -->
        <view class="addContractContainer">
            <u-popup :show="addContractShow" @close="addContractClose" @open="addContractOpen" mode="bottom" round="22">
                <scroll-view scroll-y="true" style="height:100%;">
                    <combination-title class="addContractFormTitle" title="添加订单"></combination-title>
                    <!-- 添加用户表单 -->
                    <view class="addContractForm">
                        <u--form labelPosition="left" :model="addContractFormdata" :rules="addContractRules" ref="form1">
                            <view class="formUpCard">
                                <u-form-item label="矿厂" labelWidth="20%" ref="item1">
                                    <u--input v-model="addContractFormdata.filedName" disabled disabledColor="#ffffff" border="none"></u--input>
                                </u-form-item>
                                <u-form-item @click="coalFiledSelectShow = true" label="煤厂" labelWidth="20%" ref="item1">
                                    <u--input v-model="addContractFormdata.compName" disabled disabledColor="#ffffff"></u--input>
                                </u-form-item>
                                <u-form-item label="收货人" labelWidth="20%" ref="item1" @click="addContractConsignee">
                                    <u--input v-model="addContractFormdata.customerName" disabled disabledColor="#ffffff"></u--input>
                                </u-form-item>
                                <u-form-item @click="addContractCoalShow = true" label="品种" labelWidth="20%" ref="item1">
                                    <u--input v-model="addContractFormdata.coalName" disabled disabledColor="#ffffff"></u--input>
                                </u-form-item>
                                <template>
                                    <!--     价格卡片 -->
                                    <view class="priceList" v-if="showPrice && favouredpolicyListcomputed">
                                        <view class="currentPriceContainer">
                                            <u-divider text="当前价格"></u-divider>
                                            <view class="currentPriceBox">
                                                <u--form :model="currentCoal" labelPosition="left">
                                                    <u-form-item label="煤种" labelWidth="35%">
                                                        <u--input v-model="currentCoal.coalName" disabled disabledColor="#ffffff" border="none"></u--input>
                                                    </u-form-item>
                                                    <u-form-item :label="currentCoal.type == 1 ? '钢厂长协' : '基准价'" labelWidth="35%">
                                                        <u--input v-model="currentCoal.steelMillPrice" disabled disabledColor="#ffffff" border="none"></u--input>
                                                    </u-form-item>
                                                    <u-form-item :label="currentCoal.type == 1 ? '焦化长协' : '电厂基准'" labelWidth="35%">
                                                        <u--input v-model="currentCoal.cokingPrice" disabled disabledColor="#ffffff" border="none"></u--input>
                                                    </u-form-item>
                                                    <u-form-item :label="currentCoal.type == 1 ? '非长协' : '区域外电厂价'" labelWidth="35%">
                                                        <u--input v-model="currentCoal.noImportantPrice" disabled disabledColor="#ffffff" border="none"></u--input>
                                                    </u-form-item>
                                                    <u-form-item label="挂牌价" labelWidth="35%">
                                                        <u--input v-model="currentCoal.quotePrice" disabled disabledColor="#ffffff" border="none"></u--input>
                                                    </u-form-item>
                                                </u--form>
                                            </view>
                                        </view>
                                        <view class="selectPriceContainer">
                                            <u-divider text="选择价格"></u-divider>
                                            <view class="selectPricebox">
                                                <u--form labelPosition="left">
                                                    <u-form-item label="煤种" labelWidth="35%">
                                                        <u--input v-model="currentCoal.coalName" disabled disabledColor="#ffffff" border="none"></u--input>
                                                    </u-form-item>
                                                    <u-radio-group v-model="addContractFormdata.priceMode" placement="column" @change="groupChange">
                                                        <view class="selectPriceboxItem">
                                                            <u-form-item :label="currentCoal.type == 1 ? '钢厂长协' : '基准价'" labelWidth="35%">
                                                                <u--input v-model="afterPrice.steelMillPrice" disabled disabledColor="#ffffff" border="none"></u--input>
                                                            </u-form-item>
                                                            <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="0" @change="changePriceMode"></u-radio>
                                                        </view>
                                                        <view class="selectPriceboxItem">
                                                            <u-form-item :label="currentCoal.type == 1 ? '焦化长协' : '电厂基准'" labelWidth="35%">
                                                                <u--input v-model="afterPrice.cokingPrice" disabled disabledColor="#ffffff" border="none"></u--input>
                                                            </u-form-item>
                                                            <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="1" @change="changePriceMode"></u-radio>
                                                        </view>
                                                        <view class="selectPriceboxItem">
                                                            <u-form-item :label="currentCoal.type == 1 ? '非长协' : '区域外电厂价'" labelWidth="35%">
                                                                <u--input v-model="afterPrice.noImportantPrice" disabled disabledColor="#ffffff" border="none"></u--input>
                                                            </u-form-item>
                                                            <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="2" @change="changePriceMode"></u-radio>
                                                        </view>
                                                        <view class="selectPriceboxItem">
                                                            <u-form-item label="挂牌价" labelWidth="35%">
                                                                <u--input v-model="afterPrice.quotePrice" disabled disabledColor="#ffffff" border="none"></u--input>
                                                            </u-form-item>
                                                            <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="3" @change="changePriceMode"></u-radio>
                                                        </view>
                                                    </u-radio-group>
                                                </u--form>
                                            </view>
                                        </view>
                                        <view class="selectFavouredPolicy">
                                            <u-divider text="选择优惠政策"></u-divider>
                                            <view class="selectFavouredPolicyBox">
                                                <u-checkbox-group
                                                           v-model="selectOKfavouredpolicyValue"
                                                           placement="column"
                                                           @change="checkboxChangeFavouredpolicy"
                                                       >
                                                <uni-table ref="priceTableRef" :loading="loading" border stripe  emptyText="暂无更多数据">
                                                    <uni-tr>
                                                        <uni-th width="10" align="center" >选项</uni-th>
                                                        <uni-th width="150" align="center">优惠方式</uni-th>
                                                        <uni-th width="60" align="center">符号</uni-th>
                                                        <uni-th width="60" align="center">值</uni-th>
                                                        <uni-th width="60" align="center">价格优惠</uni-th>
                                                    </uni-tr>
                                                    <uni-tr v-for="(item, index) in favouredpolicyList" :key="index">
                                                        <uni-td align="center">
                                                            <view class="">
                                                                <u-checkbox
                                                                            :customStyle="{marginBottom: '8px'}"
                                                                            :key="index"
                                                                            :name="item.id" size="30"
                                                                        >
                                                                        </u-checkbox>
                                                            </view>
                                                            </uni-td>
                                                        <uni-td>{{ item.type }}</uni-td>
                                                        <uni-td align="center">{{ operator[item.method].label }}</uni-td>
                                                        <uni-td align="center">{{ item.val }}</uni-td>
                                                        <uni-td align="center">{{ item.price }}</uni-td>
                                                    </uni-tr>
                                                </uni-table>
                                                </u-checkbox-group>
                                            </view>
                                        </view>
                                    </view>
                                </template>
                                <u-form-item @click="addContractTransportShow = true" label="运输" labelWidth="20%" ref="item1"><u--input v-model="addContractTransport"></u--input></u-form-item>
                            </view>
                            <view class="formDownCard">
                                <u-form-item label="单价" labelWidth="20%" ref="item1">
                                    <u--input v-model="addContractFormdata.price" disabled disabledColor="#ffffff" border="none"></u--input>
                                </u-form-item>
                                <u-form-item label="订单金额" labelWidth="20%" ref="item1"><u--input :disabled="addContractFormdata.trainType == 2" v-show="currentRowComputed" v-model="addContractFormdata.amount"></u--input></u-form-item>
                                <u-form-item label="订单数量" labelWidth="20%" ref="item1">
                                    <u--input :disabled="addContractFormdata.trainType == 1" @input="jisuanAmount" v-model="addContractFormdata.quant"></u--input>
                                </u-form-item>
                            </view>
                            <!-- <u-form-item label="发站" labelWidth="18%" borderBottom ref="item1"><u--input v-model="addContractFormdata.fromStation" border="none"></u--input></u-form-item>
                            <u-form-item label="到站" labelWidth="18%" borderBottom ref="item1"><u--input v-model="addContractFormdata.toStation" border="none"></u--input></u-form-item>
                            <u-form-item label="运费" labelWidth="18%" borderBottom ref="item1"><u--input v-model="addContractFormdata.cost1" border="none"></u--input></u-form-item>
                            <u-form-item label="抑尘费" labelWidth="18%" borderBottom ref="item1"><u--input v-model="addContractFormdata.cost2" border="none"></u--input></u-form-item> -->
                        </u--form>
                        <view class="addContractConfirm"><u-button text="添加" type="primary" @click="addContractSanConfirm"></u-button></view>
                    </view>
                    <!-- 选择煤厂 -->
                    <view class="coalFiledSelectPopup">
                        <u-popup :show="coalFiledSelectShow" @close="coalFiledSelectClose" @open="coalFiledSelectOpen" mode="bottom" round="22">
                            <scroll-view scroll-y="true" style="height:100%;">
                                <combination-title class="selectCustomerTitle" title="选择煤厂"></combination-title>
                                <view class="coalFiledSelectSearch"></view>
                                <view class="coalFiledTable">
                                    <view class="tableBody">
                                        <uni-table border emptyText="暂无更多数据">
                                            <uni-tr>
                                                <uni-th width="120" align="center">煤厂名称</uni-th>
                                                <uni-th width="120" align="center">煤厂编号</uni-th>
                                                <uni-th width="120" align="center">所属矿</uni-th>
                                                <uni-th width="120" align="center">备注</uni-th>
                                            </uni-tr>
                                            <uni-tr v-for="(item, index) in coalfiledData" :key="index">
                                                <uni-td align="center">
                                                    <view :style="tdStyle">{{ item.name }}</view>
                                                </uni-td>
                                                <uni-td align="center">
                                                    <view :style="tdStyle">{{ item.num }}</view>
                                                </uni-td>
                                                <uni-td align="center">
                                                    <view :style="tdStyle">{{ item.compName }}</view>
                                                </uni-td>
                                                <uni-td align="left">
                                                    <view :style="tdStyle">{{ item.remark }}</view>
                                                </uni-td>
                                            </uni-tr>
                                        </uni-table>
                                    </view>
                                    <view class="TableUtilBtn">
                                        <uni-table border emptyText="暂无更多数据">
                                            <uni-tr><uni-th align="center">操作</uni-th></uni-tr>
                                            <uni-tr v-for="(item, index) in coalfiledData" :key="index">
                                                <uni-td align="center">
                                                    <!-- 选择合同 -->
                                                    <view class="TableUtilBtnContainer"><u-button type="primary" @click="coalFiledSelectClick(item)" icon="checkbox-mark" size="mini"></u-button></view>
                                                </uni-td>
                                            </uni-tr>
                                        </uni-table>
                                    </view>
                                </view>
                            </scroll-view>
                        </u-popup>
                    </view>
                    <!-- 选择收货人 -->
                    <view class="selectCustomerPopup">
                        <u-popup :show="addContractConsigneeShow" @close="addContractConsigneeClose" @open="addContractConsigneeOpen" mode="bottom" round="22">
                            <scroll-view scroll-y="true" style="height:100%;">
                                <combination-title class="selectCustomerTitle" title="选择收货人"></combination-title>
                                <view class="selectCustomerContainer">
                                    <view class="searchContainer">
                                        <u--form labelPosition="left" :model="searchCustomerForm" ref="selectformRef">
                                            <u-form-item labelWidth="12%" label="单位" borderBottom ref="compRef">
                                                <u--input @focus="selectCustomerCompShow = true" v-model="searchCustomerForm.compName" placeholder="点击选择单位" border="none"></u--input>
                                                <u-icon slot="right" name="close-circle-fill" v-show="searchCustomerForm.compName != ''" @click="searchCustomerForm.compName = ''"></u-icon>
                                            </u-form-item>
                                            <u-form-item labelWidth="20%" label="客户名称" borderBottom ref="timeDataRef">
                                                <u--input v-model="selectCustomerData.customerName" border="none" placeholder="输入客户名称"></u--input>
                                                <u-icon slot="right" name="close-circle-fill" v-show="selectCustomerData.customerName != ''" @click="selectCustomerData.customerName = ''"></u-icon>
                                            </u-form-item>
                                            <u-form-item labelWidth="20%" label="客户级别" borderBottom>
                                                <u--input @focus="selectLevelShow = true" border="none" v-model="searchCustomerForm.levelText" placeholder="点击选择级别"></u--input>
                                                <u-icon slot="right" name="close-circle-fill" v-show="searchCustomerForm.levelText != ''" @click="searchCustomerForm.levelText = ''"></u-icon>
                                            </u-form-item>
                                        </u--form>
                                    </view>
                                    <view class="searchCustomerBtn">
                                        <u-button text="搜索" type="primary" @click="selectCustomer()"></u-button>
                                        <u-button text="清空" @click="selectCustomerResetFields"></u-button>
                                    </view>
                                    <!-- 客户列表 -->
                                    <view class="searchResultList">
                                        <u-cell-group :right-icon="false">
                                            <u-cell v-for="(item, index) in customerData" :title="item.customerFullName" :arrow="false">
                                                <text slot="value" class="u-slot-value">
                                                    <button
                                                        class="mini-btn"
                                                        type="default"
                                                        size="mini"
                                                        style="background: #007aff;
                                                        color: #ffffff;
                                                        margin: auto 0;
                                                        height: 20px;
                                                        line-height:20px;
                                                        width: 43px;
                                                        font-size: 10px;
                                                        padding: 0;"
                                                        @click="addContractConsigneeConfirm(item)"
                                                    >
                                                        选择
                                                    </button>
                                                </text>
                                            </u-cell>
                                        </u-cell-group>
                                    </view>
                                    <view class="loadmoreClass">
                                        <u-loadmore loadmoreText="点击加载更多" nomoreText="无更多数据!!!" :status="status" @loadmore="loadingCustomer" fontSize="20" height="30px"/>
                                    </view>
                                    <!-- 选择用户菜单项 -->
                                    <view class="selectCustomerCompSheet">
                                        <u-action-sheet
                                            :show="selectCustomerCompShow"
                                            :actions="selectCustomerActions"
                                            title="请选择单位"
                                            @close="selectCustomerCompShow = false"
                                            @select="selectCustomerSelect"
                                        ></u-action-sheet>
                                    </view>
                                    <!-- 级别菜单项 -->
                                    <view class="selectLevelSheet">
                                        <u-action-sheet :show="selectLevelShow" :actions="levelList" title="请选择级别" @close="selectLevelShow = false" @select="selectLevelSelect"></u-action-sheet>
                                    </view>
                                </view>
                            </scroll-view>
                        </u-popup>
                    </view>
                    <!-- 品种选择器 -->
                    <view class="addContractCoalPicker">
                        <u-picker
                            :show="addContractCoalShow"
                            :columns="addContractCoalData"
                            @close="addContractCoalClose"
                            @cancel="addContractCoalShow = false"
                            @confirm="addContractCoalConfirm"
                            :closeOnClickOverlay="true"
                            keyName="label"
                        ></u-picker>
                    </view>
                    <!-- 运输选择器 -->
                    <view class="addContractCoalPicker">
                        <u-picker
                            :show="addContractTransportShow"
                            :columns="addContractTransportData"
                            @close="addContractTransportClose"
                            @cancel="addContractTransportShow = false"
                            @confirm="addContractTransportConfirm"
                            :closeOnClickOverlay="true"
                            keyName="label"
                        ></u-picker>
                    </view>
                </scroll-view>
            </u-popup>
        </view>
        <!-- 申请表格 -->
        <view class="newApplicationTable">
            <!-- <uni-table border stripe emptyText="暂无更多数据">
                <uni-tr v-for="(item, index) in 12" :key="index">
                    <uni-th align="center">字段标题</uni-th>
                    <uni-td>
                        <view class="text">输入/选择内容</view>
                        <view class="icon"><image src="@/static/icon/select.png" mode=""></image></view>
                    </uni-td>
                </uni-tr>
                <uni-tr>
                    <uni-th align="center">操作</uni-th>
                    <uni-td>
                        <view class="newApplicationTableUtil">
                            <u-button type="primary" text="修改" size="mini"></u-button>
                            <u-button type="error" text="删除" size="mini"></u-button>
                        </view>
                    </uni-td>
                </uni-tr>
            </uni-table> -->
            <view class="balanceNo" v-if="accountDetails.balanceTotal < 0"><text style="color:red;">客户账户当前处于欠款状态</text></view>
            <view class="messageCustomerBalance" v-if="accountDetails.balanceTotal >= 0">
                <text style="color: #FFA500;;">客户账户现汇余额:{{ accountDetails.balanceTotal }},承兑余额:{{ accountDetails.balance2 == null ? 0 : customerChengdui }}</text>
            </view>
            <u-swipe-action>
                <u-swipe-action-item @click="deleteContractCardClick" :options="options1" v-for="(item, index) in newFormData.contractOrders" :key="index">
                    <view class="cardList">
                        <view class="" class="cardListIcon" @click="editApplicationClick(index)">
                            <u-icon name="edit-pen" color="#2979ff" size="35"></u-icon>
                        </view>
                        <view class="cardList-container">
                            <view class="cardList_item">
                                收货人:
                                <text>{{ item.customerName }}</text>
                            </view>
                            <view class="cardList_item">
                                <view class="">
                                    矿厂:
                                    <text>{{ item.filedName }}</text>
                                </view>
                                <view class="">
                                    煤厂:
                                    <text>{{ item.compName }}</text>
                                </view>
                            </view>
                            <view class="cardList_item">
                                <view class="">
                                    品种:
                                    <text>{{ item.coalName }}</text>
                                </view>
                                <view class="">
                                    运输:
                                    <text>{{ item.trainType == 1 ? '地销':'路运'   }}</text>
                                </view>
                            </view>
                            <view class="cardList_item">
                                <view class="">
                                    单价:
                                    <text>{{ item.price }}</text>
                                </view>
                                <view class="">
                                    订单金额:
                                    <text>{{ item.amount }}</text>
                                </view>
                                <!-- <view class="">
                                            订单数量:<text>218.899</text>
                                        </view> -->
                            </view>
                        </view>
                    </view>
                </u-swipe-action-item>
            </u-swipe-action>
            <view class="addCard" @click="addContractClick">
                <view class="addCard-icon"><u-icon name="plus" size="100"></u-icon></view>
            </view>
        </view>
        <view class="new-application-button">
            <u-button text="取消" :plain="true" type="primary" @click="backPage"></u-button>
            <u-button text="确定" type="primary" @click="newApplicationFormDataClick"></u-button>
        </view>
        <!-- 菜单栏 -->
        <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu>
    </view>
</template>
<script>
import combinationTitle from '@/components/common/combined-title/combined-title.vue';
import popupMenu from '@/components/common/popup-menu/popup-menu.vue';
// 最大显示的日期
const d = new Date();
const year = d.getFullYear();
let month = d.getMonth() + 1;
month = month < 10 ? `0${month}` : month;
const date = d.getDate();
export default {
    data() {
        return {
            applicationOrderIndex:null,
            tdStyle: 'max-height: 30px;overflow: scroll;',
            spanStyle: 'overflow:auto',
            newFormData: {
                amount: null,
                coalId: '',
                coalName: '',
                contractId: 169,
                contractName: '',
                contractNum: '',
                contractOrders: [],
                customerAddressId: '',
                customerId: 236,
                customerName: '',
                endDate: '',
                executiveQuant: null,
                id: null,
                number: '',
                payType: '',
                price: null,
                quant: null,
                remark: '',
                startDate: '',
                type: '外销'
            },
            accountDetails: {},
            // 时间
            timeDataStr: '',
            menuShow: false,
            // 表单
            // selectCustomerShow: false, // 选择用户弹框
            showPayType: false, // 付款方式弹框
            payData: [],
            actions: [],
            selectValue: '',
            rules: {
                customerName: [
                    {
                        required: true,
                        message: '请选择结算客户',
                        trigger: ['blur', 'change']
                    }
                ],
                contractNum: [
                    {
                        required: true,
                        message: '请选择合同编号',
                        trigger: ['blur', 'change']
                    }
                ],
                payType: [
                    {
                        required: true,
                        message: '请选择付款方式',
                        trigger: ['blur', 'change']
                    }
                ],
                startDate: [
                    {
                        required: true,
                        message: '请选择时间',
                        trigger: ['blur', 'change']
                    }
                ]
            },
            // 时间
            timeShow: false,
            mode: 'range',
            maxDate: `${year}-${month}-${date + 70}`,
            // 选择客户
            selectCustomerData: {
                compIds: '',
                customerName: '',
                level: '',
                current: 1,
                size: 10
            },
            status:'loadmore',
            customerDataAllNum:0,//客户列表总条数
            account: null, //客户账户信息
            // 搜索字段
            selectCompsData: [],
            selectCustomerLevel: [],
            searchCustomerForm: {
                compName: '',
                levelText: ''
            },
            customerData: [],
            // 选择单位
            selectCustomerCompShow: false,
            selectCustomerActions: [],
            // 级别
            selectLevelShow: false,
            levelList: [{ name: '一星级', value: 'A' }, { name: '二星级', value: 'B' }, { name: '三星级', value: 'C' }, { name: '四星级', value: 'D' }, { name: '五星级', value: 'E' }],
            // 选择合同
            // selectContractShow: false,
            // searchContractForm: {
            //     current: 1,
            //     size: 10,
            //     num: '',
            //     startDate: '',
            //     endDate: '',
            //     result: 2,
            //     type: '',
            //     customerName: ''
            // },
            // contractData: [],
            // 类型
            // selectContractTypeShow: false,
            // selectContractTypeData: [[]],
            // 时间
            // selectContractTimeMode: 'single',
            // selectContractStartTimeShow: false,
            // selectContractEndTimeShow: false,
            // 添加合同
            addContractShow: false,
            // 添加合同表单
            addContractRules: {},
            addContractFormdata: {
                amount: null,
                coalId: null,
                coalName: '',
                compId: null,
                compName: '',
                cost1: '',
                cost2: '',
                customerId: null,
                customerName: '',
                edit: true,
                favouredpolicyIds: '',
                filedId: null,
                filedName: '',
                fromStation: '',
                modifyId: null,
                modifyInfoId: null,
                customerAddressId: null,
                price: null,
                priceMode: '0',
                quant: '',
                toStation: '',
                trainType: 1,
                type: ''
            },
            contractDetails: [], // 选择的合同详情
            // 选择煤厂
            coalFiledSelectShow: false,
            coalfiledData: [],
            coalfiledParams: { current: 1, size: 10 },
            selectCoalFiledData: {},
            // 选择收货人
            addContractConsigneeShow: false,
            // 品种选择器
            addContractCoalShow: false,
            addContractCoalData: [[]],
            // 运输类型
            // 优惠
            favouredpolicyListAll: [], //优惠政策列表所有的
            favouredpolicyList: [], // 优惠政策列表
            multipleSelection: [], //选中的优惠政策
            selectOKfavouredpolicyValue:[],//复选框选中
            // 单选框
            addContractTransport: '',
            // 品种价格表格
            loading: false,
            // 价格请求参数
            getNewPriceData: {
                // compId: 133,
                // compName: '邢台矿',
                // customerAddressName: '邢台国泰发电有限责任公司',
                // customerAddressId: 236,
                // coalId: 45,
                // coalName: '',
                // trainType: 1,
                // fromStation: '小康庄',
                // toStation: '小康庄',
                // quant: '',
                // price: '',
                // amount: '',
                // priceMode: null,
                // filedName: '邢台矿主煤场',
                // filedId: 4,
                // type: '',
                // cost1: '',
                // cost2: '',
                // edit: true
            },
            dust: null, // 抑尘费
            trainfreight: {}, //路运运费
            // 运输类型
            addContractTransportShow: false,
            addContractTransportData: [[{ label: '地销', value: 1 }, { label: '路运', value: 2 }]],
            currentCoal: {
                coalName: '',
                cokingPrice: null,
                modifyId: null,
                modifyInfoId: null,
                noImportantPrice: null,
                quotePrice: null,
                steelMillPrice: null,
                type: null
            },
            // 滑动单元格
            options1: [
                {
                    text: '删除'
                }
            ],
            editApplicationTableId:''
        };
    },
    onLoad(options){
        this.editApplicationTableId = JSON.parse(options.index);
    },
    onShow() {
        if (this.menuShow == true) {
            this.$refs.menuRef.menuClick();
        }
        this.init();
    },
    // 点击导航栏菜单后
    onNavigationBarButtonTap(e) {
        this.$refs.menuRef.menuClick();
    },
    computed: {
        afterPrice() {
            console.log(this.currentCoal,'this.currentCoal---computed')
            let temp = this.currentCoal;
            console.log(temp,'temp======================')
            let favouredpolicyIds = '';
            if (this.favouredpolicyList.length > 0) {
                this.multipleSelection.forEach(e => {
                    if (favouredpolicyIds.length > 0) {
                        favouredpolicyIds += ',';
                    }
                    favouredpolicyIds += e.id;
                    temp.steelMillPrice -= e.price;
                    temp.cokingPrice -= e.price;
                    temp.noImportantPrice -= e.price;
                    temp.quotePrice -= e.price;
                });
                if (this.multipleSelection.length > 0) {
                    this.addContractFormdata.favouredpolicyIds = favouredpolicyIds;
                }
            }
      console.log(temp,'quotePrice1111111111111111======111111111111111111111111')
            return temp;
        },
        showPrice() {
            if (this.addContractFormdata) {
                let row = this.addContractFormdata;
                if (row.compId && row.customerAddressId && row.coalId) {
                    // this.rowClik(this.currentRow);
                    return true;
                }
            }
            return false;
        },
        //优惠政策
        favouredpolicyListcomputed() {
            let list = [];
            this.favouredpolicyListAll.forEach(e => {
                //支付方式
                if (e.type.indexOf('B') != -1 && e.coalIds) {
                    if (e.coalIds.indexOf(this.addContractFormdata.coalId) != -1) {
                        list.push(e);
                    }
                }
                //运距
                if (this.addContractFormdata.trainType == 2) {
                    if (e.type.indexOf('A') != -1) {
                        //根据发站到站获取运距
                        list.push(e);
                    }
                }
            });
            this.favouredpolicyList = list;
            return true;
        },
        async currentRowComputed() {
            console.log('进入计算,currentRowComputed');
            console.log('路运-------------进来',this.addContractFormdata,'this.addContractFormdata-----');
            //变价格用的
            this.changePriceMode(this.addContractFormdata.priceMode);
            //变订单量
            if (this.addContractFormdata.price > 0 && (this.addContractFormdata.amount > 0 || this.addContractFormdata.quant > 0)) {
                console.log('路运-------------进来',this.addContractFormdata,'this.addContractFormdata-----222222222222222222222');
                let price = this.addContractFormdata.price;
                if (this.addContractFormdata.trainType == 1) {
                    console.log('地销');
                    let q = this.addContractFormdata.amount / price;
                    this.addContractFormdata.quant = q.toFixed(2);
                    this.addContractFormdata.cost1 = null; //运费
                    this.addContractFormdata.cost2 = null; //抑尘费
                } else if (this.addContractFormdata.trainType == 2) {
                    console.log('路运',this.addContractFormdata,'this.addContractFormdata-----');
                    //如果路运价格增加抑尘费和运费
                    let cost1Price = await this.getFreight(this.addContractFormdata.fromStation, this.addContractFormdata.toStation, this.addContractFormdata.customerAddressId); //路运运费
                    console.log('运费',cost1Price);
                    price += cost1Price;
                    console.log(price,'price======')
                    price += this.dust;
                    console.log(this.addContractFormdata.quant,'this.addContractFormdata.quant===')
                    this.addContractFormdata.cost1 = (this.addContractFormdata.quant * cost1Price).toFixed(2); //运费
                    this.addContractFormdata.cost2 = (this.addContractFormdata.quant * this.dust).toFixed(2); //抑尘费
                    let amount = Number(price * this.addContractFormdata.quant) + Number(this.addContractFormdata.cost1) + Number(this.addContractFormdata.cost2);
                    console.log('金额',amount,price,Number(price * this.addContractFormdata.quant),Number(this.addContractFormdata.cost1),Number(this.addContractFormdata.cost2));
                    console.log('quant:'+this.addContractFormdata.quant,'cost1:'+this.addContractFormdata.cost1,'cost2:'+this.addContractFormdata.cost2);
                    this.addContractFormdata.amount = amount.toFixed(2);
                }
            } else {
                this.addContractFormdata.quant = null;
            }
            // if (this.currentRow.quant > 0 && this.currentRow.price > 0) {
            //   this.currentRow.amount = this.currentRow.quant * this.currentRow.price;
            //   return true;
            // }
            return true;
        }
        // accountMsg() {
        //     this.accountMsgType = 'error';
        //     if (this.accountDetails) {
        //         if (this.accountDetails.balanceType == '贷') {
        //             return '客户账户余额当前处于欠款状态!';
        //         } else {
        //             let amount = 0;
        //             this.newFormData.contractOrders.forEach(e => {
        //                 amount += Number(e.amount);
        //             });
        //             if (this.newFormData.payType == '0') {
        //                 if (this.accountDetails.balance < amount) {
        //                     return '客户账户现汇余额不足,现汇余额:' + this.accountDetails.balance;
        //                 }
        //             } else {
        //                 if (this.accountDetails.balance2 < amount) {
        //                     return '客户账户承兑余额不足,承兑余额:' + this.accountDetails.balance2;
        //                 }
        //             }
        //         }
        //         this.accountMsgType = 'warning';
        //         return '客户账户现汇余额:' + this.accountDetails.balance + ',承兑余额:' + (this.accountDetails.balance2 ? this.accountDetails.balance2 : 0);
        //     }
        //     return null;
        // }
    },
    watch: {
        // 立即处理 进入页面就触发 // immediate: true,
        // 深度监听 属性的变化// deep: true
        // 选择客户查询条件
        'searchCustomerForm.compName'(newV, oldV) {
            if (newV == '') {
                this.selectCustomerData.compIds = '';
            }
        },
        'searchCustomerForm.levelText'(newV, oldV) {
            if (newV == '') {
                this.selectCustomerData.level = '';
            }
        },
        // 'selectOKfavouredpolicyValue'(newV,oleV){
        // }
    },
    components: {
        popupMenu,
        combinationTitle
    },
    methods: {
        async jisuanAmount() {
            console.log('进入计算');
            if (this.addContractFormdata.trainType == 2) {
                let price = this.addContractFormdata.price;
                //如果路运价格增加抑尘费和运费
                let cost1Price = await this.getFreight(this.addContractFormdata.fromStation, this.addContractFormdata.toStation, this.addContractFormdata.customerAddressId); //路运运费
                price += cost1Price;
                price += this.dust;
                this.addContractFormdata.cost1 = (this.addContractFormdata.quant * cost1Price).toFixed(2); //运费
                this.addContractFormdata.cost2 = (this.addContractFormdata.quant * this.dust).toFixed(2); //抑尘费
                let amount = Number(price * this.addContractFormdata.quant) + Number(this.addContractFormdata.cost1) + Number(this.addContractFormdata.cost2);
                this.addContractFormdata.amount = amount.toFixed(2);
            }
        },
        init() {
            this.jcfavouredpolicyitem();
            this.coalfiled();
            this.coalprice();
            this.operato();
            this.pay_type();
            this.others_params();
            this.fetchCompTree();
            this.getFavouredPolicyItem();
            this.editApplicationFormData(); // 修改申请表单详情
        },
        editApplicationFormData(){
            this.$reqGet('formData',{},this.editApplicationTableId).then(res=>{
                console.log('整体详情',res.data);
                this.newFormData = res.data;
                this.timeDataStr = this.newFormData.startDate;
            })
        },
        editApplicationClick(index){
            this.applicationOrderIndex = index;// 待修改订单index
            this.addContractFormdata = this.newFormData.contractOrders[index];
            console.log('修改的订单详情1',this.addContractFormdata,index,this.newFormData.contractOrders);
            this.addContractFormdata.priceMode = this.newFormData.contractOrders[this.applicationOrderIndex].priceMode.toString();
            // 修改订单优惠初始化
            if(this.newFormData.contractOrders[index].favouredpolicyIds){
                this.newFormData.contractOrders[index].favouredpolicyIds.split(',').map(item=>{
                    this.selectOKfavouredpolicyValue.push(Number(item));
                });
            }
            // 获取价格
            // this.getNewPriceData = this.addContractFormdata;
            this.getNewPriceData.type = this.newFormData.type;
            this.getNewPriceData.customerAddressName = this.addContractFormdata.customerFullName;
            this.getNewPriceData.customerAddressId = this.addContractFormdata.id;
            this.getNewPriceData.toStation = this.addContractFormdata.toStation;
            this.getNewPriceData.coalId = this.addContractFormdata.coalId;
            this.getNewPriceData.coalName =this.addContractFormdata.coalName;
            // 获取合同煤种价格
            this.getNewPrice();
            // 初始化第一次优惠价格计算
            // this.$nextTick(()=>{
                if(this.selectOKfavouredpolicyValue.length == 0){
                    this.multipleSelection = [];
                } else {
                    this.multipleSelection = [];
                    this.favouredpolicyList.forEach((item)=>{
                        if(this.selectOKfavouredpolicyValue.indexOf(item.id) != -1){
                            this.multipleSelection.push(item);
                        }
                    })
                }
            // })
            // 订单运输类型
            switch(this.addContractFormdata.trainType){
                case 1:
                this.addContractTransport = '地销';
                break;
                case 2:
                this.addContractTransport = '路运';
                break;
            }
            // 获取合同详情,煤种
            this.getContractDetails();
            this.$nextTick(()=>{
                this.addContractShow = true;
            })
            console.log('修改的订单详情',this.addContractFormdata);
        },
        getContractDetails(){
            uni.showLoading({
                title:'加载中...'
            })
            this.$reqGet('getByContractId',{},this.newFormData.contractId).then(res=>{
                uni.hideLoading();
                if(res.code == 0){
                    this.contractDetails = res.data;
                }
            })
            this.$nextTick(()=>{
                this.contractDetails.forEach(item => {
                    let a = [{ label: '', id: '' }];
                    a[0].label = item.coalName;
                    a[0].id = item.coalId;
                    if (this.addContractCoalData[0]) {
                        this.addContractCoalData = [];
                    }
                    this.addContractCoalData.push(a);
                });
            })
        },
        checkboxChangeFavouredpolicy(e){
            // this.selectOKfavouredpolicyValue = e;
            if(e.length == 0){
                this.multipleSelection = [];
            } else {
                this.multipleSelection = [];
                this.favouredpolicyList.forEach((item,i)=>{
                    if(e.indexOf(item.id) != -1){
                        this.multipleSelection.push(item);
                    }
                })
            }
        },
        // 选择客户
        selectCustomer() {
            this.selectLevelShow = false;
            this.selectCustomerCompShow = false;
            uni.showLoading({
                title: '加载中...'
            });
            // this.selectCustomerShow = true;
            this.selectCustomerData.current = 1;
            this.$reqGet('customer', this.selectCustomerData).then(res => {
                uni.hideLoading();
                if (res.code == 0) {
                    this.customerData = res.data.records;
                    this.customerDataAllNum = res.data.total;
                }
            });
        },
        // 客户选择弹框打开了
        // selectCustomerOpen() {
        //     // this.spanStyle = 'overflow:hidden'; //当蒙层弹起时,固定界面禁止滚动,当蒙层关闭时,允许滚动
        // },
        // selectCustomerClose() {
        //     // this.spanStyle = 'overflow:auto'; // 让html的body可滑动
        //     // this.selectCustomerShow = false;
        // },
        // 获取单位树
        fetchCompTree() {
            this.selectCustomerActions = [];
            this.$reqGet('fetchCompTree').then(res => {
                if (res.code == 0) {
                    let a = { name: '', id: '' };
                    a.name = res.data[0].name;
                    a.id = res.data[0].id;
                    this.selectCustomerActions.push(a);
                    res.data[0].children.forEach(item => {
                        let a = { name: '', id: '' };
                        a.name = item.name;
                        a.id = item.id;
                        this.selectCustomerActions.push(a);
                    });
                }
            });
        },
        // 客户选择框单位选择菜单
        selectCustomerSelect(v) {
            uni.hideKeyboard();
            this.selectCustomerData.compIds = v.id;
            this.searchCustomerForm.compName = v.name;
        },
        // 级别
        selectLevelSelect(v) {
            uni.hideKeyboard();
            this.selectCustomerData.level = v.value;
            this.searchCustomerForm.levelText = v.name;
        },
        // 付款类型
        sexSelect(v) {
            uni.hideKeyboard();
            this.selectValue = v.name;
            this.newFormData.payType = v.value;
            // this.newFormData.payType = e.name;
            // this.$refs.form1.validateField('userInfo.sex');
        },
        // 清空选择客户表单
        selectCustomerResetFields() {
            this.$refs.selectformRef.resetFields(); // 不起效果
            this.selectCustomerData.customerName = '';
            this.searchCustomerForm.compName = '';
            this.searchCustomerForm.levelText = '';
            this.selectCustomer();
        },
        selectCustomerOkClick(v) {
            this.newFormData.customerName = v.customerName;
            this.newFormData.customerId = v.id;
            this.$reqGet('getAccount', { customerId: v.id }).then(res => {
                this.accountDetails = res.data;
                this.searchContractForm.customerName = res.data.customerName;
            });
            this.$nextTick(() => {
                // this.selectCustomerShow = false;
            });
        },
        loadingCustomer(){
            if(this.selectCustomerData.current >= this.customerDataAllNum / 10) return;
            this.status = 'loading';
            this.selectCustomerData.current = ++this.selectCustomerData.current;
            this.$reqGet('customer', this.selectCustomerData).then(res => {
                if(this.selectCustomerData.current >= this.customerDataAllNum / 10){
                    this.status = 'nomore';
                    this.$u.toast('没有更多数据了!')
                }
                uni.hideLoading();
                if (res.code == 0) {
                    this.customerDataAllNum = res.data.total;
                    this.customerData = this.customerData.concat(res.data.records);
                    this.status = 'loadmore';
                }
            });
        },
        // 时间
        confirmTime(v) {
            this.timeShow = false;
            v.forEach(e => {
                this.newFormData.startDate = v[0];
                this.newFormData.endDate = v[v.lenght - 1];
                this.timeDataStr = v[0] + ' 至 ' + v[v.length - 1];
            });
        },
        // 选择合同
        // selectContract() {
        //     if (this.newFormData.customerName != '') {
        //         if (this.newFormData.contractOrders != []) {
        //             uni.showToast({
        //                 title: '添加订单后,不能修改合同!',
        //                 icon: 'error',
        //                 duration: 2000
        //             });
        //         }
        //         this.selectContractShow = true;
        //     } else {
        //         this.$refs.formRef
        //             .validate()
        //             .then(res => {
        //                 uni.$u.toast('校验成功');
        //             })
        //             .catch(err => {
        //                 uni.$u.toast('请选择结算客户');
        //             });
        //     }
        // },
        // 选择合同类型输入框获取焦点触发
        // searchContractFormTypeFocus() {
        //     // 类型弹出框
        //     this.selectContractTypeShow = true;
        //     // 弹出框类型请求
        //     this.$nextTick(() => {
        //         this.$reqGet('contract_type').then(res => {
        //             res.data.forEach(item => {
        //                 this.selectContractTypeData[0].push(item.value);
        //             });
        //         });
        //     });
        // },
        // 选择合同弹框
        // selectContractOpen() {
        //     uni.showLoading({
        //         title: '加载中...'
        //     });
        //     this.$reqGet('contract_status').then(res => {
        //         // console.log('状态', res);
        //     });
        //     this.$reqGet('contract', this.searchContractForm).then(res => {
        //         uni.hideLoading();
        //         if (res.code == 0) {
        //             // console.log('合同', res);
        //             this.contractData = res.data.records;
        //         }
        //     });
        // },
        // selectContractClose() {
        //     this.selectContractShow = false;
        // },
        // 合同类型选择器
        // selectContractTypeConfirm(v) {
        //     this.searchContractForm.type = v.value[0];
        //     this.selectContractTypeShow = false;
        //     console.log('选择器确定后的值', v, this.searchContractForm.type);
        // },
        // selectContractTypeClose(v) {
        //     // 初始化合同类型选择器
        //     this.selectContractTypeData[0] = [];
        //     this.selectContractTypeShow = false;
        //     if (v) {
        //         this.searchContractForm.type = v.value[0];
        //     }
        // },
        // 合同时间选择器
        // selectContractStartTimeConfirm(e) {
        //     this.selectContractStartTimeShow = false;
        //     this.searchContractForm.startDate = e[0];
        // },
        // selectContractStartTimeClose() {
        //     this.selectContractStartTimeShow = false;
        // },
        // selectContractEndTimeConfirm(e) {
        //     this.selectContractEndTimeShow = false;
        //     this.searchContractForm.endDate = e[0];
        // },
        // selectContractEndTimeClose() {
        //     this.selectContractEndTimeShow = false;
        // },
        // 重置表单所有字段
        // selectContractResetFields() {
        //     this.searchContractForm.num = '';
        //     this.searchContractForm.startDate = '';
        //     this.searchContractForm.endDate = '';
        //     this.searchContractForm.customerName = '';
        //     this.searchContractForm.type = '';
        // },
        // selectContractClick(e) {
        //     console.log('选择合同', e);
        //     this.newFormData.contractName = e.contractName;
        //     this.newFormData.contractNum = e.num;
        //     this.newFormData.contractId = e.id;
        //     this.selectContractShow = false;
        //     // 价格参数赋值
        //     this.getNewPriceData.type = e.type;
        //     // 选定合同详情
        //     uni
        //         .request({
        //             url: `/yunxiao/contractitem/getByContractId/${e.id}`,
        //             method: 'GET',
        //             header: {
        //                 'TENANT-ID': 5,
        //                 Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
        //                 VERSION: 'zzl'
        //             }
        //         })
        //         .then(res => {
        //             this.contractDetails = res[1].data.data;
        //             console.log('合同详情', res, this.contractDetails);
        //         })
        //         .catch(err => {
        //             console.log(err);
        //         });
        // },
        // 添加订单按钮
        addContractClick() {
            // 打印true或false
            this.$refs.formRef
                .validate()
                .then(res => {
                    if (this.accountDetails.balanceType == '贷') {
                        uni.showToast({
                            title: '客户账户余额当前处于欠款状态!',
                            icon: 'error',
                            duration: 2000
                        });
                    } else {
                        if (this.accountDetails.balance == 0 || (null && this.accountDetails.balance2 == 0) || null) {
                            uni.showToast({
                                title: '账户余额不足!',
                                icon: 'error',
                                duration: 2000
                            });
                        } else {
                            this.addContractShow = true;
                            this.addContractFormdata = {
                                amount: null,
                                coalId: null,
                                coalName: '',
                                compId: null,
                                compName: '',
                                cost1: '',
                                cost2: '',
                                customerId: null,
                                customerName: '',
                                edit: true,
                                favouredpolicyIds: '',
                                filedId: null,
                                filedName: '',
                                fromStation: '',
                                modifyId: null,
                                modifyInfoId: null,
                                customerAddressId: null,
                                price: null,
                                priceMode: '0',
                                quant: '',
                                toStation: '',
                                trainType: 1,
                                type: ''
                            };
                            // this.getNewPriceData.type = this.newFormData.type;
                            // this.getNewPriceData.customerAddressName = this.addContractFormdata.customerFullName;
                            // this.getNewPriceData.customerAddressId = this.addContractFormdata.id;
                            // this.getNewPriceData.toStation = this.addContractFormdata.toStation;
                            // this.getNewPriceData.coalId = this.addContractFormdata.coalId;
                            // this.getNewPriceData.coalName =this.addContractFormdata.coalName;
                            // 获取合同煤种价格
                            // this.getNewPrice();
                            // 运输类型初始化
                            switch(this.addContractFormdata.trainType){
                                case 1:
                                this.addContractTransport = '地销';
                                break;
                                case 2:
                                this.addContractTransport = '路运';
                                break;
                            }
                            // 获取合同详情,煤种
                            this.getContractDetails();
                            // console.log('this.addContractFormdata',this.addContractFormdata);
                            this.multipleSelection = [];
                        }
                    }
                })
                .catch(err => {
                    uni.$u.toast('效验失败');
                });
        },
        // 添加合同弹出框
        addContractClose() {
            this.addContractFormdata = {};
            this.addContractShow = false;
        },
        addContractOpen() {
            console.log('添加申请子项窗口打开this.addContractFormdata',this.addContractFormdata);
            // console.log('添加订单打开');
        },
        // 选择煤厂
        coalFiledSelectOpen(e) {
            // console.log('coalfiledSelect: ', e);
        },
        coalFiledSelectClose() {
            this.coalFiledSelectShow = false;
        },
        // 选择的煤厂
        coalFiledSelectClick(e) {
            this.addContractFormdata.compName = e.compName;
            this.addContractFormdata.filedName = e.name;
            this.addContractFormdata.compId = e.compId;
            this.addContractFormdata.filedId = e.id;
            this.addContractFormdata.fromStation = e.toStation;
            this.selectCoalFiledData = e;
            this.coalFiledSelectShow = false;
        },
        // 收货人
        addContractConsigneeClose() {
            this.addContractConsigneeShow = false;
        },
        // 添加合同子项收货人打开
        addContractConsigneeOpen() {
            this.selectCustomer()
        },
        addContractConsignee() {
            this.addContractConsigneeShow = true;
        },
        addContractConsigneeConfirm(v) {
            // console.log('收货人', v);
            this.addContractFormdata.toStation = v.toStation;
            this.addContractFormdata.customerName = v.customerName;
            this.addContractFormdata.customerId = v.id;
            this.$reqGet('getAccount', { customerId: v.id }).then(res => {
                // console.log('获取收货人账号', res);
                // this.accountDetails = res.data;
                // this.newFormData.customerName = res.data.customerName;
                // this.newFormData.customerId = res.data.id;
                // this.searchContractForm.customerName = res.data.customerName;
            });
            this.$nextTick(() => {
                this.addContractConsigneeShow = false;
            });
            // 赋值给取价格请求参数
            this.getNewPriceData.customerAddressName = v.customerFullName;
            this.getNewPriceData.customerAddressId = v.id;
            this.getNewPriceData.toStation = v.toStation;
            this.addContractFormdata.toStation = v.toStation;
            this.addContractFormdata.customerAddressId = v.id;
            // 添加煤种选项
            this.contractDetails.forEach(item => {
                let a = [{ label: '', id: '' }];
                a[0].label = item.coalName;
                a[0].id = item.coalId;
                if (this.addContractCoalData[0]) {
                    this.addContractCoalData = [];
                }
                this.addContractCoalData.push(a);
            });
        },
        // 品种选择器
        addContractCoalConfirm(e) {
            // console.log('品种选择器', e);
            this.addContractCoalShow = false; // 关闭选择器
            this.addContractFormdata.coalId = e.value[0].id;
            this.addContractFormdata.coalName = e.value[0].label;
            // 煤种价格请求(煤厂=>价格参数)
            this.getNewPriceData.coalId = e.value[0].id;
            this.getNewPriceData.coalName = e.value[0].label;
            // this.selectCoalFiledData.compId = e.compId;
            // this.selectCoalFiledData.compName = e.compName;
            // this.selectCoalFiledData.toStation = e.fromStation;
            this.getNewPrice();
        },
        getNewPrice(){
            this.$reqGet('getNewPrice', this.getNewPriceData).then(res => {
                if (res.code == 0) {
                    // console.log('获取价格',res);
                    let data = res.data;
                    if (data) {
                        this.currentCoal.coalName = data.coalName;
                        this.currentCoal.cokingPrice = data.cokingPrice; //焦化价格
                        this.currentCoal.noImportantPrice = data.noImportantPrice; //不重要价格
                        this.currentCoal.quotePrice = data.quotePrice; // 挂牌价格
                        this.currentCoal.steelMillPrice = data.steelMillPrice; // 钢厂价格
                        this.currentCoal.modifyId = data.modifyId; //修改id
                        this.currentCoal.modifyInfoId = data.id;
                        this.addContractFormdata.price = data.steelMillPrice;
                        this.addContractFormdata.modifyId = data.modifyId;
                        this.addContractFormdata.id = data.id;
                    } else {
                        uni.$u.toast('煤种价格未设置');
                    }
                }
            });
        },
        addContractCoalClose() {
            this.addContractCoalShow = false;
        },
        // 煤品种价格
        groupChange(e) {
            // console.log('单选框小组', e);
        },
        changePriceMode(e) {
            console.log('进入单选框',this.addContractFormdata,'this.addContractFormdata===111');
            if (!this.currentCoal) return;
            console.log('单选框数字',e,this.addContractFormdata.priceMode);
            console.log('进入单选框',this.addContractFormdata,'this.addContractFormdata===2222');
            if(e){
                this.addContractFormdata.priceMode = e;
                console.log('进入单选框',this.addContractFormdata,'this.addContractFormdata===3333');
                console.log(typeof this.addContractFormdata.priceMode,this.addContractFormdata.priceMode,'this.addContractFormdata.priceMode=======字符串')
            }
            console.log(this.afterPrice,'this.afterPrice.quotePrice=======afterPrice222222');
                        console.log(this.afterPrice.cokingPrice,'this.afterPrice.quotePrice=======afterPrice222222------------');
            console.log(this.afterPrice.quotePrice,'this.afterPrice.quotePrice=======afterPrice222222------------')
            this.addContractFormdata.price = this.afterPrice.quotePrice;
            console.log(this.addContractFormdata.price,'this.addContractFormdata.price=====afterPrice333333333333')
            switch (this.addContractFormdata.priceMode) {
                case '0':
                    console.log('价格',this.afterPrice.steelMillPrice);
                    this.addContractFormdata.price = this.afterPrice.steelMillPrice;
                    break;
                case '1':
                    this.addContractFormdata.price = this.afterPrice.cokingPrice;
                    break;
                case '2':
                    this.addContractFormdata.price = this.afterPrice.noImportantPrice;
                    break;
                case '3':
                    this.addContractFormdata.price = this.afterPrice.quotePrice;
                    console.log('进入单选框',this.addContractFormdata,'this.addContractFormdata===444');
                    break;
            }
        },
        // 优惠选择
        selectionChange(e) {
            // console.log('优惠选择',e);
            this.multipleSelection = [];
            this.favouredpolicyList.forEach((item, i) => {
                if (e.detail.index.indexOf(i) != -1) {
                    this.multipleSelection.push(item);
                }
            });
        },
        // 运输选择器
        addContractTransportConfirm(e) {
            this.addContractTransportShow = false;
            this.addContractFormdata.trainType = e.value[0].value;
            switch (this.addContractFormdata.trainType) {
                case 1:
                    this.addContractTransport = '地销';
                    break;
                case 2:
                    this.addContractTransport = '路运';
                    break;
            }
        },
        addContractTransportClose() {
            this.addContractTransportShow = false;
        },
        // 获取运费
        async getFreight(from, to, customerId) {
            let key = from + to + customerId;
            let price = this.trainfreight[key];
            price = await this.$reqGet('trainFreightFind', { from, to, customerId }).then(res => {
                let resPrice = 10; //默认价格为10
                if (res.data) {
                    resPrice = res.data.price;
                }
                return resPrice;
            });
            return price;
        },
        addContractSanConfirm() {
            if (this.addContractFormdata.compId && this.addContractFormdata.customerId && this.addContractFormdata.filedId) {
                if(this.applicationOrderIndex == null){
                    this.newFormData.contractOrders.push(this.addContractFormdata);
                    this.$nextTick(() => {
                        this.addContractShow = false;
                    });
                    this.$u.toast('添加成功');
                } else {
                    // this.newFormData.contractOrders.map(i => {
                    //     return this.newformData.contractOrders[]
                    // })
                    this.newFormData.contractOrders[this.applicationOrderIndex] = this.addContractFormdata;
                    this.addContractShow = false; // 隐藏弹出框
                    this.applicationOrderIndex = null; // 初始化修改订单index
                    this.$u.toast('修改成功');
                }
            } else {
                uni.$u.toast('请规范输入所有信息');
            }
        },
        // 初始数据请求
        operato() {
            this.$reqGet('operator').then(res => {
                this.operator = res.data;
            });
        },
        pay_type() {
            this.actions = [];
            this.$reqGet('pay_type').then(res => {
                // console.log('paytype', res);
                this.payData = res.data;
                res.data.forEach(e => {
                    let a = { name: '', value: '' };
                    a.name = e.label;
                    a.value = e.value;
                    this.actions.push(a);
                });
            });
            // console.log(this.actions);
        },
        // 抑尘费
        others_params() {
            this.$reqGet('others_params').then(res => {
                // console.log('others_params', res);
                res.data.forEach(e => {
                    if (e.label == 'dust') {
                        this.dust = parseFloat(e.value);
                    }
                });
            });
        },
        coalprice() {
            this.$reqGet('coalprice', { current: 1, size: 1000 }).then(res => {
                // console.log('coalprice', res);
            });
        },
        // 级别距优惠
        jcfavouredpolicyitem() {
            this.$reqGet('jcfavouredpolicyitem', { current: 1, size: 1000, status: 0 }).then(res => {
                // console.log('级别距优惠', res);
                // this.favouredpolicyListAll = res.data.records;
            });
        },
        // 获取所有的优惠政策
        getFavouredPolicyItem() {
            this.$reqGet('getFavouredPolicyItem', { current: 1, size: 1000, status: 0 }).then(res => {
                // console.log('所有价格优惠',res.data.records);
                this.favouredpolicyListAll = res.data.records;
            });
        },
        // 煤场
        coalfiled() {
            this.$reqGet('coalfiled', this.coalfiledParams).then(res => {
                this.coalfiledData = res.data.records;
            });
        },
        // 时间
        timeClose() {
            this.timeShow = false;
        },
        menushow(e) {
            this.menuShow = e;
        },
        // 选择客户
        // moveHandleCustomer() {
        //     return true;
        // },
        // moveHandleContract(){
        //     return true;
        // },
        // 新建发运申请
        newApplicationFormDataClick() {
            this.$refs.formRef
                .validate()
                .then(res => {
                    let amount = 0;
                    this.newFormData.contractOrders.forEach(e => {
                        amount += Number(e.amount);
                    });
                    if (this.newFormData.payType == '0') {
                        if(this.newFormData.contractOrders.length <= 0){
                            this.$u.toast('请添加订单子项!');
                            return false;
                        }else if (this.accountDetails.balance < amount) {
                            let msg = this.accountDetails.balance == null ? 0 : this.accountDetails.balance;
                            uni.showToast({
                                title: '客户账户现汇余额不足,现汇余额:' + msg,
                                icon: 'error',
                                duration: 2000
                            });
                        } else {
                            this.editShenQing();
                            // this.xswaybill();
                        }
                    } else {
                        if(this.newFormData.contractOrders.length <= 0){
                            this.$u.toast('请添加订单子项!');
                            return false;
                        }else if (this.accountDetails.balance2 < amount) {
                            let msg = this.accountDetails.balance2 == null ? 0 : this.accountDetails.balance2;
                            uni.showToast({
                                title: '客户账户承兑余额不足,承兑余额:' + msg,
                                icon: 'error',
                                duration: 2000
                            });
                        } else {
                            this.editShenQing();
                            // this.xswaybill();
                        }
                    }
                })
                .catch(err => {
                    uni.$u.toast('校验失败');
                });
        },
        // 修改申请信息
        editShenQing(){
            uni.request({
                url:'/yunxiao/xswaybill',
                method:"PUT",
                data:this.newFormData,
                header:{
                    'TENANT-ID': 5,
                    Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
                    VERSION: 'zzl'
                },
            }).then(res=>{
                // console.log(res);
                if(res.code == 0){
                    uni.showToast({
                        title:'修改成功',
                        icon:'success',
                        duration:2000
                    })
                    this.$u.toast('修改成功')
                }
                uni.navigateBack({
                        delta: 1
                    });
            })
        },
        // 删除订单卡片
        deleteContractCardClick(e) {
            // console.log('删除订单卡片', e);
            this.newFormData.contractOrders.splice(e, 1);
        },
        xswaybill() {
            console.log('新建发运申请', this.newFormData);
            uni.showLoading({
                title: '加载中...'
            });
            this.$reqPost('xswaybill', this.newFormData).then(res => {
                uni.hideLoading();
                console.log('新建发运申请', res);
                if (res.code == 0) {
                    uni.showToast({
                        title: '添加成功!',
                        icon: 'success',
                        duration: 2000
                    });
                    // this.$nextTick(() => {
                    //     uni.navigateBack({
                    //         // url: '/pages/my-application/my-application'
                    //         delta: 2
                    //     });
                    // });
                }
            });
        },
        backPage() {
            uni.navigateBack({
                delta: 1
            });
        }
    }
};
</script>
<style lang="scss" scoped>
@include tableMainStyle();
::v-deep.new-application-form-data {
    width: 100%;
    padding-bottom: vww(40);
    // 标题
    .newApplicationTitle {
        margin-bottom: 0;
    }
    // 表单
    .formDataContaniner {
        .u-form {
            width: 91%;
            margin: 0 auto 0;
            .u-form-item {
                .u-form-item__body {
                    .u-form-item__body__left {
                        .u-form-item__body__left__content {
                            .u-form-item__body__left__content__label {
                            }
                        }
                    }
                    .u-form-item__body__right {
                        .u-form-item__body__right__content {
                            .u-form-item__body__right__content__slot {
                            }
                        }
                    }
                }
            }
        }
    }
    // 选择客户弹框
    .selectCustomerPopup {
        .u-popup {
            .u-transition {
                height: 95%;
                .u-popup__content {
                    overflow: scroll !important;
                    .selectCustomerTitle {
                        margin-bottom: 0;
                    }
                    .selectCustomerContainer {
                        padding: 0 4%;
                        // .loadmoreClass{
                        //     .u-loadmore{
                        //         .u-loadmore__content{
                        //             .u-loadmore__content__text{
                        //             }
                        //         }
                        //     }
                        // }
                        .searchContainer {
                        }
                        .searchCustomerBtn {
                            margin-top: vww(10);
                            display: flex;
                            .u-button {
                                width: 30%;
                            }
                        }
                        // 数据列表
                        .searchResultList {
                            margin-top: vww(16);
                        }
                        // 合同表格
                        .tableContract {
                            margin-top: vww(30);
                            display: flex;
                            justify-content: center;
                            .uni-table-scroll {
                                min-width: 0 !important;
                                .uni-table {
                                    .uni-table-tr {
                                        padding: 0;
                                        font-size: vww(13);
                                        .uni-table-th {
                                            width: vww(100);
                                            height: vww(32);
                                            line-height: vww(20);
                                            padding: vww(5) vww(10);
                                            color: #111111;
                                            font-weight: 400;
                                            background: #f5f5f5;
                                        }
                                        .uni-table-td {
                                            line-height: vww(20);
                                            padding: vww(5) vww(10);
                                            color: #111111;
                                        }
                                    }
                                }
                            }
                            .tableBody {
                                width: 80%;
                            }
                            .TableUtilBtn {
                                width: 20%;
                                overflow: hidden;
                                .uni-table {
                                    min-width: 0 !important;
                                }
                                .TableUtilBtnContainer {
                                    .u-button {
                                        width: vww(20);
                                    }
                                }
                            }
                        }
                        // 合同类型选择器
                        .selectContractTypePicker {
                            .u-popup {
                                .u-transition {
                                    height: auto;
                                }
                            }
                        }
                        .selectCustomerCompSheet {
                            .u-popup {
                                .u-transition {
                                    height: auto;
                                }
                            }
                        }
                        .selectLevelSheet {
                            .u-popup {
                                .u-transition {
                                    height: auto;
                                }
                            }
                        }
                        // 时间选择器
                        .selectContractStartTime {
                            .u-popup {
                                .u-transition {
                                    height: auto;
                                }
                            }
                        }
                        .selectContractEndTime {
                            .u-popup {
                                .u-transition {
                                    height: auto;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    // 煤厂
    .addContractContainer {
        .u-popup {
            .u-transition {
                height: 95%;
                .u-popup__content {
                    overflow: scroll !important;
                    .addContractFormTitle {
                        margin-bottom: 0;
                    }
                    // 搜索
                    .coalFiledSelectSearch {
                    }
                    // 选择煤种
                    .coalFiledSelectPopup {
                        .u-popup {
                            .u-transition {
                                height: 80%;
                                .u-popup__content {
                                    overflow: scroll !important;
                                    // 表格
                                    .coalFiledTable {
                                        width: 92%;
                                        display: flex;
                                        justify-content: center;
                                        margin: 0 auto;
                                        .uni-table-scroll {
                                            min-width: 0 !important;
                                            .uni-table {
                                                .uni-table-tr {
                                                    padding: 0;
                                                    font-size: vww(13);
                                                    .uni-table-th {
                                                        width: vww(100);
                                                        height: vww(32);
                                                        line-height: vww(20);
                                                        padding: vww(5) vww(10);
                                                        color: #111111;
                                                        font-weight: 400;
                                                        background: #f5f5f5;
                                                    }
                                                    .uni-table-td {
                                                        line-height: vww(20);
                                                        padding: vww(5) vww(10);
                                                        color: #111111;
                                                    }
                                                }
                                            }
                                        }
                                        .tableBody {
                                            width: 80%;
                                        }
                                        .TableUtilBtn {
                                            width: 20%;
                                            overflow: hidden;
                                            .uni-table {
                                                min-width: 0 !important;
                                            }
                                            .TableUtilBtnContainer {
                                                .u-button {
                                                    width: vww(20);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    // 添加合同
    .addContractContainer {
        .u-popup {
            .u-transition {
                height: 95%;
                .u-popup__content {
                    // background-color: rgb(247, 247, 247);
                    overflow: scroll !important;
                    .addContractForm {
                        width: 92%;
                        margin: 0 auto;
                        // 表单
                        // .u-form{
                        //     .u-form-item{
                        //         .u-form-item__body{
                        //             .u-form-item__body__right{
                        //                 .u-form-item__body__right__content__slot{
                        //                     .u-input{
                        //                         border:1px solid #dddddd;
                        //                         .u-input__content{
                        //                         }
                        //                     }
                        //                 }
                        //             }
                        //         }
                        //     }
                        // }
                        .formUpCard {
                            margin-top: vww(10);
                            padding: vww(10);
                            border-radius: vww(4);
                            box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5;
                            background-color: #ffffff;
                            // 价格卡片
                            .priceList {
                                min-height: vww(20);
                                border-radius: vww(4);
                                padding: vww(10) 0;
                                box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5;
                                // margin-top:vww(10);
                                background-color: #ffffff;
                                .currentPriceContainer {
                                    .currentPriceBox {
                                        width: 92%;
                                        margin: 0 auto;
                                    }
                                }
                                .selectPriceContainer {
                                    .selectPricebox {
                                        width: 92%;
                                        margin: 0 auto;
                                        .selectPriceboxItem {
                                            display: flex;
                                            justify-content: space-between;
                                        }
                                    }
                                }
                            }
                        }
                        .formDownCard {
                            border-radius: vww(4);
                            padding: vww(10);
                            box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5;
                            margin-top: vww(10);
                            background-color: #ffffff;
                        }
                        .addContractConfirm {
                            margin-top: vww(30);
                        }
                    }
                    // 品种选择器
                    .addContractCoalPicker {
                        .u-popup {
                            .u-transition {
                                height: auto;
                            }
                        }
                    }
                }
            }
        }
    }
    // 表格
    .newApplicationTable {
        margin: vww(40) auto;
        width: 100%;
        padding: vww(0) vww(10) vww(60) vww(10);
        box-sizing: border-box;
        .u-swipe-action {
            .u-swipe-action-item {
                box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5;
                margin-top: vww(10);
                .u-swipe-action-item__right {
                    .u-swipe-action-item__right__button {
                        .u-swipe-action-item__right__button__wrapper {
                            background-color: #ee336b !important;
                        }
                    }
                }
            }
        }
        .cardList {
            height: vww(130);
            border-radius: vww(4);
            padding: vww(10);
            position: relative;
            .cardListIcon{
                position:absolute; right: vww(20); top:vww(20);
            }
            .cardList-container {
                .cardList_item {
                    margin-top: vww(12);
                    font-size: 14px;
                    display: flex;
                    view {
                        width: 50%;
                        &:nth-child(2) {
                            margin-left: vww(20);
                        }
                    }
                }
            }
        }
        .addCard {
            width: 100%;
            height: vww(130);
            margin-top: vww(10);
            border-radius: vww(4);
            display: flex;
            justify-content: center;
            align-items: center;
            box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5;
        }
    }
    // button
    .new-application-button {
        display: flex;
        .u-button {
            width: vww(120);
            height: vww(40);
        }
    }
}
</style>
pages/home/home.vue
@@ -46,27 +46,26 @@
                            <image src="@/static/home/cehui.png" mode=""></image>
                            <view>撤回</view>
                        </view>
                        <view @click="checkTheScheduleClick" v-if="item.status == 1">
                        <view @click="checkTheScheduleClick(item.procInstId)" v-if="item.status == 1">
                            <image src="@/static/home/jindu.png" mode=""></image>
                            <view>查看进度</view>
                        </view>
                        <view @click="theFormDataClick" v-if="item.status == 1 || item.status == 2 ">
                        <view @click="theFormDataClick(item.tableId)" v-if="item.status == 1 || item.status == 2">
                            <image src="@/static/home/biaodan.png" mode=""></image>
                            <view>表单数据</view>
                        </view>
                        <view v-if="item.status == 3">
                        <view @click="apply(item)" v-if="item.status == 3">
                            <image src="@/static/home/history.png" mode="" ></image>
                            <view>重新申请</view>
                        </view>
                        <view v-if="item.status == 3">
                        <view @click="editMyApplication(item)" v-if="item.status == 3">
                            <image src="@/static/home/history.png" mode="" ></image>
                            <view>编辑</view>
                        </view>
                        <view @click="approvalHistoryClick" v-if="item.status == 2 || item.status == 3">
                        <view @click="approvalHistoryClick(item.procInstId)" v-if="item.status == 2 || item.status == 3">
                            <image src="@/static/home/history.png" mode=""></image>
                            <view>审批历史</view>
                        </view>
                    </view>
                    <!-- 已结束小组按钮 -->
                    <!-- <view class="bottom-content__chulizhong bottom-content__item" v-if="item.status == 2">
@@ -111,19 +110,19 @@
                <view class="bottom-container">
                    <!-- 待办按钮 -->
                    <view class="bottom-content__item">
                        <view @click="theFormDataClick">
                        <!-- <view @click="theFormDataClick">
                            <image src="@/static/home/jindu.png" mode=""></image>
                            <view>申请详情</view>
                        </view>
                        <view @click="adoptModalShow = true">
                        </view> -->
                        <view @click="adopClick(item)">
                            <image src="@/static/home/tongguo.png" mode=""></image>
                            <view>通过</view>
                        </view>
                        <view @click="rejectModalShow = true">
                        <view @click="rejectClick(item)">
                            <image src="@/static/home/bohui.png" mode=""></image>
                            <view>驳回</view>
                        </view>
                        <view @click="approvalHistoryClick">
                        <view @click="approvalHistoryClick(item.procInstId)">
                            <image src="@/static/home/history.png" mode=""></image>
                            <view>历史</view>
                        </view>
@@ -168,7 +167,7 @@
                                    item.duration >= 86400000
                                        ? parseInt(item.duration / 86400000 + '天' + parseInt(item.duration % 86400000) / 3600000 + '时' + parseInt(item.duration % 3600000) / 60000 + '分')
                                        : item.duration >= 3600000
                                        ? parseInt(item.duration / 3600000) + '时' + parseInt(item.duration / 3600000 % 3600000)  + '分'
                                        ? parseInt(item.duration / 3600000) + '时' + parseInt((item.duration / 3600000) % 3600000) + '分'
                                        : parseInt(item.duration / 60000) + '分'
                                }}
                            </text>
@@ -183,11 +182,11 @@
                <view class="bottom-container">
                    <!-- 已办按钮 -->
                    <view class="bottom-content__item">
                        <view @click="theFormDataClick">
                        <view @click="theFormDataClick(item.tableId)">
                            <image src="@/static/home/biaodan.png" mode=""></image>
                            <view>表单数据</view>
                        </view>
                        <view @click="approvalHistoryClick">
                        <view @click="approvalHistoryClick(item.procInstId)">
                            <image src="@/static/home/history.png" mode=""></image>
                            <view>审批历史</view>
                        </view>
@@ -203,14 +202,20 @@
        <!-- 撤回模态框 -->
        <view class="wodeshenqingMotai">
            <u-modal width="684rpx" :show="withDrawShow" title="撤回原因" :showCancelButton="true" @confirm="withDrawConfirm" @cancel="withDrawCancel">
                <view class="slot-content"><u--textarea v-model="withDrawContent" placeholder="请输入撤回原因"></u--textarea></view>
                <view class="slot-content"><u--textarea v-model="withDrawData.reason" placeholder="请输入撤回原因"></u--textarea></view>
            </u-modal>
        </view>
        <!-- 通过模态框 -->
        <view class="adoptModal">
            <u-modal width="684rpx" :show="adoptModalShow" title="审批通过" :showCancelButton="true" @confirm="adoptModalConfirm" @cancel="adoptModalCancel">
                <view class="slot-content"><u--textarea v-model="adoptModalContent" placeholder="请输入审批意见"></u--textarea></view>
                <view class="slot-content">
                    <view class="rejectMesaage">
                        <u-icon name="info-circle-fill" color="#0307ff"></u-icon>
                        <text>{{ modalType == 0 ? '注意:将默认分配给节点设定的所有可审批用户' : '注意:所有流程将驳回至发起人' }}</text>
                    </view>
                    <u--textarea v-model="adoptForm.comment" placeholder="请输入审批意见"></u--textarea>
                </view>
            </u-modal>
        </view>
@@ -218,8 +223,12 @@
        <view class="rejectModal">
            <u-modal width="684rpx" :show="rejectModalShow" title="驳回" :showCancelButton="true" @confirm="rejectModalConfirm" @cancel="rejectModalCancel">
                <view class="slot-content">
                    <u--textarea v-model="rejectModalContent" placeholder="请输入审批意见"></u--textarea>
                    <view class="rejectBack">
                    <view class="rejectMesaage">
                        <u-icon name="info-circle-fill" color="#0307ff"></u-icon>
                        <text>{{ modalType == 0 ? '注意:将默认分配给节点设定的所有可审批用户' : '注意:所有流程将驳回至发起人' }}</text>
                    </view>
                    <u--textarea v-model="rejectForm.comment" placeholder="请输入审批意见"></u--textarea>
                    <!-- <view class="rejectBack">
                        <view class="rejectBack-title"><text>驳回至</text></view>
                        <view class="data-selet" @click="statusSeletShow = true">
                            <view class="content">
@@ -227,7 +236,7 @@
                            </view>
                            <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="加载失败"></image></view>
                        </view>
                    </view>
                    </view> -->
                </view>
            </u-modal>
        </view>
@@ -245,7 +254,7 @@
        </view>
        <!-- 选择器 -->
        <u-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker>
        <!-- <u-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker> -->
        <!-- 菜单栏 -->
        <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu>
@@ -257,7 +266,7 @@
import popupMenu from '@/components/common/popup-menu/popup-menu.vue';
import combinedTitle from '@/components/common/combined-title/combined-title.vue';
import combinationCard from '@/components/common/combination-card/combination-card.vue';
import {setAccessToken} from '@/utils/status.js'
import { setAccessToken } from '@/utils/status.js';
export default {
    name: 'home',
    data() {
@@ -270,17 +279,45 @@
            list3: ['https://cdn.uviewui.com/uview/swiper/swiper3.png', 'https://cdn.uviewui.com/uview/swiper/swiper2.png', 'https://cdn.uviewui.com/uview/swiper/swiper1.png'],
            // 撤回模态框
            withDrawShow: false,
            withDrawData: {
                reason: '',
                id: '', // 撤回申请ID
                procInstId: ''
            },
            withDrawContent: '',
            withDrawId: 0, // 撤回申请ID
            // 重新申请
            form: {
                sendMessage: true,
                sendSms: true,
                sendEmail: true,
                procDefId: '',
                assignees: [],
                priority: '0'
            },
            assigneeList: [],
            showAssign: false,
            isGateway: false,
            isCustom: false,
            // 通过模态框
            adoptModalShow: false,
            adoptModalContent: '',
            // 通过请求
            adoptForm: {
                ids: '',
                comment: ''
            },
            // 驳回模态框
            rejectModalShow: false,
            rejectModalContent: '',
            dataSeletText: '请选择状态',
            // dataSeletText: '请选择状态',
            // 驳回请求
            rejectForm: {
                procInstIds: '',
                comment: ''
            },
            modalType: 0,
            // 删除申请模态框
            deleteApplicationModalShow: false,
            procInstId:'',
            // 选择器
            statusSeletShow: false,
            statusList: [['中国', '美国', '日本']],
@@ -332,12 +369,12 @@
        getUserInfo() {
            this.$reqGet('getUserInfo').then(res => {
                if(res.code == 0) {
                    uni.setStorageSync('userInfo',res.data.sysUser)
                    uni.setStorageSync('userInfo', res.data.sysUser);
                }
            })
            });
        },
        init() {
            this.getUserInfo()
            this.getUserInfo();
            this.getProcessDataList(); // 申请列表
            this.todoList(); // 我的待办
            this.doneList(); // 我的已办
@@ -359,7 +396,11 @@
            });
        },
        doneList() {
            uni.showLoading({
                title:'加载中...'
            })
            this.$reqGet('doneList', this.haveTodoParams).then(res => {
                uni.hideLoading();
                if (res.code === 0) {
                    // console.log('已办', res);
                    this.yibanData = res.data.content;
@@ -372,12 +413,25 @@
        // 撤回模态框
        withDrawClick(id) {
            this.withDrawShow = true;
            this.withDrawId = id;
            this.withDrawData.id = id;
        },
        withDrawConfirm() {
            console.log(this.withDrawId);
            if (this.withDrawContent.length >= 2) {
                console.log(this.withDrawContent);
            this.shenqingData.forEach(i => {
                if (i.id == this.withDrawData.id) {
                    this.withDrawData.procInstId = i.procInstId;
                }
            });
            if (this.withDrawData.reason.length >= 2) {
                this.$reqPost('withDraw', this.withDrawData, 'form').then(res => {
                    this.withDrawShow = false;
                    if (res.code == 0) {
                        uni.showToast({
                            title: res.data,
                            duration: 2000
                        });
                    }
                    this.getProcessDataList();
                });
            } else {
                uni.showToast({
                    title: '请规范输入',
@@ -385,16 +439,51 @@
                });
            }
        },
        // 通过
        adopClick(v) {
            console.log('通过点击', v);
            this.adoptModalShow = true;
            this.adoptForm.ids = v.id;
            this.modalType = 0;
            // let urlparam = v.procDefId+'/'+v.key;
            // this.$reqGet('getNextNode',{},urlparam).then(res=>{
            //     console.log('通过欲请求');
            // })
        },
        // 通过模态框
        adoptModalConfirm() {
            this.adoptModalShow = false;
            this.adoptForm.comment = this.adoptModalContent;
            this.$reqPost('passAll', this.adoptForm, 'form').then(res => {
                if (res.code == 0) {
                    this.$u.toast('操作成功!');
                } else {
                    this.$u.toast('添加失败!!');
                }
            });
        },
        adoptModalCancel() {
            this.adoptModalShow = false;
        },
        // 驳回
        rejectClick(v) {
            this.modalType = 1;
            this.rejectModalShow = true;
            this.rejectForm.procInstIds = v.procInstId;
        },
        // 驳回模态框
        rejectModalConfirm() {
            this.rejectModalShow = false;
            this.$reqPost('backAll', this.rejectForm, 'form').then(res => {
                if (res.code == 0) {
                    this.$u.toast('操作成功!');
                } else {
                    this.$u.toast('操作失败!!!');
                }
                this.todoList(); // 我的待办
            });
        },
        rejectModalCancel() {
            this.rejectModalShow = false;
@@ -405,31 +494,126 @@
        // 删除申请模态框
        deleteApplicationModalConfirm() {
            this.deleteApplicationModalShow = false;
            this.$reqPost('deleteHistoric',{ids:this.procInstId},'form').then(res=>{
                if(res.code == 0){
                    this.$u.toast('操作成功!')
                    this.yibanData = [];
                    this.doneList(); // 我的已办
                } else {
                    this.$u.toast('操作失败!!!')
                }
            })
        },
        deleteApplicationModalCancel() {
            this.deleteApplicationModalShow = false;
        },
        // 查看进度
        checkTheScheduleClick() {
        checkTheScheduleClick(v) {
            uni.navigateTo({
                url: '/pages/check-the-schedule/check-the-schedule'
                url: `/pages/check-the-schedule/check-the-schedule?index=${v}`
            });
        },
        // 表单数据
        theFormDataClick() {
        theFormDataClick(v) {
            uni.navigateTo({
                url: '/pages/the-form-data/the-form-data'
                url: `/pages/the-form-data/the-form-data?index=${v}`
            });
        },
        // 重新申请
        apply(v){
            if (!v.procDefId || v.procDefId == 'null') {
                this.$u.toast('流程定义为空');
                return;
            }
            this.form.id = v.id;
            this.form.procDefId = v.procDefId;
            this.form.title = v.title;
            // 加载审批人
            // this.userLoading = true;
            uni.showLoading({
                title: '审批人加载中'
            });
            // getFirstNode(v.procDefId).then((res) => {
            this.$reqGet('getFirstNode', {}, v.procDefId).then(res => {
                // this.userLoading = false;
                console.log('审批人', res);
                uni.hideLoading();
                if (res.data) {
                    this.error = '';
                    if (res.data.type == 3 || res.data.type == 4) {
                        this.isGateway = true;
                        this.form.firstGateway = true;
                        this.showAssign = false;
                        this.isCustom = false;
                        return;
                    }
                    if (res.data.type == 5) {
                        this.isCustom = true;
                        this.isGateway = false;
                        this.form.firstGateway = false;
                        this.showAssign = false;
                        return;
                    }
                    if (res.data.type == 1) {
                        this.showAssign = true;
                        this.isGateway = false;
                        this.form.firstGateway = false;
                        this.isCustom = false;
                        if (res.data.users && res.data.users.length > 0) {
                            this.assigneeList = res.data.users;
                            // 默认勾选
                            let ids = [];
                            res.data.users.forEach(e => {
                                ids.push(e.userId);
                            });
                            this.form.assignees = ids;
                            this.showAssign = true;
                            // 获取表单内容,重新创建申请
                            this.$reqPost('apply',this.form,'form').then(res=>{
                                console.log('重新提交申请',res);
                                if(res.code == 0){
                                    uni.showToast({
                                        title:res.data,
                                        icon:'success',
                                        duration:2000
                                    });
                                }
                                // 初始化申请列表
                                // this.myApplication.pageNumber = 1;
                                // this.shenqingData = [];
                                // this.getMoreNews();
                                this.getProcessDataList();
                            })
                        } else {
                            this.form.assignees = [];
                            this.showAssign = true;
                            this.error = '请进入"流程管理"为审批节点分配候选审批人员';
                        }
                    }
                }
                console.log(this.form);
            });
            this.modalVisible = true;
        },
        // 修改
        editMyApplication(v){
            console.log('修改申请');
            uni.navigateTo({
                url: `/pages/edit-my-application/edit-my-application?index=${v.tableId}`
            });
        },
        // 审批历史
        approvalHistoryClick() {
        approvalHistoryClick(v) {
            uni.navigateTo({
                url: '/pages/approval-history/approval-history'
                url: `/pages/approval-history/approval-history?index=${v}`
            });
        },
        // 删除申请
        deleteApplicationClick(id) {
            this.deleteApplicationModalShow = true;
            this.procInstId = id;
            console.log(id);
        }
    }
@@ -440,7 +624,6 @@
::v-deep.home {
    height: 100%;
    width: 100%;
    padding-bottom: vww(24);
    .home_swipe {
        width: 100%;
        height: vww(160);
@@ -537,7 +720,18 @@
        // width:100%;
        // height:vww(244);
        .slot-content {
            .rejectMesaage {
                display: flex;
                padding: vww(3);
                border: 1px solid #0307ff;
                border-radius: vww(4);
                font-size: 13px;
                text {
                    margin-left: vww(5);
                }
            }
            .u-textarea {
                margin-top: vww(10);
                width: vww(280);
                height: vww(90) !important;
                .uni-textarea-wrapper {
@@ -551,7 +745,18 @@
    .rejectModal {
        .slot-content {
            display: inline-block;
            .rejectMesaage {
                display: flex;
                padding: vww(3);
                border: 1px solid #0307ff;
                border-radius: vww(4);
                font-size: 13px;
                text {
                    margin-left: vww(5);
                }
            }
            .u-textarea {
                margin-top: vww(10);
                width: vww(280);
                height: vww(90) !important;
                .uni-textarea-wrapper {
pages/login/login.vue
@@ -53,6 +53,12 @@
                    // error
                    console.log(e);
                }
            } else{
                uni.showToast({
                    title:response.data.msg,
                    icon:'error',
                    duration:2000
                })
            }
        }
        
pages/my-application/my-application.vue
@@ -20,17 +20,17 @@
            </view>
            <!-- 时间选择器 -->
            <view class="example-body"><uni-datetime-picker v-model="range" type="daterange" @maskClick="maskClick" /></view>
            <view class="searchBtn"><u-button type="primary" text="搜索" @click="searchClick"></u-button></view>
            <view class="searchBtn"><u-button type="primary" text="搜索" @click="searchClick"></u-button> <u-button type="primary" :plain="true" text="清空" @click="emptyButtonClick"></u-button></view>
        </view>
        <!-- 选择器 -->
        <u-picker @cancel="dataSelectCancel" @confirm="selectConfirm" :show="selectPickerShow" :columns="selectList"></u-picker>
        <!-- 我的申请卡片区域 -->
        <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:50px">
        <!-- <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:150px"> -->
            <combination-card v-for="(item, index) in shenqingData" index="index">
                <template v-slot:top>
                    <u-checkbox size="35" :key="item.id" :name="item.id"></u-checkbox>
                    <!-- <u-checkbox size="35" :key="item.id" :name="item.id"></u-checkbox> -->
                    <view>
                        <text>{{ item.title }}</text>
                    </view>
@@ -71,11 +71,11 @@
                                <image src="@/static/home/cehui.png" mode=""></image>
                                <view>撤回</view>
                            </view>
                            <view @click="checkTheScheduleClick" v-if="item.status == 1">
                            <view @click="checkTheScheduleClick(item.procInstId)" v-if="item.status == 1">
                                <image src="@/static/home/jindu.png" mode=""></image>
                                <view>查看进度</view>
                            </view>
                            <view @click="theFormDataClick" v-if="item.status == 1 || item.status == 2">
                            <view @click="theFormDataClick(item.tableId)" v-if="item.status == 1 || item.status == 2">
                                <image src="@/static/home/biaodan.png" mode=""></image>
                                <view>表单数据</view>
                            </view>
@@ -83,11 +83,11 @@
                                <image src="@/static/home/history.png" mode=""></image>
                                <view>重新申请</view>
                            </view>
                            <view v-if="item.status == 3">
                            <view v-if="item.status == 3" @click="editMyApplication(item)">
                                <image src="@/static/home/history.png" mode=""></image>
                                <view>编辑</view>
                            </view>
                            <view @click="approvalHistoryClick" v-if="item.status == 2 || item.status == 3">
                            <view @click="approvalHistoryClick(item.procInstId)" v-if="item.status == 2 || item.status == 3">
                                <image src="@/static/home/history.png" mode=""></image>
                                <view>审批历史</view>
                            </view>
@@ -95,7 +95,7 @@
                    </view>
                </template>
            </combination-card>
        </u-checkbox-group>
        <!-- </u-checkbox-group> -->
        <!-- 撤回模态框 -->
        <view class="wodeshenqingMotai">
@@ -116,15 +116,19 @@
            ></u-modal>
        </view>
        <view class="" style="height:50px;">
        </view>
        <!-- 底部全选 -->
        <view class="bottomTabbar">
            <view class="bottomTabbar_checkBox">
                <u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange">
                <!-- <u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange">
                    <u-checkbox labelSize="13px" label="全选" name="tatalSelect"></u-checkbox>
                </u-checkbox-group>
                </u-checkbox-group> -->
            </view>
            <view class="bottomTabbar_button">
                <u-button :plain="true" type="primary" text="批量删除" @click="batchDeleteClick"></u-button>
                <!-- <u-button :plain="true" type="primary" text="批量删除" @click="batchDeleteClick"></u-button> -->
                <u-button type="primary" text="新增申请" @click="newApplicationClick"></u-button>
            </view>
        </view>
@@ -210,6 +214,7 @@
        if (this.menuShow == true) {
            this.$refs.menuRef.menuClick();
        }
        this.myApplication.pageNumber = 1;
        this.init();
    },
    // 点击导航栏菜单后
@@ -246,6 +251,17 @@
            this.getMoreNews();
        }, 1000);
    },
    // 下拉加载
    onPullDownRefresh() {
        console.log('refresh');
        this.myApplication.pageNumber = 1;
        this.loadingType = 0;
        this.shenqingData = [];
        setTimeout(()=> {
            uni.stopPullDownRefresh();
        }, 1000);
        this.init();
    },
    methods: {
        init() {
            this.getMoreNews();
@@ -279,7 +295,12 @@
                    return;
                }
                // this.myApplication.pageNumber++; // 每触底一次 page +1
                this.shenqingData = this.shenqingData.concat(response.data.records); //将数据拼接在一起
                if(this.myApplication.title||this.myApplication.status||this.myApplication.result||this.myApplication.startTime||this.myApplication.endTime){
                    this.shenqingData = response.data.records
                } else{
                    this.shenqingData = this.shenqingData.concat(response.data.records);
                }
                 //将数据拼接在一起
                this.loadingType = 0; // 将loadingType归0重置
                uni.hideNavigationBarLoading(); // 关闭加载动画
            });
@@ -307,10 +328,16 @@
            console.log('maskClick事件:', e);
        },
        searchClick() {
            // if(this.myApplication.title || this.myApplication.status || this.myApplication.result ||  this.myApplication.startTime || this.myApplication.endTime){
            console.log('this.myApplication', this.myApplication);
            this.getProcessDataList();
            // }
            this.myApplication.pageNumber = 1;
            this.loadingType = 0;
            this.getMoreNews();
        },
        emptyButtonClick(){
            this.myApplication.title = '';
            this.selectText = '';
            this.range = [];
            this.init();
        },
        // 撤回模态框
        withDrawClick(id) {
@@ -330,12 +357,12 @@
                        title: res.data,
                        duration: 2000
                    });
                }
                    this.withDrawShow = false;
                    // 初始化申请列表
                    this.shenqingData = [];
                    this.myApplication.pageNumber = 1;
                this.shenqingData = [];
                    this.getMoreNews();
                }
            });
            console.log(this.withDrawId);
@@ -400,7 +427,7 @@
                            this.form.assignees = ids;
                            this.showAssign = true;
                            // 获取表单内容,重新创建申请
                            this.$reqPost('apply',this.form).then(res=>{
                            this.$reqPost('apply',this.form,'form').then(res=>{
                                console.log('重新提交申请',res);
                                if(res.code == 0){
                                    uni.showToast({
@@ -409,6 +436,10 @@
                                        duration:2000    
                                    });
                                }
                                // 初始化申请列表
                                this.myApplication.pageNumber = 1;
                                this.shenqingData = [];
                                this.getMoreNews();
                            })
                        } else {
                            this.form.assignees = [];
@@ -421,6 +452,14 @@
            });
            
            this.modalVisible = true;
        // }
        },
        // 修改申请
        editMyApplication(v){
            console.log('修改申请');
            uni.navigateTo({
                url: `/pages/edit-my-application/edit-my-application?index=${v.tableId}`
            });
        },
        // 批量删除模态框
        batchDeleteClick() {
@@ -452,21 +491,21 @@
            console.log('totalChange', n);
        },
        // 查看进度
        checkTheScheduleClick() {
        checkTheScheduleClick(v) {
            uni.navigateTo({
                url: '/pages/check-the-schedule/check-the-schedule'
                url: `/pages/check-the-schedule/check-the-schedule?index=${v}`
            });
        },
        // 表单数据
        theFormDataClick() {
        theFormDataClick(v) {
            uni.navigateTo({
                url: '/pages/the-form-data/the-form-data'
                url: `/pages/the-form-data/the-form-data?index=${v}`
            });
        },
        // 审批历史
        approvalHistoryClick() {
        approvalHistoryClick(v) {
            uni.navigateTo({
                url: '/pages/approval-history/approval-history'
                url: `/pages/approval-history/approval-history?index=${v}`
            });
        },
        // 新增申请
pages/my-have-todo/my-have-todo.vue
@@ -1,25 +1,36 @@
<template>
    <view class="my-have-todo">
        <!-- 搜索区域 -->
        <view class="searchContainer">
        <view class="searchBox">
            <view class="search">
                <u-search @clickIcon="searchIconClick" :clearabled="false" :showAction="false" placeholder="请输入标题" v-model="searchData" shape="square"></u-search>
                <u-search :clearabled="true" :showAction="false" placeholder="请输入标题" v-model="haveTodoParams.title" shape="square"></u-search>
            </view>
            <!-- 状态选择器 -->
            <view class="data-selet" @click="statusSeletShow = true">
            <!-- <view class="data-selet" @click="statusSeletShow = true">
                <view class="content">
                    <text>{{ dataSeletText }}</text>
                </view>
                <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="加载失败"></image></view>
            </view> -->
            <view class="search">
                <u-search  :clearabled="true" :showAction="false" placeholder="请输入任务名称" v-model="haveTodoParams.name" shape="square"></u-search>
            </view>
        </view>
        <!-- 时间搜索区域 -->
        <view class="timeContiner">
            <uni-datetime-picker class="time-picker" type="date" :clear-icon="false" v-model="createTime" @change="startDateChange" placeholder="开始时间" />
            <uni-datetime-picker class="time-picker" type="date" :clear-icon="false" v-model="endTime" @change="endDateChange" placeholder="结束时间" />
            <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="haveTodoParams.startDate" @change="startDateChange" placeholder="开始时间" />
            <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="haveTodoParams.endDate" @change="endDateChange" placeholder="结束时间" />
        </view>
        <view class="searchButton">
            <u-button type="primary" text="搜索" @click="searchButtonClick"></u-button>
            <u-button type="primary" :plain="true" text="清空" @click="emptyButtonClick"></u-button>
        </view>
</view>
        <!-- 我的已办卡片区域 -->
        <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:50px">
        <combination-card v-for="(item, index) in yibanData" index="index">
@@ -70,11 +81,11 @@
                <view class="bottom-container">
                    <!-- 已办按钮 -->
                    <view class="bottom-content__item">
                        <view @click="theFormDataClick">
                        <view @click="theFormDataClick(item.tableId)">
                            <image src="@/static/home/biaodan.png" mode=""></image>
                            <view>表单数据</view>
                        </view>
                        <view @click="approvalHistoryClick">
                        <view @click="approvalHistoryClick(item.procInstId)">
                            <image src="@/static/home/history.png" mode=""></image>
                            <view>审批历史</view>
                        </view>
@@ -94,7 +105,7 @@
                <u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange"><u-checkbox labelSize="13px" label="全选" name="tatalSelect"></u-checkbox></u-checkbox-group>
            </view>
            <view class="bottomTabbar_button">
                <u-button :plain="true" type="primary"  text="批量删除" @click="deleteApplicationClick()"></u-button>
                <u-button :plain="true" type="primary"  text="批量删除" @click="deleteApplicationClickAll()"></u-button>
            </view>
        </view>
        
@@ -111,7 +122,7 @@
        </view>
        <!-- 选择器 -->
        <u-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker>
        <!-- <u-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker> -->
        
        <!-- 菜单栏 -->
        <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu>
@@ -125,19 +136,31 @@
    data() {
        return {
            // 条件搜索
            searchData: '',
            dataSeletText: '请选择状态',
            // searchData: '',
            // dataSeletText: '请选择状态',
            // 时间选择
            createTime: '',
            endTime: '',
            // createTime: '',
            // endTime: '',
            // 复选框
            checkBoxValue:[],
            totalSelectValue:[],
            // 选择器
            statusSeletShow: false,
            statusList: [['中国', '美国', '日本']],
            // statusSeletShow: false,
            // statusList: [['中国', '美国', '日本']],
            yibanData: [],
            // 删除申请
            deleteIds:'',
            deleteApplicationModalShow:false,
            yibanData: []
            haveTodoParams:{
                name: '',
                pageNumber: 1,
                pageSize: 10,
                sort: 'createTime',
                order: 'desc',
                title: '',
                startDate: '',
                endDate: ''
            }
        };
    },
    onShow(){
@@ -161,46 +184,76 @@
        },
        // 已办
        doneList() {
            uni.showLoading({
                title:'加载中...'
            })
            this.$reqGet('doneList', this.haveTodoParams).then(res => {
                uni.hideLoading();
                if (res.code === 0) {
                    // console.log('已办', res);
                    this.yibanData = res.data.content;
                }
            });
        },
        // 搜索
        searchButtonClick(){
            this.init();
        },
        // 清空
        emptyButtonClick(){
            this.haveTodoParams.name = '';
            this.haveTodoParams.title = '';
            this.haveTodoParams.startDate = '';
            this.haveTodoParams.endDate = '';
            this.init();
        },
        menushow(e){
            this.menuShow = e
        },
        deleteApplicationClick(id){
            if(this.checkBoxValue.length > 0){
            this.deleteIds = id;
                this.deleteApplicationModalShow = true;
        },
        deleteApplicationClickAll(){
            if(this.checkBoxValue.length > 0){
                this.deleteIds = this.checkBoxValue.toString(',');
                this.deleteApplicationModalShow = true;
            } else{
                this.$u.toast('未选中申请')
            }
        },
        // 删除申请模态框
        deleteApplicationModalConfirm() {
            this.deleteApplicationModalShow = false;
            this.$reqPost('deleteHistoric',{ids:this.deleteIds},'form').then(res=>{
                if(res.code == 0){
                    this.$nextTick(()=>{
                        this.$u.toast('操作成功!')
                    })
                    this.yibanData = [];
                    this.init();
                } else {
                    this.$u.toast('操作失败!!!')
                }
            })
        },
        deleteApplicationModalCancel() {
            this.deleteApplicationModalShow = false;
        },
        // 时间选择器
        startDateChange() {
            this.queryRealTimeShippingData.startDate = '';
            this.$nextTick(() => {
                console.log(this.queryRealTimeShippingData);
                this.realTimeShipping();
            });
            // this.queryRealTimeShippingData.startDate = '';
            // this.$nextTick(() => {
            //     console.log(this.queryRealTimeShippingData);
            //     this.realTimeShipping();
            // });
        },
        endDateChange() {
            this.queryRealTimeShippingData.endDate = '';
            this.$nextTick(() => {
                console.log(this.queryRealTimeShippingData);
                this.realTimeShipping();
            });
        },
        // 搜索
        searchIconClick() {
            console.log(1111, this.searchData);
            // this.queryRealTimeShippingData.endDate = '';
            // this.$nextTick(() => {
            //     console.log(this.queryRealTimeShippingData);
            //     this.realTimeShipping();
            // });
        },
        // 复选框
        checkboxChange(n){
@@ -217,20 +270,20 @@
            }
        },
        // 状态
        statusConfirm(a){
            this.statusSeletShow = false
            console.log(a)
        },
        // statusConfirm(a){
        //     this.statusSeletShow = false
        //     console.log(a)
        // },
        // 表单数据
        theFormDataClick() {
        theFormDataClick(v) {
            uni.navigateTo({
                url: '/pages/the-form-data/the-form-data'
                url:  `/pages/the-form-data/the-form-data?index=${v}`
            });
        },
        // 审批历史
        approvalHistoryClick() {
        approvalHistoryClick(v) {
            uni.navigateTo({
                url: '/pages/approval-history/approval-history'
                url: `/pages/approval-history/approval-history?index=${v}`
            });
        }
    }
@@ -240,6 +293,17 @@
<style lang="scss" scoped>
::v-deep.my-have-todo {
    // 搜索区域
    .searchContainer{
        .searchButton{
            width: 91%;
            margin: vww(16) auto;
            display: flex;
            .u-button{
                width:30%;
            }
        }
    .searchBox {
        width: 91%;
        display: flex;
@@ -322,6 +386,11 @@
        }
    }
    }
    // 卡片中间
    .center-container {
        display: flex;
pages/my-todo/my-todo.vue
@@ -2,30 +2,40 @@
    <!-- 我的待办 -->
    <view class="my-todo">
        <!-- 搜索区域 -->
        <view class="searchContainer">
        <view class="searchBox">
            <view class="search">
                <u-search @clickIcon="searchIconClick" :clearabled="false" :showAction="false" placeholder="请输入标题" v-model="searchData" shape="square"></u-search>
                    <u-search @clickIcon="searchIconClick" :clearabled="true" :showAction="false" placeholder="请输入标题" v-model="todoParams.title" shape="square"></u-search>
            </view>
            <!-- 状态选择器 -->
            <view class="data-selet" @click="statusSeletShow = true">
                <!-- <view class="data-selet" @click="statusSeletShow = true">
                <view class="content">
                    <text>{{ dataSeletText }}</text>
                </view>
                <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="加载失败"></image></view>
                </view> -->
                <view class="search">
                    <u-search @clickIcon="searchIconClick" :clearabled="true" :showAction="false" placeholder="请输入任务名称" v-model="todoParams.name" shape="square"></u-search>
            </view>
        </view>
        <!-- 时间搜索区域 -->
        <view class="timeContiner">
            <uni-datetime-picker class="time-picker" type="date" :clear-icon="false" v-model="createTime" @change="startDateChange" placeholder="开始时间" />
            <uni-datetime-picker class="time-picker" type="date" :clear-icon="false" v-model="endTime" @change="endDateChange" placeholder="结束时间" />
                <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="todoParams.startDate" @change="startDateChange" placeholder="开始时间" />
                <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="todoParams.endDate" @change="endDateChange" placeholder="结束时间" />
            </view>
            <view class="searchButton">
                <u-button type="primary" text="搜索" @click="searchButtonClick"></u-button>
                <u-button type="primary" text="清空" :plain="true" @click="emptyButtonClick"></u-button>
            </view>
        </view>
        <!-- 我的待办卡片区域 -->
        <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:50px">
            <combination-card v-for="(item, index) in daibanData" index="index">
                <template v-slot:top>
                    <u-checkbox size="35" :key="item.id" :name="item.id"></u-checkbox>
                    <u-checkbox size="35" :key="item.id" :name="item.id+item.procInstId"></u-checkbox>
                    <view>
                        <text>{{ item.actBusiness.title }}</text>
                    </view>
@@ -53,11 +63,11 @@
                    <view class="bottom-container">
                        <!-- 待办按钮 -->
                        <view class="bottom-content__item">
                            <view @click="theFormDataClick">
                            <!-- <view @click="theFormDataClick">
                                <image src="@/static/home/jindu.png" mode=""></image>
                                <view>申请详情</view>
                            </view>
                            <view @click="adoptModalShow = true">
                            </view> -->
                            <view @click="adopClick(item)">
                                <image src="@/static/home/tongguo.png" mode=""></image>
                                <view>通过</view>
                            </view>
@@ -65,7 +75,7 @@
                                <image src="@/static/home/bohui.png" mode=""></image>
                                <view>驳回</view>
                            </view>
                            <view @click="approvalHistoryClick">
                            <view @click="approvalHistoryClick(item.procInstId)">
                                <image src="@/static/home/history.png" mode=""></image>
                                <view>历史</view>
                            </view>
@@ -83,15 +93,18 @@
                </u-checkbox-group>
            </view>
            <view class="bottomTabbar_button">
                <u-button :plain="true" type="primary" text="批量驳回" @click="rejectModalShow = true"></u-button>
                <u-button type="primary" text="批量通过" @click="adoptModalShow = true"></u-button>
                <u-button :plain="true" type="primary" text="批量驳回" @click="batchRejectClick"></u-button>
                <u-button type="primary" text="批量通过" @click="batchAdoptClick"></u-button>
            </view>
        </view>
        <!-- 通过模态框 -->
        <view class="adoptModal">
            <u-modal width="684rpx" :show="adoptModalShow" title="审批通过" :showCancelButton="true" @confirm="adoptModalConfirm" @cancel="adoptModalCancel">
                <view class="slot-content"><u--textarea v-model="adoptModalContent" placeholder="请输入审批意见"></u--textarea></view>
                <view class="slot-content"><view class="rejectMesaage">
                        <u-icon name="info-circle-fill" color="#0307ff"></u-icon>
                        <text>{{ modalType == 0 ? '注意:将默认分配给节点设定的所有可审批用户' : '注意:所有流程将驳回至发起人' }}</text>
                    </view><u--textarea v-model="adoptForm.comment" placeholder="请输入审批意见"></u--textarea></view>
            </u-modal>
        </view>
@@ -99,8 +112,12 @@
        <view class="rejectModal">
            <u-modal width="684rpx" :show="rejectModalShow" title="驳回" :showCancelButton="true" @confirm="rejectModalConfirm" @cancel="rejectModalCancel">
                <view class="slot-content">
                    <u--textarea v-model="rejectModalContent" placeholder="请输入审批意见"></u--textarea>
                    <view class="rejectBack">
                    <view class="rejectMesaage">
                        <u-icon name="info-circle-fill" color="#0307ff"></u-icon>
                        <text>{{ modalType == 0 ? '注意:将默认分配给节点设定的所有可审批用户' : '注意:所有流程将驳回至发起人' }}</text>
                    </view>
                    <u--textarea v-model="rejectForm.comment" placeholder="请输入审批意见"></u--textarea>
                    <!-- <view class="rejectBack">
                        <view class="rejectBack-title"><text>驳回至</text></view>
                        <view class="data-selet" @click="statusSeletShow = true">
                            <view class="content">
@@ -108,7 +125,7 @@
                            </view>
                            <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="加载失败"></image></view>
                        </view>
                    </view>
                    </view> -->
                </view>
            </u-modal>
        </view>
@@ -138,9 +155,6 @@
            </u-modal>
        </view> -->
        
        <!-- 选择器 -->
        <u-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker>
        <!-- 菜单栏 -->
        <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu>
    </view>
@@ -152,38 +166,57 @@
export default {
    data() {
        return {
            // 条件搜索
            searchData: '',
            dataSeletText: '请选择状态',
            // 时间选择
            createTime: '',
            endTime: '',
            // 选择器
            statusSeletShow: false,
            statusList: [['中国', '美国', '日本']],
            // 复选框
            checkBoxValue:[],
            totalSelectValue:[],
            // 通过模态框
            adoptModalShow: false,
            adoptModalContent: '',
            adoptDataBox:[],
            // 通过请求
            adoptForm: {
                ids: '',
                comment: ''
            },
            // 驳回模态框
            rejectModalShow: false,
            rejectModalContent: '',
            menuShow:false,
            rejectDataBox:[],
            // 驳回请求
            rejectForm: {
                procInstIds: '',
                comment: ''
            },
            modalType:0,
            // data
            daibanData: [],
            // 待办
            todoParams: {
                name: '',
                pageNumber: 1,
                pageSize: 10
                pageSize: 10,
                title: '',
                startDate: '',
                endDate: '',
            },
            // 上拉加载更多
            timer: {},
            load: 0,
            loadingText: '加载中...',
            loadingType: 0,
            contentText: {
                contentDown: '上拉显示更多',
                contentRefresh: '正在加载...',
                contentNomore: '没有更多数据了'
            }
        };
    },
    onShow(){
        if(this.menuShow == true){
            this.$refs.menuRef.menuClick()
        }
        this.myApplication.pageNumber = 1;
        this.init();
    },
    // 点击导航栏菜单后
@@ -195,40 +228,108 @@
        combinationCard,
        popupMenu
    },
    // 上拉加载更多
    onReachBottom() {
        if (this.timer != null) {
            clearTimeout(this.timer);
        }
        this.timer = setTimeout(() => {
            this.getMoreNews();
        }, 1000);
    },
    // 下拉加载
    onPullDownRefresh() {
        console.log('refresh');
        this.todoParams.pageNumber = 1;
        this.loadingType = 0;
        this.daibanData = [];
        setTimeout(()=> {
            uni.stopPullDownRefresh();
        }, 1000);
        this.init();
    },
    methods: {
        init(){
            this.todoList();
            // this.todoList();
            this.getMoreNews();
        },
        // 待办列表
        todoList(){
            this.$reqGet('todoList', this.todoParams).then(res => {
                if (res.code === 0) {
                    this.daibanData = res.data.content;
        // todoList(){
        //     this.$reqGet('todoList', this.todoParams).then(res => {
        //         if (res.code === 0) {
        //             this.daibanData = res.data.content;
        //         }
        //     });
        // },
        getMoreNews() {
            if (this.loadingType !== 0) {
                //loadingType!=0;直接返回
                return false;
                }
            this.loadingType = 1;
            uni.showNavigationBarLoading(); //显示加载动画
            this.$reqGet('todoList', this.todoParams).then(res => {
                    // if (res.code === 0) {
                    //     this.daibanData = res.data.content;
                    // }
                    this.todoParams.pageNumber++; // 得到数据之后 page+1
                    if (res.data.content.length < 1) {
                        // 没有数据
                        this.loadingType = 2;
                        uni.hideNavigationBarLoading(); // 关闭加载动画
                        uni.showToast({
                            title: '没有更多数据了!',
                            icon: 'error'
            });
                        return;
                    }
                    if(this.todoParams.name||this.todoParams.startTime||this.todoParams.endTime||this.todoParams.title){
                        this.daibanData = res.data.content
                    } else{
                        this.daibanData = this.daibanData.concat(res.data.content);
                    }
                     //将数据拼接在一起
                    this.loadingType = 0; // 将loadingType归0重置
                    uni.hideNavigationBarLoading(); // 关闭加载动画
                });
        },
        // 搜索点击
        searchButtonClick(){
            this.todoParams.pageNumber = 1;
            this.init();
        },
        // 清空
        emptyButtonClick(){
            this.todoParams.name = '';
            this.todoParams.title = '';
            this.todoParams.startDate = '';
            this.todoParams.endDate = '';
            this.init();
        },
        menushow(e){
            this.menuShow = e;
        },
        // 时间选择器
        startDateChange() {
            this.queryRealTimeShippingData.startDate = '';
            this.$nextTick(() => {
                console.log(this.queryRealTimeShippingData);
                this.realTimeShipping();
            });
            // this.queryRealTimeShippingData.startDate = '';
            // this.$nextTick(() => {
            //     console.log(this.queryRealTimeShippingData);
            //     this.realTimeShipping();
            // });
        },
        endDateChange() {
            this.queryRealTimeShippingData.endDate = '';
            this.$nextTick(() => {
                console.log(this.queryRealTimeShippingData);
                this.realTimeShipping();
            });
            // this.queryRealTimeShippingData.endDate = '';
            // this.$nextTick(() => {
            //     console.log(this.queryRealTimeShippingData);
            //     this.realTimeShipping();
            // });
        },
        // 搜索
        searchIconClick() {
            console.log(1111, this.searchData);
        },
        // 状态
        statusConfirm(a) {
            this.statusSeletShow = false;
@@ -241,7 +342,7 @@
        totalSelectChange(n){
            if(n[0] == 'tatalSelect'){
                this.daibanData.forEach(item=>{
                    this.totalSelectValue.push(item.id)
                    this.totalSelectValue.push(item.id+item.procInstId)
                })
                this.checkBoxValue = this.totalSelectValue
            } else {
@@ -256,14 +357,40 @@
            });
        },
        // 审批历史
        approvalHistoryClick() {
        approvalHistoryClick(v) {
            uni.navigateTo({
                url: '/pages/approval-history/approval-history'
                url: `/pages/approval-history/approval-history?index=${v}`
            });
        },
        // 通过
        adopClick(v){
            this.adoptModalShow = true;
            this.adoptForm.ids = v.id;
            this.modalType = 0;
        },
        batchAdoptClick(){
            if(this.checkBoxValue.length != 0){
                this.adoptModalShow = true;
            } else {
                this.$u.toast('未选择申请!')
            }
        },
        // 通过模态框
        adoptModalConfirm() {
            this.adoptModalShow = false;
            this.checkBoxValue.forEach(item=>{
                this.adoptDataBox.push(item.slice(0,6))
            })
            this.adoptForm.ids = this.adoptDataBox.toString();
            this.$reqPost('passAll', this.adoptForm, 'form').then(res => {
                console.log('是否还原',this.adoptForm.ids,this.rejectForm.procInstIds);
                if (res.code == 0) {
                    this.$u.toast('操作成功!');
                } else {
                    this.$u.toast('添加失败!!');
                }
                this.init();
            });
        },
        adoptModalCancel() {
            this.adoptModalShow = false;
@@ -271,9 +398,36 @@
        // 驳回模态框
        rejectModalConfirm() {
            this.rejectModalShow = false;
            this.checkBoxValue.forEach(item=>{
                this.rejectDataBox.push(item.slice(6,12))
            })
            this.rejectForm.procInstIds = this.rejectDataBox.toString();
            this.$reqPost('backAll', this.rejectForm, 'form').then(res => {
                if (res.code == 0) {
                    this.$u.toast('操作成功!');
                } else {
                    this.$u.toast('操作失败!!!');
                }
                this.init();
            });
        },
        rejectModalCancel() {
            this.rejectModalShow = false;
        },
        rejectClick(v) {
            this.modalType = 1;
            this.rejectModalShow = true;
            this.rejectForm.procInstIds = v.procInstId;
        },
        batchRejectClick(){
            if(this.checkBoxValue.length != 0){
                this.rejectModalShow = true;
                console.log(this.rejectDataBox);
            } else{
                this.$u.toast('未选中申请!')
            }
        }
    }
};
@@ -282,6 +436,16 @@
<style lang="scss" scoped>
::v-deep.my-todo {
    // 搜索区域
    .searchContainer{
        .searchButton{
            width:91%;
            margin: vww(16) auto;
            display:flex;
            .u-button{
                width:30%;
            }
        }
        // 条件搜索
    .searchBox {
        width: 91%;
        display: flex;
@@ -334,7 +498,6 @@
            }
        }
    }
    // 时间搜索
    .timeContiner {
        width: 91%;
@@ -363,6 +526,12 @@
            }
        }
    }
    }
    // 卡片中间
    .center-container {
@@ -453,7 +622,18 @@
        // width:100%;
        // height:vww(244);
        .slot-content {
            .rejectMesaage {
                display: flex;
                padding: vww(3);
                border: 1px solid #0307ff;
                border-radius: vww(4);
                font-size: 13px;
                text {
                    margin-left: vww(5);
                }
            }
            .u-textarea {
                margin-top:vww(10);
                width: vww(280);
                height: vww(90) !important;
                .uni-textarea-wrapper {
@@ -467,7 +647,18 @@
    .rejectModal {
        .slot-content {
            display: inline-block;
            .rejectMesaage {
                display: flex;
                padding: vww(3);
                border: 1px solid #0307ff;
                border-radius: vww(4);
                font-size: 13px;
                text {
                    margin-left: vww(5);
                }
            }
            .u-textarea {
                margin-top:vww(10);
                width: vww(280);
                height: vww(90) !important;
                .uni-textarea-wrapper {
pages/new-application-form-data/new-application-form-data.vue
@@ -83,7 +83,7 @@
                                            width: 43px;
                                            font-size: 10px;
                                            padding: 0;"
                                            @click="selectCustomerOkClick(item.id)"
                                            @click="selectCustomerOkClick(item)"
                                        >
                                            选择
                                        </button>
@@ -91,7 +91,9 @@
                                </u-cell>
                            </u-cell-group>
                        </view>
                        <view class="loadmoreClass">
                            <u-loadmore loadmoreText="点击加载更多" nomoreText="无更多数据!!!" :status="status" @loadmore="loadingCustomer" fontSize="20" height="30px" />
                        </view>
                        <!-- 选择用户菜单项 -->
                        <view class="selectCustomerCompSheet">
                            <u-action-sheet
@@ -347,9 +349,11 @@
                                <u-form-item label="单价" labelWidth="20%" ref="item1">
                                    <u--input v-model="addContractFormdata.price" disabled disabledColor="#ffffff" border="none"></u--input>
                                </u-form-item>
                                <u-form-item label="订单金额" labelWidth="20%" ref="item1"><u--input v-show="currentRowComputed" v-model="addContractFormdata.amount"></u--input></u-form-item>
                                <u-form-item label="订单金额" labelWidth="20%" ref="item1">
                                    <u--input :disabled="addContractFormdata.trainType == 2" v-show="currentRowComputed" v-model="addContractFormdata.amount"></u--input>
                                </u-form-item>
                                <u-form-item label="订单数量" labelWidth="20%" ref="item1">
                                    <u--input v-model="addContractFormdata.quant" disabled disabledColor="#ffffff" border="none"></u--input>
                                    <u--input :disabled="addContractFormdata.trainType == 1" @input="jisuanAmount" v-model="addContractFormdata.quant"></u--input>
                                </u-form-item>
                            </view>
@@ -461,6 +465,9 @@
                                            </u-cell>
                                        </u-cell-group>
                                    </view>
                                    <view class="loadmoreClass">
                                        <u-loadmore loadmoreText="点击加载更多" nomoreText="无更多数据!!!" :status="status" @loadmore="loadingCustomer" fontSize="20" height="30px" />
                                    </view>
                                    <!-- 选择用户菜单项 -->
                                    <view class="selectCustomerCompSheet">
                                        <u-action-sheet
@@ -536,8 +543,9 @@
                <text style="color: #FFA500;;">客户账户现汇余额:{{ accountDetails.balanceTotal }},承兑余额:{{ accountDetails.balance2 == null ? 0 : customerChengdui }}</text>
            </view>
            <u-swipe-action>
                <u-swipe-action-item @click="deleteContractCardClick" :options="options1" v-for="(item, index) in this.newFormData.contractOrders" :key="index">
                <u-swipe-action-item @click="deleteContractCardClick" :options="options1" v-for="(item, index) in newFormData.contractOrders" :key="index">
                    <view class="cardList">
                        <view class="" class="cardListIcon"><u-icon name="edit-pen" color="#2979ff" size="35"></u-icon></view>
                        <view class="cardList-container">
                            <view class="cardList_item">
                                收货人:
@@ -678,7 +686,7 @@
            // 时间
            timeShow: false,
            mode: 'range',
            maxDate: `${year}-${month}-${date + 80}`,
            maxDate: `${year}-${month}-${date + 70}`,
            // 选择客户
            selectCustomerData: {
                compIds: '',
@@ -687,6 +695,8 @@
                current: 1,
                size: 10
            },
            status: 'loadmore',
            customerDataAllNum: 0, //客户列表总条数
            account: null, //客户账户信息
            // 搜索字段
            selectCompsData: [],
@@ -715,6 +725,7 @@
                customerName: ''
            },
            contractData: [],
            contractNumList: [],
            // 类型
            selectContractTypeShow: false,
            selectContractTypeData: [[]],
@@ -884,36 +895,34 @@
            return true;
        },
        async currentRowComputed() {
            console.log('currentRowComputed');
            //变价格用的
            this.changePriceMode(this.addContractFormdata.priceMode);
            //变订单量
            if (this.addContractFormdata.amount > 0 && this.addContractFormdata.price > 0) {
            if (this.addContractFormdata.price > 0 && (this.addContractFormdata.amount > 0 || this.addContractFormdata.quant > 0)) {
                let price = this.addContractFormdata.price;
                if (this.addContractFormdata.trainType == 2) {
                if (this.addContractFormdata.trainType == 1) {
                    let q = this.addContractFormdata.amount / price;
                    this.addContractFormdata.quant = q.toFixed(2);
                    this.addContractFormdata.cost1 = null; //运费
                    this.addContractFormdata.cost2 = null; //抑尘费
                } else if (this.addContractFormdata.trainType == 2) {
                    //如果路运价格增加抑尘费和运费
                    let cost1Price = await this.getFreight(this.addContractFormdata.fromStation, this.addContractFormdata.toStation, this.addContractFormdata.customerAddressId); //路运运费
                    price += cost1Price;
                    price += this.dust;
                }
                let q = this.addContractFormdata.amount / price;
                this.addContractFormdata.quant = q.toFixed(2);
                if (this.addContractFormdata.trainType == 2) {
                    let cost1Price = await this.getFreight(this.addContractFormdata.fromStation, this.addContractFormdata.toStation, this.addContractFormdata.customerAddressId); //路运运费
                    this.addContractFormdata.cost1 = (this.addContractFormdata.quant * cost1Price).toFixed(2); //运费
                    this.addContractFormdata.cost2 = (this.addContractFormdata.quant * this.dust).toFixed(2); //抑尘费
                    console.log('运费,抑尘费:', this.addContractFormdata.cost1, this.addContractFormdata.cost2);
                } else {
                    this.addContractFormdata.cost1 = null; //运费
                    this.addContractFormdata.cost2 = null; //抑尘费
                    let amount = Number(price * this.addContractFormdata.quant) + Number(this.addContractFormdata.cost1) + Number(this.addContractFormdata.cost2);
                    console.log(amount);
                    this.addContractFormdata.amount = amount.toFixed(2);
                    // console.log('运费,抑尘费:', this.addContractFormdata.cost1, this.addContractFormdata.cost2);
                }
            } else {
                this.addContractFormdata.quant = null;
            }
            // if (this.currentRow.quant > 0 && this.currentRow.price > 0) {
            //   this.currentRow.amount = this.currentRow.quant * this.currentRow.price;
            //   return true;
            // }
            return true;
        }
        // accountMsg() {
@@ -962,6 +971,20 @@
        combinationTitle
    },
    methods: {
        async jisuanAmount() {
            if (this.addContractFormdata.trainType == 2) {
                let price = this.addContractFormdata.price;
                //如果路运价格增加抑尘费和运费
                let cost1Price = await this.getFreight(this.addContractFormdata.fromStation, this.addContractFormdata.toStation, this.addContractFormdata.customerAddressId); //路运运费
                price += cost1Price;
                price += this.dust;
                this.addContractFormdata.cost1 = (this.addContractFormdata.quant * cost1Price).toFixed(2); //运费
                this.addContractFormdata.cost2 = (this.addContractFormdata.quant * this.dust).toFixed(2); //抑尘费
                let amount = Number(price * this.addContractFormdata.quant) + Number(this.addContractFormdata.cost1) + Number(this.addContractFormdata.cost2);
             console.log(amount);
                this.addContractFormdata.amount = amount.toFixed(2);
            }
        },
        init() {
            this.jcfavouredpolicyitem();
            this.coalfiled();
@@ -980,10 +1003,13 @@
                title: '加载中...'
            });
            this.selectCustomerShow = true;
            this.selectCustomerData.current = 1;
            this.$reqGet('customer', this.selectCustomerData).then(res => {
                console.log('客户呵呵哈哈哈或', res);
                uni.hideLoading();
                if (res.code == 0) {
                    this.customerData = res.data.records;
                    this.customerDataAllNum = res.data.total;
                }
            });
        },
@@ -1042,15 +1068,47 @@
            this.selectCustomer();
        },
        selectCustomerOkClick(v) {
            console.log('id', v);
            this.$reqGet('getAccount', { customerId: v }).then(res => {
            console.log('外层客户选择', v);
            this.newFormData.customerName = v.customerName;
            this.newFormData.customerId = v.id;
            this.$reqGet('getAccount', { customerId: v.id }).then(res => {
                console.log('客户选择账户', res);
                this.accountDetails = res.data;
                this.newFormData.customerName = res.data.customerName;
                this.newFormData.customerId = res.data.id;
                this.searchContractForm.customerName = res.data.customerName;
                this.reqContract();
                this.$nextTick(() => {
                    this.contractData.forEach(item => {
                        this.contractNumList.push(item.num);
                    });
                    console.log('合同号码列表', this.contractNumList);
                    // 检查换客户后对应的合同
                    if (this.contractNumList.indexOf(this.newFormData.contractNum) > -1) {
                        this.newFormData.contractNum = '';
                        this.newFormData.contractName = '';
                    }
                });
            });
            this.$nextTick(() => {
                this.selectCustomerShow = false;
            });
        },
        loadingCustomer() {
            console.log('加载更多事件');
            if (this.selectCustomerData.current >= this.customerDataAllNum / 10) return;
            this.status = 'loading';
            this.selectCustomerData.current = ++this.selectCustomerData.current;
            this.$reqGet('customer', this.selectCustomerData).then(res => {
                if (this.selectCustomerData.current >= this.customerDataAllNum / 10) {
                    this.status = 'nomore';
                    this.$u.toast('没有更多数据了!');
                }
                uni.hideLoading();
                if (res.code == 0) {
                    this.customerDataAllNum = res.data.total;
                    this.customerData = this.customerData.concat(res.data.records);
                    this.status = 'loadmore';
                    console.log(this.selectCustomerData);
                }
            });
        },
        // 时间
@@ -1107,6 +1165,10 @@
            this.$reqGet('contract_status').then(res => {
                console.log('状态', res);
            });
            this.reqContract();
        },
        // 合同请求
        reqContract() {
            this.$reqGet('contract', this.searchContractForm).then(res => {
                uni.hideLoading();
                if (res.code == 0) {
@@ -1275,15 +1337,16 @@
            this.addContractConsigneeShow = true;
        },
        addContractConsigneeConfirm(v) {
            console.log('收货人', v);
            this.addContractFormdata.toStation = v.toStation;
            this.addContractFormdata.customerName = v.customerName;
            this.addContractFormdata.customerId = v.id;
            this.$reqGet('getAccount', { customerId: v.id }).then(res => {
                console.log('获取收货人账号', res);
                // this.accountDetails = res.data;
                // this.newFormData.customerName = res.data.customerName;
                // this.newFormData.customerId = res.data.id;
                // this.searchContractForm.customerName = res.data.customerName;
                this.addContractFormdata.customerId = res.data.id;
            });
            this.$nextTick(() => {
                this.addContractConsigneeShow = false;
@@ -1415,6 +1478,7 @@
        addContractSanConfirm() {
            if (this.addContractFormdata.compId && this.addContractFormdata.customerId && this.addContractFormdata.filedId) {
                this.newFormData.contractOrders.push(this.addContractFormdata);
                console.log('添加子订单',this.addContractFormdata);
                this.$nextTick(() => {
                    this.addContractShow = false;
                });
@@ -1469,6 +1533,7 @@
        // 获取所有的优惠政策
        getFavouredPolicyItem() {
            this.$reqGet('getFavouredPolicyItem', { current: 1, size: 1000, status: 0 }).then(res => {
                console.log('所有优惠政策', res.data.records);
                this.favouredpolicyListAll = res.data.records;
            });
        },
@@ -1502,7 +1567,10 @@
                        amount += Number(e.amount);
                    });
                    if (this.newFormData.payType == '0') {
                        if (this.accountDetails.balance < amount) {
                        if (this.newFormData.contractOrders.length <= 0) {
                            this.$u.toast('请添加订单子项!');
                            return false;
                        } else if (this.accountDetails.balance < amount) {
                            let msg = this.accountDetails.balance == null ? 0 : this.accountDetails.balance;
                            uni.showToast({
                                title: '客户账户现汇余额不足,现汇余额:' + msg,
@@ -1510,10 +1578,14 @@
                                duration: 2000
                            });
                        } else {
                            console.log('提交整体',this.newFormData);
                            this.xswaybill();
                        }
                    } else {
                        if (this.accountDetails.balance2 < amount) {
                        if (this.newFormData.contractOrders.length <= 0) {
                            this.$u.toast('请添加订单子项!');
                            return false;
                        } else if (this.accountDetails.balance2 < amount) {
                            let msg = this.accountDetails.balance2 == null ? 0 : this.accountDetails.balance2;
                            uni.showToast({
                                title: '客户账户承兑余额不足,承兑余额:' + msg,
@@ -1521,6 +1593,7 @@
                                duration: 2000
                            });
                        } else {
                            console.log('提交整体',this.newFormData);
                            this.xswaybill();
                        }
                    }
@@ -1535,7 +1608,7 @@
            this.newFormData.contractOrders.splice(e, 1);
        },
        xswaybill() {
            console.log('新建发运申请');
            console.log('新建发运申请', this.newFormData);
            uni.showLoading({
                title: '加载中...'
            });
@@ -1611,6 +1684,14 @@
                    }
                    .selectCustomerContainer {
                        padding: 0 4%;
                        // .loadmoreClass{
                        //     .u-loadmore{
                        //         .u-loadmore__content{
                        //             .u-loadmore__content__text{
                        //             }
                        //         }
                        //     }
                        // }
                        .searchContainer {
                        }
                        .searchCustomerBtn {
@@ -1904,6 +1985,12 @@
            height: vww(130);
            border-radius: vww(4);
            padding: vww(10);
            position: relative;
            .cardListIcon {
                position: absolute;
                right: vww(20);
                top: vww(20);
            }
            .cardList-container {
                .cardList_item {
                    margin-top: vww(12);
pages/new-application/new-application.vue
@@ -2,24 +2,25 @@
    <!-- 新增申请 -->
    <view class="new-application">
        <!-- 搜索区域 -->
        <view class="searchBox">
        <!-- <view class="searchBox">
            <view class="search">
                <u-search @clickIcon="searchIconClick" :clearabled="false" :showAction="false" placeholder="请输入标题" v-model="searchData" shape="square"></u-search>
            </view>
            <!-- 状态选择器 -->
            <view class="data-selet" @click="statusSeletShow = true">
                <view class="content">
                    <text>{{ dataSeletText }}</text>
                </view>
                <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="加载失败"></image></view>
            </view>
        </view>
        </view> -->
        <combined-title title="申请模板"></combined-title>
        <!-- 卡片区域 -->
        <view class="newApplicationCard" @click="toNewApplicationDetails" v-for="(item,index) in newApplicationData" :key="index">
            <view class="card" >
                <view class="card-left">
                    <view class="card-left_top"><text>{{item.description}}</text></view>
                    <view class="card-left_top">
                        <text>{{ item.description }}</text>
                    </view>
                    <view class="card-left_bottom">
                        <text>版本:v{{item.version}}</text>
                        <text>所属分类:{{item.categoryTitle}}</text>
@@ -41,7 +42,9 @@
<script>
import popupMenu from '@/components/common/popup-menu/popup-menu.vue';
import combinedTitle from '@/components/common/combined-title/combined-title.vue';
export default {
    name: 'new-application',
    data() {
        return {
            searchData: '',
@@ -56,15 +59,15 @@
                status:1,
                pageNumber:1,
                pageSize:10,
                sort:"createTime",
                order:"desc"
                sort: 'createTime',
                order: 'desc'
            },
            newApplicationData:[]
        };
    },
    onShow(){
        if(this.menuShow == true){
            this.$refs.menuRef.menuClick()
            this.$refs.menuRef.menuClick();
        }
        this.init();
    },
@@ -74,10 +77,11 @@
    // 点击导航栏菜单后
    onNavigationBarButtonTap(e) {
        // console.log(e);
        this.$refs.menuRef.menuClick()
        this.$refs.menuRef.menuClick();
    },
    components:{
        popupMenu
        popupMenu,
        combinedTitle
    },
    methods: {
        init(){
@@ -85,17 +89,17 @@
            this.$reqGet('getNewProcessDataList',this.updateData).then(res=>{
                if(res.code === 0){
                    res.data.records.forEach(item=>{
                        if(item.id=="WAY_BILL:4:87504"){
                        if (item.id == 'WAY_BILL:4:87504') {
                            this.newApplicationData.push(item);
                        }
                    })
                    });
                    
                    console.log("新增",res);
                    console.log('新增', res);
                }
            })
            });
        },
        menushow(e){
            this.menuShow = e
            this.menuShow = e;
        },
        // 搜索
        searchIconClick() {
pages/the-form-data/the-form-data.vue
@@ -1,7 +1,7 @@
<template>
    <!-- 表单数据 -->
    <view class="the-form-data">
        <view class="formData">
        <!-- <view class="formData">
            <view class="formData-row">
                <view class="formData-row_input">
                    <text>字段标题</text>
@@ -48,10 +48,9 @@
                    <u--textarea height="130" v-model="value1" placeholder="请输入内容" ></u--textarea>
                </view>
            </view>
        </view>
        <view class="dataTable">
        </view> -->
        <!-- <view class="dataTable">
            <uni-table border stripe emptyText="暂无更多数据">
                <!-- 表格数据行 -->
                <uni-tr>
                    <uni-th align="center">字段标题</uni-th>
                    <uni-th align="center">字段标题</uni-th>
@@ -77,7 +76,79 @@
                    <uni-td align="center">字段标题</uni-td>
                </uni-tr>
            </uni-table>
        </view> -->
        <view class="formDataContaniner">
            <u--form labelPosition="left" :model="formData" ref="formRef">
                <u-form-item labelWidth="20%" label="结算客户"  ref="customerNameRef">
                    <u--input v-model="formData.customerName" disabled disabledColor="#ffffff"></u--input>
                </u-form-item>
                <u-form-item labelWidth="20%" label="编号" >
                    <u--input  disabled disabledColor="#ffffff" v-model="formData.number" placeholder="请输入编号"></u--input>
                </u-form-item>
                <u-form-item  labelWidth="20%" label="合同编号"  ref="contractNumRef">
                    <u--input v-model="formData.contractNum" disabled disabledColor="#ffffff"></u--input>
                </u-form-item>
                <u-form-item labelWidth="20%" label="合同名称"  ref="contractNameRef">
                    <u--input v-model="formData.contractName" disabled disabledColor="#ffffff" ></u--input>
                </u-form-item>
                <u-form-item labelWidth="20%" label="付款方式"  ref="payTypeRef">
                    <u--input :value="formData.payType == 0? '现汇':'承兑'" disabled disabledColor="#ffffff" placeholder="请选择付款方式" ></u--input>
                </u-form-item>
                <u-form-item labelWidth="20%" label="日期"  ref="timeDataRef">
                    <u--input :value="formData.createTime != null ?formData.createTime.slice(0,10):'暂无' + ' 至 ' + formData.endDate != null? formData.endDate:'暂无'" disabled disabledColor="#ffffff" placeholder="请选择范围日期"></u--input>
                </u-form-item>
            </u--form>
        </view>
        <view class="card">
            <view class="cardList" v-for="(item,index) in formData.contractOrders">
                <view class="cardList-container">
                    <view class="cardList_item">
                        收货人:
                        <text>{{ item.customerName }}</text>
                    </view>
                    <view class="cardList_item">
                        <view class="">
                            矿厂:
                            <text>{{ item.filedName }}</text>
                        </view>
                        <view class="">
                            煤厂:
                            <text>{{ item.compName }}</text>
                        </view>
                    </view>
                    <view class="cardList_item">
                        <view class="">
                            品种:
                            <text>{{ item.coalName }}</text>
                        </view>
                        <view class="">
                            运输:
                            <text>{{ item.trainType == 1 ? '路运' : '地销' }}</text>
                        </view>
                    </view>
                    <view class="cardList_item">
                        <view class="">
                            单价:
                            <text>{{ item.price }}</text>
                        </view>
                        <view class="">
                            订单金额:
                            <text>{{ item.amount }}</text>
                        </view>
                        <!-- <view class="">
                                    订单数量:<text>218.899</text>
                                </view> -->
                    </view>
                </view>
            </view>
        </view>
        
        <!-- 菜单栏 -->
        <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu>
@@ -96,6 +167,8 @@
                    name: ''
                }
            },
            formData:{},
            applicationId:0,
            menuShow:false
        };
    },
@@ -103,6 +176,10 @@
        if(this.menuShow == true){
            this.$refs.menuRef.menuClick()
        }
        this.init();
    },
    onLoad(options){
        this.applicationId = JSON.parse(options.index); // 字符串转对象
    },
    // 点击导航栏菜单后
    onNavigationBarButtonTap(e) {
@@ -113,6 +190,21 @@
        popupMenu
    },
    methods:{
        init(){
            this.requestFormData();
        },
        requestFormData(){
            uni.showLoading({
                title:'加载中...'
            })
            this.$reqGet('formData',{},this.applicationId).then(res=>{
                console.log('表单',res);
                uni.hideLoading();
                if(res.code == 0){
                    this.formData = res.data
                }
            })
        },
        menushow(e){
            this.menuShow = e
        }
@@ -123,53 +215,53 @@
<style lang="scss" scoped>
.the-form-data {
    // 表单
    .formData{
        width:91%;
        margin:vww(16) auto 0;
        .formData-row{
            margin-top:vww(16);
            display:flex;
            justify-content: space-between;
            .formData-row_input{
                width:47%;
                .u-input{
                    margin-top:vww(10);
                }
                text{
                    font-size:vww(13);
                }
            }
            .formData-row_textarea{
                width:100%;
                .u-textarea{
                    margin-top:vww(10);
                }
                text{
                    font-size: vww(13);
                }
            }
        }
    }
    // .formData{
    //     width:91%;
    //     margin:vww(16) auto 0;
    //     .formData-row{
    //         margin-top:vww(16);
    //         display:flex;
    //         justify-content: space-between;
    //         .formData-row_input{
    //             width:47%;
    //             .u-input{
    //                 margin-top:vww(10);
    //             }
    //             text{
    //                 font-size:vww(13);
    //             }
    //         }
    //         .formData-row_textarea{
    //             width:100%;
    //             .u-textarea{
    //                 margin-top:vww(10);
    //             }
    //             text{
    //                 font-size: vww(13);
    //             }
    //         }
    //     }
    // }
    // 表格
    .dataTable{
        width:91%;
        margin:vww(48) auto 0;
        .uni-table{
            .uni-table-tr{
                .uni-table-th{
                    background-color: #F5F5F5;
                    font-size:vww(13);
                    color:#111111;
                    font-weight: 500;
                }
                .uni-table-td{
                    background-color: #FFFFFF;
                    font-size:vww(13);
                    color:#111111;
                }
            }
        }
    }
    // .dataTable{
    //     width:91%;
    //     margin:vww(48) auto 0;
    //     .uni-table{
    //         .uni-table-tr{
    //             .uni-table-th{
    //                 background-color: #F5F5F5;
    //                 font-size:vww(13);
    //                 color:#111111;
    //                 font-weight: 500;
    //             }
    //             .uni-table-td{
    //                 background-color: #FFFFFF;
    //                 font-size:vww(13);
    //                 color:#111111;
    //             }
    //         }
    //     }
    // }
    
    
    
@@ -203,5 +295,56 @@
    // }
    
    
    .formDataContaniner {
        .u-form {
            width: 91%;
            margin: 0 auto 0;
            .u-form-item {
                .u-form-item__body {
                    .u-form-item__body__left {
                        .u-form-item__body__left__content {
                            .u-form-item__body__left__content__label {
                            }
                        }
                    }
                    .u-form-item__body__right {
                        .u-form-item__body__right__content {
                            .u-form-item__body__right__content__slot {
                            }
                        }
                    }
                }
            }
        }
    }
    .card{
        width:91%;
        margin:0 auto;
        .cardList {
            height: vww(130);
            border-radius: vww(4);
            padding: vww(10);
            box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5;
            margin-top: vww(10);
            .cardList-container {
                .cardList_item {
                    margin-top: vww(12);
                    font-size: 14px;
                    display: flex;
                    view {
                        width: 50%;
                        &:nth-child(2) {
                            margin-left: vww(20);
                        }
                    }
                }
            }
        }
    }
}
</style>
store/index.js
utils/api.js
@@ -99,6 +99,12 @@
        mehtod:"GET"
    },
    
    // 合同详情
    getByContractId:{
        url:'/yunxiao/contractitem/getByContractId',
        method:'GET'
    },
    
    // 添加申请
    xswaybill:{
@@ -110,8 +116,6 @@
        url:'/yunxiao/coalpricemodifyinfo/getNewPrice',
        method:'GET'
    },
    // 获取运费
    
    
    // 撤回
@@ -141,4 +145,44 @@
        name:'pig',
        method:'GET'
    },
    // 表单数据
    formData:{
        url:'/yunxiao/xswaybill',
        method:'GET'
    },
    // 查看进度
    historicFlow:{
        url:'/oa/actTask/historicFlow',
        method:'GET'
    },
    // 待办通过
    // getNextNode:{
    //     url:'/oa/actProcess/getNextNode',
    //     method:'GET'
    // },
    // 批量通过
    passAll:{
        url:'/oa/actTask/passAll',
        method:'POST'
    },
    // 批量驳回
    backAll:{
        url:'/oa/actTask/backAll',
        method:"POST"
    },
    deleteHistoric:{
        url:'/oa/actTask/deleteHistoric',
        method:"POST"
    },
    // 修改驳回申请信息
    editXswaybill:{
        url:'/yunxiao/xswaybill',
        method:'PUT'
    },
    // 退出清空缓存
    // logout:{
    //     url:'/auth/token/logout',
    //     method:'DELETE'
    // }
}
utils/request.js
@@ -73,7 +73,7 @@
        title: response.data.msg,
        icon: 'error',
        position: 'top',
        duration: 1000
        duration: 2000
    })
    return false;
}
@@ -135,7 +135,6 @@
        statusCode,
        data
    } = resp;
    // 验证http状态码
    const handlerHTTPStatus = handlerCode[statusCode];