wangxiaogang 3 gadi atpakaļ
vecāks
revīzija
2a84dbe93c

+ 5 - 1
src/components/citySelect.vue

@@ -2,7 +2,11 @@
   <div class="citySelect" ref="citySelect">
      <header>
         <ul>
-          <li v-for="(item,i) in selectCitys" :key="item.id"><span>{{item.name}}</span><Icon type="md-close" @click="deleteCity(item,i)" /></li>
+          <li v-for="(item,i) in selectCitys" :key="item.id">
+            <span>{{item.name}}</span>
+            <Icon type="md-close" v-if="stopCheck" />
+            <Icon type="md-close" @click="deleteCity(item,i)" v-else />
+          </li>
         </ul>
      </header>
       <div class="citySelectList">

+ 13 - 4
src/components/tableLists.vue

@@ -149,18 +149,24 @@
                         const arr1 = []
                         r.data.lists.forEach(v => {
                             let source = JSON.parse(v.filter).source
+                            if (v.order_status == -2) {
+                                v._disabled = true
+                            }
                             if (source && source == 'qmx') {// 线下
-                                if (v.return_status == 1) {
+                                if (v.return_status == 1 || v.order_status == -2) {
                                     v._disabled = true
                                 } else {
                                     v._disabled = false
                                 }
                             } else {// 线上
-                                if (v.return_status == 1) {
+                                if (v.return_status == 1 || v.order_status == -2) {
                                     v._disabled = true
                                 } else {
                                     if ((v.pay_way == 'transferAccounts' || v.pay_way == '对公转账') && v.course_status == 4) {
                                         v._disabled = false
+                                        if (v.order_status == -2) {
+                                            v._disabled = true
+                                        }
                                     } else {
                                         v._disabled = true
                                     }
@@ -195,17 +201,20 @@
                         r.data.lists.forEach(v => {
                             let source = JSON.parse(v.filter).source
                             if (source && source == 'qmx') {// 线下
-                                if (v.return_status == 1) {
+                                if (v.return_status == 1 || v.order_status == -2) {
                                     v._disabled = true
                                 } else {
                                     v._disabled = false
                                 }
                             } else {// 线上
-                                if (v.return_status == 1) {
+                                if (v.return_status == 1 || v.order_status == -2) {
                                     v._disabled = true
                                 } else {
                                     if ((v.pay_way == 'transferAccounts' || v.pay_way == '对公转账') && v.course_status == 4) {
                                         v._disabled = false
+                                        if (v.order_status == -2) {
+                                            v._disabled = true
+                                        }
                                     } else {
                                         v._disabled = true
                                     }

+ 141 - 119
src/views/order/components/batchOrder.vue

@@ -33,7 +33,11 @@
             <DatePicker type="datetime" v-model="returnCash.returnTime" format="yyyy-MM-dd HH:mm:ss" :readonly="!returnCash.flowType&&returnCash.payType=='3'"></DatePicker>
           </FormItem>
           <FormItem label="流水金额(元)" prop="serialCash">
-            <Input v-model="returnCash.serialCash" :readonly="!returnCash.flowType&&returnCash.payType=='3'"></Input>
+            <Input
+              v-model="returnCash.serialCash"
+              @on-keyup="returnCash.serialCash=conHandler(returnCash.serialCash)"
+              :readonly="!returnCash.flowType&&returnCash.payType=='3'"
+            ></Input>
           </FormItem>
           <FormItem label="支付凭证" prop="">
             <b-upload 
@@ -100,7 +104,6 @@ export default {
   props: {
     selectData: {},
     status: Boolean,
-    type: String,
     bookLevel: String
   },
   components: {
@@ -110,12 +113,12 @@ export default {
     'returnCash.serialCash': {
       handler() {
         this.selectData.forEach((v, i) => {
-          if (this.returnCash.serialCash) {
-            v._readonly = false
+          if (this.returnCash.serialCash && this.returnCash.flowType) {
+            // v._readonly = false
             // this.$set(v, i, false)
           } else {
-            v._readonly = true
-            v.monery = ''
+            // v._readonly = true
+            // v.monery = ''
             // this.$set(v, i, true)
           }
         })
@@ -123,6 +126,9 @@ export default {
     }
   },
   methods: {
+    conHandler(val) {
+      return val.match(/\d+(\.\d{0,2})?/) ? val.match(/\d+(\.\d{0,2})?/)[0] : ''
+    },
     payTypeChange(val){
       if (val !== '3') {
         this.returnCash.flowType = true
@@ -148,6 +154,7 @@ export default {
           returnVoucherUrl: '',
           remark: ''
         }
+        this.surplusData()
       }
     },
     fixedNum(val) {
@@ -165,27 +172,19 @@ export default {
       })
     },
     init() {
-      if (this.type == 'single') {
-        this.selectName = this.selectData.company_name
-        this.selectId = this.selectData.id
-        this.selectOrderId.push({
-          orderId: this.selectData.id
-        })
-      } else {
-        const arr1 = [], arr2 = [], arr3 = []
-        this.selectData.forEach(v => {
-          if (v.company_name || v.id) {
-            arr1.push(v.company_name) 
-            arr2.push(v.id) 
-            arr3.push({
-              orderId: v.id
-            }) 
-          }
-        })
-        this.selectName = arr1[0]
-        this.selectId = arr2
-        this.selectOrderId = arr3
-      }
+      const arr1 = [], arr2 = [], arr3 = []
+      this.selectData.forEach(v => {
+        if (v.company_name || v.id) {
+          arr1.push(v.company_name) 
+          arr2.push(v.id) 
+          arr3.push({
+            orderId: v.id
+          }) 
+        }
+      })
+      this.selectName = arr1[0]
+      this.selectId = arr2
+      this.selectOrderId = arr3
     },
     localed(val) {
       return val.toLocaleString('zh', { style:'currency', currency:'CNY' })
@@ -199,6 +198,7 @@ export default {
       ).success((res) => {
         if (res.data) {
           this.allPrice = res.data.price
+          this.orderAtr = res.data.orderArr
           console.log(parseInt(this.huiIds.TRSBAL * 100), res.data.price)
           if (parseInt(this.huiIds.TRSBAL * 100) > res.data.price) {
             this.$Notice.warning({
@@ -208,56 +208,123 @@ export default {
             })
             return
           } else {
-            this.returnCash.serialNumber = this.huiIds.BNKFLW
-            this.returnCash.returnTime = String(this.huiIds.BNKTIM)
-            this.returnCash.returnBank = this.huiIds.BNKNAM
-            this.returnCash.serialCash = this.huiIds.TRSBAL
-            this.returnCash.payAccountName = this.huiIds.OTHNAM
-            this.returnCash.remark = this.huiIds.NUSAGE
-            setTimeout(() => {
-              this.hShow = false
-            }, 500)
-          }
-          if (this.type == 'single') {
-            if (this.returnCash.serialCash * 100 == res.data.price) {
-              this.selectData.monery = res.data.orderArr[0].money
-              this.selectData._readonly = true
-            } else if (this.returnCash.serialCash * 100 < res.data.price) {
-              this.selectData.monery = ''
-              this.selectData._readonly = false
+            console.log(this.huiIds)
+            if (!this.returnCash.flowType) {
+              this.returnCash.serialNumber = this.huiIds.BNKFLW
+              this.returnCash.returnTime = String(this.huiIds.BNKTIM)
+              this.returnCash.returnBank = this.huiIds.BNKNAM
+              this.returnCash.serialCash = this.huiIds.TRSBAL || 0
+              this.returnCash.payAccountName = this.huiIds.OTHNAM
+              this.returnCash.remark = this.huiIds.NUSAGE
+              setTimeout(() => {
+                this.hShow = false
+              }, 500)
             }
-          } else {
-            this.selectData.forEach((v, i) => {
-              res.data.orderArr.forEach(s => {
-                if (String(s.orderId) === String(v.id)) {
-                  v.no_return_monery = s.money / 100
-                }
-              })
-              if (parseInt(this.returnCash.serialCash * 100) == res.data.price) {
-                res.data.orderArr.forEach(s => {
-                  if (String(s.orderId) === String(v.id)) {
-                    console.log(s.money)
+          }
+          console.log(parseInt(this.returnCash.serialCash * 100), res.data.price)
+          let arrs = this.selectData.length
+          this.selectData.forEach((v, i) => {
+            res.data.orderArr.forEach(s => {
+              if (String(s.orderId) === String(v.id)) {
+                v.no_return_monery = s.money / 100
+                if (parseInt(this.returnCash.serialCash * 100) == res.data.price) {
+                  v._readonly = true
+                  if (this.selectData.length > 1 || this.selectData.length === 1) {
                     v.monery = ''
                     v.monery += (s.money / 100).toString()
+                    console.log(v.monery)
                   } else {
                     v.monery += ''
                   }
-                })
-                v._readonly = true
-              } else if (this.returnCash.serialCash * 100 < res.data.price) {
-                let arrs = this.selectData.length
-                v.monery = ''
-                if (this.selectData.length > 1 && arrs == i + 1) {
-                  v._readonly = true
-                } else {
-                  v._readonly = false
+                } else if (parseInt(this.returnCash.serialCash * 100) < res.data.price) {
+                  v.monery = ''
+                  console.log(this.returnCash.flowType)
+                  if (this.selectData.length > 1 && arrs == i + 1) {
+                    console.log('-0-0-')
+                    if (this.returnCash.flowType) {
+                      v._readonly = false
+                      this.$set(v, i, false)
+                    } else {
+                      v._readonly = true
+                    }
+                  } else {
+                  console.log(parseInt(this.returnCash.serialCash * 100), res.data.price)
+                    v._readonly = false
+                    this.$set(v, i, false)
+                  }
                 }
               }
+              
             })
-          }
+            
+          })
         }
       }).post()
     },
+    handleSummary ({ columns }) {
+      const sums = {}
+      columns.forEach((column, index) => {
+        const key = column.key
+        if (index === 0) {
+          sums[key] = {
+            key,
+            value: '总价'
+          }
+          return
+        }
+        console.log(this.selectData)
+        const values = this.selectData.map(item => Number(item[key]))
+        if (!values.every(value => isNaN(value))) {
+          const v = values.reduce((prev, curr) => {
+            const value = Number(curr)
+            if (!isNaN(value)) {
+                return prev + curr
+            } else {
+                return prev
+            }
+          }, 0)
+          sums[key] = {
+            key,
+            value: v
+          }
+        } else {
+          sums[key] = {
+            key,
+            value: ''
+          }
+        }
+      })
+      console.log(sums.monery.value)
+      this.selectData.forEach((v, i) => {
+        this.orderAtr.forEach(s => {
+          if (String(s.orderId) === String(v.id)) {
+            if (this.returnCash.flowType && (parseInt(this.returnCash.serialCash * 100) == this.allPrice)) {
+              v.monery = ''
+              v.monery += (s.money / 100).toString()
+              v._readonly = true
+              this.$set(v, i, true)
+              console.log(v.monery)
+            } else if (this.returnCash.flowType && (parseInt(this.returnCash.serialCash * 100) < this.allPrice)) {
+              v.monery = ''
+              v._readonly = false
+              this.$set(v, i, '')
+              console.log('ppppp')
+            }
+          }
+        })
+      })
+      // if (parseInt(this.returnCash.serialCash * 100) < this.allPrice || (this.returnCash.flowType && parseInt(this.returnCash.serialCash * 100) == this.allPrice)) {
+      if (parseInt(this.returnCash.serialCash * 100) < this.allPrice) {
+        console.log(this.returnCash.serialCash-sums.monery.value.toFixed(2))
+        setTimeout(() => {
+          let lastVal = document.getElementById('re-moey' + (this.selectData.length - 1))
+          lastVal.value = this.returnCash.serialCash - sums.monery.value.toFixed(2)
+          lastVal.setAttribute('readonly', true)
+        }, 0)
+        this.lastVal = sums.monery.value
+      }
+      return sums
+    },
     getData(val) {
       this.init()
       this.loading1 = true
@@ -414,47 +481,6 @@ export default {
           this.inited()
         }, 300)
       }
-    },
-    handleSummary ({ columns }) {
-      const sums = {}
-      columns.forEach((column, index) => {
-        const key = column.key
-        if (index === 0) {
-          sums[key] = {
-            key,
-            value: '总价'
-          }
-          return
-        }
-        const values = this.selectData.map(item => Number(item[key]))
-        if (!values.every(value => isNaN(value))) {
-          const v = values.reduce((prev, curr) => {
-            const value = Number(curr)
-            if (!isNaN(value)) {
-                return prev + curr
-            } else {
-                return prev
-            }
-          }, 0)
-          sums[key] = {
-            key,
-            value: v
-          }
-        } else {
-          sums[key] = {
-            key,
-            value: ''
-          }
-        }
-      })
-      if (this.returnCash.serialCash * 100 < this.allPrice || this.returnCash.serialCash * 100 == this.allPrice) {
-        setTimeout(() => {
-          let lastVal = document.getElementById('re-moey' + (this.selectData.length - 1))
-          lastVal.value = (this.returnCash.serialCash - sums.monery.value).toFixed(2)
-        }, 0)
-        this.lastVal = sums.monery.value
-      }
-      return sums
     }
   },
   data () {
@@ -475,8 +501,8 @@ export default {
     const validCash = (rule, value, callback) =>  {
       if (value == '') {
         callback(new Error('请输入流水金额'))
-      } if (this.returnCash.serialCash * 100 > this.allPrice) {
-        callback(new Error('流水金额不能大于未回款金额之和'))
+      } if (parseInt(this.returnCash.serialCash * 100) > this.allPrice) {
+        callback(new Error('流水金额不能大于未回款金额'))
       } else {
         callback()
       }
@@ -497,6 +523,7 @@ export default {
       selectName: [],
       selectList: [],
       huiIds: [],
+      orderAtr: [],
       allPrice: 0,
       returnCash: {
         flowType: false,
@@ -670,17 +697,12 @@ export default {
               },
               on:{
                 'on-change':(e) => {
-                  let arrs = this.selectData.length
-                  if (this.type == 'single') {
-                    this.selectData.monery = e.target.value
-                  } else {
-                    this.selectData.forEach((v, i) => {
-                      if (row.id == v.id) {
-                        v.monery = e.target.value
-                        this.$set(v, i, e.target.value)
-                      }
-                    })
-                  }
+                  this.selectData.forEach((v, i) => {
+                    if (row.id == v.id) {
+                      v.monery = e.target.value
+                      this.$set(v, i, e.target.value)
+                    }
+                  })
                 }
               }
             })

+ 7 - 48
src/views/order/components/bigOrderEdit.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="two-child">
-        <Modal title="编辑大会员订单" v-model="bShow" class-name="order-model" :mask-closable="false" @on-visible-change="visibleChange">
+        <Modal title="编辑大会员订单" v-model="bShow" class-name="order-model" :mask-closable="false">
             <Form ref="member" :model="member" :rules="ruleValidate" :show-message="false" :label-width="121">
                 <FormItem label="订单状态" prop="order_status">
                   <Select v-model="member.order_status" placeholder="请选择订单状态">
@@ -713,7 +713,7 @@ export default {
                         }
                     }
                     if (v.i_ispackage == 1) {
-                        let countStr = this.supplys.filter(s => { return Number(s.id) == v.id}).map(t => { return t.count })
+                        let countStr = this.supplys?this.supplys.filter(s => { return Number(s.id) == v.id}).map(t => { return t.count }):[]
                         this.pacData.push({
                             id: v.id,
                             s_name: v.s_name,
@@ -893,7 +893,7 @@ export default {
         },
         leChange(val) {// 会员套餐
             // this.initialized()
-            val = JSON.parse(val)
+            val = val ? JSON.parse(val) : ''
             // this.datas2 = []
             this.sArr = []
             this.combo_id = val
@@ -1497,7 +1497,7 @@ export default {
                     proceduresMoney: this.fixedNum(this.member.proceduresMoney),
                     companyName: this.member.companyName,
                     agreementStatus: this.member.agreementStatus =='0'||this.member.agreementStatus =='1'?this.member.agreementStatus:999,
-                    agreementTime: this.member.agreementStatus!==''?this.member.agreementTime:'',
+                    agreementTime: this.member.agreementStatus!==0?this.member.agreementTime:'',
                     agreementNumber: this.member.agreementStatus!==''?this.member.agreementNumber:'',
                     salesChannel: this.member.salesChannel,
                     orderChannel: this.member.orderChannel?this.member.orderChannel:'d01',
@@ -1530,7 +1530,7 @@ export default {
                     proceduresMoney: this.fixedNum(this.member.proceduresMoney),
                     companyName: this.member.companyName,
                     agreementStatus: this.member.agreementStatus =='0'||this.member.agreementStatus =='1'?this.member.agreementStatus:999,
-                    agreementTime: this.member.agreementStatus!==''?this.member.agreementTime:'',
+                    agreementTime: this.member.agreementStatus!==0?this.member.agreementTime:'',
                     agreementNumber: this.member.agreementStatus!==''?this.member.agreementNumber:'',
                     salesChannel: this.member.salesChannel,
                     orderChannel: this.member.orderChannel?this.member.orderChannel:'d01',
@@ -1561,7 +1561,7 @@ export default {
                     proceduresMoney: this.fixedNum(this.member.proceduresMoney),
                     companyName: this.member.companyName,
                     agreementStatus: this.member.agreementStatus =='0'||this.member.agreementStatus =='1'?this.member.agreementStatus:999,
-                    agreementTime: this.member.agreementStatus!==''?this.member.agreementTime:'',
+                    agreementTime: this.member.agreementStatus!==0?this.member.agreementTime:'',
                     agreementNumber: this.member.agreementStatus!==''?this.member.agreementNumber:'',
                     salesChannel: this.member.salesChannel,
                     orderChannel: this.member.orderChannel?this.member.orderChannel:'d01',
@@ -1581,47 +1581,6 @@ export default {
         ordCancel() {
             this.bShow = false
         },
-        visibleChange(val) {
-            // if (val == false) {
-            //     setTimeout(() => {
-            //         this.colr = ''
-            //         this.creAuth = ''
-            //         this.member.products = ''
-            //         this.member.phone = ''
-            //         this.member.salesperson = ''
-            //         this.member.billingMode = ''
-            //         this.member.level = ''
-            //         this.member.createType = ''
-            //         this.nums = ''
-            //         this.serData = []
-            //         this.spinShow = false
-            //         this.noPhone = false
-            //         this.noPass = false
-            //         this.pReadon = false
-            //         this.member.salesChannel = ''
-            //         this.member.orderChannel = 'd01'
-            //         this.member.paybackCompany = 'h01'
-            //         this.$refs.casRef.values = []
-            //         let sigs2 = this.$refs.sigleRef2
-            //         let sigs3 = this.$refs.casRef1
-            //         let sigs4 = this.$refs.casRef2
-            //         if (sigs2) {
-            //             this.$refs.sigleRef2.initd()
-            //         }
-            //         if (sigs3) {
-            //             this.$refs.casRef1.values = ['d01']
-            //         }
-            //         if (sigs4) {
-            //             this.$refs.casRef2.values = ['h01']
-            //         }
-            //         this.initialized()
-            //     },500)
-            // } else {
-            //     this.creAuth = ''
-            //     this.member.products = ''
-            //     this.isDisable = false
-            // }
-        },
         show(data) {
             const {contractRes,filterData,refundRes,res,returnInfo,returnRes } = data
             //产品类型
@@ -1704,7 +1663,7 @@ export default {
                 sums: (filterData.bigMoney + filterData.subMoney + filterData.supplyMoney)/100|| '0', //
                 agreementStatus: contractRes.contract_status+'', //
                 agreementTime: contractRes.contract_time?this.timeReg(contractRes.contract_time):'', //
-                agreementNumber: contractRes.contract_archive_num, //
+                agreementNumber: contractRes.contract_code, //
                 contractUrl: contractRes.contract_file_url, //
                 payMoney: res.pay_money/100, //
                 bigPayMoney: filterData.bigPayMoney / 100, //

+ 11 - 10
src/views/order/components/details.vue

@@ -7,7 +7,7 @@
                 <div class="classfity">
                     <span><p>订单编号:</p> {{orDetails?orDetails.order_code:'--'}}</span>
                     <span v-if="orDetails.product_type == '大会员-AI中标预测包'||orDetails.product_type == '大会员-招标文件解读'"><p>产品类型:</p>大会员-补充包</span>
-                    <span v-else><p>产品类型:</p>{{orDetails?orDetails.product_type:'--'}}</span>
+                    <span v-else><p>产品类型:</p>{{orDetails ? prosType(orDetails.product_type) : '--'}}</span>
                     <span v-if="orderType == 14&&orDetails.product_type=='广告'"><p>广告来源:</p>{{book?book.adSource:'--'}}</span>
                     <span v-if="book.source == 'qmx'||orderType == 3||orderType == 6||orderType == 7||orderType == 8||orderType == 9||orderType == 10||orderType == 15">
                         <p>销售人员:</p>
@@ -53,7 +53,7 @@
                     <span><p>订单时间:</p>{{orDetails?orDetails.create_time:'--'}}</span>
                     <span><p>录入时间:</p>{{orDetails?orDetails.entry_time?orDetails.entry_time:'--':'--'}}</span>
                     <span><p>审核状态:</p><i :class="orDetails.course_status | courseColr">{{orDetails.course_status | coursed}}</i></span>
-                    <span><p>订单状态:</p>{{orDetails.order_status | orderStatus}}</span>
+                    <span><p>订单状态:</p>{{orDetails.orderStatus | orderStatus}}</span>
                     <span><p>创建人:</p>{{orDetails.create_person || '--'}}</span>
                     <span><p>最近一次更新人:</p>{{orDetails.last_update_person || '--'}}</span>
                     <span><p>最近一次更新时间</p>{{orDetails.last_update_time || '--'}}</span>
@@ -544,7 +544,7 @@
                 type="success"
                 size="large"
                 @click="editOrder"
-                v-if="book.source == 'qmx' || (book.source !== 'qmx' && addDate7)"
+                v-if="(book.source == 'qmx' || (book.source !== 'qmx' && addDate7)) && (orDetails.order_status !== -2 && orDetails.order_status !== '已取消')"
             >编辑订单</Button>
             <Button
                 class="piao-btn"
@@ -559,7 +559,7 @@
                 type="success"
                 size="large"
                 disabled
-                v-if="returnCashStatus"
+                v-if="returnCashStatus || (orDetails.order_status == -2 || orDetails.order_status == '已取消')"
             >新增回款信息</Button>
             <Button class="piao-btn" type="success" size="large" @click="relation" v-else>新增回款信息</Button>
             <Button 
@@ -567,7 +567,7 @@
                 type="success" 
                 size="large"
                 disabled
-                v-if="orDetails.applybill_status == '已开具' || orDetails.order_status == '已取消' || orDetails.order_status == '待付款' || orDetails.order_status == '未支付'"
+                v-if="orDetails.applybill_status == '已开具' || (orDetails.order_status == -2 || orDetails.order_status == '已取消')"
             >线下开发票</Button>
             <Button class="ping-btn" type="success" size="large" @click="pushInvo" v-else>线下开发票</Button>
             <Button 
@@ -575,7 +575,7 @@
                 type="success" 
                 size="large"
                 @click="uploadP"
-                v-if="book.source == 'qmx'"
+                v-if="book.source == 'qmx' && (orDetails.order_status !== -2 && orDetails.order_status !== '已取消')"
             >上传合同</Button>
             <Button class="ping-btn" type="success" size="large" disabled v-else>上传合同</Button>
             <Button 
@@ -583,7 +583,7 @@
                 type="success" 
                 size="large" 
                 @click="downContract"
-                v-if="book.source == 'qmx'&&contractDis"
+                v-if="book.source == 'qmx'&&contractDis && (orDetails.order_status !== -2 && orDetails.order_status !== '已取消')"
             >下载合同</Button>
             <Button class="ping-btn" type="success" size="large" disabled v-else>下载合同</Button>
             <Button class="shen-btn" type="primary" size="large" @click="audited" v-if="courseDis">审核</Button>
@@ -601,12 +601,10 @@
             :isStatus="book.source"
             :payMoney="orDetails.pay_money"
         ></d-model>
-        <!-- 关联回款弹框 -->
-        <!-- <b-collect ref="batchModel" :selectName="orDetails.company_name" :selectData="orDetails.order_code" :status="true" @onChange="onChange"></b-collect> -->
         <!-- 发票编号弹框 -->
         <code-model ref="codeRef" :codeDetail="codeDetail"></code-model>
         <!-- 批量回款弹框 -->
-        <b-collect ref="batchModel" :selectData="[orDetails]" :bookLevel="book.level" @onChange="onChange" type="multiple"></b-collect>
+        <b-collect ref="batchModel" :selectData="[orDetails]" :bookLevel="book.level" @onChange="onChange"></b-collect>
         <online-order-edit ref="onlineOrderEdit"/>
         <otherOrderEdit ref="otherOrderEdit"/>
         <bigOrderEdit ref="bigOrderEdit"/>
@@ -1063,6 +1061,9 @@ export default {
                 }
             });
             console.log(id)
+        },
+        prosType(val) {
+            return val && val.indexOf('VIP订阅') > -1 ? val.replace('VIP订阅', '超级订阅') : val
         }
     },
     filters: {

+ 1 - 1
src/views/order/components/otherOrder.vue

@@ -769,7 +769,7 @@ export default {
               {v: '2', n: '结构化数据'},
               {v: '3', n: '企业商机管理'},
               {v: '4', n: '历史数据'},
-              {v: '5', n: 'VIP订阅'},
+              {v: '5', n: '超级订阅'},
               {v: '6', n: '线下课程培训'},
               {v: '7', n: '课程分销'},
               {v: '8', n: '标书制作'},

+ 37 - 21
src/views/order/components/otherOrderEdit.vue

@@ -4,9 +4,9 @@
           <Form ref="others" :model="others" :rules="ruleValidate" :show-message="false" :label-width="110">
               <FormItem label="订单状态" prop="order_status">
                 <Select v-model="others.order_status" placeholder="请选择订单状态">
-                  <Option value="0">未完成</Option>
-                  <Option value="1">已完成</Option>
-                  <Option value="-2">已取消</Option>
+                  <Option value="0" :disabled="noFinishDis">未完成</Option>
+                  <Option value="1" :disabled="finishDis">已完成</Option>
+                  <Option value="-2" :disabled="interested">已取消</Option>
                 </Select>
               </FormItem>
               <FormItem label="销售渠道" prop="salesChannel">
@@ -26,10 +26,11 @@
                     placeholder="请输入手机号"
                     @on-change="changeHandler" 
                     @on-keyup="pheHandler"
+                    :readonly="interested"
                   ></Input>
               </FormItem>
               <FormItem label="产品类型" prop="productType">
-                  <Select v-model="others.productType" placeholder="请选择产品类型" @on-change="goodChange">
+                  <Select v-model="others.productType" placeholder="请选择产品类型" @on-change="goodChange" :disabled="interested">
                       <Option v-for="item in otherPro" :value="item.v" :key="item.v">{{ item.n }}</Option>
                   </Select>
               </FormItem>
@@ -72,12 +73,12 @@
                       @on-keyup="others.cycleCount=others.cycleCount.replace(/[^\d]+/g,'')"
                       :maxlength="12"
                       placeholder="请输入有效周期"
-                      :disabled="others.vipType=='2'"
+                      :disabled="others.vipType=='2' || interested"
                       style="width:476px"
                     ></Input>
                 </FormItem>
                 <FormItem prop="cycleUnit" style="margin-left:10px">
-                    <Select v-model="others.cycleUnit" placeholder="请选择单位" :disabled="others.vipType=='2'" style="width:110px;">
+                    <Select v-model="others.cycleUnit" placeholder="请选择单位" :disabled="others.vipType=='2' || interested" style="width:110px;">
                       <Option v-for="item in unitOptions" :value="item.v" :key="item.v">{{ item.n }}</Option>
                     </Select>
                 </FormItem>
@@ -92,6 +93,7 @@
                         :overTime="0" 
                         class="no-pass"
                         :dateDis="others.vipType!=='0'"
+                        :readonly="interested"
                     ></date-sigle>
                     <Checkbox v-model="noPass" @on-change="noTchange" :disabled="others.vipType!=='0'">暂不开通</Checkbox >
                 </FormItem>
@@ -239,6 +241,18 @@ export default {
       citySelect,
       saleSelect
   },
+  computed: {
+    interested: function() {
+      console.log(this.others.vipStartTime.substr(0, 2))
+      if (this.others.vipStartTime == '2099-01-01' || this.others.vipStartTime.substr(0, 2) == '9') {
+        this.stopCheck = false
+        return false
+      } else {
+        // this.stopCheck = true
+        return true
+      }
+    }
+  },
   methods: {
       inited() {// 初始化
         // this.$refs['others'].resetFields()
@@ -345,14 +359,14 @@ export default {
                   this.areaNums = res.data.userData
                 }
                 if (res.data.willEffect == true) { // 存在即将生效的超级订阅订单
-                  // this.$Modal.warning({
-                  //   title: '警告提示',
-                  //   content: '该用户存在即将生效的超级订阅订单,无法创建新订单',
-                  //   okText: '我知道了',
-                  //   onOk:() => {
-                  //     this.oShow = false
-                  //   }
-                  // })
+                  this.$Modal.warning({
+                    title: '警告提示',
+                    content: '该用户存在即将生效的超级订阅订单,无法创建新订单',
+                    okText: '我知道了',
+                    onOk:() => {
+                      this.oShow = false
+                    }
+                  })
                 } else {// 不存在即将生效的超级订阅订单
                   if (res.data.vipExist == true ) { // 存在已经生效的超级订阅订单
                       if (res.data.nationwide) { // 购买区域是“全国”
@@ -613,11 +627,11 @@ export default {
             this.others.area = String(Object.keys(this.areaNums.o_vipjy.o_area))
           }
         }
-        if (this.others.orderMoney = '') {
+        if (this.others.orderMoney === '') {
           this.$Notice.warning({title: '订单金额不能为空'})
           return
         }
-        if (this.others.contractMoney = '') {
+        if (this.others.contractMoney === '') {
           this.$Notice.warning({title: '实付金额不能为空'})
           return
         }
@@ -669,11 +683,11 @@ export default {
         console.log(obj)
         this.isDisable = true
         this.$request('/order/updateOtherOrder').data(
-            obj
+          obj
         ).success(() => {
           this.oShow = false
           setTimeout(() => {
-              this.isDisable = false
+            this.isDisable = false
           }, 1000)
           this.$Message.success({content: '提交成功'})
           this.$parent.ordered()
@@ -703,8 +717,8 @@ export default {
         const {contractRes,filterData,refundRes,res,returnInfo,returnRes } = data
         this.returnBoll = returnInfo.money
         //产品类型
-        const productType = this.otherPro.find(item=>item.n==res.productType).v
-        console.log(productType)
+        let rest = res.productType === 'VIP订阅'?'超级订阅':res.productType
+        const productType = this.otherPro.find(item => item.n==rest).v
         //购买省份
         if(productType=='5'){
           const area = Object.keys(filterData.area).map(name=>{
@@ -835,6 +849,8 @@ export default {
           stopCheck: false,
           gouDis: true,
           returnBoll: 0,
+          noFinishDis: false,
+          finishDis: false,
           phoneReg: [],
           infoData: [],
           areaNums: [],
@@ -903,7 +919,7 @@ export default {
               {v: '2', n: '结构化数据'},
               {v: '3', n: '企业商机管理'},
               {v: '4', n: '历史数据'},
-              {v: '5', n: 'VIP订阅'},
+              {v: '5', n: '超级订阅'},
               {v: '6', n: '线下课程培训'},
               {v: '7', n: '课程分销'},
               {v: '8', n: '标书制作'},

+ 3 - 0
src/views/order/orderDetail.vue

@@ -84,6 +84,9 @@ export default {
             case 'VIP订阅':
                 this.proStatus = '8'
                 break;
+            case 'vip订阅':
+                this.proStatus = '8'
+                break;
             case '超级订阅':
                 this.proStatus = '8'
                 break;

+ 3 - 3
src/views/order/orderList.vue

@@ -164,7 +164,7 @@
     <!-- 导入发票弹框 -->
     <i-invoice ref="importModel"></i-invoice>
     <!-- 批量回款弹框 -->
-    <b-collect ref="batchModel" :selectData="selectData" @onChange="onChange" type="multiple"></b-collect>
+    <b-collect ref="batchModel" :selectData="selectData" @onChange="onChange"></b-collect>
     <!-- 创建其他订单弹框 -->
     <o-model ref="otherModel"></o-model>
     <!-- 创建大会员订单弹框 -->
@@ -445,7 +445,7 @@ export default {
                 {v: '18', n: '省份订阅包'},
                 {v: '19', n: '附件下载包'},
                 {v: '20', n: '采购单位画像包'},
-                {v: '0', n: 'VIP订阅'},
+                {v: '0', n: '超级订阅'},
                 {v: '1', n: '数据报告'},
                 {v: '2', n: '历史数据'},
                 // {v: '3', n: '线下课程'},
@@ -630,7 +630,7 @@ export default {
                             bookType = '(购买)'
                         }
                         if (words == 'VIP订阅' || words == 'vip订阅') {
-                            return h('span', 'VIP订阅' + vipType)
+                            return h('span', '超级订阅' + vipType)
                         } else if (words == '大会员') {
                             return h('span', '大会员' + bigVip)
                         } else if (words == '省份订阅包') {