819527061@qq.com
2023-11-24 5c8906cc4aaa7fcf70ee37de2dd1069161d80a61
收款明细页面及对接接口、详情页面
6个文件已修改
2个文件已添加
1075 ■■■■■ 已修改文件
pages/home/home.vue 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/my-application/my-application.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/new-application-form-data/new-application-form-data.vue 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/new-application/new-application.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/payment-form-data/payment-form-data.vue 830 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/api.js 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/request.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/smallToBig.js 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.vue
@@ -19,7 +19,7 @@
                    </view>
                </template>
                <template v-slot:center>
                    <view class="center-container">
                    <view class="center-container" @click="() => shenqingDetail(item)">
                        <view class="center-content__one center-margin">
                            <view class="">
                                <text>所属流程:{{ item.processName }}</text>
@@ -102,7 +102,7 @@
                    </view>
                </template>
                <template v-slot:center>
                    <view class="center-container">
                    <view class="center-container" @click="() => daibanDetail(item)">
                        <view class="center-content__one center-margin">
                            <view class="">
                                <text>任务名称:{{ item.name || '' }}</text>
@@ -156,7 +156,7 @@
                    </view>
                </template>
                <template v-slot:center>
                    <view class="center-container">
                    <view class="center-container" @click="() => shenqingDetail(item)">
                        <view class="center-content__one center-margin">
                            <view>
                                <text>任务名称:{{ item.name }}</text>
@@ -491,6 +491,32 @@
            this.doneList(); // 我的已办
            this.xscarshippingdayplan(); // 日计划
        },
    //代办详情
    daibanDetail(item) {
      if(item?.actBusiness?.actType == 'Offsetting') {  //收款 actType = ‘Offsetting’
        uni.navigateTo({
          url: `/pages/payment-form-data/payment-form-data?id=${item.tableId}`,
        })
      }else if(item?.actBusiness?.actType == 'WAY_BILL') {
        uni.navigateTo({
          url: `/pages/new-application-form-data/new-application-form-data?id=${item.tableId}`
        })
      }
    },
    //代办详情
    shenqingDetail(item) {
      if(item.actType == 'Offsetting') {  //收款 actType = ‘Offsetting’
        uni.navigateTo({
          url: `/pages/payment-form-data/payment-form-data?id=${item.tableId}`,
        })
      }else if(item.actType == 'WAY_BILL') {
        uni.navigateTo({
          url: `/pages/new-application-form-data/new-application-form-data?id=${item.tableId}`
        })
      }
    },
        getUserInfo() {
            this.$reqGet('getUserInfo').then(res => {
                if (res.code == 0) {
@@ -1110,4 +1136,4 @@
        }
    }
}
</style>
</style>
pages/my-application/my-application.vue
@@ -55,7 +55,7 @@
        </view>
      </template>
      <template v-slot:center>
        <view class="center-container">
        <view class="center-container" @click="() => shenqingDetail(item)">
          <view class="center-content__one center-margin">
            <view class="">
              <text>所属流程:{{ item.processName }}</text>
@@ -306,6 +306,19 @@
    this.init();
  },
  methods: {
    shenqingDetail(item) { //跳转详情页面
      if(item.actType == 'Offsetting') {  //收款 actType = ‘Offsetting’
        uni.navigateTo({
          url: `/pages/payment-form-data/payment-form-data?id=${item.tableId}`,
        })
      }else if(item.actType == 'WAY_BILL') {
        uni.navigateTo({
          url: `/pages/new-application-form-data/new-application-form-data?id=${item.tableId}`
        })
      }
    },
    init() {
      this.myApplication.pageNumber = 1;
      this.loadingType = 0;
@@ -795,7 +808,7 @@
      right:vww(20)!important;
    }
  }
    // 底部占位
    .empty-placeH{
        height:vww(50);
pages/new-application-form-data/new-application-form-data.vue
@@ -5,7 +5,7 @@
        <!-- <page-meta :page-style="spanStyle"></page-meta> -->
        <!-- 表单 -->
        <combination-title class="newApplicationTitle" title="新增"></combination-title>
        <combination-title class="newApplicationTitle" :title="newFormData.id?'查看':'新增'"></combination-title>
        <!-- 注意,如果需要兼容微信小程序,最好通过setRules方法设置rules规则 -->
        <!-- <u-notify :message="accountMsg" :show="trueMsg" :type="accountMsgType"></u-notify> -->
        <!-- <u-alert :title="accountMsg" :type="accountMsgType" :description="accountMsgType"></u-alert> -->
@@ -590,7 +590,12 @@
            <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="cardListIcon" @click="editApplicationClick(index)"><u-icon name="edit-pen" color="#2979ff" size="35"></u-icon></view>
                        <view
                v-if="!newFormData.id"
                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">
                                收货人:
@@ -635,12 +640,12 @@
                </u-swipe-action-item>
            </u-swipe-action>
            <view class="addCard" @click="addContractClick">
            <view class="addCard" @click="addContractClick" v-if="!newFormData.id">
                <view class="addCard-icon"><u-icon name="plus" size="100"></u-icon></view>
            </view>
        </view>
        <view class="new-application-button">
        <view class="new-application-button" v-if="!newFormData.id">
            <u-button text="取消" :plain="true" type="primary" @click="backPage"></u-button>
            <u-button text="确定" type="primary" @click="newApplicationFormDataClick"></u-button>
        </view>
@@ -959,6 +964,10 @@
        popupMenu,
        combinationTitle
    },
  onLoad(e) {
    console.log('我是详请还是新增----',e)
    this.newFormData.id = e.id || 0
  },
    methods: {
        async jisuanAmount() {
            if (this.addContractFormdata.trainType == 2) {
@@ -990,6 +999,30 @@
                    this.selectContractTypeData[0].push(item.value);
                });
            });
      this.$nextTick(() => {
        if(this.newFormData.id) {
          this.$reqGet('formData',{},this.newFormData.id).then(res => {
            console.log(res,'res====查看====')
            this.newFormData = res.data
            console.log(this.newFormData,'this.newFormData====----')
            if(this.actions.length > 0) {  //付款方式回显
              this.actions.forEach(item => {
                console.log(item,'item=====-----')
                console.log(this.newFormData.payType,'payType')
                 if(this.newFormData.payType == item.value) {
                   this.selectValue = item.name
                 }
              })
            }
            if(this.newFormData.startDate && this.newFormData.endDate) { //日期
              this.timeDataStr = `${this.newFormData.startDate} - ${this.newFormData.endDate}`
            }
          })
        }else {
        }
      })
        },
        /**
         * 获取分类账套
@@ -1769,7 +1802,7 @@
                        .searchResultList {
                            margin-top: vww(16);
                        }
                        // 滚动通知
                        .tapStyle{
                            margin-top: vww(30);
pages/new-application/new-application.vue
@@ -31,6 +31,19 @@
                </view>
            </view>
        </view>
        <view class="newApplicationCard shoukuanDetailCard" @click="ToPaymentForm">
            <view class="card">
                <view class="card-left">
                    <view class="card-left_bottom">
                        <text>添加收款明细</text>
                    </view>
                </view>
                <view class="card-right">
                    <view class="icon"><image src="@/static/groupAppTotalImg/back_1.png" mode=""></image></view>
                </view>
            </view>
        </view>
        <!-- 选择器 -->
        <u-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker>
@@ -113,6 +126,12 @@
            uni.navigateTo({
                url: '/pages/new-application-form-data/new-application-form-data'
            });
        },
        //新增收款明细
        ToPaymentForm() {
            uni.navigateTo({
                url:'/pages/payment-form-data/payment-form-data'
            })
        }
    }
};
@@ -209,5 +228,17 @@
            }
        }
    }
    .shoukuanDetailCard{
        .card{
            height: auto;
            .card-left_bottom {
                font-size: vww(13);
                margin: vww(12) 0;
                text {
                    margin-right: vww(16);
                }
            }
        }
    }
}
</style>
pages/payment-form-data/payment-form-data.vue
New file
@@ -0,0 +1,830 @@
<template>
    <view class="payment-form-data-wrap">
        <combination-title  class="newApplicationTitle" :title="dataForm.id?'查看':'新增'"> </combination-title>
        <view class="payment-form-data-main">
            <u--form
                    labelPosition="left"
                    labelWidth = "20vw"
                    :model="dataForm"
                    :rules="rules"
                    ref="dataForm">
                <u-form-item
                        label="收款单编号"
                        prop="number"
                        borderBottom
                        ref="item1"
                >
                    <u--input
                        v-model="dataForm.number"
                        placeholder="自动生成"
                        disabled
                        border="none"
                    ></u--input>
                </u-form-item>
                <u-form-item
                        label="账套"
                        prop="ledgerName"
                        borderBottom
                        ref="item1"
                        readonly
                        @click="showLedger = true"
                >
                    <u--input
                        v-model="dataForm.ledgerName"
            placeholder="请选择账套"
                        border="none"
                    ></u--input>
                </u-form-item>
                <u-form-item
                        label="收款日期"
                        prop="inputDate"
                        borderBottom
                        ref="item1"
                        readonly
                        @click="showCalendar = true"
                >
                    <u--input
            readonly
            v-model="dataForm.inputDate"
            placeholder="请选择收款日期"
                        border="none"
                    ></u--input>
                </u-form-item>
                <u-form-item
                        label="客户名称"
                        prop="customerName"
                        borderBottom
                        ref="item1"
                        @click="handleCustomerNameOpen(1)"
                >
                    <u--input
                       readonly
                        v-model="dataForm.customerName"
             placeholder="请选择客户"
                        border="none"
                    ></u--input>
                </u-form-item>
                <u-form-item
                        label="用煤客户"
                        prop="customerAddressName"
                        borderBottom
                        ref="item1"
            @click="handleCustomerNameOpen(2)"
                >
                    <u--input
                        v-model="dataForm.customerAddressName"
                        border="none"
            placeholder="请选择用煤客户"
                    ></u--input>
                </u-form-item>
                <u-form-item
                        label="自产煤收入"
                        prop="money1"
                        borderBottom
                        ref="item1"
                >
                    <u--input
                        v-model="dataForm.money1"
                        border="none"
            placeholder="请输入自产煤收入"
                    ></u--input>
                </u-form-item>
        <view class="bigMoney">大写:{{smallToBig(dataForm.money1)}}</view>
                <u-form-item
                        label="外购煤收入"
                        prop="money2"
                        borderBottom
                        ref="item1"
                >
                    <u--input
                        v-model="dataForm.money2"
                        border="none"
            placeholder="请输入外购煤收入"
                    ></u--input>
                </u-form-item>
        <view class="bigMoney">大写:{{smallToBig(dataForm.money2)}}</view>
        <u-form-item
            label="收款金额"
            prop="money"
            borderBottom
            ref="item1"
        >
          <u--input
              v-model="money"
              border="none"
              disabled
          ></u--input>
        </u-form-item>
        <view class="bigMoney">大写:{{smallToBig(money)}}</view>
                <u-form-item
                        label="收款类型"
                        prop="payName"
                        borderBottom
                        ref="item1"
            @click="showPayType='true'"
                >
                    <u--input
                        v-model="dataForm.payName"
                        border="none"
            placeholder="请选择收款类型"
            readonly
                    ></u--input>
                </u-form-item>
                <u-form-item
            labelWidth = "22vw"
                        label="财务票据编号"
                        prop="financialBillCode"
                        borderBottom
                        ref="item1"
                >
                    <u--input
                        v-model="dataForm.financialBillCode"
                        border="none"
            placeholder="请输入财务票据编号"
                    ></u--input>
                </u-form-item>
                <u-form-item
                        label="备注"
                        prop="remark"
                        borderBottom
                        ref="item1"
                >
                    <u--input
                        v-model="dataForm.remark"
                        border="none"
            placeholder="备注"
                    ></u--input>
                </u-form-item>
        <u-form-item
            label="不同步NC"
            prop="checkBoxSendNC"
            borderBottom
            ref="item1"
        >
          <u-checkbox-group
              placement="column"
              @change="checkboxChangeNC"
              v-model="checkBoxSendNC"
          >
            <u-checkbox
                name="NC"
                :customStyle="{marginBottom: '8px'}"
                :checked="checkboxNC"
            >
            </u-checkbox>
            <span>(选择后收款信息不会发送到NC系统)</span>
          </u-checkbox-group>
        </u-form-item>
        <u-form-item
            label="抵抹账"
            prop="checkBoxSendNC"
            borderBottom
            ref="item1"
        >
          <u-checkbox-group
              placement="column"
              @change="checkboxChangeDM"
              v-model="checkBoxDM"
          >
          <u-checkbox
              name="DM"
              :customStyle="{marginBottom: '8px'}"
              :checked="checkboxDM"
          >
          </u-checkbox>
            <span>(选择后收款信息不会发送到NC系统)</span>
          </u-checkbox-group>
        </u-form-item>
        <div class="submit-btn" v-if="!dataForm.id">
          <u-button @click="dataFormSubmit()" size="small" type="primary">确定</u-button>
        </div>
            </u--form>
            <!-- 账套选择 -->
            <u-action-sheet
                :show="showLedger"
                :actions="ledgerList"
                title="请选择账套"
                @close="showLedger = false"
                @select="ledgerSelect"
            >
            </u-action-sheet>
            <!-- 日期选择 -->
            <u-calendar :show="showCalendar" :mode="mode" @confirm="calendarConfirm" @close="showCalendar=false"></u-calendar>
      <!-- 选择客户弹框 -->
      <!--  @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
                      @click="
                                        selectCustomerCompShow = true;
                                    "
                      labelWidth="12%"
                      label="单位"
                      borderBottom
                      ref="compRef"
                  >
                    <u--input v-model="searchCustomerForm.compName" disabled disabledColor="#ffffff" placeholder="点击选择单位" border="none"></u--input>
                    <!--                                    <u-icon slot="right" name="close-circle-fill" @click="searchCustomerForm.compName = ''"></u-icon>-->
                  </u-form-item>
                  <u-form-item labelWidth="20%" label="客户名称" borderBottom ref="timeDataRef">
                    <u--input v-model="selectCustomerData.customerFullName" border="none" placeholder="输入客户名称"></u--input>
                    <u-icon slot="right" name="close-circle-fill" @click="selectCustomerData.customerFullName = ''"></u-icon>
                  </u-form-item>
                  <u-form-item
                      @click="
                                        selectLevelShow = true;
                                    "
                      labelWidth="20%"
                      label="客户级别"
                      borderBottom
                  >
                    <u--input border="none" v-model="searchCustomerForm.levelText" disabled disabledColor="#ffffff" placeholder="点击选择级别"></u--input>
                    <!--                                    <u-icon slot="right" name="close-circle-fill" @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">
                    <view slot="value" class="u-slot-value">
                      <button
                          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>
                    </view>
                  </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>
      <!-- 收款类型 -->
      <u-action-sheet
          :show="showPayType"
          :actions="payTypeList"
          title="请选择账套"
          @close="showPayType = false"
          @select="payTypeSelect"
      >
      </u-action-sheet>
    </view>
    </view>
</template>
<script>
    import combinationTitle from '@/components/common/combined-title/combined-title.vue';
  import {smallToBig} from "../../utils/smallToBig";
  export default{
        name: 'payment-form-data',
        components: {
            combinationTitle
        },
        data() {
            return {
                showLedger: false,  //账套选择框
                showCalendar: false, //日历选择框
        showPayType: false,  //收款类型弹框
        payTypeList:[
        ],
        // 选择单位
        selectCustomerShow: false, // 选择用户弹框
        selectCustomerActions: [],
        searchCustomerForm: {
          compName: '',
          levelText: ''
        },
        customerData: [],
        // 选择单位
        selectCustomerCompShow: false,
        // 选择客户
        selectCustomerData: {
          compIds: '',
          customerFullName: '',
          level: '',
          current: 1,
          size: 10
        },
        searchContractForm: {
          current: 1,
          size: 50,
          num: '',
          startDate: '',
          endDate: '',
          result: 2,
          type: '',
          customerName: ''
        },
        // 级别
        levelList: [
          { name: '一星级', value: 'A' },
          { name: '二星级', value: 'B' },
          { name: '三星级', value: 'C' },
          {
            name: '四星级',
            value: 'D'
          },
          { name: '五星级', value: 'E' }
        ],
        selectLevelShow: false,
        selCustomerType:null,  //是结算用户1还是用煤用户2
        customerDataAllNum: 0, //客户列表总条数
        accountDetails:{},
        contractNumList: [],
                mode: 'single',
                dataForm: {
                  id: '',
                  customerId: '',
                  financialBillCode: '',
                  payType: 0,
          payName:'',
                  inputDate: '',
                  leftMoney: '',
                  managePerson: '',
                  money: '',
                  money1:null,
                  money2:null,
                  number: '',
                  customerName: '',
                  oppaccount: '',
                  account: '',
                  remark: '',
                  sendNC: null,
                  ncSkUserId: null,
                  customerAddressName: null,
                  ledgerId: null,
          ledgerName:'', //账套名字
                  isDiZhang: null,
                },
        checkBoxSendNC:[],  //是否被选中
        checkBoxSendNameNC:'',  //是否被选中
        checkBoxNameDM:'',  //是否被选中
        checkBoxDM:[], //是否被选中
        checkboxNC:false,
        checkboxDM:false,
                ledgerList:[],
                rules: {
                    inputDate: [
                        {
                            required: true,
                            message: '请选择收款日期',
                            trigger: ['blur', 'change']
                        }
                    ],
                    customerName: [
                        {
                            required: true,
                            message: '请填写客户名称',
                            trigger: ['blur', 'change']
                        }
                    ],
                    customerAddressName: [
                        {
                            required: true,
                            message: '请选择用煤客户',
                            trigger: ['blur', 'change']
                        }
                    ],
                    money: [
                        {
                            required: true,
                            message: '请填写收款金额',
                            trigger: ['blur', 'change']
                        }
                    ]
                }
            }
        },
        onShow() {
            this.init()
        },
    computed: {
      money() {
        if(this.dataForm.money1||this.dataForm.money2) {
          this.dataForm.money = parseFloat(Number(this.dataForm.money1)+Number(this.dataForm.money2)).toFixed(2);
        }
        return this.dataForm.money;
      }
    },
    onLoad(e) {
      this.dataForm.id = e.id || 0
    },
        methods:{
      smallToBig,
      checkboxChangeNC(n) {
      },
      checkboxChangeDM(n) {
      },
            init() {
        this.payType()  //收款类型
                //账套选择
                let compId = uni.getStorageSync('userInfo').compId;
                this.$reqGet('getLedgerList',{compId:compId}).then(res => {
                    this.ledgerList = res?.data?.records?.map(e => {
                        return {
                            ledgerId: e.id,
              name: e.name
                        }
                    })
                })
        this.$nextTick(() => {
          this.$refs.dataForm.resetFields()
          if(this.dataForm.id) { //修改
            this.$reqGet('getObj',{},this.dataForm.id).then(res => {
              this.dataForm = res.data
              this.payTypeList.forEach(item => {
                if(item.value == this.dataForm.payType) {
                  this.dataForm.payName = item.name
                }
              })
              // if(this.dataForm.payType)
              // this.dataForm.payName =
              if(this.dataForm.sendNC == 0) {
                this.checkboxNC = true
              }else {
                this.checkboxNC = false
              }
              if(this.dataForm.isDiZhang) {
                this.checkboxDM = true
              }else {
                this.checkboxDM = false
              }
            })
          }else { //新增
          }
        })
            },
      getSKUser() { //详情接口
        this.$reqGet('getListByComp',{ledgerId:this.dataForm.ledgerId}).then(res => {
        })
      },
      payType() {  //收款类型
        this.$reqGet('pay_type').then(res => {
          this.payTypeList = res?.data?.map(item => {
            return {
              name: item.label,
              value: item.value
            }
          })
        })
      },
            //选择账套下拉菜单
            ledgerSelect(e) {
                this.dataForm.ledgerId = e.ledgerId
                this.dataForm.ledgerName = e.name
                this.$refs.dataForm.validateField('ledgerId')
            },
            calendarConfirm(e) {  //日历确认按钮
        this.showCalendar = false
                this.dataForm.inputDate = e[0]
            },
      payTypeSelect(e) {  //收款类型
        this.dataForm.payName = e.name
        this.dataForm.payType = e.value
      },
      /**客户弹框*/
      // 选择客户
      handleCustomerNameOpen(t) { //打开客户
        this.selCustomerType = t
        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;
          }
        });
      },
      selectCustomerOkClick(v) {
        this.dataForm.customerId = v.id;
        if(this.selCustomerType == 2){
          this.dataForm.customerAddressName = v.customerFullName;  //用煤客户
        }else {
          this.dataForm.customerName = v.customerFullName;
          this.dataForm.customerId = v.id;
        }
        this.$nextTick(() => {
          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);
            });
          }
        });
      },
      // 清空选择客户表单
      selectCustomerResetFields() {
        this.$refs.selectformRef.resetFields(); // 不起效果
        this.selectCustomerData.customerFullName = '';
        this.searchCustomerForm.compName = '';
        this.searchCustomerForm.levelText = '';
        this.selectCustomer();
      },
      selectCustomerOpen() {
      },
      selectCustomerClose() {
        this.selectCustomerShow = false;
      },
      // 客户选择框单位选择菜单
      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;
      },
      dataFormSubmit() { //提交表单
        this.$refs.dataForm.validate().then(e => {
          if (this.checkBoxSendNC.length > 0) {
            this.dataForm.sendNC = "0"
          } else {
            this.dataForm.sendNC = null;
          }
          if (this.checkBoxDM.length > 0) {
            this.dataForm.isDiZhang = 1;
          } else {
            this.dataForm.isDiZhang = null;
          }
          uni.showLoading({
            title: '加载中...'
          });
          if(this.dataForm.id) {
            this.$reqPut('putObj',this.dataForm).then(res => {
            })
          }else {
            this.$reqPost('addObj',this.dataForm).then(res => {
              uni.hideLoading();
              this.$u.toast('添加成功,即将返回申请页!!!');
              setTimeout(() => {
                uni.navigateBack({
                  // url: '/pages/my-application/my-application'
                  delta: 2
                });
              }, 1500);
            })
          }
        })
      }
        },
        onReady() {
            this.$refs.dataForm.setRules(this.rules)
        }
    }
</script>
<style lang="scss" scoped>
    .payment-form-data-wrap{
        width: 100%;
        padding: 0 vww(10);
        box-sizing: border-box;
    // 选择客户弹框
    .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 {
                .u-input {
                  width: 90%;
                }
              }
              .searchCustomerBtn {
                margin-top: vww(10);
                display: flex;
                .u-button {
                  width: 30%;
                }
              }
              // 数据列表
              .searchResultList {
                margin-top: vww(16);
              }
              // 滚动通知
              .tapStyle{
                margin-top: vww(30);
              }
              // 合同表格
              .tableContract {
                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%;
                  .contractTableTd {
                    width: vww(200);
                    white-space: nowrap;
                    text-overflow: ellipsis;
                    overflow: hidden;
                  }
                }
                .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;
                  }
                }
              }
            }
          }
        }
      }
    }
    .submit-btn{
      width: 60%;
      position: fixed;
      bottom: vww(40);
      left: 50%;
      transform: translateX(-50%);
    }
    ::v-deep{
      .u-checkbox-group{
        display: flex;
        flex-direction: row!important;
        align-items: center!important;
      }
    }
    .bigMoney{
      font-size: vww(12);
      color: #222222;
      margin-left: vww(80);
    }
    }
</style>
utils/api.js
@@ -26,6 +26,15 @@
        name: 'pig',
        mehtod: 'GET'
    },
    //新增收款明细
    //账套接口查询
    getLedgerList: {
        url: '/yunxiao/zhaccountledger/page',
        name: 'pig',
        mehtod: 'GET'
    },
    // 操作人员
    operator: {
        url: '/admin/dict/type/operator',
@@ -78,7 +87,7 @@
    /**
     * @选择客户
     */
     */
    // 搜索
    customer: {
        url: '/yunxiao/customer/page',
@@ -211,6 +220,24 @@
    coalbunker: {
        url: '/yunxiao/coalbunker/page',
        method: 'GET'
    },
    //新增收款明细
    addObj: {
        url: '/yunxiao/gatheringbill',
        method: 'post',
    },
    putObj: {
        url: '/yunxiao/gatheringbill',
        method: 'PUT',
    },
    //收款明细详情
    getObj: {
        url: '/yunxiao/gatheringbill',
        method: 'GET',
    },
    getListByComp: {
        url: '/yunxiao/jcncskuser/getListByComp',
        method: 'GET',
    }
}
utils/request.js
@@ -82,12 +82,12 @@
    500: responseError
}
// let BaseUrl = 'http://192.168.3.159:9999';
 let BaseUrl = 'http://192.168.0.159:9999';
// const BaseUrl = 'https://mx.jzeg.cn:443/app';
// let BaseUrl = 'http://192.168.0.114:9999';
// const BaseUrl = 'http://192.168.0.102:9999'; // 飞哥
const BaseUrl = "https://mx.jzeg.cn:9998"; // 正式服务
//const BaseUrl = "https://mx.jzeg.cn:9998"; // 正式服务
// 请求拦截
const fetch = (url, opt, urlParam) => {
utils/smallToBig.js
New file
@@ -0,0 +1,87 @@
export const smallToBig = (money) => {
    //  将数字金额转换为大写金额
    var cnNums = new Array(
        "零",
        "壹",
        "贰",
        "叁",
        "肆",
        "伍",
        "陆",
        "柒",
        "捌",
        "玖"
    ); //汉字的数字
    var cnIntRadice = new Array("", "拾", "佰", "仟"); //基本单位
    var cnIntUnits = new Array("", "万", "亿", "兆"); //对应整数部分扩展单位
    var cnDecUnits = new Array("角", "分", "毫", "厘"); //对应小数部分单位
    var cnInteger = "整"; //整数金额时后面跟的字符
    var cnIntLast = "元"; //整数完以后的单位
    //最大处理的数字
    var maxNum = 999999999999999.9999;
    var integerNum; //金额整数部分
    var decimalNum; //金额小数部分
    //输出的中文金额字符串
    var chineseStr = "";
    var parts; //分离金额后用的数组,预定义
    if (money == null || money == "") {
        return "";
    }
    money = parseFloat(money);
    if (money >= maxNum) {
        //超出最大处理数字
        return "超出最大处理数字";
    }
    if (money == 0) {
        chineseStr = cnNums[0] + cnIntLast + cnInteger;
        return chineseStr;
    }
    //四舍五入保留两位小数,转换为字符串
    money = Math.round(money * 100).toString();
    integerNum = money.substr(0, money.length - 2);
    decimalNum = money.substr(money.length - 2);
    //获取整型部分转换
    if (parseInt(integerNum, 10) > 0) {
        var zeroCount = 0;
        var IntLen = integerNum.length;
        for (var i = 0; i < IntLen; i++) {
            var n = integerNum.substr(i, 1);
            var p = IntLen - i - 1;
            var q = p / 4;
            var m = p % 4;
            if (n == "0") {
                zeroCount++;
            } else {
                if (zeroCount > 0) {
                    chineseStr += cnNums[0];
                }
                //归零
                zeroCount = 0;
                chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
            }
            if (m == 0 && zeroCount < 4) {
                chineseStr += cnIntUnits[q];
            }
        }
        chineseStr += cnIntLast;
    }
    //小数部分
    if (decimalNum != "") {
        var decLen = decimalNum.length;
        for (var i = 0; i < decLen; i++) {
            var n = decimalNum.substr(i, 1);
            if (n != "0") {
                chineseStr += cnNums[Number(n)] + cnDecUnits[i];
            }
        }
    }
    if (chineseStr == "") {
        chineseStr += cnNums[0] + cnIntLast + cnInteger;
    } else if (decimalNum == "" || /^0*$/.test(decimalNum)) {
        chineseStr += cnInteger;
    }
    return chineseStr;
}