|
|
@@ -468,7 +468,7 @@
|
|
|
|
|
|
<el-input readonly type="text" slot="reference" size="small" @focus="showChange('accountVisible')" v-model="form.enterprisename">
|
|
|
<template slot="append">
|
|
|
- <el-button size="small" @click="accountVisible = false;form.enterprisename = '';agentListPrams.content.where.condition = '';$refs.member.selected = []" style="width:100%" type="primary">{{$t('清空')}}</el-button>
|
|
|
+ <el-button size="small" @click="accountVisible = false;form.enterprisename = '';agentListPrams.content.where.condition = '';$refs.member.selected = [];form.sys_enterpriseid = 0" style="width:100%" type="primary">{{$t('清空')}}</el-button>
|
|
|
</template>
|
|
|
</el-input>
|
|
|
</el-popover>
|
|
|
@@ -819,49 +819,34 @@ export default {
|
|
|
if(this.$route.query.type == '居间') {
|
|
|
/* 当合同关系发生改变时 */
|
|
|
if (!this.form.sys_enterpriseid &&(this.form.sys_enterpriseid != this.data.sys_enterpriseid || this.form.ascription_contractid != this.data.ascription_contractid)) {
|
|
|
- /* 项目商机中是否存在该居间商 */
|
|
|
- let isChange = this.$refs.projectContract.ENlist
|
|
|
- .find(item => item.sa_contractid == this.form.ascription_contractid).parties
|
|
|
- .some(item2 => item2.sys_enterpriseid == this.form.sys_enterpriseid),
|
|
|
|
|
|
- contract = this.$refs.projectContract.ENlist
|
|
|
- .find(item => item.sa_contractid == this.form.ascription_contractid)
|
|
|
- if (isChange) {
|
|
|
- this.$confirm(this.$t('当前项目已存在此居间商,不可编辑'),this.$t('提示'),{
|
|
|
- cancelButtonText:this.$t('取消'),
|
|
|
- showConfirmButton:false
|
|
|
- }).then(() => {
|
|
|
- this.$store.commit('setLoading',false)
|
|
|
- })
|
|
|
+ if (this.$route.query.type == '直销项目') {
|
|
|
+ this.form.type = '项目'
|
|
|
+ this.form.typemx = '直销'
|
|
|
+ } else if (this.$route.query.type == '经销项目') {
|
|
|
+ this.form.type = '项目'
|
|
|
+ this.form.typemx = '经销'
|
|
|
} else {
|
|
|
- if (this.$route.query.type == '直销项目') {
|
|
|
- this.form.type = '项目'
|
|
|
- this.form.typemx = '直销'
|
|
|
- } else if (this.$route.query.type == '经销项目') {
|
|
|
- this.form.type = '项目'
|
|
|
- this.form.typemx = '经销'
|
|
|
- } else {
|
|
|
- this.form.type = this.$route.query.type
|
|
|
- }
|
|
|
- this.form.discountrate ? this.form.discountrate = (parseFloat(this.form.discountrate) / 100).toFixed(4) : ''
|
|
|
- this.form.productdiscount ? this.form.productdiscount = (parseFloat(this.form.productdiscount) / 100).toFixed(4) : ''
|
|
|
- this.form.orderratio ? this.form.orderratio = (parseFloat(this.form.orderratio) / 100).toFixed(4) : ''
|
|
|
- let res = await this.$api.requested({
|
|
|
- "id":20221121185302,
|
|
|
- "content": this.form
|
|
|
- })
|
|
|
- if (res.code == 0){
|
|
|
- this.form.discountrate = this.form.discountrate * 100
|
|
|
- this.form.productdiscount = this.form.productdiscount * 100
|
|
|
- this.form.orderratio = this.form.orderratio * 100
|
|
|
- }
|
|
|
- this.tool.showMessage(res,() => {
|
|
|
- this.$store.commit('setLoading',false)
|
|
|
- this.$refs.form.resetFields()
|
|
|
- this.drawer = false
|
|
|
- this.$emit('onSuccess')
|
|
|
- })
|
|
|
+ this.form.type = this.$route.query.type
|
|
|
}
|
|
|
+ this.form.discountrate ? this.form.discountrate = (parseFloat(this.form.discountrate) / 100).toFixed(4) : ''
|
|
|
+ this.form.productdiscount ? this.form.productdiscount = (parseFloat(this.form.productdiscount) / 100).toFixed(4) : ''
|
|
|
+ this.form.orderratio ? this.form.orderratio = (parseFloat(this.form.orderratio) / 100).toFixed(4) : ''
|
|
|
+ let res = await this.$api.requested({
|
|
|
+ "id":20221121185302,
|
|
|
+ "content": this.form
|
|
|
+ })
|
|
|
+ if (res.code == 0){
|
|
|
+ this.form.discountrate = this.form.discountrate * 100
|
|
|
+ this.form.productdiscount = this.form.productdiscount * 100
|
|
|
+ this.form.orderratio = this.form.orderratio * 100
|
|
|
+ }
|
|
|
+ this.tool.showMessage(res,() => {
|
|
|
+ this.$store.commit('setLoading',false)
|
|
|
+ this.$refs.form.resetFields()
|
|
|
+ this.drawer = false
|
|
|
+ this.$emit('onSuccess')
|
|
|
+ })
|
|
|
|
|
|
} else {
|
|
|
this.form.orderratio ? this.form.orderratio = (parseFloat(this.form.orderratio) / 100).toFixed(4) : ''
|
|
|
@@ -882,6 +867,7 @@ export default {
|
|
|
this.$emit('onSuccess')
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
} else {
|
|
|
if (this.$route.query.type == '直销项目') {
|
|
|
this.form.type = '项目'
|