|
@@ -1,49 +1,54 @@
|
|
|
<template>
|
|
|
- <div v-loading="fullscreenLoading">
|
|
|
+ <div v-loading="fullscreenLoading">
|
|
|
<div class="groupedit">
|
|
|
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
|
|
<div class="required-box">
|
|
|
<el-form-item label-width="120px" label="销售报价号:">
|
|
|
- <el-input :readonly="true" el-input v-model="ruleForm.quotenum"></el-input>
|
|
|
+ <el-input :readonly="true" el-input v-model="ruleForm.quotenum"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label-width="120px" label="本团成单人:" prop="person">
|
|
|
<el-select v-model="ruleForm.person" placeholder="请选择本团成单人 ">
|
|
|
- <el-option v-for="(item,index) in personarr" :key="index" :label="item.cnName" :value="item.id"></el-option>
|
|
|
+ <el-option v-for="(item, index) in personarr" :key="index" :label="item.cnName"
|
|
|
+ :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label-width="120px" label="客户级别:" prop="grades">
|
|
|
<el-select v-model="ruleForm.grades" placeholder="请选择客户级别">
|
|
|
- <el-option v-for="(item,index) in gradearr" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
+ <el-option v-for="(item, index) in gradearr" :key="index" :label="item.name"
|
|
|
+ :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label-width="120px" label="团组类型:" prop="OP">
|
|
|
<el-select class="op-type" v-model="ruleForm.OP" placeholder="请选择团组类型">
|
|
|
- <el-option v-for="(item,index) in OPtype" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
+ <el-option v-for="(item, index) in OPtype" :key="index" :label="item.name"
|
|
|
+ :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label-width="120px" label="团组名称:" prop="groupname">
|
|
|
- <el-input el-input v-model="ruleForm.groupname"></el-input>
|
|
|
+ <el-input el-input v-model="ruleForm.groupname"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label-width="120px" label="客户名称:" prop="customername">
|
|
|
- <el-input el-input v-model="ruleForm.customername"></el-input>
|
|
|
+ <el-input el-input v-model="ruleForm.customername"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label-width="120px" label="客户单位:" prop="customerunits">
|
|
|
- <el-input el-input v-model="ruleForm.customerunits"></el-input>
|
|
|
+ <el-input el-input v-model="ruleForm.customerunits"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label-width="120px" label="出访国家:" prop="countriesvisited">
|
|
|
- <el-input el-input v-model="ruleForm.countriesvisited"></el-input>
|
|
|
+ <el-input el-input v-model="ruleForm.countriesvisited"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label-width="120px" label="出访时间:" prop="visitingtime">
|
|
|
- <el-date-picker type="date" placeholder="选择日期" v-model="ruleForm.visitingtime" style="width: 100%;"></el-date-picker>
|
|
|
+ <el-form-item label-width="120px" label="出访时间:" prop="visitingtime">
|
|
|
+ <el-date-picker type="date" placeholder="选择日期" v-model="ruleForm.visitingtime"
|
|
|
+ style="width: 100%;"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label-width="120px" label="出访天数:" prop="numdays">
|
|
|
- <el-input el-input v-model="ruleForm.numdays"></el-input>
|
|
|
+ <el-input el-input v-model="ruleForm.numdays"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label-width="120px" label="出访人数:" prop="numperson">
|
|
|
- <el-input el-input v-model="ruleForm.numperson"></el-input>
|
|
|
+ <el-input el-input v-model="ruleForm.numperson"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label-width="120px" label="合同时间:" prop="contracttime">
|
|
|
- <el-date-picker type="date" placeholder="选择日期" v-model="ruleForm.contracttime" style="width: 100%;"></el-date-picker>
|
|
|
+ <el-form-item label-width="120px" label="合同时间:" prop="contracttime">
|
|
|
+ <el-date-picker type="date" placeholder="选择日期" v-model="ruleForm.contracttime"
|
|
|
+ style="width: 100%;"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="advance-box">
|
|
@@ -51,33 +56,49 @@
|
|
|
<el-input style="width: 100px;" el-input v-model="ruleForm.occasion"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label-width="98px" label="日支付款项:" prop="payments">
|
|
|
- <el-input el-input v-model="ruleForm.payments"></el-input>
|
|
|
+ <el-input el-input v-model="ruleForm.payments"></el-input>
|
|
|
</el-form-item>
|
|
|
- <span style="margin-bottom: 22px;display: inline-block;color: #606266;font-size: 14px;">(预付款,请输入RMB)</span>
|
|
|
+ <span
|
|
|
+ style="margin-bottom: 22px;display: inline-block;color: #606266;font-size: 14px;">(预付款,请输入RMB)</span>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex;">
|
|
|
+ <el-form-item label-width="120px" label="OP提成等级" prop="opRoyaltyLv">
|
|
|
+ <el-select v-model="ruleForm.opRoyaltyLv" placeholder="OP提成等级" clearable filterable
|
|
|
+ style="width: 100%;">
|
|
|
+ <el-option v-for="item in opRoyaltyLvList" :key="item.id" :label="item.name + '元'"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label-width="98px" label="等级说明:" prop="opRoyaltyRemark">
|
|
|
+ <el-input type="textarea" v-model="ruleForm.opRoyaltyRemark" style="width: 500px;"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <span style="margin-bottom: 22px;display: inline-block;color: #606266;font-size: 14px;"
|
|
|
+ @click="dialogVisible = true">(点击查看等级说明)</span>
|
|
|
</div>
|
|
|
<el-form>
|
|
|
<el-form-item label-width="120px" label="出访目的:">
|
|
|
<el-input type="textarea" v-model="ruleForm.purposevisit"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label-width="120px" label="特殊需求:">
|
|
|
- <el-input type="textarea" v-model="ruleForm.specialneeds"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label-width="120px" label="其他需求:">
|
|
|
- <el-input type="textarea" v-model="ruleForm.otherneeds"></el-input>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label-width="120px" label="特殊需求:">
|
|
|
+ <el-input type="textarea" v-model="ruleForm.specialneeds"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label-width="120px" label="其他需求:">
|
|
|
+ <el-input type="textarea" v-model="ruleForm.otherneeds"></el-input>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<el-form class="approval-box">
|
|
|
<el-form-item label-width="160px" label="出国任务审批部门名称:">
|
|
|
- <el-input el-input v-model="ruleForm.approvalname"></el-input>
|
|
|
+ <el-input el-input v-model="ruleForm.approvalname"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label-width="120px" label="批件文号:">
|
|
|
- <el-input el-input v-model="ruleForm.approvalnumber1"></el-input>
|
|
|
+ <el-input el-input v-model="ruleForm.approvalnumber1"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label-width="130px" label="政治审查部门名称:">
|
|
|
- <el-input el-input v-model="ruleForm.censorshipdepartment"></el-input>
|
|
|
+ <el-input el-input v-model="ruleForm.censorshipdepartment"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label-width="120px" label="批件文号:">
|
|
|
- <el-input el-input v-model="ruleForm.approvalnumber2"></el-input>
|
|
|
+ <el-input el-input v-model="ruleForm.approvalnumber2"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-form>
|
|
@@ -93,8 +114,38 @@
|
|
|
<el-button @click="resetForm('ruleForm')">重 置</el-button>
|
|
|
<el-button @click="clickback()">返 回</el-button>
|
|
|
</el-form-item>
|
|
|
- </el-form>
|
|
|
+ </el-form>
|
|
|
</div>
|
|
|
+ <el-dialog title="等级说明" :visible.sync="dialogVisible" width="30%" :before-close="handleClose"
|
|
|
+ :close-on-click-modal="false">
|
|
|
+ <span>
|
|
|
+ 1)普通团组:¥300/团;<br><br>
|
|
|
+
|
|
|
+ 2)VIP团(地市州书记 市长 成都副市级别 副书记级别 成都正厅级干部):¥500/团;<br><br>
|
|
|
+
|
|
|
+ 3)VVIP团(四川省副部级 副省级 省长 ):¥1000/团;<br><br>
|
|
|
+
|
|
|
+ 4)非全程接待或非标准团组,接待5天内(含5天)的团组:¥100/团;<br><br>
|
|
|
+
|
|
|
+ 5)非全程接待或非标准团组,但负责全程机票,接待5天以上的团组:¥200/团;<br><br>
|
|
|
+
|
|
|
+ 6)非全程接待或非标准团组且不负责全程机票,接待5天以上的团组:¥100/团<br><br>
|
|
|
+
|
|
|
+ 7)非全程接待或非标准团组且不负责全程机票,只负责地接的,人数为10人以上的的团组:300/团;<br><br>
|
|
|
+
|
|
|
+ 8)人数为5人以内(含5人)的标准团组:¥200/团;<br><br>
|
|
|
+
|
|
|
+ 9)人数为5人以内(含5人)并且非全程接待5天内(含5天)的团组:¥100/团;<br><br>
|
|
|
+
|
|
|
+ 10)人数为5人以内(含5人),非全程接待5天以上并且负责全程机票的团组:¥200/团;<br><br>
|
|
|
+
|
|
|
+ 11)人数为5人以内(含5人)并且非全程接待5天以上,但不负责全程机票的团组:¥100.00/团;<br><br>
|
|
|
+ </span>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -103,95 +154,105 @@ import { el } from '@fullcalendar/core/internal-common';
|
|
|
import { all } from 'q';
|
|
|
export default {
|
|
|
data() {
|
|
|
- return {
|
|
|
- editid:'',
|
|
|
- token:'',
|
|
|
- userid:'',
|
|
|
- ruleForm: {
|
|
|
- quotenum:'',
|
|
|
- groupname: '',
|
|
|
- customername: '',
|
|
|
- customerunits:'',
|
|
|
- countriesvisited:'',
|
|
|
- visitingtime:'',
|
|
|
- contracttime:'',
|
|
|
- numdays:'',
|
|
|
- numperson:'',
|
|
|
- occasion:'',
|
|
|
- payments:'',
|
|
|
- purposevisit: '',
|
|
|
- specialneeds:'',
|
|
|
- otherneeds:'',
|
|
|
- approvalname:'',
|
|
|
- approvalnumber1:'',
|
|
|
- approvalnumber2:'',
|
|
|
- censorshipdepartment:'',
|
|
|
- remark:'',
|
|
|
- phonenumber:'',
|
|
|
- OP:'',
|
|
|
- grades:'',
|
|
|
- person:''
|
|
|
- },
|
|
|
- personarr:[],
|
|
|
- gradearr:[],
|
|
|
- OPtype:[],
|
|
|
- rules: {
|
|
|
- groupname: [
|
|
|
- { required: true, message: '请输入团组名称', trigger: 'blur' },
|
|
|
- ],
|
|
|
- customername: [
|
|
|
- { required: true, message: '请输入客户名称', trigger: 'blur' },
|
|
|
- ],
|
|
|
- customerunits:[
|
|
|
- { required: true, message: '请输入客户单位', trigger: 'blur' },
|
|
|
- ],
|
|
|
- countriesvisited:[
|
|
|
- { required: true, message: '请输入出访国家', trigger: 'blur' },
|
|
|
- ],
|
|
|
- person: [
|
|
|
- { required: true, message: '请选择成团人', trigger: 'change' }
|
|
|
- ],
|
|
|
- grades:[
|
|
|
- { required: true, message: '请选择级别', trigger: 'change' }
|
|
|
- ],
|
|
|
- OP:[
|
|
|
- { required: true, message: '请选择类型', trigger: 'change' }
|
|
|
- ],
|
|
|
- visitingtime: [
|
|
|
- { type: 'date', required: true, message: '请选择日期', trigger: 'change' }
|
|
|
- ],
|
|
|
- contracttime: [
|
|
|
- { type: 'date', required: true, message: '请选择时间', trigger: 'change' }
|
|
|
- ],
|
|
|
- numdays:[
|
|
|
- { required: true, message: '请输入出访天数', trigger: 'blur' },
|
|
|
- {pattern:"^\\d+$",message: "请输入正整数",trigger: "blur"}
|
|
|
- ],
|
|
|
- numperson:[
|
|
|
- { required: true, message: '请输入出访人数', trigger: 'blur' },
|
|
|
- {pattern:"^\\d+$",message: "请输入正整数",trigger: "blur"}
|
|
|
- ],
|
|
|
- occasion:[
|
|
|
- { required: true, message: '请输入出天数', trigger: 'blur' },
|
|
|
- {pattern:"^\\d+$",message: "请输入正整数",trigger: "blur"}
|
|
|
- ],
|
|
|
- payments:[
|
|
|
- { required: true, message: '请输入出款额', trigger: 'blur' },
|
|
|
- {pattern:"^\\d+(\\.\\d+)?$",message: "请输入正浮点数或整数",trigger: "blur"}
|
|
|
- ]
|
|
|
- },
|
|
|
- fullscreenLoading:false
|
|
|
- };
|
|
|
+ return {
|
|
|
+ editid: '',
|
|
|
+ token: '',
|
|
|
+ userid: '',
|
|
|
+ ruleForm: {
|
|
|
+ quotenum: '',
|
|
|
+ groupname: '',
|
|
|
+ customername: '',
|
|
|
+ customerunits: '',
|
|
|
+ countriesvisited: '',
|
|
|
+ visitingtime: '',
|
|
|
+ contracttime: '',
|
|
|
+ numdays: '',
|
|
|
+ numperson: '',
|
|
|
+ occasion: '',
|
|
|
+ payments: '',
|
|
|
+ purposevisit: '',
|
|
|
+ specialneeds: '',
|
|
|
+ otherneeds: '',
|
|
|
+ approvalname: '',
|
|
|
+ approvalnumber1: '',
|
|
|
+ approvalnumber2: '',
|
|
|
+ censorshipdepartment: '',
|
|
|
+ remark: '',
|
|
|
+ phonenumber: '',
|
|
|
+ OP: '',
|
|
|
+ grades: '',
|
|
|
+ person: '',
|
|
|
+ opRoyaltyLv: '',
|
|
|
+ opRoyaltyRemark: ''
|
|
|
+ },
|
|
|
+ personarr: [],
|
|
|
+ gradearr: [],
|
|
|
+ OPtype: [],
|
|
|
+ rules: {
|
|
|
+ groupname: [
|
|
|
+ { required: true, message: '请输入团组名称', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ customername: [
|
|
|
+ { required: true, message: '请输入客户名称', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ customerunits: [
|
|
|
+ { required: true, message: '请输入客户单位', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ countriesvisited: [
|
|
|
+ { required: true, message: '请输入出访国家', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ person: [
|
|
|
+ { required: true, message: '请选择成团人', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ grades: [
|
|
|
+ { required: true, message: '请选择级别', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ OP: [
|
|
|
+ { required: true, message: '请选择类型', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ visitingtime: [
|
|
|
+ { type: 'date', required: true, message: '请选择日期', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ contracttime: [
|
|
|
+ { type: 'date', required: true, message: '请选择时间', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ numdays: [
|
|
|
+ { required: true, message: '请输入出访天数', trigger: 'blur' },
|
|
|
+ { pattern: "^\\d+$", message: "请输入正整数", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ numperson: [
|
|
|
+ { required: true, message: '请输入出访人数', trigger: 'blur' },
|
|
|
+ { pattern: "^\\d+$", message: "请输入正整数", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ occasion: [
|
|
|
+ { required: true, message: '请输入出天数', trigger: 'blur' },
|
|
|
+ { pattern: "^\\d+$", message: "请输入正整数", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ payments: [
|
|
|
+ { required: true, message: '请输入出款额', trigger: 'blur' },
|
|
|
+ { pattern: "^\\d+(\\.\\d+)?$", message: "请输入正浮点数或整数", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ opRoyaltyLv: [
|
|
|
+ { required: true, message: '请选择op提成等级', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ opRoyaltyRemark: [
|
|
|
+ { required: true, message: '请填写等级描述', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ fullscreenLoading: false,
|
|
|
+ dialogVisible: false,
|
|
|
+ opRoyaltyLvList: [],
|
|
|
+ };
|
|
|
},
|
|
|
methods: {
|
|
|
submitForm(formName) {
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- this.addGroupInfo()
|
|
|
- } else {
|
|
|
- console.log('error submit!!');
|
|
|
- return false;
|
|
|
- }
|
|
|
+ if (valid) {
|
|
|
+ this.addGroupInfo()
|
|
|
+ } else {
|
|
|
+ console.log('error submit!!');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
//清空
|
|
@@ -199,53 +260,69 @@ export default {
|
|
|
this.$refs[formName].resetFields();
|
|
|
},
|
|
|
//返回
|
|
|
- clickback(){
|
|
|
+ clickback() {
|
|
|
this.$router.go(-1);
|
|
|
},
|
|
|
//获取下拉列表
|
|
|
- getdown(){
|
|
|
- var url="/api/Groups/GroupEditBasicSource"
|
|
|
- var that=this
|
|
|
+ getdown() {
|
|
|
+ var url = "/api/Groups/GroupEditBasicSource"
|
|
|
+ var that = this
|
|
|
this.$axios({
|
|
|
method: 'post',
|
|
|
- url:url,
|
|
|
- headers:{
|
|
|
- Authorization:'Bearer '+this.token
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + this.token
|
|
|
},
|
|
|
- data:{
|
|
|
+ data: {
|
|
|
portType: 1,
|
|
|
}
|
|
|
- }).then(function(res){
|
|
|
- if(res.data.code==200){
|
|
|
- that.personarr=res.data.data.userData;
|
|
|
- that.gradearr=res.data.data.teamLevData;
|
|
|
- that.OPtype=res.data.data.teamTypeData;
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.personarr = res.data.data.userData;
|
|
|
+ that.gradearr = res.data.data.teamLevData;
|
|
|
+ that.OPtype = res.data.data.teamTypeData;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ var url = "/api/System/QuerySetData"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + this.token
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ dataType: 70,
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.opRoyaltyLvList = res.data.data;
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
//新增获取销售号
|
|
|
- getSalesQuoteNo(){
|
|
|
- if(this.editid==undefined){
|
|
|
- var url="/api/Groups/GetGroupSalesQuoteNo"
|
|
|
- var that=this
|
|
|
- if(this.editid==undefined){
|
|
|
+ getSalesQuoteNo() {
|
|
|
+ if (this.editid == undefined) {
|
|
|
+ var url = "/api/Groups/GetGroupSalesQuoteNo"
|
|
|
+ var that = this
|
|
|
+ if (this.editid == undefined) {
|
|
|
this.$axios({
|
|
|
method: 'post',
|
|
|
- url:url,
|
|
|
- headers:{
|
|
|
- Authorization:'Bearer '+this.token
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + this.token
|
|
|
},
|
|
|
- }).then(function(res){
|
|
|
- if(res.data.code==200){
|
|
|
- that.ruleForm.quotenum=res.data.data.salesQuoteNo;
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.ruleForm.quotenum = res.data.data.salesQuoteNo;
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
//处理时间
|
|
|
- disposeTime(val){
|
|
|
+ disposeTime(val) {
|
|
|
var date = new Date(val);
|
|
|
var y = date.getFullYear();
|
|
|
var m = date.getMonth() + 1;
|
|
@@ -256,123 +333,128 @@ export default {
|
|
|
return time
|
|
|
},
|
|
|
//编辑获取原数据
|
|
|
- getGroupInfo(){
|
|
|
- var url="/api/Groups/GetGroupInfo"
|
|
|
- var that=this
|
|
|
+ getGroupInfo() {
|
|
|
+ var url = "/api/Groups/GetGroupInfo"
|
|
|
+ var that = this
|
|
|
var datagroup
|
|
|
- if(this.editid!=undefined){
|
|
|
+ if (this.editid != undefined) {
|
|
|
this.$axios({
|
|
|
method: 'post',
|
|
|
- url:url,
|
|
|
- headers:{
|
|
|
- Authorization:'Bearer '+this.token
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + this.token
|
|
|
},
|
|
|
- data:{
|
|
|
- portType:1,
|
|
|
- id:that.editid
|
|
|
+ data: {
|
|
|
+ portType: 1,
|
|
|
+ id: that.editid
|
|
|
}
|
|
|
- }).then(function(res){
|
|
|
- if(res.data.code==200){
|
|
|
- datagroup=res.data.data;
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ datagroup = res.data.data;
|
|
|
console.log(datagroup)
|
|
|
- that.ruleForm.quotenum=datagroup.salesQuoteNo;
|
|
|
- that.ruleForm.groupname=datagroup.teamName;
|
|
|
- that.ruleForm.customername=datagroup.clientName;
|
|
|
- that.ruleForm.customerunits=datagroup.clientUnit;
|
|
|
- that.ruleForm.countriesvisited=datagroup.visitCountry.replaceAll("|","、");
|
|
|
- that.ruleForm.visitingtime=new Date(datagroup.visitDate.split(' ')[0]);
|
|
|
- that.ruleForm.numdays=datagroup.visitDays+"";
|
|
|
- that.ruleForm.numperson=datagroup.visitPNumber+"";
|
|
|
- that.ruleForm.contracttime=new Date(datagroup.tontractTime.split(' ')[0]);
|
|
|
- that.ruleForm.payments=datagroup.paymentMoney+'';
|
|
|
- that.ruleForm.occasion=datagroup.payDay+'';
|
|
|
- that.ruleForm.purposevisit=datagroup.visitPurpose;
|
|
|
- that.ruleForm.specialneeds=datagroup.specialNeeds;
|
|
|
- that.ruleForm.otherneeds=datagroup.otherNeeds;
|
|
|
- that.ruleForm.approvalname=datagroup.cgrwspbmmc;
|
|
|
- that.ruleForm.approvalnumber1=datagroup.cgrwspwh;
|
|
|
- that.ruleForm.censorshipdepartment=datagroup.zzscbmmc;
|
|
|
- that.ruleForm.approvalnumber2=datagroup.zzscspwh;
|
|
|
- that.ruleForm.remark=datagroup.remark;
|
|
|
- that.ruleForm.phonenumber=datagroup.tellPhone;
|
|
|
- that.ruleForm.OP=datagroup.teamDid;
|
|
|
- that.ruleForm.grades=datagroup.teamLevSId;
|
|
|
- that.ruleForm.person=datagroup.jietuanOperator;
|
|
|
+ that.ruleForm.quotenum = datagroup.salesQuoteNo;
|
|
|
+ that.ruleForm.groupname = datagroup.teamName;
|
|
|
+ that.ruleForm.customername = datagroup.clientName;
|
|
|
+ that.ruleForm.customerunits = datagroup.clientUnit;
|
|
|
+ that.ruleForm.countriesvisited = datagroup.visitCountry.replaceAll("|", "、");
|
|
|
+ that.ruleForm.visitingtime = new Date(datagroup.visitDate.split(' ')[0]);
|
|
|
+ that.ruleForm.numdays = datagroup.visitDays + "";
|
|
|
+ that.ruleForm.numperson = datagroup.visitPNumber + "";
|
|
|
+ that.ruleForm.contracttime = new Date(datagroup.tontractTime.split(' ')[0]);
|
|
|
+ that.ruleForm.payments = datagroup.paymentMoney + '';
|
|
|
+ that.ruleForm.occasion = datagroup.payDay + '';
|
|
|
+ that.ruleForm.purposevisit = datagroup.visitPurpose;
|
|
|
+ that.ruleForm.specialneeds = datagroup.specialNeeds;
|
|
|
+ that.ruleForm.otherneeds = datagroup.otherNeeds;
|
|
|
+ that.ruleForm.approvalname = datagroup.cgrwspbmmc;
|
|
|
+ that.ruleForm.approvalnumber1 = datagroup.cgrwspwh;
|
|
|
+ that.ruleForm.censorshipdepartment = datagroup.zzscbmmc;
|
|
|
+ that.ruleForm.approvalnumber2 = datagroup.zzscspwh;
|
|
|
+ that.ruleForm.remark = datagroup.remark;
|
|
|
+ that.ruleForm.phonenumber = datagroup.tellPhone;
|
|
|
+ that.ruleForm.OP = datagroup.teamDid;
|
|
|
+ that.ruleForm.grades = datagroup.teamLevSId;
|
|
|
+ that.ruleForm.person = datagroup.jietuanOperator;
|
|
|
+ debugger
|
|
|
+ that.ruleForm.opRoyaltyLv = parseInt(datagroup.opRoyaltyLv);
|
|
|
+ that.ruleForm.opRoyaltyRemark = datagroup.opRoyaltyRemark;
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
//新增编辑
|
|
|
- addGroupInfo(){
|
|
|
- var url="/api/Groups/GroupOperation";
|
|
|
- var that=this;
|
|
|
+ addGroupInfo() {
|
|
|
+ var url = "/api/Groups/GroupOperation";
|
|
|
+ var that = this;
|
|
|
that.fullscreenLoading = true;
|
|
|
var status
|
|
|
- if(this.editid!=undefined){
|
|
|
- status=2
|
|
|
- }else{
|
|
|
- status=1
|
|
|
+ if (this.editid != undefined) {
|
|
|
+ status = 2
|
|
|
+ } else {
|
|
|
+ status = 1
|
|
|
}
|
|
|
this.$axios({
|
|
|
- method: 'post',
|
|
|
- url:url,
|
|
|
- headers:{
|
|
|
- Authorization:'Bearer '+this.token
|
|
|
- },
|
|
|
- data:{
|
|
|
- portType:1,
|
|
|
- status:status,//添加1//修改2//删除3
|
|
|
- id:that.editid,
|
|
|
- userId:that.userid,
|
|
|
- salesQuoteNo:that.ruleForm.quotenum,
|
|
|
- jietuanOperator:parseInt(that.ruleForm.person),//
|
|
|
- teamLevSId:parseInt(that.ruleForm.grades),//
|
|
|
- teamDid:parseInt(that.ruleForm.OP),//
|
|
|
- teamName:that.ruleForm.groupname,
|
|
|
- clientName:that.ruleForm.customername,
|
|
|
- clientUnit:that.ruleForm.customerunits,
|
|
|
- visitCountry:that.ruleForm.countriesvisited.replaceAll("、","|"),
|
|
|
- visitDate:that.disposeTime(that.ruleForm.visitingtime),
|
|
|
- visitDays:parseInt(that.ruleForm.numdays),
|
|
|
- visitPNumber:parseInt(that.ruleForm.numperson),
|
|
|
- tontractTime:that.disposeTime(that.ruleForm.contracttime),
|
|
|
- payDay:parseInt(that.ruleForm.occasion),
|
|
|
- paymentMoney:parseInt(that.ruleForm.payments),
|
|
|
- visitPurpose:that.ruleForm.purposevisit,
|
|
|
- specialNeeds:that.ruleForm.specialneeds,
|
|
|
- otherNeeds:that.ruleForm.otherneeds,
|
|
|
- cgrwspbmmc:that.ruleForm.approvalname,
|
|
|
- cgrwspwh:that.ruleForm.approvalnumber1,
|
|
|
- zzscbmmc:that.ruleForm.censorshipdepartment,
|
|
|
- zzscspwh:that.ruleForm.approvalnumber2,
|
|
|
- tellPhone:that.ruleForm.phonenumber,
|
|
|
- remark:that.ruleForm.remark,
|
|
|
- }
|
|
|
- }).then(function(res){
|
|
|
- console.log(res)
|
|
|
- if(res.data.code==200){
|
|
|
- that.$message({
|
|
|
- message: res.data.msg,
|
|
|
- type: 'success',
|
|
|
- offset:50
|
|
|
- });
|
|
|
- that.fullscreenLoading = false;
|
|
|
- that.$router.go(-1);
|
|
|
- }else{
|
|
|
- that.$message({
|
|
|
- message:res.data.msg,
|
|
|
- type: 'warning',
|
|
|
- offset:50
|
|
|
- });
|
|
|
- that.fullscreenLoading = false;
|
|
|
- }
|
|
|
- })
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + this.token
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ portType: 1,
|
|
|
+ status: status,//添加1//修改2//删除3
|
|
|
+ id: that.editid,
|
|
|
+ userId: that.userid,
|
|
|
+ salesQuoteNo: that.ruleForm.quotenum,
|
|
|
+ jietuanOperator: parseInt(that.ruleForm.person),//
|
|
|
+ teamLevSId: parseInt(that.ruleForm.grades),//
|
|
|
+ teamDid: parseInt(that.ruleForm.OP),//
|
|
|
+ teamName: that.ruleForm.groupname,
|
|
|
+ clientName: that.ruleForm.customername,
|
|
|
+ clientUnit: that.ruleForm.customerunits,
|
|
|
+ visitCountry: that.ruleForm.countriesvisited.replaceAll("、", "|"),
|
|
|
+ visitDate: that.disposeTime(that.ruleForm.visitingtime),
|
|
|
+ visitDays: parseInt(that.ruleForm.numdays),
|
|
|
+ visitPNumber: parseInt(that.ruleForm.numperson),
|
|
|
+ tontractTime: that.disposeTime(that.ruleForm.contracttime),
|
|
|
+ payDay: parseInt(that.ruleForm.occasion),
|
|
|
+ paymentMoney: parseInt(that.ruleForm.payments),
|
|
|
+ visitPurpose: that.ruleForm.purposevisit,
|
|
|
+ specialNeeds: that.ruleForm.specialneeds,
|
|
|
+ otherNeeds: that.ruleForm.otherneeds,
|
|
|
+ cgrwspbmmc: that.ruleForm.approvalname,
|
|
|
+ cgrwspwh: that.ruleForm.approvalnumber1,
|
|
|
+ zzscbmmc: that.ruleForm.censorshipdepartment,
|
|
|
+ zzscspwh: that.ruleForm.approvalnumber2,
|
|
|
+ tellPhone: that.ruleForm.phonenumber,
|
|
|
+ remark: that.ruleForm.remark,
|
|
|
+ opRoyaltyLv: that.ruleForm.opRoyaltyLv,
|
|
|
+ opRoyaltyRemark: that.ruleForm.opRoyaltyRemark,
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ console.log(res)
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success',
|
|
|
+ offset: 50
|
|
|
+ });
|
|
|
+ that.fullscreenLoading = false;
|
|
|
+ that.$router.go(-1);
|
|
|
+ } else {
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'warning',
|
|
|
+ offset: 50
|
|
|
+ });
|
|
|
+ that.fullscreenLoading = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
- mounted(){
|
|
|
- this.editid=this.$route.query.id;
|
|
|
- this.token=JSON.parse(localStorage.getItem('userinif')).token;
|
|
|
- this.userid=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
|
|
|
+ mounted() {
|
|
|
+ this.editid = this.$route.query.id;
|
|
|
+ this.token = JSON.parse(localStorage.getItem('userinif')).token;
|
|
|
+ this.userid = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
|
|
|
this.getSalesQuoteNo();
|
|
|
this.getdown();
|
|
|
this.getGroupInfo();
|
|
@@ -380,34 +462,41 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
<style>
|
|
|
- .groupedit{
|
|
|
- background-color: #fff;
|
|
|
- border-radius: 10px;
|
|
|
- padding: 20px;
|
|
|
- }
|
|
|
- .required-box{
|
|
|
- display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
- justify-content: space-between;
|
|
|
- }
|
|
|
- .required-box>div{
|
|
|
- width: 30%;
|
|
|
- }
|
|
|
- .required-box .el-select{
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
- .approval-box{
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- }
|
|
|
- .approval-box>div{
|
|
|
- width: 23%;
|
|
|
- }
|
|
|
- .approval-box>div:nth-child(1){
|
|
|
- width: 30%;
|
|
|
- }
|
|
|
- .advance-box{
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- }
|
|
|
+.groupedit {
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 10px;
|
|
|
+ padding: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.required-box {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+
|
|
|
+.required-box>div {
|
|
|
+ width: 30%;
|
|
|
+}
|
|
|
+
|
|
|
+.required-box .el-select {
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+
|
|
|
+.approval-box {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+
|
|
|
+.approval-box>div {
|
|
|
+ width: 23%;
|
|
|
+}
|
|
|
+
|
|
|
+.approval-box>div:nth-child(1) {
|
|
|
+ width: 30%;
|
|
|
+}
|
|
|
+
|
|
|
+.advance-box {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
</style>>
|