| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450 | 
							- <template>
 
-     <div>
 
-         <div class="received-all">
 
-             <div class="received-head">
 
-                 <div class="received-head-li">
 
-                     <label>团组名称:</label>
 
-                     <el-select style="width: 250px;" @change="changediid()" v-model="value" filterable placeholder="请选择">
 
-                         <el-option
 
-                         v-for="item in options"
 
-                         :key="item.id"
 
-                         :label="item.groupName"
 
-                         :value="item.id">
 
-                         </el-option>
 
-                     </el-select>
 
-                 </div>
 
-                 <div class="received-head-li">
 
-                     <el-button @click="ysSaveition()" type="primary">保存数据</el-button>
 
-                 </div>
 
-             </div>
 
-             <div class="received-info">
 
-                 <div class="received-info-li">
 
-                     <label>团 号:</label>
 
-                     <span v-if="this.groupInfo.tourCode!=''">{{groupInfo=={}?'暂无':groupInfo.tourCode==""?'暂无':groupInfo.tourCode}}</span>
 
-                     <!-- <span>{{groupInfo?'暂无':groupInfo.tourCode}}</span> -->
 
-                 </div>
 
-                 <div class="received-info-li">
 
-                     <label>客 户:</label>
 
-                     <span>{{groupInfo=={}?'暂无':groupInfo.clientName==""?'暂无':groupInfo.clientName}}</span>
 
-                 </div>
 
-                 <div class="received-info-li">
 
-                     <label>出访国家:</label>
 
-                     <span>{{groupInfo=={}?'暂无':groupInfo.visitCountry==""?'暂无':groupInfo.visitCountry}}</span>
 
-                 </div>
 
-                 <div class="received-info-li">
 
-                     <label>起止日期:</label>
 
-                     <span>{{groupInfo.visitStartDate|filter_time}}~{{groupInfo.visitEndDate|filter_time}}</span>
 
-                 </div>
 
-                 <div class="received-info-li">
 
-                     <label>天数/人数:</label>
 
-                     <span>{{groupInfo=={}?'暂无':groupInfo.visitDays+'天/'+groupInfo.visitPNumber+'人'}}</span>
 
-                 </div>
 
-             </div>
 
-             <div class="received-checked">
 
-                 <div class="received-checked-label">已收款项</div>
 
-                 <el-button size="mini" @click="addUnassignedData()" type="primary">添加一行</el-button>
 
-             </div>
 
-             <div class="received-form">
 
-                 <el-table
 
-                 :border="true"
 
-                 ref="multipleTable"
 
-                 :data="UnassignedData"
 
-                 tooltip-effect="dark"
 
-                 style="width: 100%"
 
-                 >
 
-                     <el-table-column
 
-                     label="付款时间"
 
-                     width="155">
 
-                         <template slot-scope="scope">
 
-                             <el-date-picker
 
-                             style="width: 100%;"
 
-                             v-model="scope.row.sectionTime"
 
-                             type="date"
 
-                             placeholder="选择日期">
 
-                             </el-date-picker>
 
-                             <!-- <el-input v-model="scope.row.sectionTime"></el-input> -->
 
-                         </template>
 
-                     </el-table-column>
 
-                     <el-table-column
 
-                         label="付款方信息"
 
-                         >
 
-                         <template slot-scope="scope">
 
-                             <el-input v-model="scope.row.client"></el-input>
 
-                         </template>
 
-                     </el-table-column>
 
-                     <el-table-column
 
-                         label="付款方电话"
 
-                         width="150">
 
-                         <template slot-scope="scope">
 
-                             <el-input v-model="scope.row.customerTel"></el-input>
 
-                         </template>
 
-                     </el-table-column>
 
-                     <el-table-column
 
-                         label="已收金额"
 
-                         width="120">
 
-                         <template slot-scope="scope">
 
-                             <el-input-number :controls="false" :precision="2" v-model="scope.row.price"></el-input-number>
 
-                         </template>
 
-                     </el-table-column>
 
-                     <el-table-column
 
-                         label="到款时间"
 
-                         width="155">
 
-                         <template slot-scope="scope">
 
-                             <el-date-picker
 
-                             style="width: 100%;"
 
-                             v-model="scope.row.customerName"
 
-                             type="date"
 
-                             placeholder="选择日期">
 
-                             </el-date-picker>
 
-                             <!-- <el-input v-model="scope.row.customerName"></el-input> -->
 
-                         </template>
 
-                     </el-table-column>
 
-                     <el-table-column
 
-                         label="币种"
 
-                         width="100">
 
-                         <template slot-scope="scope">
 
-                             <el-select v-model="scope.row.currency">
 
-                                 <el-option
 
-                                         v-for="item in currencyoptions"
 
-                                         :key="item.id"
 
-                                         :label="item.name"
 
-                                         :value="item.id">
 
-                                 </el-option>
 
-                             </el-select>
 
-                         </template>
 
-                     </el-table-column>
 
-                     <el-table-column
 
-                         label="收款类型"
 
-                         width="140">
 
-                         <template slot-scope="scope">
 
-                             <el-select v-model="scope.row.receivablesType">
 
-                                 <el-option
 
-                                         v-for="item in typeoptions"
 
-                                         :key="item.id"
 
-                                         :label="item.name"
 
-                                         :value="item.id">
 
-                                 </el-option>
 
-                             </el-select>
 
-                         </template>
 
-                     </el-table-column>
 
-                     <el-table-column
 
-                         label="备注"
 
-                         width="260">
 
-                         <template slot-scope="scope">
 
-                             <el-input v-model="scope.row.remark"></el-input>
 
-                         </template>
 
-                     </el-table-column>
 
-                     <el-table-column
 
-                         label="操作"
 
-                         width="80">
 
-                         <template slot-scope="scope">
 
-                             <el-button
 
-                             size="mini"
 
-                             type="danger"
 
-                             @click="yshandleDelete(scope.$index, scope.row,UnassignedData)"><i class="el-icon-delete"></i></el-button>
 
-                         </template>
 
-                     </el-table-column>
 
-                 </el-table>
 
-             </div>
 
-         </div>
 
-     </div>
 
- </template>
 
- <script>
 
- export default {
 
-     data() {
 
-         return {
 
-             userid:'',
 
-             value:'',
 
-             options:[],
 
-             currencyoptions:[],
 
-             UnassignedData:[
 
-                 {
 
-                     sectionTime:'',
 
-                     client:'',
 
-                     price:'',
 
-                     customerName:'',
 
-                     currency:'',
 
-                     receivablesType:'',
 
-                     remark:""
 
-                 }
 
-             ],
 
-             typeoptions:[],
 
-             groupInfo:{
 
-                 clientName:'',
 
-                 id:'',
 
-                 tourCode:'',
 
-                 visitCountry:'',
 
-                 visitDays:'',
 
-                 visitEndDate:'',
 
-                 visitPNumber:'',
 
-                 visitStartDate:'',
 
-             },
 
-         }
 
-     },
 
-     methods:{
 
-         //获取团组
 
-         GetForeignReceivablesDataSources(){
 
-             var url = "/api/Financial/GetForeignReceivablesDataSources"
 
-             var that = this
 
-             this.$axios({
 
-                 method: 'post',
 
-                 url: url,
 
-                 headers: {
 
-                     Authorization: 'Bearer ' + that.userid
 
-                 },
 
-             }).then(function (res) {
 
-                 console.log(res)
 
-                 if(res.data.code==200){
 
-                     that.options=res.data.data.groupNameData;
 
-                     that.currencyoptions=res.data.data.currencyData;
 
-                     that.typeoptions=res.data.data.remittanceMethodData;
 
-                     that.value=res.data.data.groupNameData[0].id;
 
-                     that.PostAmountReceived();
 
-                 }
 
-             })
 
-         },
 
-         //获取账单详情
 
-         PostAmountReceived(){
 
-             var url = "/api/Financial/PostAmountReceived"
 
-             var that = this
 
-             this.$axios({
 
-                 method: 'post',
 
-                 url: url,
 
-                 headers: {
 
-                     Authorization: 'Bearer ' + that.userid
 
-                 },
 
-                 data:{
 
-                     portType: 1,
 
-                     diId: that.value
 
-                 }
 
-             }).then(function (res) {
 
-                 console.log(res)
 
-                 that.UnassignedData=res.data.data
 
-                 that.groupInfo=res.data.data.groupInfo
 
-                 that.PostShareGroupInfo();
 
-             })
 
-         },
 
-         //获取团组详情
 
-         PostShareGroupInfo(){
 
-             console.log(this.value)
 
-             var url = "/api/Business/PostShareGroupInfo"
 
-             var that = this
 
-             this.$axios({
 
-                 method: 'post',
 
-                 url: url,
 
-                 headers: {
 
-                     Authorization: 'Bearer ' + that.userid
 
-                 },
 
-                 data:{
 
-                     portType: 1,
 
-                     id: that.value
 
-                 }
 
-             }).then(function (res) {
 
-                 console.log(res)
 
-                 // that.UnassignedData=res.data.data
 
-                 that.groupInfo=res.data.data
 
-                 console.log(that.groupInfo)
 
-             })
 
-         },
 
-         //切换团组
 
-         changediid(){
 
-             this.PostAmountReceived()
 
-         },
 
-         //已收款项删除
 
-         yshandleDelete(index, row,rows) {
 
-             this.$confirm('此操作将删除此条数据,是否确认删除?', '提示', {
 
-                 confirmButtonText: '确定',
 
-                 cancelButtonText: '取消',
 
-                 type: 'warning'
 
-             }).then(() => {
 
-                 var url = "/api/Financial/PostAmountReceived_Del"
 
-                 var that = this
 
-                 this.$axios({
 
-                     method: 'post',
 
-                     url: url,
 
-                     headers: {
 
-                         Authorization: 'Bearer ' + this.token
 
-                     },
 
-                     data:{
 
-                         userId:that.userid,
 
-                         id:row.id
 
-                     }
 
-                 }).then(function (res) {
 
-                     if(res.data.code==200){
 
-                         that.$message({
 
-                             message: res.data.msg,
 
-                             type: 'success'
 
-                         });
 
-                         rows.splice(index, 1);
 
-                     }else{
 
-                         that.$message.error('删除失败!数据异常');
 
-                     }
 
-                 })
 
-             })
 
-         },
 
-         //添加一行
 
-         addUnassignedData(){
 
-             var newinif={
 
-                 id: 0,
 
-                 sectionTime: "",//费用名称
 
-                 price: 0,//费用
 
-                 currency:836,//币种
 
-                 receivablesType:72,//收款类型
 
-                 client:'',//收款单位
 
-                 customerName:'',//收款单位 负责人 姓名
 
-                 customerTel:'',//收款单位 负责人 电话号码
 
-                 remark:""//备注
 
-             }
 
-             var url = "/api/Financial/PostAmountReceivedAddOrEdit"
 
-             var that = this
 
-             this.$axios({
 
-                 method: 'post',
 
-                 url: url,
 
-                 headers: {
 
-                     Authorization: 'Bearer ' + this.token
 
-                 },
 
-                 data:{
 
-                     portType: 1,
 
-                     diId: that.value,
 
-                     userId:that.userid,
 
-                     _ProceedsReceivedInfos:[newinif]
 
-                 }
 
-             }).then(function (res) {
 
-                 if(res.data.code==200){
 
-                     that.$message({
 
-                         message: res.data.msg,
 
-                         type: 'success'
 
-                     });
 
-                     console.log(res)
 
-                     that.PostAmountReceived()
 
-                 }else{
 
-                     that.$message.error('添加失败!数据异常');
 
-                 }
 
-             })
 
-         },
 
-         //保存已收款项
 
-         ysSaveition(){
 
-             console.log(this.UnassignedData)
 
-             //提取参数
 
-             var arrnew = this.UnassignedData.map((item,index) => {
 
-                 return Object.assign({},{
 
-                     'id':item.id,
 
-                     'sectionTime':item.sectionTime,
 
-                     'price':item.price,
 
-                     'currency':item.currency,
 
-                     'receivablesType':item.receivablesType,
 
-                     'client':item.client,
 
-                     'customerName':item.customerName,
 
-                     'customerTel':item.customerTel,
 
-                     'remark':item.remark,
 
-                 })
 
-             })
 
-             console.log(arrnew)
 
-             var Savedecides=true
 
-             for(let g=0;g<arrnew.length;g++){
 
-                 if(arrnew[g].count==""||arrnew[g].currency==""||arrnew[g].itemSumPrice==""||arrnew[g].price==""||arrnew[g].priceName==""||arrnew[g].rate==""||arrnew[g].unit==""){
 
-                     Savedecides=false
 
-                     break
 
-                 }
 
-             }
 
-             if(Savedecides==true){
 
-                 var url = "/api/Financial/PostAmountReceivedAddOrEdit"
 
-                 var that = this
 
-                 this.$axios({
 
-                     method: 'post',
 
-                     url: url,
 
-                     headers: {
 
-                         Authorization: 'Bearer ' + this.token
 
-                     },
 
-                     data:{
 
-                         portType: 1,
 
-                         diId: that.value,
 
-                         userId:that.userid,
 
-                         _ProceedsReceivedInfos:arrnew
 
-                     }
 
-                 }).then(function (res) {
 
-                     if(res.data.code==200){
 
-                         that.$message({
 
-                             message: res.data.msg,
 
-                             type: 'success'
 
-                         });
 
-                         console.log(res)
 
-                         that.PostAmountReceived()
 
-                     }else{
 
-                         that.$message.error('保存失败!数据异常');
 
-                     }
 
-                 })
 
-             }else{
 
-                 this.$message.error('请检查数据是否完整!');
 
-             }
 
-         },
 
-     },
 
-     mounted(){
 
-         this.userid=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
 
-         this.GetForeignReceivablesDataSources()
 
-     },
 
-     filters:{
 
-         filter_time(value){
 
-             if(value){
 
-                 return value.split(' ')[0];
 
-             }
 
-             return value
 
-             
 
-         },
 
-         filter_city(value){
 
-             return value
 
-         }
 
-     },
 
- }
 
- </script>
 
- <style>
 
- .received-all{
 
-     background-color: #fff;
 
-     padding: 10px;
 
-     box-shadow: 0 0 5px #0005;
 
-     border-radius: 10px;
 
-     height: 100%;
 
-     min-height: 840px;
 
- }
 
- .received-head-li label{
 
-     color: #606266;
 
-     font-size: 15px;
 
-     font-weight: 600;
 
- }
 
- .received-head{
 
-     display: flex;
 
-     justify-content: space-between;
 
- }
 
- .received-info{
 
-     display: flex;
 
-     margin-top: 10px;
 
- }
 
- .received-info-li{
 
-     margin-right: 30px;
 
- }
 
- .received-info-li label{
 
-     color: #606266;
 
-     font-size: 15px;
 
-     font-weight: 600;
 
- }
 
- .received-info-li span{
 
-     color: #606266;
 
-     font-size: 14px;
 
- }
 
- .received-all .el-input-number{
 
-     width: 100%;
 
- }
 
- .received-checked{
 
-     margin-top: 10px;
 
-     display: flex;
 
-     align-items: center;
 
-     justify-content: space-between;
 
- }
 
- .received-checked-label{
 
-     font-size: 17px;
 
-     
 
- }
 
- .received-form{
 
-     margin-top: 10px;
 
- }
 
- </style>
 
 
  |