|
@@ -11,40 +11,14 @@
|
|
|
<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>
|
|
|
- <Input
|
|
|
- class="sale-inpt"
|
|
|
- v-model="salesMen"
|
|
|
- type="text"
|
|
|
- placeholder="请输入销售人员姓名"
|
|
|
- @on-blur="saleBlur"
|
|
|
- element-id="inptId"
|
|
|
- :readonly="saleReadon"
|
|
|
- v-if="isSales"
|
|
|
- ></Input>
|
|
|
- <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> -->
|
|
|
+ <i class="i-inpt">{{orDetails.salesperson?orDetails.salesperson:'--'}}</i>
|
|
|
</span>
|
|
|
<span v-if="orDetails.order_channel_new == '微信小商店'">
|
|
|
<p>业绩统计时间:</p>--
|
|
|
</span>
|
|
|
<span v-else>
|
|
|
<p>业绩统计时间:</p>
|
|
|
- <date-sigle
|
|
|
- ref="sigleRef3"
|
|
|
- :dateType="'datetime'"
|
|
|
- :placeholderd="'请选择业绩统计时间'"
|
|
|
- @startDate="startDate2"
|
|
|
- :overTime="0"
|
|
|
- v-if="isTimes"
|
|
|
- style="width:180px"
|
|
|
- ></date-sigle>
|
|
|
- <i class="i-inpt" v-else>{{orDetails?orDetails.sale_time?orDetails.sale_time:'--':'--'}}</i>
|
|
|
- <!-- <div v-if="!orDetails.sale_time&&book.source !== 'qmx'"> -->
|
|
|
- <div v-if="!orDetails.sale_time&&book.source == 'qmx'">
|
|
|
- <Button class="i-btn" type="primary" @click="saveTime(3)" v-if="isTimes">保存</Button>
|
|
|
- <Button class="i-btn" type="primary" @click="timeBtn(3)" v-else>编辑</Button>
|
|
|
- </div>
|
|
|
+ <i class="i-inpt">{{orDetails?orDetails.sale_time?orDetails.sale_time:'--':'--'}}</i>
|
|
|
</span>
|
|
|
<span><p>公司名称:</p>{{orDetails?orDetails.company_name?orDetails.company_name:'--':'--'}}</span>
|
|
|
<span><p>签约主体:</p>{{orDetails?orDetails.return_commpany?orDetails.return_commpany:'--':'--'}}</span>
|
|
@@ -159,20 +133,7 @@
|
|
|
<span v-if="orderType == 16"><p>购买区域:</p><i v-if="book">{{orderObjectd(book.area)?String(Object.keys(book.area)):'全国'}}</i></span>
|
|
|
<span>
|
|
|
<p>开始日期:</p>
|
|
|
- <date-sigle
|
|
|
- ref="sigleRef1"
|
|
|
- :dateType="'date'"
|
|
|
- :placeholderd="'请选择开始时间'"
|
|
|
- @startDate="startDate1"
|
|
|
- :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(1)" v-if="isTime">保存</Button>
|
|
|
- <Button class="i-btn" type="primary" @click="timeBtn(1)" v-else>编辑</Button>
|
|
|
- </div>
|
|
|
+ <i class="i-inpt">{{orDetails?vip_starttime:'--'}}</i>
|
|
|
</span>
|
|
|
<span><p>计费模式:</p>{{orDetails?orDetails.billingMode==0?'免费':'收费':'--'}}</span>
|
|
|
<span><p>订购区域:</p><i v-if="book">{{book?book.subscription_area?book.subscription_area:'--':'--'}}</i></span>
|
|
@@ -224,42 +185,14 @@
|
|
|
<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>
|
|
|
+ <i class="i-inpt">{{orDetails.user_phone?orDetails.user_phone:'--'}}</i>
|
|
|
</span>
|
|
|
<span v-else><p>手机号:</p>{{orDetails.user_phone?orDetails.user_phone:'--'}}</span>
|
|
|
<span><p>计费模式:</p><i v-if="orDetails">{{orDetails?orDetails.billingMode==0?'免费':'收费':'--'}}</i></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="sigleRef2"
|
|
|
- :dateType="'date'"
|
|
|
- :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(2)" v-if="isTime">保存</Button>
|
|
|
- <Button class="i-btn" type="primary" @click="timeBtn(2)" v-else>编辑</Button>
|
|
|
- </div>
|
|
|
+ <i class="i-inpt">{{orDetails?vip_starttime:'--'}}</i>
|
|
|
</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>
|
|
@@ -418,7 +351,7 @@
|
|
|
<span><p>退款状态:</p><i>{{orDetails?refundStatus(orDetails.refund_status):'--'}}</i></span>
|
|
|
<span><p>退款时间:</p><i>{{refundDis?refundRes.refund_time:'--'}}</i></span>
|
|
|
<span><p>退款金额:</p><i>{{refundDis?localed(refundRes.refund_money/100):'--'}}</i></span>
|
|
|
- <span><p>退款原因:</p><i>{{refundRes?refundRes.refund_reason:'--'}}</i></span>
|
|
|
+ <span><p>退款原因:</p><i>{{refundRes?refundRes.refund_reason?refundRes.refund_reason:'--':'--'}}</i></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<Divider />
|
|
@@ -619,7 +552,7 @@ import dateSigle from '@/components/dateSigle'
|
|
|
import onlineOrderEdit from "./onlineOrderEdit.vue"
|
|
|
import otherOrderEdit from "./otherOrderEdit.vue"
|
|
|
import bigOrderEdit from "./bigOrderEdit.vue"
|
|
|
-import { ChangeDate, ChangeDate1, ChangeDate4, addDate } from '@/assets/js/date.js'
|
|
|
+import { dateFormatter, addDate } from '@/assets/js/date.js'
|
|
|
export default {
|
|
|
props:{
|
|
|
orderType: String
|
|
@@ -771,6 +704,8 @@ export default {
|
|
|
return '已申请'
|
|
|
} else if (val == 2) {
|
|
|
return '已开具'
|
|
|
+ } else {
|
|
|
+ return '--'
|
|
|
}
|
|
|
},
|
|
|
timeChange(val, type) {
|
|
@@ -817,12 +752,11 @@ export default {
|
|
|
this.orders = r.data
|
|
|
if (r.data.res.invoice.length > 0) {
|
|
|
r.data.res.invoice.forEach(v => {
|
|
|
- v.create_time = ChangeDate4(v.create_time)
|
|
|
+ v.create_time = dateFormatter(v.create_time * 1000)
|
|
|
})
|
|
|
this.invoiceed = r.data.res.invoice
|
|
|
}
|
|
|
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?r.data.contractRes:{}
|
|
|
this.refundRes = r.data.refundRes?r.data.refundRes[0]:[];
|
|
@@ -845,26 +779,16 @@ export default {
|
|
|
this.serverData = r.data.filterData.serversName?r.data.filterData.serversName.split(','):[]
|
|
|
this.supplysData = r.data.filterData.supplys?r.data.filterData.supplys:[]
|
|
|
if (this.strCourse) {
|
|
|
- this.l_starttime = ChangeDate1(this.strCourse.l_starttime);
|
|
|
- this.l_endtime = ChangeDate1(this.strCourse.l_endtime);
|
|
|
+ this.l_starttime = dateFormatter(this.strCourse.l_starttime * 1000, 'yyyy年MM月dd日')
|
|
|
+ this.l_endtime = dateFormatter(this.strCourse.l_endtime * 1000, 'yyyy年MM月dd日')
|
|
|
}
|
|
|
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)?dateFormatter(this.orDetails.vip_starttime, 'yyyy.MM.dd'):'-'
|
|
|
+ this.vip_endtime = this.orderObjectd(this.orDetails.vip_endtime)?' - ' + dateFormatter(this.orDetails.vip_endtime, 'yyyy.MM.dd'):'-'
|
|
|
this.trueMoney = this.localed((this.contractData.contract_money - (this.orDetails.commission + this.orDetails.procedures_money))/100)
|
|
|
}
|
|
|
}).get()
|
|
|
},
|
|
|
- // 销售人员姓名修改
|
|
|
- saleBlur() {
|
|
|
- if (!this.isSales) {
|
|
|
- if (this.salesMen == '--') {
|
|
|
- this.salesMen = '--'
|
|
|
- } else {
|
|
|
- this.salesMen = this.orDetails.salesperson
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
invoiceCode(item) {
|
|
|
this.codeDetail = item
|
|
|
this.$refs.codeRef.codeShow = true
|
|
@@ -876,134 +800,6 @@ export default {
|
|
|
this.saleReadon = false
|
|
|
}, 100)
|
|
|
},
|
|
|
- inptSave() {
|
|
|
- if (!this.salesMen) {
|
|
|
- this.$Message.warning('销售人员姓名不能为空')
|
|
|
- return
|
|
|
- }
|
|
|
- this.$request('/order/updateSalesperson').data({
|
|
|
- orderCode: this.orDetails.order_code,
|
|
|
- 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
|
|
|
- },
|
|
|
- startDate1(val) {
|
|
|
- this.beginTime = val
|
|
|
- },
|
|
|
- startDate2(val) {
|
|
|
- this.saleTime = val
|
|
|
- },
|
|
|
- // 开始时间修改
|
|
|
- timeBtn(num) {
|
|
|
- if (num == 1 || num == 2) {
|
|
|
- this.isTime = true
|
|
|
- } else if (num == 3) {
|
|
|
- this.isTimes = true
|
|
|
- }
|
|
|
- },
|
|
|
- urlFunc(url, obj, status) {
|
|
|
- this.$request(url).data(obj).success(() => {
|
|
|
- this.$Message.success('修改成功')
|
|
|
- setTimeout(() => {
|
|
|
- if (status == 1 || status == 2) {
|
|
|
- this.isTime = false
|
|
|
- } else {
|
|
|
- this.isTimes = false
|
|
|
- }
|
|
|
- this.ordered()
|
|
|
- }, 100)
|
|
|
- }).post()
|
|
|
- },
|
|
|
- saveTime(num) {
|
|
|
- if (num == 1) {
|
|
|
- if (!this.beginTime) {
|
|
|
- this.$Message.warning('开始日期不能为空')
|
|
|
- return
|
|
|
- }
|
|
|
- const obj = {
|
|
|
- id: this.$route.query.id,
|
|
|
- vipStartTime: this.beginTime
|
|
|
- }
|
|
|
- this.urlFunc('/order/updateVipStartTime', obj, 1)
|
|
|
- } else if (num == 2) {
|
|
|
- if (!this.beginTime) {
|
|
|
- this.$Message.warning('开始日期不能为空')
|
|
|
- return
|
|
|
- }
|
|
|
- const obj = {
|
|
|
- orderCode: this.orDetails.order_code,
|
|
|
- startTime: this.beginTime,
|
|
|
- cycle: this.book.cycle,
|
|
|
- cycleType: this.book.cycleType,
|
|
|
- userId: this.orDetails.user_id
|
|
|
- }
|
|
|
- this.urlFunc('/order/updateSalesperson', obj, 2)
|
|
|
- } else if (num == 3) {
|
|
|
- console.log(this.saleTime)
|
|
|
- if (!this.saleTime) {
|
|
|
- this.$Message.warning('业绩统计时间不能为空')
|
|
|
- return
|
|
|
- }
|
|
|
- const obj = {
|
|
|
- orderCode: this.orDetails.order_code,
|
|
|
- saleTime: this.saleTime
|
|
|
- }
|
|
|
- console.log(obj)
|
|
|
- this.urlFunc('/order/updateSalesperson', obj, 3)
|
|
|
- }
|
|
|
- },
|
|
|
pushInvo() {
|
|
|
this.$refs.backRef.iShow = true
|
|
|
},
|
|
@@ -1188,7 +984,6 @@ export default {
|
|
|
return {
|
|
|
saleReadon: true,
|
|
|
phoneReadon: true,
|
|
|
- isPhone: false,
|
|
|
isSales: false,
|
|
|
addDate7: false,
|
|
|
buyProvince: '',
|
|
@@ -1200,7 +995,6 @@ export default {
|
|
|
refundRes: [],
|
|
|
orders: {},
|
|
|
codeDetail: [],
|
|
|
- salesMen: '',
|
|
|
beginTime: '',
|
|
|
saleTime: '',
|
|
|
orDetails: [],
|
|
@@ -1213,8 +1007,6 @@ export default {
|
|
|
serverData: [],
|
|
|
supplysData: [],
|
|
|
isDisable: false,
|
|
|
- isTime: false,
|
|
|
- isTimes: false,
|
|
|
invoiceed: [],
|
|
|
uploadData: {
|
|
|
type: 'transferAccounts'
|
|
@@ -1268,16 +1060,6 @@ export default {
|
|
|
.no-line {
|
|
|
color: #999;
|
|
|
}
|
|
|
- .sale-inpt {
|
|
|
- width: 180px;
|
|
|
- /deep/ .ivu-input {
|
|
|
- font-size: 16px;
|
|
|
- color: #333;
|
|
|
- &:focus {
|
|
|
- box-shadow: none;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
.i-inpt {
|
|
|
width: 180px;
|
|
|
}
|