浏览代码

提交新分支代码

xgwangman 4 年之前
父节点
当前提交
32e54f23f5

+ 2 - 2
.env

@@ -1,7 +1,7 @@
 VUE_APP_ADMIN_TOKEN_NAME = 'admin_token'
-VUE_APP_API_URL_PREFIX = 'http://admin204.jydev.jianyu360.com/api/admin/'
+VUE_APP_API_URL_PREFIX = 'https://web-qmx_admin.jydev.jianyu360.com/api/admin/'
 VUE_APP_API_ACTION_NAME = '_action'
 VUE_APP_API_TOKEN_NAME = '_token'
-VUE_APP_INDEX_URL = '/'
+VUE_APP_INDEX_URL = '/index'
 VUE_APP_SITE_NAME = '管理平台'
 VUE_APP_SITE_TITLE_TPL = '{title}'

+ 7 - 0
src/assets/css/common.css

@@ -638,4 +638,11 @@ textarea:-ms-input-placeholder {
 }
 .upload-file .pay-load .ivu-upload-list .ivu-upload-list-file span {
   font-size: 12px;
+}
+.order-model .ipt-inpt, .order-model .no-pass {
+  width: 340px;
+  margin-right: 20px;
+}
+.order-model .order-spin {
+  height: 36px;
 }

+ 1 - 1
src/components/Login.vue

@@ -127,7 +127,7 @@
                     code: this.form.code,
                     loginType: '2'
                 }
-                this.$request("/login").data(forms).success((r) => {// 发送验证码
+                this.$request("/login").data(forms).success(() => {// 发送验证码
                     this.$Message.success({content: '发送成功'})
                     this.codeWord = 60 + ' s'
                     let num = 60

+ 3 - 5
src/components/dateSigle.vue

@@ -8,6 +8,7 @@
         @on-change="handleChange"
         @on-ok="confirmed"
         :editable="false"
+        :readonly="beginDis"
     ></DatePicker>
 </template>
 
@@ -15,7 +16,8 @@
 export default {
     props: {
         placeholderd: String,
-        overTime: Number
+        overTime: Number,
+        beginDis: Boolean
     },
     data() {
         return {
@@ -48,7 +50,3 @@ export default {
     }
 }
 </script>
-
-<style lang="scss" scoped>
-
-</style>

+ 1 - 1
src/plugins/request.js

@@ -27,7 +27,6 @@ export const request = function ({ type, data, dataType,contentType, url, succes
 }
 
 export const requestSuccessHandle = function (vue, response, tipSuccess, tipError, success, error) {
-    const _this = this
     if (response.status === 'success') {
         if (tipSuccess) {
             vue.$Notice.success({
@@ -141,6 +140,7 @@ class ActionRequest {
             },
             error: (res) => {
                 console.log(res)
+                this.$router.push('/login')
                 this.vue.$Notice.error({ title: '对不起您请求的数据不存在或者返回异常', duration: 5 })
             },
             complete: () => {

+ 1 - 1
src/views/index.vue

@@ -11,7 +11,7 @@ import { config } from '../helper'
 
 export default {
     created() {
-        if (config('INDEX_URL') !== "/") {
+        if (config('INDEX_URL') !== "/index") {
             this.$router.replace(config('INDEX_URL'))
         }
     },

+ 190 - 121
src/views/order/components/bigOrder.vue

@@ -3,7 +3,17 @@
         <Modal title="创建大会员订单" v-model="bShow" class-name="order-model" :mask-closable="false" @on-visible-change="visibleChange">
             <Form ref="member" :model="member" :show-message="false" :label-width="110">
                 <FormItem label="手机号" :class="{'big-stas':colr}">
-                    <Input v-model="member.phone" type="text" @on-change="pheHandler" @on-keyup="keyHandler" :maxlength="11" placeholder="请输入手机号"></Input>
+                    <Input 
+                        class="ipt-inpt" 
+                        v-model="member.phone" 
+                        type="text" 
+                        @on-change="pheHandler" 
+                        @on-keyup="keyHandler" 
+                        :maxlength="11" 
+                        placeholder="请输入手机号"
+                        :readonly="pReadon"
+                    ></Input>
+                    <Checkbox v-model="noPhone" @on-change="noPchange">无手机号</Checkbox>
                     <Spin fix class="order-spin" v-if="spinShow">
                         <Icon type="ios-loading" size=18 class="demo-spin-icon-load"></Icon>
                     </Spin>
@@ -70,7 +80,15 @@
                             <Input v-model="member.payCycle" type="tel" maxlength="2" @on-keyup="cycleHandler" @on-change="peChange" :placeholder="'请输入有效周期(单位(月),最多输入'+monthTime+'个月)'"></Input>
                         </FormItem>
                         <FormItem label="开始日期" v-if="creAuth == '1' && repair !== '3'">
-                            <date-sigle ref="sigleRef" :placeholderd="'请选择开始日期'" @startDate="startDate" :overTime="overTime"></date-sigle>
+                            <date-sigle 
+                                ref="sigleRef" 
+                                :placeholderd="'请选择开始日期'" 
+                                @startDate="startDate" 
+                                :overTime="overTime" 
+                                class="no-pass"
+                                :beginDis="noPass"
+                            ></date-sigle>
+                            <Checkbox v-model="noPass" @on-change="noTchange">暂不开通</Checkbox >
                         </FormItem>
                         <FormItem class="table-order1">
                             <Table 
@@ -158,6 +176,9 @@
                             :multipled="false"
                         ></b-upload>
                     </FormItem>
+                    <FormItem label="公司名称">
+                        <Input v-model="member.companyName" type="text" :maxlength="8" placeholder="请输入公司名称"></Input>
+                    </FormItem>
                     <FormItem label="备注">
                         <Input v-model="member.remark" type="text" :maxlength="40" placeholder="请输入备注"></Input>
                     </FormItem>
@@ -185,10 +206,16 @@ export default {
         proDis:function() {
             if (this.member.phone == '') {
                 return true
-            } else if (!(/^1[3456789]\d{9}$/.test(this.member.phone))) {
-                return true
             } else {
-                return false
+                if (this.noPhone) {
+                    return false
+                } else {
+                    if (!(/^1[3456789]\d{9}$/.test(this.member.phone))) {
+                        return true
+                    } else {
+                        return false
+                    }
+                }
             }
         }
     },
@@ -207,6 +234,7 @@ export default {
             this.member.supplyPayMoney = ''
             this.member.payCycle = ''
             this.member.contractUrl = ''
+            this.member.companyName = ''
             this.member.remark = ''
             this.sumSel = []
             this.sPrice = 0
@@ -233,125 +261,143 @@ export default {
         keyHandler() {
             this.member.phone = this.member.phone.replace(/[^\d]/g,'')
         },
-        pheHandler() {// 填写手机号并验证
-            this.member.phone = this.member.phone.replace(/[^\d]/g,'')
-            if (this.member.phone) {
-                if ((/^1[3456789]\d{9}$/.test(this.member.phone))) {
-                    this.spinShow = true
-                    this.initialized()
-                    this.$request('/order/isOpenBig').data({// 验证手机号权限
-                        phone: this.member.phone
-                    }).success((res) => {
-                        this.bigStas = res.data.Bigstatus
-                        this.subStas = res.data.isSub
-                        this.isYears = res.data.isYear
-                        this.overTime = res.data.endTime
-                        this.stopTime = getDateSub('', res.data.endTime)
-                        this.serData = []
-                        this.pacData = []
-                        this.datas2 = []
-                        if (res.data.isYear == 0) {
-                            this.yearStas = 10
-                        } else if (res.data.isYear == 1) {
-                            this.yearStas = 12
-                        }
-                        this.currentServer()
-                        setTimeout(() => {
-                            this.spinShow = false
-                            if (this.member.products == 1) {
-                                if (this.bigStas == 1) {
-                                    if (this.subStas == 1) {
-                                        this.colr = ''
-                                        this.downDis = false
-                                        if (this.nums == 0) {
-                                            this.getServed('')
-                                            this.sumSel = []
-                                            this.radioDis1 = false
-                                            this.radioDis2 = true
-                                            this.radioDis3 = true
-                                            this.member.createType = '1'
-                                            this.repair = 1
-                                            this.monthTime = 60
-                                        }
-                                    } else {
-                                        this.downDis = true
-                                        if (this.nums == 0) {
-                                            this.getServed('')
-                                            this.sumSel = []
-                                            this.radioDis1 = true
-                                            this.radioDis2 = false
-                                            this.radioDis3 = false
-                                            this.member.createType = '2'
-                                            this.repair = 2
-                                            this.monthTime = this.stopTime
-                                        }
-                                    }
-                                } else {
-                                    this.colr = ''
-                                    if (this.nums == 0) {
-                                        this.creAuth = '1'
-                                    }
-                                    this.downDis = false
-                                    if (this.nums == 0) {
-                                        this.getServed('')
-                                        this.sumSel = []
-                                        this.radioDis1 = false
-                                        this.radioDis2 = true
-                                        this.radioDis3 = true
-                                        this.member.createType = '1'
-                                        this.repair = 1
-                                        this.monthTime = 60
-                                    }
+        noPchange(val) {
+            if (val) {
+                this.pReadon = true
+                this.member.phone = 9 + String(Math.random()).substring(2,12)
+                this.overTime = 0
+                this.pheHandler()
+            } else {
+                this.pReadon = false
+                this.member.phone = ''
+            }
+        },
+        reged() {
+            this.spinShow = true
+            this.initialized()
+            this.$request('/order/isOpenBig').data({// 验证手机号权限
+                phone: this.member.phone
+            }).success((res) => {
+                this.bigStas = res.data.Bigstatus
+                this.subStas = res.data.isSub
+                this.isYears = res.data.isYear
+                this.overTime = res.data.endTime
+                this.stopTime = getDateSub('', res.data.endTime)
+                this.serData = []
+                this.pacData = []
+                this.datas2 = []
+                if (res.data.isYear == 0) {
+                    this.yearStas = 10
+                } else if (res.data.isYear == 1) {
+                    this.yearStas = 12
+                }
+                this.currentServer()
+                setTimeout(() => {
+                    this.spinShow = false
+                    if (this.member.products == 1) {
+                        if (this.bigStas == 1) {
+                            if (this.subStas == 1) {
+                                this.colr = ''
+                                this.downDis = false
+                                if (this.nums == 0) {
+                                    this.getServed('')
+                                    this.sumSel = []
+                                    this.radioDis1 = false
+                                    this.radioDis2 = true
+                                    this.radioDis3 = true
+                                    this.member.createType = '1'
+                                    this.repair = 1
+                                    this.monthTime = 60
                                 }
-                            } else if (this.member.products == 2) {
-                                if (this.bigStas == 0) {
-                                    if (this.subStas == 0) {
-                                        this.colr = '此手机号无大会员权限'
-                                        this.creAuth = ''
-                                    }
-                                } else if (this.bigStas == 2) {
-                                    this.colr = '此手机号已有大会员权限,无需再次创建'
-                                    this.creAuth = ''
-                                } else {
-                                    if (this.subStas == 1) {
-                                        this.colr = '此手机号已是大会员子账号'
-                                        this.creAuth = ''
-                                    } else {
-                                        this.colr = ''
-                                        if (this.nums == 0) {
-                                            this.creAuth = '2'
-                                            this.getServed('')
-                                            this.sumSel = []
-                                        }
-                                    }
+                            } else {
+                                this.downDis = true
+                                if (this.nums == 0) {
+                                    this.getServed('')
+                                    this.sumSel = []
+                                    this.radioDis1 = true
+                                    this.radioDis2 = false
+                                    this.radioDis3 = false
+                                    this.member.createType = '2'
+                                    this.repair = 2
+                                    this.monthTime = this.stopTime
                                 }
-                            } else if (this.member.products == 3) {
-                                if (this.bigStas == 0) {
-                                    if (this.subStas == 0) {
-                                        this.colr = '此手机号无大会员权限'
-                                        this.creAuth = ''
-                                    }
-                                } else if (this.bigStas == 2) {
-                                    this.colr = '此手机号已有大会员权限,无需再次创建'
-                                    this.creAuth = ''
-                                } else {
-                                    if (this.subStas == 1) {
-                                        this.colr = '此手机号已是大会员子账号'
-                                        this.creAuth = ''
-                                    } else {
-                                        this.colr = ''
-                                        if (this.nums == 0) {
-                                            this.creAuth = '3'
-                                        }
-                                        this.getServed('')
-                                        this.sumSel = []
-                                    }
+                            }
+                        } else {
+                            this.colr = ''
+                            if (this.nums == 0) {
+                                this.creAuth = '1'
+                            }
+                            this.downDis = false
+                            this.getServed('')
+                            if (this.nums == 0) {
+                                this.sumSel = []
+                                this.radioDis1 = false
+                                this.radioDis2 = true
+                                this.radioDis3 = true
+                                this.member.createType = '1'
+                                this.repair = 1
+                                this.monthTime = 60
+                            }
+                        }
+                    } else if (this.member.products == 2) {
+                        if (this.bigStas == 0) {
+                            if (this.subStas == 0) {
+                                this.colr = '此手机号无大会员权限'
+                                this.creAuth = ''
+                            }
+                        } else if (this.bigStas == 2) {
+                            this.colr = '此手机号已有大会员权限,无需再次创建'
+                            this.creAuth = ''
+                        } else {
+                            if (this.subStas == 1) {
+                                this.colr = '此手机号已是大会员子账号'
+                                this.creAuth = ''
+                            } else {
+                                this.colr = ''
+                                if (this.nums == 0) {
+                                    this.creAuth = '2'
+                                    this.getServed('')
+                                    this.sumSel = []
                                 }
+                            }
+                        }
+                    } else if (this.member.products == 3) {
+                        if (this.bigStas == 0) {
+                            if (this.subStas == 0) {
+                                this.colr = '此手机号无大会员权限'
+                                this.creAuth = ''
+                            }
+                        } else if (this.bigStas == 2) {
+                            this.colr = '此手机号已有大会员权限,无需再次创建'
+                            this.creAuth = ''
+                        } else {
+                            if (this.subStas == 1) {
+                                this.colr = '此手机号已是大会员子账号'
+                                this.creAuth = ''
                             } else {
-                                this.member.products = ''
+                                this.colr = ''
+                                if (this.nums == 0) {
+                                    this.creAuth = '3'
+                                }
+                                this.getServed('')
+                                this.sumSel = []
                             }
-                        }, 500)
-                    }).post()
+                        }
+                    } else {
+                        this.member.products = ''
+                    }
+                }, 500)
+            }).post()
+        },
+        pheHandler() {// 填写手机号并验证
+            this.member.phone = this.member.phone.replace(/[^\d]/g,'')
+            if (this.member.phone) {
+                if (this.pReadon) {
+                    this.reged()
+                } else {
+                    if ((/^1[3456789]\d{9}$/.test(this.member.phone))) {
+                        this.reged()
+                    }
                 }
             }
         },
@@ -665,14 +711,26 @@ export default {
                 }
             }
         },
+        timeReg(val) {
+            return new Date(ChangeDate(val).replace(/-/g, '/') + ' 00:00:00').getTime() / 1000
+        },
         startDate(val) {
             if (val) {
-                this.member.beginTime = new Date(ChangeDate(val).replace(/-/g, '/') + ' 00:00:00').getTime() / 1000
+                this.member.beginTime = this.timeReg(val)
             } else {
                 this.member.beginTime = ''
             }
             this.cycleTime()
         },
+        noTchange(val) {
+            if (val) {
+                this.$refs.sigleRef.dataVals = '2099-01-01'
+                this.member.beginTime = this.timeReg('2099-01-01')
+            } else {
+                this.$refs.sigleRef.dataVals = ''
+                this.member.beginTime = ''
+            }
+        },
         payBlur() {
             if (this.member.paySub) {
                 this.datas1.splice(1,1,{
@@ -690,7 +748,7 @@ export default {
                 this.member.orderMoney = parseInt(this.member.paySub==''?0:this.member.paySub) * 2000
             }
             this.member.subMoney = parseInt(this.member.paySub==''?0:this.member.paySub) * 2000
-            if (this.member.subMoney == 0) {
+            if (this.member.paySub == '') {
                 this.subDis = true
                 this.member.subPayMoney =''
             } else {
@@ -967,6 +1025,7 @@ export default {
                     serversId: this.nums == 0?String(serId):'',
                     serversName: this.nums == 0?String(serName):'',
                     serversArr: serveData,
+                    companyName: this.member.companyName,
                     remark: this.member.remark
                 }
                 this.urlReq('/order/createBigOrder', obj)
@@ -981,6 +1040,7 @@ export default {
                     contractUrl: this.member.contractUrl,
                     isAll: this.isAll ? 1 : this.member.contractUrl ? 3 : 2,
                     payMoney: parseInt(this.member.payMoney * 100),
+                    companyName: this.member.companyName,
                     remark: this.member.remark
                 }
                 this.urlReq('/order/createSubOrder', obj)
@@ -994,6 +1054,7 @@ export default {
                     contractUrl: this.member.contractUrl,
                     isAll: this.isAll ? 1 : this.member.contractUrl ? 3 : 2,
                     payMoney: parseInt(this.member.payMoney * 100),
+                    companyName: this.member.companyName,
                     remark: this.member.remark
                 }
                 this.urlReq('/order/createSupplyOrder', obj)
@@ -1012,6 +1073,10 @@ export default {
                     this.member.salesperson = ''
                     this.member.level = ''
                     this.nums = ''
+                    this.spinShow = false
+                    this.noPhone = false
+                    this.noPass = false
+                    this.pReadon = false
                     this.initialized()
                 },500)
             } else {
@@ -1039,6 +1104,9 @@ export default {
             subDis: true,
             supplyDis: true,
             sArr: [],
+            noPhone: false,
+            noPass: false,
+            pReadon: false,
             isDisable: false,
             selectList: [],
             member: {
@@ -1061,6 +1129,7 @@ export default {
                 bigPayMoney: '',
                 subPayMoney: '',
                 supplyPayMoney: '',
+                companyName: '',
                 remark: ''
             },
             isAll: false,

+ 24 - 22
src/views/order/components/detailModel.vue

@@ -22,7 +22,7 @@
           <Form ref="returned" :model="returned" :rules="backDetailValidate">
             <Row :gutter="10" class="back-row">
               <Col span="8">
-                <FormItem prop="returnTime">
+                <FormItem prop="returnTime" v-if="visibleChange1">
                   <date-sigle ref="sigleRef" :placeholderd="'请选择回款时间'" @startDate="startDate" :overTime="0"></date-sigle>
                 </FormItem>
               </Col>
@@ -158,6 +158,7 @@ export default {
       this.contract.contractFileUrl = ''
       this.returned.returnVoucherUrl = ''
       this.returned.returnRemark = ''
+      this.returned.returnCode = ''
       this.$refs.sigleRef.initd()
       this.$refs['backed'].resetFields()
       this.$refs['returned'].resetFields()
@@ -232,33 +233,34 @@ export default {
         returnVoucherUrl: this.returned.returnVoucherUrl
       }
       this.$refs.backed.validate((valid) => {
-        if (!valid) {
-          return
-        }
-      })
-      this.$refs.returned.validate((valid) => {
         if (valid) {
-          this.isDisable = true
-          this.$request('/order/editReturnInfo').data(
-            obj
-          ).showSuccessTip().success(() => {
-            this.backShow = false
-            this.$parent.ordered()
-            this.inited()
-            setTimeout(() => {
-                this.isDisable = false
-            },1000)
-          }).error(() => {
-              this.isDisable = false
-          }).post()
+            this.$refs.returned.validate((valid) => {
+                if (valid) {
+                  this.isDisable = true
+                  this.$request('/order/editReturnInfo').data(
+                    obj
+                  ).showSuccessTip().success(() => {
+                    this.backShow = false
+                    this.$parent.ordered()
+                    this.inited()
+                    setTimeout(() => {
+                        this.isDisable = false
+                    },1000)
+                  }).error(() => {
+                      this.isDisable = false
+                  }).post()
+                }
+            })
+        } else {
+            this.$refs.returned.validate((valid) => {
+                if (valid) {}
+            })
         }
       })
+      
     },
     backCancel() {
       this.backShow = false
-      setTimeout(() => {
-          this.inited()
-      },500)
     },
     pingSub() {// 上传合同
       if (!this.contract.contractFileUrl) {

+ 143 - 23
src/views/order/components/details.vue

@@ -15,13 +15,16 @@
                             v-model="salesMen" 
                             type="text" 
                             placeholder="请输入销售人员姓名" 
-                            @on-enter="menBlur"
                             @on-blur="saleBlur"
                             element-id="inptId"
                             :readonly="saleReadon"
+                            v-if="isSales"
                         ></Input>
-                        <Button type="primary" @click="inptBtn">编辑</Button>
+                        <i class="i-inpt" v-else>{{salesMen}}</i>
+                        <Button class="i-btn" type="primary" @click="inptSave" v-if="isSales">保存</Button>
+                        <Button class="i-btn" type="primary" @click="inptBtn" v-else>编辑</Button>
                     </span>
+                    <span><p>公司名称:</p>{{orDetails?orDetails.company_name?orDetails.company_name:'--':'--'}}</span>
                     <span><p>订单类型:</p>{{orDetails?orDetails.dis_word ? '分销' : '直销':'--'}}</span>
                     <span><p>创建时间:</p>{{orDetails?orDetails.create_time:'--'}}</span>
                     <span><p>审核状态:</p><i :class="orDetails.course_status | courseColr">{{orDetails.course_status | coursed}}</i></span>
@@ -133,12 +136,48 @@
             </div>
             <Divider />
         </div>
-        <!-- 大会员 -->
+        <!-- 大会员、子账号、补充包 -->
         <div class="infor-card" v-if="orderType == 7||orderType == 9||orderType == 10||orDetails.product_type == '大会员-AI中标预测包'||orDetails.product_type == '大会员-招标文件解读'">
             <div class="cont">
                 <div class="tit">产品信息</div>
                 <div class="classfity">
+                    <span v-if="orderType == 7">
+                        <p>手机号:</p>
+                        <Input 
+                            class="sale-inpt"
+                            v-model="bigPhone" 
+                            type="text" 
+                            placeholder="请输入正确的手机号" 
+                            maxlength="11"
+                            @on-blur="phoneBlur"
+                            element-id="phoneId"
+                            :readonly="phoneReadon"
+                            v-if="isPhone"
+                        ></Input>
+                        <i class="i-inpt" v-else>{{bigPhone}}</i>
+                        <div v-if="book.source == 'qmx'">
+                            <Button class="i-btn" type="primary" @click="saveBtn" v-if="isPhone">保存</Button>
+                            <Button class="i-btn" type="primary" @click="phoneBtn" v-else>编辑</Button>
+                        </div>
+                    </span>
+                    <span v-else><p>手机号:</p>{{orDetails.user_phone?orDetails.user_phone:'--'}}</span>
                     <span><p>会员套餐:</p><i v-if="book">{{book?orderType == 10?'自定义':book.level:'--'}}</i></span>                   
+                    <span v-if="orderType == 7">
+                        <p>开始时间:</p>
+                        <date-sigle 
+                            ref="sigleRef" 
+                            :placeholderd="'请选择开始时间'" 
+                            @startDate="startDate" 
+                            :overTime="0"
+                            v-if="isTime"
+                            style="width:180px"
+                        ></date-sigle>
+                        <i class="i-inpt" v-else>{{orDetails?vip_starttime:'--'}}</i>
+                        <div v-if="book.source == 'qmx'">
+                            <Button class="i-btn" type="primary" @click="saveTime" v-if="isTime">保存</Button>
+                            <Button class="i-btn" type="primary" @click="timeBtn" v-else>编辑</Button>
+                        </div>
+                    </span>
                     <span v-if="orderType == 7"><p>订阅周期:</p><i v-if="orDetails">{{orDetails?vip_starttime:''}}{{orDetails?vip_endtime:''}}</i></span>
                     <span v-if="orderType !== 7"><p>有效日期:</p><i v-if="book">{{book?book.effective_date?book.effective_date:'--':'--'}}</i></span>
                     <span v-if="orderType == 7||orderType == 9"><p>付费子账号:</p><i v-if="book">{{book.pay_sub_num||book.pay_sub_num==0?book.pay_sub_num+'个':'--'}}</i></span>
@@ -161,7 +200,6 @@
                         </ul>
                         <i v-else>--</i>
                     </span>
-                    <span><p>手机号:</p>{{orDetails.user_phone?orDetails.user_phone:'--'}}</span>
                 </div>
             </div>
             <Divider />
@@ -354,7 +392,6 @@
                 <div class="tit">合同信息</div>
                 <div class="classfity">
                     <span><p>合同金额:</p> {{contractData.contract_money?localed(contractData.contract_money/100):'--'}}</span>
-                    <span><p>手机号:</p> {{orDetails.user_phone?orDetails.user_phone:'--'}}</span>
                     <span><p>客户名称:</p>{{contractData.customer_name?contractData.customer_name:'--'}}</span>
                     <span><p>协议签订时间:</p>{{contractData.contract_time?contractData.contract_time:'--'}}</span>
                     <span><p>协议编号:</p>{{contractData.contract_code?contractData.contract_code:'--'}}</span>
@@ -429,14 +466,15 @@
 
 <script>
 import dModel from './detailModel'
+import dateSigle from '@/components/dateSigle'
 import { ChangeDate, ChangeDate1 } from '../../../assets/js/date.js'
-import { forgetHandleSet } from '../../../../../app/app/jg_app/src/api/getData'
 export default {
     props:{
         orderType: String
     },
     components: {
-        dModel
+        dModel,
+        dateSigle
     },
     computed: {
         courseDis:function() {
@@ -580,6 +618,7 @@ export default {
                 this.orders = r.data
                 this.orDetails = r.data.res;
                 this.salesMen = r.data.res.salesperson?r.data.res.salesperson:'--'
+                this.bigPhone = r.data.res.user_phone?r.data.res.user_phone:'--'
                 this.contractData = r.data.contractRes;
                 this.refundRes = r.data.refundRes?r.data.refundRes[0]:[];
                 this.returnRes = r.data.returnRes;
@@ -593,42 +632,113 @@ export default {
                     this.l_endtime = ChangeDate1(this.strCourse.l_endtime);
                 }
                 if (this.orDetails) {
-                    this.vip_starttime = this.orderObjectd(this.orDetails.vip_starttime)?ChangeDate(this.orDetails.vip_starttime)+' - ':'-';
-                    this.vip_endtime = this.orderObjectd(this.orDetails.vip_endtime)?ChangeDate(this.orDetails.vip_endtime):'-';
+                    this.vip_starttime = this.orderObjectd(this.orDetails.vip_starttime)?ChangeDate(this.orDetails.vip_starttime):'-';
+                    this.vip_endtime = this.orderObjectd(this.orDetails.vip_endtime)?' - ' + ChangeDate(this.orDetails.vip_endtime):'-';
                 }
             }).get()
         },
+        // 销售人员姓名修改
         saleBlur() {
-            this.saleReadon = true
-            if (this.salesMen == '--') {
-                this.salesMen = '--'
-            } else {
-                this.salesMen = this.orDetails.salesperson
+            if (!this.isSales) {
+                if (this.salesMen == '--') {
+                    this.salesMen = '--'
+                } else {
+                    this.salesMen = this.orDetails.salesperson
+                }
             }
         },
         inptBtn() {
-            this.saleReadon = false
+            this.isSales = true
             setTimeout(() => {
                 document.getElementById("inptId").focus()
+                this.saleReadon = false
             }, 100)
         },
-        menBlur() {
+        inptSave() {
             if (!this.salesMen) {
                 this.$Message.warning('销售人员姓名不能为空')
                 return
             }
             this.$request('/order/updateSalesperson').data({
                 orderCode: this.orDetails.order_code,
-                salesperson: this.salesMen
-            }).success((r) => {
+                salesperson: this.salesMen,
+                userId: this.orDetails.user_id
+            }).success(() => {
                 this.$Message.success('修改成功')
                 this.saleReadon = true
                 setTimeout(() => {
+                    this.isSales = false
                     document.getElementById("inptId").blur()
                 }, 100)
                 this.ordered()
             }).post()
         },
+        // 手机号修改
+        phoneBlur() {
+            if (!this.isPhone) {
+                if (this.bigPhone == '--') {
+                    this.bigPhone = '--'
+                } else {
+                    this.bigPhone = this.orDetails.user_phone
+                }
+            }
+        },
+        phoneBtn() {
+            this.isPhone = true
+            setTimeout(() => {
+                document.getElementById("phoneId").focus()
+                this.phoneReadon = false
+            }, 100)
+        },
+        saveBtn() {
+            if (!this.bigPhone) {
+                this.$Message.warning('手机号不能为空')
+                return
+            }
+            if (!(/^1[3456789]\d{9}$/.test(this.bigPhone))) {
+                this.$Message.warning('手机号格式错误')
+                return
+            }
+            this.$request('/order/updateSalesperson').data({
+                orderCode: this.orDetails.order_code,
+                phone: this.bigPhone,
+                userPhone: this.orDetails.user_phone,
+                userId: this.orDetails.user_id
+            }).success(() => {
+                this.$Message.success('修改成功')
+                this.phoneReadon = true
+                setTimeout(() => {
+                    this.isPhone = false
+                    document.getElementById("phoneId").blur()
+                    this.ordered()
+                }, 100)
+            }).post()
+        },
+        startDate(val) {
+            this.beginTime = new Date(ChangeDate(val).replace(/-/g, '/') + ' 00:00:00').getTime() / 1000
+        },
+        // 开始时间修改
+        timeBtn() {
+            this.isTime = true
+        },
+        saveTime() {
+            if (!this.beginTime) {
+                this.$Message.warning('开始日期不能为空')
+                return
+            }
+            this.$request('/order/updateSalesperson').data({
+                orderCode: this.orDetails.order_code,
+                startTime: this.beginTime,
+                cycle: this.book.cycle,
+                userId: this.orDetails.user_id
+            }).success(() => {
+                this.$Message.success('修改成功')
+                setTimeout(() => {
+                    this.isTime = false
+                    this.ordered()
+                }, 100)
+            }).post()
+        },
         pushInvo() {
             this.$refs.backRef.iShow = true
         },
@@ -650,7 +760,6 @@ export default {
                 onOk: () => {// 文件下载
                     const a1 = document.createElement('a')
                     a1.download = this.contractData.contract_file_name
-                    a1.href = this.contractData.contract_file_url
                     a1.click()
                 }
             })
@@ -755,12 +864,17 @@ export default {
     data () {
         return {
             saleReadon: true,
+            phoneReadon: true,
+            isPhone: false,
+            isSales: false,
+            bigPhone: '',
             contractData: [],
             returnInfo: [],
             returnRes: [],
             refundRes: [],
             orders: [],
             salesMen: '',
+            beginTime: '',
             orDetails: [],
             book: [],
             strCourse: [],
@@ -771,6 +885,7 @@ export default {
             serverData: [],
             supplysData: [],
             isDisable: false,
+            isTime: false,
             uploadData: {
                 type: 'transferAccounts'
             }
@@ -810,10 +925,12 @@ export default {
                 }
                 span {
                     display: flex;
+                    align-items: center;
                     p:first-child {
                         min-width: 128px;
                         text-align: right;
                         margin-right: 30px;
+                        align-self: flex-start;
                     }
                    i {
                         width: 70%;
@@ -822,18 +939,21 @@ export default {
                         color: #999;
                     }
                     .sale-inpt {
-                        width: 150px;
+                        width: 180px;
                         /deep/ .ivu-input {
-                            border: none;
                             font-size: 16px;
                             color: #333;
-                            padding: 0;
                             &:focus {
-                                border: none;
                                 box-shadow: none;
                             }
                         }
                     }
+                    .i-inpt {
+                        width: 180px;
+                    }
+                    .i-btn {
+                        margin-left: 10px;
+                    }
                 }
                 .color1 {
                     color: #f4516c;

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

@@ -101,7 +101,6 @@ export default {
           this.others.phone = this.others.phone.replace(/[^\d]/g,'')
       },
       agreeDate(val) {
-        console.log(val)
         this.others.contractTime = val
       },
       startsData(val) {
@@ -153,9 +152,7 @@ export default {
                   this.isDisable = false
               }).post()
             }
-        })
-          
-          
+        }) 
       },
       otherCancel() {
           this.oShow = false

+ 13 - 4
src/views/order/orderList.vue

@@ -59,11 +59,18 @@
                 placeholder="输入手机号" 
                 clearable
                 maxlength="11"
-                style="width:100px;height:36px;margin: 0 10px 10px 2px;" 
+                style="width:105px;height:36px;margin: 0 10px 10px 2px;" 
             ></Input>
             <Select placeholder="是否上传合同" clearable v-model="filter.contractStatus" style="width:120px;margin:0 10px 10px 0">
                 <Option v-for="item in contractStas" :value="item.v" :key="item.v">{{ item.n }}</Option>
             </Select>
+            <Input 
+                type="text" 
+                v-model="filter.companyName" 
+                placeholder="公司名称" 
+                clearable
+                style="width:130px;height:36px;margin: 0 10px 10px 2px;" 
+            ></Input>
             <Input 
                 type="text" 
                 v-model="filter.payMoneyMin" 
@@ -276,7 +283,8 @@ export default {
                 returnStatus: this.filter.returnStatus,
                 refundStatus: this.filter.refundStatus,
                 contractStatus: this.filter.contractStatus,
-                phone: this.filter.phone
+                phone: this.filter.phone,
+                companyName: this.filter.companyName
             }
             this.$Modal.confirm({
                 title: "确定导出结果吗?",
@@ -431,7 +439,8 @@ export default {
                 invoiceType: '',
                 returnStatus: '',
                 refundStatus: '',
-                contractStatus: ''
+                contractStatus: '',
+                companyName: ''
             },
             sear: {
                 keyword: ''
@@ -510,7 +519,7 @@ export default {
                 {
                     title: '订单时间',
                     key: 'create_time',
-                    width: '170',
+                    width: '110',
                     align: 'center'
                 },
                 {