Browse Source

Merge branch 'mergeBranch' of http://124.70.211.186:3000/zhangqi/yos_web into mergeBranch

codeMan 8 months ago
parent
commit
d3631e07a9

+ 2 - 2
src/HDrpManagement/collectionRule/modules/table.vue

@@ -89,7 +89,7 @@
             <template slot-scope="scope">
             <template slot-scope="scope">
               <div v-if="scope.row.accountingnodes">
               <div v-if="scope.row.accountingnodes">
                 <div v-if="scope.row.accountingnodes.logisticscheck">
                 <div v-if="scope.row.accountingnodes.logisticscheck">
-                  <indexNew :data="scope.row.accountingnodes.logisticscheck"></indexNew>
+                  <indexNew :data="scope.row.accountingnodes.logisticscheck" name="isused"></indexNew>
                 </div>
                 </div>
                 <div v-else>--</div>
                 <div v-else>--</div>
               </div>
               </div>
@@ -150,7 +150,7 @@
             <template slot-scope="scope">
             <template slot-scope="scope">
               <div v-if="scope.row.accountingnodes">
               <div v-if="scope.row.accountingnodes">
                 <div v-if="scope.row.accountingnodes.invoiceapplycheck">
                 <div v-if="scope.row.accountingnodes.invoiceapplycheck">
-                  <indexNew :data="scope.row.accountingnodes.invoiceapplycheck"></indexNew>
+                  <indexNew :data="scope.row.accountingnodes.invoiceapplycheck" name="isused"></indexNew>
                 </div>
                 </div>
                 <div v-else>--</div>
                 <div v-else>--</div>
               </div>
               </div>

+ 263 - 0
src/HDrpManagement/contractManage/components/contactList/addContact.vue

@@ -0,0 +1,263 @@
+<template>
+  <div>
+    <el-button size="small" type="primary" @click="addBtn(drawerFormVisible = true)">添加</el-button>
+    <el-drawer
+        title="添加联系人"
+        :visible.sync="drawerFormVisible"
+        size="600px"
+        direction="rtl"
+        :show-close="false"
+        append-to-body
+        @close="onClose">
+      <div class="drawer__panel">
+        <el-row :gutter="20">
+          <el-form :model="form" :rules="rules"  ref="form"  size="mini" label-position="right" label-width="90px">
+            <el-col :span="24">
+              <el-form-item  label="姓名:" prop="name">
+                <contactsNewTemplate ref="contactRef" ownertable="sys_enterprise" :isParam="true" :newParam="param" @contactData="contactData" ></contactsNewTemplate>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item >
+                <el-radio v-model="form.isTelephone" label="0" disabled>手机号</el-radio>
+                <el-radio v-model="form.isTelephone" label="1" disabled>座机电话</el-radio>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" v-if="form.isTelephone == '1'">
+              <el-form-item label="联系方式:" prop="telephone" >
+                <el-input v-model="form.areaCode" style="width: 25%" autocomplete="on" placeholder="请填写区号" disabled></el-input>
+                <span style="color: #999999">——</span>
+                <el-input v-model="form.telephone" style="width: 68%" autocomplete="on" placeholder="请填写座机电话" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24"  >
+              <el-form-item v-if="form.isTelephone == '0'" label="联系方式:" prop="phonenumber" :rules="[
+              { required: true, message: '手机号码不能为空'},
+              { pattern:/^1[3-9][0-9]\d{8}$/, message: '请输入正确手机号码',trigger: 'change' }
+            ]">
+                <el-input v-model="form.phonenumber" autocomplete="on" placeholder="请填写手机号码" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item  label="微信:" prop="wechatnum" >
+                <el-input  autosize v-model="form.wechatnum" placeholder="请输入微信" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item   label="邮箱:" :rules="[
+              { pattern:/^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/, message: '请输入有效的邮箱',trigger: 'change' }
+            ]">
+                <el-input   autosize v-model="form.email" placeholder="请输入邮箱" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item  label="传真:" >
+                <el-input  autosize v-model="form.fax" placeholder="请输入传真" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item  label="关联企业:" >
+                <el-input  autosize v-model="form.enterprisename" placeholder="请输入关联企业" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item  label="部门:" prop="depname" >
+                <el-input  autosize v-model="form.depname" placeholder="请输入部门" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item  label="职位:" prop="position">
+                <el-input  autosize v-model="form.position" placeholder="请输入职位" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item  label="性别:" >
+                <el-radio v-model="form.sex" label="男" disabled>男</el-radio>
+                <el-radio v-model="form.sex" label="女" disabled>女</el-radio>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item  label="生日:" >
+                <el-date-picker
+                    disabled
+                    v-model="form.birthday"
+                    value-format="yyyy-MM-dd"
+                    type="date"
+                    placeholder="选择日期"
+                    style="width: 100%"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item  label="家庭住址:" >
+                <el-input type="textarea" rows="5" v-model="form.address" placeholder="请输入家庭住址" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="偏好" prop="preference" >
+                <el-input v-model="form.preference" autocomplete="on" placeholder="请填写偏好" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="爱好" prop="hobby" >
+                <el-input v-model="form.hobby" autocomplete="on" placeholder="请填写爱好" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item  label="备注:" >
+                <el-input type="textarea"  rows="5" v-model="form.remarks" placeholder="请输入备注" disabled></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="onClose" class="normal-btn-width" :disabled="loading">取 消</el-button>
+        <el-button size="small" type="primary" :loading="loading"  @click="onSubmit" class="normal-btn-width">确 定</el-button>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import contactsNewTemplate from '@/template/contactsNewTemplate/index'
+export default {
+  name: "addContact",
+  components:{contactsNewTemplate},
+  props:['data'],
+  data(){
+    var validateMobilePhone = (rule, value, callback) => {
+      if (value === '') {
+        callback(new Error('手机号不可为空'));
+      } else {
+        if (value !== '') {
+          var reg=/^1[3456789]\d{9}$/;
+          if(!reg.test(value)){
+            callback(new Error('请输入有效的手机号码'));
+          }
+        }
+        callback();
+      }
+    };
+    var telephone = (rule,value,callback) =>{
+      if (this.form.areaCode === '' && this.form.telephone === ''){
+        callback(new Error('座机电话不能为空'))
+      } else  {
+        var reg=/^0\d{2,3}-\d{7,8}$/
+        let telephone = this.form.areaCode + '-' + this.form.telephone
+        if (!reg.test(telephone)){
+          callback(new Error('请输入正确座机电话'))
+        } else {
+          callback();
+        }
+      }
+
+    }
+    return {
+      drawerFormVisible:false,
+      loading:false,
+      form:{
+        contactsid: 0,
+        sys_enterpriseid: "",
+        name: "",
+        sex: "",
+        depname: "",
+        position: "",
+        birthday: "",
+        phonenumber: "",
+        email: "",
+        address: "",
+        remarks: "",
+        enterprisename:'',
+        province: "",
+        city: "",
+        county: "",
+        workaddress: 0,
+        isdefault: 1,
+        isprimary: 1,
+        sys_phonebookid:'',
+        telephone:'',
+        fax:'',
+        ownerid: this.$route.query.id,
+        ownertable: "sa_customers",
+        isTelephone:'0',
+        areaCode:'',
+        company:''
+      },
+      rules:{
+        name: [
+          { required: true, message: '姓名不能为空', trigger: 'change' },
+        ],
+        telephone:[
+          { required: true, validator: telephone, trigger: 'change' }
+        ],
+        depname: [
+          { required: true, message: '部门不能为空', trigger: 'blur' },
+        ],
+        position: [
+          { required: true, message: '职位不能为空', trigger: 'blur' },
+        ],
+      },
+      param:{
+        "id": 20240923153304,
+        "content": {
+          "sa_contractid": this.$route.query.id,
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+        }
+      }
+    }
+  },
+  methods:{
+    addBtn(){
+      this.$refs.form.clearValidate()
+    },
+    onSubmit(){
+      this.$refs.form.validate(async(valid)=>{
+        if (!valid) return false
+        this.loading = true
+        const res = await this.$api.requested({
+          "id": 20240923153004,
+          "content": {
+            "sa_contractid": this.$route.query.id,
+            "sys_phonebookid": this.form.sys_phonebookid
+          }
+        })
+        this.loading = false
+        this.tool.showMessage(res,()=>{
+          this.$emit('addSuccess')
+          this.onClose()
+        })
+      })
+    },
+    onClose(){
+      this.drawerFormVisible = false
+      this.form = {}
+      this.$refs.contactRef.nameValue = ''
+    },
+    contactData(val){
+      this.form = Object.assign({},this.form,val)
+      this.form.name = val.name
+      if (val.phonenumber.indexOf('-') != '-1'){
+        this.form.isTelephone = '1'
+        this.form.areaCode = val.phonenumber.substring(0,val.phonenumber.indexOf('-'))
+        this.form.telephone = val.phonenumber.substring(this.form.areaCode.length+1)
+        this.form.phonenumber = ''
+      }else {
+        this.form.isTelephone = '0'
+        this.form.phonenumber = val.phonenumber
+        this.form.areaCode = ''
+        this.form.telephone = ''
+      }
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 118 - 0
src/HDrpManagement/contractManage/components/contactList/index.vue

@@ -0,0 +1,118 @@
+<template>
+  <div>
+    <addContact class="inline-16" @addSuccess="listData(param.content.pageNumber = 1)"></addContact>
+    <el-input style="width:200px;" placeholder="输入搜索内容" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="mt-10 input-with-select inline-16 layout_search__panel" clearable>
+    </el-input>
+    <table-detail  :layout="tablecols" :data="list" :custom="true" :width="true" :height="tableHieght" minHeight="200px" fixedName="operation">
+      <template v-slot:customcol="scope">
+        <div v-if="scope.column.columnname === 'tag'">
+          <div v-if="scope.column.data.tag.length > 0">
+            <el-tag v-for="item in scope.column.data.tag" :key="item.index" color="#FA8C16" size="mini" type="warning" effect="dark" style="margin-right: 5px">
+              <span>{{item}}</span>
+            </el-tag>
+          </div>
+          <div v-else>--</div>
+        </div>
+        <div v-else>
+          {{ scope.column.data[[scope.column.columnname]] || scope.column.columnname === 'operation' ? scope.column.data[[scope.column.columnname]] : '--' }}
+        </div>
+      </template>
+      <template v-slot:opreation="scope">
+        <el-button type="text" @click="delClick(scope.data)" size="mini">删除</el-button>
+      </template>
+    </table-detail>
+    <div  class="container normal-panel" style="text-align:right;padding-bottom: 0!important;">
+      <el-pagination
+          background
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[50, 100, 150, 200]"
+          :page-size="50"
+          layout="total,sizes, prev, pager, next, jumper"
+          :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+import addContact from './addContact'
+export default {
+  name: "index",
+  components:{addContact},
+  props:['data'],
+  data(){
+    return {
+      tableHieght:'calc(100vh - 380px)',
+      tablecols:[],
+      list:[],
+      currentPage:0,
+      total:0,
+      param:{
+        "id": 20240923153204,
+        "content": {
+          "sa_contractid": "",
+          "pageNumber": 1,
+          "pageSize": 50,
+          "where": {
+            "condition": ""
+          }
+        }
+      }
+    }
+  },
+  methods:{
+    async listData(){
+      this.param.content.sa_contractid = this.$route.query.id
+      const res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.listData()
+    },
+    delClick(data){
+      this.$confirm('确定删除该联系人吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async() => {
+        const res = await this.$api.requested({
+          "id": 20240923153104,
+          "content": {
+            "sa_contractid": this.$route.query.id,
+            "sys_phonebookid": data.sys_phonebookid
+          }
+        })
+        this.tool.showMessage(res,()=>{
+          this.listData()
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    }
+  },
+  mounted() {
+    this.listData()
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).contactsTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 57 - 31
src/HDrpManagement/contractManage/components/priceDifference/addPriceDiff.vue

@@ -27,7 +27,7 @@
                   <selectAgentNew ref="member" type="22" :param="agentListPrams" :radio="true" @onSelect="centerChange" @onCancel="agentVisible = false" ></selectAgentNew>
                   <selectAgentNew ref="member" type="22" :param="agentListPrams" :radio="true" @onSelect="centerChange" @onCancel="agentVisible = false" ></selectAgentNew>
                   <el-input readonly type="text" slot="reference" size="small" @focus="showChange('agentVisible')" v-model="ascription.enterprisename" placeholder="请选择居间商" >
                   <el-input readonly type="text" slot="reference" size="small" @focus="showChange('agentVisible')" v-model="ascription.enterprisename" placeholder="请选择居间商" >
                     <template slot="append">
                     <template slot="append">
-                      <el-button size="small" @click="agentVisible = false;ascription.enterprisename = '';agentListPrams.content.where.condition = '';$refs.member.selected = []" style="width:100%" type="primary">清空</el-button>
+                      <el-button size="small" @click="agentVisible = false;ascription.enterprisename = '';agentListPrams.content.where.condition = '';$refs.member.selected = [];form.sys_enterpriseid = ''" style="width:100%" type="primary">清空</el-button>
                     </template>
                     </template>
                   </el-input>
                   </el-input>
                 </el-popover>
                 </el-popover>
@@ -97,7 +97,7 @@
         <span style="margin-left: 20px">调整后提成:<span style="color: red;margin-left: 10px">{{totaladjustrewardamount == 0?'¥ '+tool.formatAmount(0,2):'¥ '+tool.formatAmount(totaladjustrewardamount,2)}}</span></span>
         <span style="margin-left: 20px">调整后提成:<span style="color: red;margin-left: 10px">{{totaladjustrewardamount == 0?'¥ '+tool.formatAmount(0,2):'¥ '+tool.formatAmount(totaladjustrewardamount,2)}}</span></span>
         <span style="margin-left: 20px">差额:<span style="color: red;margin-left: 10px">{{totalsubamount == 0?'¥ '+tool.formatAmount(0,2):'¥ '+tool.formatAmount(totalsubamount,2)}}</span></span>
         <span style="margin-left: 20px">差额:<span style="color: red;margin-left: 10px">{{totalsubamount == 0?'¥ '+tool.formatAmount(0,2):'¥ '+tool.formatAmount(totalsubamount,2)}}</span></span>
       </div>
       </div>
-      <table-detail :layout="adjustTable" :data="adjustList" :custom="true" :width="true" :height="tableHieght">
+      <table-detail :layout="adjustTable" :data="adjustList" :custom="true" :width="true" :height="tableHieght" min-height="200px">
         <template v-slot:customcol="scope" >
         <template v-slot:customcol="scope" >
           <div v-if="scope.column.columnname == 'rewardamount'">
           <div v-if="scope.column.columnname == 'rewardamount'">
             {{scope.column.data[[scope.column.columnname]]?tool.formatAmount(scope.column.data[[scope.column.columnname]],2):scope.column.data[[scope.column.columnname]] == 0?'0.00':'--'}}
             {{scope.column.data[[scope.column.columnname]]?tool.formatAmount(scope.column.data[[scope.column.columnname]],2):scope.column.data[[scope.column.columnname]] == 0?'0.00':'--'}}
@@ -115,7 +115,7 @@
       </table-detail>
       </table-detail>
       <span slot="footer" class="dialog-footer">
       <span slot="footer" class="dialog-footer">
         <el-button @click="adjustCancel" class="normal-btn-width" size="small" :disabled="adjustLoading" >取消</el-button>
         <el-button @click="adjustCancel" class="normal-btn-width" size="small" :disabled="adjustLoading" >取消</el-button>
-        <el-button type="primary" @click="adjustClick" class="normal-btn-width" size="small" :loading="adjustLoading">确定调整</el-button>
+        <el-button type="primary" @click="adjustClick" class="normal-btn-width" size="small" :loading="adjustLoading">{{checkTitle?checkTitle:'确定调整'}}</el-button>
       </span>
       </span>
     </el-dialog>
     </el-dialog>
   </div>
   </div>
@@ -125,7 +125,7 @@
 import selectAgentNew from '../selectAgentNew.vue'
 import selectAgentNew from '../selectAgentNew.vue'
 export default {
 export default {
   name: "addPriceDiff",
   name: "addPriceDiff",
-  props:["data"],
+  props:["data",'isCheck','checkTitle'],
   components:{selectAgentNew},
   components:{selectAgentNew},
   data(){
   data(){
     return {
     return {
@@ -185,7 +185,7 @@ export default {
         "content": {
         "content": {
           "sa_contractid": "0",
           "sa_contractid": "0",
           "orderratio": "",
           "orderratio": "",
-          "isadd": true, //新建时请求确认列表传true
+          "type": 0, //新建时请求确认列表传true
           "ascription_contractid": "",// 来源合同id
           "ascription_contractid": "",// 来源合同id
           "pageNumber": 1,
           "pageNumber": 1,
           "pageSize": 20,
           "pageSize": 20,
@@ -206,7 +206,8 @@ export default {
   },
   },
   methods:{
   methods:{
     addBtn(){
     addBtn(){
-      this.form.title = this.data.enterprisename + '/' + this.data.title + '_居间费'
+      this.title = '新建居间协议'
+      this.form.title = this.$route.query.type == '经销项目' || this.$route.query.type == '直销项目'?this.data.projectname + '_居间费': this.data.enterprisename + '_居间费'
       this.form.ascription_contractid = this.data.sa_contractid
       this.form.ascription_contractid = this.data.sa_contractid
       this.form.sa_projectid = this.data.sa_projectid
       this.form.sa_projectid = this.data.sa_projectid
       this.form.saler_hrid = this.data.saler_hrid
       this.form.saler_hrid = this.data.saler_hrid
@@ -234,6 +235,7 @@ export default {
       this.form.begdate = this.data.begdate
       this.form.begdate = this.data.begdate
       this.form.enddate = this.data.enddate
       this.form.enddate = this.data.enddate
       this.form.signdate = this.data.signdate
       this.form.signdate = this.data.signdate
+      this.form.remarks = data.remarks
       this.ascription = {
       this.ascription = {
         "ascription_title":this.data.title,
         "ascription_title":this.data.title,
         "enterprisename":data.sys_enterpriseid == -1  ? '':data.enterprisename,
         "enterprisename":data.sys_enterpriseid == -1  ? '':data.enterprisename,
@@ -246,27 +248,37 @@ export default {
     },
     },
     onSubmit(){
     onSubmit(){
       this.$refs.form.validate(async (valid)=>{
       this.$refs.form.validate(async (valid)=>{
-        this.loading = true
         if (!valid) return false
         if (!valid) return false
-        this.form.orderratio = (this.form.orderratio / 100).toFixed(4)
-        let res = await this.$api.requested({
-          "id": 20221121185302,
-          "content": this.form
-        })
-        if (res.code == 0){
-          this.form.orderratio = this.form.orderratio * 100
+        if (this.title == '编辑居间协议'){
           this.loading = false
           this.loading = false
-        }else {
           this.dialogTableVisible = true
           this.dialogTableVisible = true
-          this.onAdjust(res.data)
+          this.onAdjust(this.form)
+        }else {
+          this.loading = true
+          this.form.orderratio = (this.form.orderratio / 100).toFixed(4)
+          let res = await this.$api.requested({
+            "id": 20221121185302,
+            "content": this.form
+          })
+          if (res.code == 0){
+            this.form.orderratio = Math.round((this.form.orderratio * 100)*100)/100
+            this.loading = false
+            this.tool.showMessage(res,()=>{
+
+            })
+          }else {
+            this.dialogTableVisible = true
+            this.onAdjust(res.data)
+          }
         }
         }
       })
       })
     },
     },
     async onAdjust(data){
     async onAdjust(data){
       this.adjustParam.content.sa_contractid = data.sa_contractid
       this.adjustParam.content.sa_contractid = data.sa_contractid
-      this.adjustParam.content.orderratio = data.orderratio
+      this.adjustParam.content.orderratio = this.title == '编辑居间协议'?(data.orderratio / 100).toFixed(4):data.orderratio
       this.adjustParam.content.ascription_contractid = data.ascription_contractid
       this.adjustParam.content.ascription_contractid = data.ascription_contractid
       this.sys_enterpriseid = this.form.sys_enterpriseid?this.form.sys_enterpriseid:data.sys_enterpriseid
       this.sys_enterpriseid = this.form.sys_enterpriseid?this.form.sys_enterpriseid:data.sys_enterpriseid
+      this.adjustParam.content.type = this.isCheck? 2 : this.title == '新建居间协议' ? 0 : 1
       const res = await this.$api.requested(this.adjustParam)
       const res = await this.$api.requested(this.adjustParam)
       this.adjustList = res.data
       this.adjustList = res.data
       this.adjustTotal = res.total
       this.adjustTotal = res.total
@@ -286,28 +298,42 @@ export default {
     },
     },
     onClose(){
     onClose(){
       this.drawerFormVisible = false
       this.drawerFormVisible = false
+      this.adjustLoading = false
       this.form.orderratio = ''
       this.form.orderratio = ''
       this.$refs.form.resetFields()
       this.$refs.form.resetFields()
       this.form.remarks = ''
       this.form.remarks = ''
+      this.$emit('adjustSuccess')
     },
     },
     async adjustClick(){
     async adjustClick(){
-      this.adjustLoading = true
-      const res = await this.$api.requested({
-        "id": "20240828163204",
-        "content": {
-          "sa_contractid": this.adjustParam.content.sa_contractid,
-          "orderratio": this.adjustParam.content.orderratio,
-          "sys_enterpriseid":this.sys_enterpriseid,
-          "remarks":""
-        }
-      })
-      this.tool.showMessage(res,()=>{
-        this.adjustLoading = false
-        this.loading = false
+      if (this.isCheck){
+        this.adjustLoading = true
         this.drawerFormVisible = false
         this.drawerFormVisible = false
         this.dialogTableVisible = false
         this.dialogTableVisible = false
         this.$emit('adjustSuccess')
         this.$emit('adjustSuccess')
-      })
+      }else {
+        this.adjustLoading = true
+        const res = await this.$api.requested({
+          "id": "20240828163204",
+          "content": {
+            "sa_contractid": this.adjustParam.content.sa_contractid,
+            "orderratio": this.adjustParam.content.orderratio,
+            "sys_enterpriseid":this.sys_enterpriseid,
+            "remarks":this.form.remarks,
+            "title":this.form.title
+          }
+        })
+        if (res.code == 0){
+          this.adjustLoading = false
+          this.tool.showMessage(res,()=>{})
+        }
+        this.tool.showMessage(res,()=>{
+          this.adjustLoading = false
+          this.loading = false
+          this.drawerFormVisible = false
+          this.dialogTableVisible = false
+        })
+      }
+
     },
     },
     adjustCancel(){
     adjustCancel(){
       this.adjustLoading = false
       this.adjustLoading = false

+ 9 - 3
src/HDrpManagement/contractManage/components/priceDifference/index.vue

@@ -2,8 +2,8 @@
   <div>
   <div>
     <el-input style="width:200px;" placeholder="输入搜索内容" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="mt-10 input-with-select inline-16 layout_search__panel" clearable>
     <el-input style="width:200px;" placeholder="输入搜索内容" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="mt-10 input-with-select inline-16 layout_search__panel" clearable>
     </el-input>
     </el-input>
-    <addPriceDiff ref="priceDiff" class="inline-16" :data="data" @adjustSuccess="adjustSuccess"></addPriceDiff>
-    <table-detail  :layout="tablecols" :data="list" :custom="true" :width="true" :height="tableHieght">
+    <addPriceDiff ref="priceDiff" class="inline-16" :data="data" :isCheck="isCheck" @adjustSuccess="adjustSuccess" :checkTitle="checkTitle"></addPriceDiff>
+    <table-detail  :layout="tablecols" :data="list" :custom="true" :width="true" :height="tableHieght" minHeight="200px">
       <template v-slot:customcol="scope" >
       <template v-slot:customcol="scope" >
         <div v-if="scope.column.columnname == 'orderratio'">
         <div v-if="scope.column.columnname == 'orderratio'">
           {{scope.column.data[[scope.column.columnname]]?Math.round((scope.column.data[[scope.column.columnname]] * 100)*100)/100 + '%':scope.column.data[[scope.column.columnname]] == 0?'0%':'--'}}
           {{scope.column.data[[scope.column.columnname]]?Math.round((scope.column.data[[scope.column.columnname]] * 100)*100)/100 + '%':scope.column.data[[scope.column.columnname]] == 0?'0%':'--'}}
@@ -14,6 +14,12 @@
         <div v-else-if="scope.column.columnname == 'rebate'" style="color: red">
         <div v-else-if="scope.column.columnname == 'rebate'" style="color: red">
           {{scope.column.data[[scope.column.columnname]]?tool.formatAmount(scope.column.data[[scope.column.columnname]],2):scope.column.data[[scope.column.columnname]] == 0?'0.00':'--'}}
           {{scope.column.data[[scope.column.columnname]]?tool.formatAmount(scope.column.data[[scope.column.columnname]],2):scope.column.data[[scope.column.columnname]] == 0?'0.00':'--'}}
         </div>
         </div>
+        <div v-else-if="scope.column.columnname == 'status'">
+          <span style="color:#3874f6" v-if="scope.column.data[[scope.column.columnname]] == '新建'">{{scope.column.data[[scope.column.columnname]]}}</span>
+          <span style="color:#52c41a" v-else-if="scope.column.data[[scope.column.columnname]] == '已提交'">{{scope.column.data[[scope.column.columnname]]}}</span>
+          <span style="color:#333333" v-else-if="scope.column.data[[scope.column.columnname]] == '审核'">{{scope.column.data[[scope.column.columnname]]}}</span>
+          <span style="color:#000000" v-else>{{scope.column.data[[scope.column.columnname]]}}</span>
+        </div>
         <div v-else>
         <div v-else>
           {{ scope.column.data[[scope.column.columnname]] || scope.column.columnname === 'operation' ? scope.column.data[[scope.column.columnname]] : '--' }}
           {{ scope.column.data[[scope.column.columnname]] || scope.column.columnname === 'operation' ? scope.column.data[[scope.column.columnname]] : '--' }}
         </div>
         </div>
@@ -42,7 +48,7 @@
 import addPriceDiff from "./addPriceDiff"
 import addPriceDiff from "./addPriceDiff"
 export default {
 export default {
   name: "index",
   name: "index",
-  props:["data"],
+  props:["data","isCheck","checkTitle"],
   components:{addPriceDiff},
   components:{addPriceDiff},
   data(){
   data(){
     return {
     return {

+ 60 - 14
src/HDrpManagement/contractManage/components/productList/productBillno.vue

@@ -2,7 +2,7 @@
   <div>
   <div>
     <div>
     <div>
       <div class="flex-align-center" style="margin-bottom:10px">
       <div class="flex-align-center" style="margin-bottom:10px">
-        <el-input size="small" style="width:200px;margin-right:10px" v-model="params.content.where.condition" placeholder="输入搜索内容" @clear="listData(params.content.pageNumber = 1)" @keyup.native.enter="listData(params.content.pageNumber = 1)" clearable></el-input>
+        <el-input size="small" style="width:200px;margin-right:10px" v-model="params.content.where.condition" placeholder="输入搜索111内容" @clear="listData(params.content.pageNumber = 1)" @keyup.native.enter="listData(params.content.pageNumber = 1)" clearable></el-input>
         <slot name="addProduct"/>
         <slot name="addProduct"/>
         <uploadAllData
         <uploadAllData
             v-if="tool.checkAuth($route.name,'productBillManage') && data.status === '新建' && isLeader"
             v-if="tool.checkAuth($route.name,'productBillManage') && data.status === '新建' && isLeader"
@@ -14,13 +14,22 @@
             type="del"
             type="del"
         ></uploadAllData>
         ></uploadAllData>
         <el-button class="inline-16" v-if="tool.checkAuth($route.name,'productBillManage') && data.status === '新建' && isLeader" size="small" :type="delProductData.length === 0?'':'primary'" @click="onDelProduct" :disabled="delProductData.length === 0">删 除</el-button>
         <el-button class="inline-16" v-if="tool.checkAuth($route.name,'productBillManage') && data.status === '新建' && isLeader" size="small" :type="delProductData.length === 0?'':'primary'" @click="onDelProduct" :disabled="delProductData.length === 0">删 除</el-button>
-        <addProductContract class="inline-16"  title="添 加" :tablecolsAdd="tablecolsAdd" :tradefield="data.tradefield" :data="data"  @closeDrawer="closeDrawer"
+        <addProductContract class="inline-16"  title="自报价单添加" :tablecolsAdd="tablecolsAdd" :tradefield="data.tradefield" :data="data"  @closeDrawer="closeDrawer"
                             @addSuccess="queryProuctAdds" @addAll="addAll" ref="addProduct" @addProduct="queryProuctAdd" @uploadData="queryUploadData" v-if="tool.checkAuth($route.name,'productBillManage') && data.status === '新建' && isLeader"
                             @addSuccess="queryProuctAdds" @addAll="addAll" ref="addProduct" @addProduct="queryProuctAdd" @uploadData="queryUploadData" v-if="tool.checkAuth($route.name,'productBillManage') && data.status === '新建' && isLeader"
         >
         >
         </addProductContract>
         </addProductContract>
+        <addProduct v-if="tool.checkAuth($route.name,'productBillManage') && data.status === '新建' && isLeader"
+                    class="inline-16" @productAdd="queryProuctAdd" :params="paramProductAdd" :tablecolsAdd="tablecolsProductAdd" title="自产品档案添加"
+                    @addSuccess="queryProuctAdds" @addProduct="queryProuctAdd" @uploadData="queryUploadData" @closeDrawer="closeDrawer"
+                    :tradefield="data.tradefield" ref="addArchivesProduct"
+        >
+          <!--阀门选型-->
+          <selectOption position="报价单" slot="optionSystem" style="margin-left: 10px" @handleParam="handleOptionParam"  v-if="tool.checkAuth($route.name,'optionSystem')"></selectOption>
+        </addProduct>
         <exportFile v-if="tool.checkAuth($route.name,'export')" :param="params" :columns="tablecols" fileName="产品明细折扣"></exportFile>
         <exportFile v-if="tool.checkAuth($route.name,'export')" :param="params" :columns="tablecols" fileName="产品明细折扣"></exportFile>
         <slot name="cooperate"></slot>
         <slot name="cooperate"></slot>
       </div>
       </div>
+      <SetOrder ref="setOrder"></SetOrder>
       <tableLayout checkbox="true" :layout="tablecols" :data="list" :width="true" :opwidth="200" height="calc(100vh - 380px)" :custom="true" fixedName="operation countPrice" @selectionChange="selectionChange">
       <tableLayout checkbox="true" :layout="tablecols" :data="list" :width="true" :opwidth="200" height="calc(100vh - 380px)" :custom="true" fixedName="operation countPrice" @selectionChange="selectionChange">
         <template v-slot:customcol="scope">
         <template v-slot:customcol="scope">
           <div v-if="scope.column.columnname == 'qty'">
           <div v-if="scope.column.columnname == 'qty'">
@@ -55,6 +64,14 @@
           <div v-else-if="scope.column.columnname == 'brand'">
           <div v-else-if="scope.column.columnname == 'brand'">
             {{scope.column.data[scope.column.columnname][0] && scope.column.data[scope.column.columnname][0].brandname}}
             {{scope.column.data[scope.column.columnname][0] && scope.column.data[scope.column.columnname][0].brandname}}
           </div>
           </div>
+          <div v-else-if="scope.column.columnname == 'itemname'">
+            <div v-if="scope.column.data.sa_lectotypecfgid">
+              <el-tooltip class="item" effect="dark" content="点击查看选型配置单" placement="top-start">
+                <el-button size="small" type="text" @click="$refs.setOrder.onShow(scope.column.data.sa_lectotypecfgid)">{{ scope.column.data.itemname }}</el-button>
+              </el-tooltip>
+            </div>
+            <div v-else>{{ scope.column.data.itemname }}</div>
+          </div>
           <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
           <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
           <p v-if="!scope.column.data[scope.column.columnname] && scope.column.data[[scope.column.columnname]] !== 0 && scope.column.columnname != 'operation' && scope.column.columnname != 'countPrice'">--</p>
           <p v-if="!scope.column.data[scope.column.columnname] && scope.column.data[[scope.column.columnname]] !== 0 && scope.column.columnname != 'operation' && scope.column.columnname != 'countPrice'">--</p>
         </template>
         </template>
@@ -96,13 +113,16 @@
 <script>
 <script>
 // import edit from './editProduct'
 // import edit from './editProduct'
 import tableLayout from '@/components/dynamic-table/index2'
 import tableLayout from '@/components/dynamic-table/index2'
-import addProduct from './addProduct'
+// import addProduct from './addProduct'
 import previewImage from '@/components/previewImage/index'
 import previewImage from '@/components/previewImage/index'
 import addProductContract from '@/template/addProductContract/index'
 import addProductContract from '@/template/addProductContract/index'
 import uploadAllData from '@/components/uploadAllData/index'
 import uploadAllData from '@/components/uploadAllData/index'
 import exportFile from '@/components/export_file/index1'
 import exportFile from '@/components/export_file/index1'
+import addProduct from '@/template/addProduct'
+import SelectOption from '@/optionSystem/selectOption/add.vue'
+import SetOrder from '@/optionSystem/selectOption/components/setOrder.vue'
 export default {
 export default {
-  components: {addProduct,previewImage,addProductContract,uploadAllData,tableLayout,exportFile},
+  components: {addProduct,previewImage,addProductContract,uploadAllData,tableLayout,exportFile,SelectOption,SetOrder},
   name: '',
   name: '',
   props:["data","isLeader"],
   props:["data","isLeader"],
   data() {
   data() {
@@ -127,9 +147,22 @@ export default {
       },
       },
       tablecols:[],
       tablecols:[],
       tablecolsAdd:[],
       tablecolsAdd:[],
+      tablecolsProductAdd:[],
       total:0,
       total:0,
       editIndex:'',
       editIndex:'',
-      totalPrice:0
+      totalPrice:0,
+      paramProductAdd:{
+        "id": 20221124093602,
+        "content": {
+          "sa_contractid": this.$route.query.id,
+          "pageNumber": 1,
+          "pageSize": 100,
+          "where": {
+            "condition": "",
+            "istool": 0
+          }
+        },
+      }
     };
     };
   },
   },
   computed:{
   computed:{
@@ -145,11 +178,18 @@ export default {
     if (this.$route.query.id) this.listData()
     if (this.$route.query.id) this.listData()
     this.tablecols = this.tool.tabelCol(this.$route.name).productBillnoTable.tablecols
     this.tablecols = this.tool.tabelCol(this.$route.name).productBillnoTable.tablecols
     this.tablecolsAdd = this.tool.tabelCol(this.$route.name).addProuctProject.tablecols
     this.tablecolsAdd = this.tool.tabelCol(this.$route.name).addProuctProject.tablecols
+    this.tablecolsProductAdd = this.tool.tabelCol(this.$route.name).productArchivesTable.tablecols
   },
   },
   mounted() {
   mounted() {
 
 
   },
   },
   methods: {
   methods: {
+    handleOptionParam (param) {
+      param.content.enterprisename = this.data.enterprisename
+      param.content.projectname = this.data.projectname
+      param.content.sourcetable = 'sa_contract'
+      param.content.source = `项目合同:${this.data.billno}`
+    },
     async listData(){
     async listData(){
       this.totalPrice = 0
       this.totalPrice = 0
       this.params.content.sa_contractid = this.$route.query.id
       this.params.content.sa_contractid = this.$route.query.id
@@ -276,10 +316,10 @@ export default {
         "items": data.map(e=>{
         "items": data.map(e=>{
           return {
           return {
             "itemid": e.itemid,
             "itemid": e.itemid,
-            "price": e.price,
-            "qty": e.qty,
+            "price": e.price || (e.marketprice * 1).toFixed(4),
+            "qty": e.qty || e.orderminqty,
             "marketprice":e.marketprice,
             "marketprice":e.marketprice,
-            "discountrate":e.discountrate,
+            "discountrate":e.discountrate || 1,
             "type":'指定单价'
             "type":'指定单价'
           }
           }
         })
         })
@@ -293,10 +333,10 @@ export default {
       let item = data.map(item => {
       let item = data.map(item => {
         return {
         return {
           "itemid": item.itemid,
           "itemid": item.itemid,
-          "price": item.price,
-          "qty": item.qty,
+          "price": item.price || (item.marketprice * 1).toFixed(4),
+          "qty": item.qty || item.orderminqty,
           "marketprice":item.marketprice,
           "marketprice":item.marketprice,
-          "discountrate":item.discountrate,
+          "discountrate":item.discountrate || 1,
           "type":'指定单价'
           "type":'指定单价'
         }
         }
       })
       })
@@ -347,6 +387,7 @@ export default {
         this.$emit('onSuccess')
         this.$emit('onSuccess')
         this.listData()
         this.listData()
         this.$refs.addProduct.listData()
         this.$refs.addProduct.listData()
+        this.$refs.addArchivesProduct.listData()
       })
       })
     },
     },
     /*单个商品添加校验*/
     /*单个商品添加校验*/
@@ -381,6 +422,10 @@ export default {
     },
     },
     /*单个添加商品*/
     /*单个添加商品*/
     async addProduct (data) {
     async addProduct (data) {
+      let price = 0
+      if (!data.price){
+        price = (data.marketprice * 1).toFixed(4)
+      }
       let res = await this.$api.requested({
       let res = await this.$api.requested({
         "id": 20221123164402,
         "id": 20221123164402,
         "content": {
         "content": {
@@ -388,10 +433,10 @@ export default {
           "items": [
           "items": [
             {
             {
               "itemid": data.itemid,
               "itemid": data.itemid,
-              "price": data.price,
-              "qty": data.qty,
+              "price": data.price || price,
+              "qty": data.qty || data.orderminqty,
               "marketprice":data.marketprice,
               "marketprice":data.marketprice,
-              "discountrate":data.discountrate,
+              "discountrate":data.discountrate || 1,
               "type":'指定单价'
               "type":'指定单价'
             }
             }
           ]
           ]
@@ -399,6 +444,7 @@ export default {
       })
       })
       this.tool.showMessage(res,() => {
       this.tool.showMessage(res,() => {
         this.$refs.addProduct.listData()
         this.$refs.addProduct.listData()
+        this.$refs.addArchivesProduct.listData()
         this.listData()
         this.listData()
         this.$emit('onSuccess')
         this.$emit('onSuccess')
       })
       })

+ 6 - 1
src/HDrpManagement/contractManage/components/reverseCheck.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <div>
   <div>
     <el-button size="mini" @click="submit" type="primary">反 审 核 </el-button>
     <el-button size="mini" @click="submit" type="primary">反 审 核 </el-button>
-    <adjust v-show="false" ref="adjustRef" @adjustSuccess="onCheck"></adjust>
+    <adjust v-show="false" :isCheck="true" ref="adjustRef" @adjustSuccess="onCheck" checkTitle="确定反审核"></adjust>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -44,7 +44,12 @@ export default {
           "sa_contractid": this.data.sa_contractid
           "sa_contractid": this.data.sa_contractid
         },
         },
       })
       })
+      if (res.code == 0){
+        this.$refs.adjustRef.$refs.priceDiff.adjustLoading = false
+        this.tool.showMessage(res,()=>{})
+      }
       this.tool.showMessage(res,() => {
       this.tool.showMessage(res,() => {
+        this.$refs.adjustRef.$refs.priceDiff.adjustLoading = false
         this.$emit('onSuccess')
         this.$emit('onSuccess')
       })
       })
     }
     }

+ 6 - 1
src/HDrpManagement/contractManage/components/submitCheck.vue

@@ -2,7 +2,7 @@
   <div >
   <div >
     <el-button  @click="submit" size="mini" slot="reference" type="primary" :disabled="data.status == '已过期'" v-if="data.status=='新建' && tool.checkAuth($route.name,'submit') && !disabled && data.status">提 交</el-button>
     <el-button  @click="submit" size="mini" slot="reference" type="primary" :disabled="data.status == '已过期'" v-if="data.status=='新建' && tool.checkAuth($route.name,'submit') && !disabled && data.status">提 交</el-button>
     <el-button @click="submit" size="mini" slot="reference" type="primary" v-if="data.status=='已提交' && tool.checkAuth($route.name,'check') && data.status">审 核</el-button>
     <el-button @click="submit" size="mini" slot="reference" type="primary" v-if="data.status=='已提交' && tool.checkAuth($route.name,'check') && data.status">审 核</el-button>
-    <adjust v-show="false" ref="adjustRef" @adjustSuccess="onCheck"></adjust>
+    <adjust v-show="false" ref="adjustRef" @adjustSuccess="onCheck" :isCheck="true" checkTitle="确定审核"></adjust>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -107,7 +107,12 @@ export default {
           "sa_contractid": this.data.sa_contractid
           "sa_contractid": this.data.sa_contractid
         },
         },
       })
       })
+      if (res.code == 0){
+        this.tool.showMessage(res,()=>{})
+        this.$refs.adjustRef.$refs.priceDiff.adjustLoading = false
+      }
       this.tool.showMessage(res,() => {
       this.tool.showMessage(res,() => {
+        this.$refs.adjustRef.$refs.priceDiff.adjustLoading = false
         this.$emit('onSuccess')
         this.$emit('onSuccess')
       })
       })
     }
     }

+ 191 - 121
src/HDrpManagement/contractManage/modules/detail.vue

@@ -33,160 +33,228 @@
         <Del class="inline-16" :idName="20221121202502" :id="mainData.sa_contractid" idKey="sa_contractids"  v-if="tool.checkAuth($route.name,'toVoid') && (mainData.status == '新建' || mainData.status == '已终止' || mainData.status == '已过期') && isLeader"/>
         <Del class="inline-16" :idName="20221121202502" :id="mainData.sa_contractid" idKey="sa_contractids"  v-if="tool.checkAuth($route.name,'toVoid') && (mainData.status == '新建' || mainData.status == '已终止' || mainData.status == '已过期') && isLeader"/>
       </div>
       </div>
       <div slot="slot0" >
       <div slot="slot0" >
-        <!--项目产品明细折扣表-->
-        <productBillno :data="mainData" :isLeader="isLeader" ref="billno" @priceChange="queryMainData($route.query.id)" @delSuccess="queryMainData" @onSuccess="productAdd" v-if="mainData.type == '项目'">
-          <template v-slot:edit="scope">
-          </template>
-          <template v-slot:del="scope">
-          </template>
-          <template v-slot:cooperate="scope">
-            <el-button :disabled="mainData.status !== '新建'" size="small" :type="mainData.status === '新建'?'primary':''" @click="cooperateVisible = true" v-if="tool.checkAuth($route.name,'productBillManage') && isLeader">同步合作协议</el-button>
-            <el-dialog title="同步合作协议" :visible.sync="cooperateVisible" append-to-body width="703px">
-              <span style="color: #8C8C8C;font-size: 14px">请选择同步更新经销商/直销客户合作协议产品的方式:</span>
-              <el-form :model="cooperateForm" style="margin-top: 20px">
-                <el-radio v-model="cooperateForm.isadd" label="1" style="margin-bottom: 20px">
-                  <span style="font-size: 16px;color: #333333">同步添加合作协议产品</span><br><br>
-                  <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
+        <div v-if="mainData.type == '项目'">
+          <!--项目产品明细折扣表-->
+          <productBillno :data="mainData" :isLeader="isLeader" ref="billno" @priceChange="queryMainData($route.query.id)" @delSuccess="queryMainData" @onSuccess="productAdd" >
+            <template v-slot:edit="scope">
+            </template>
+            <template v-slot:del="scope">
+            </template>
+            <template v-slot:cooperate="scope">
+              <el-button :disabled="mainData.status !== '新建'" size="small" :type="mainData.status === '新建'?'primary':''" @click="cooperateVisible = true" v-if="tool.checkAuth($route.name,'productBillManage') && isLeader">同步合作协议</el-button>
+              <el-dialog title="同步合作协议" :visible.sync="cooperateVisible" append-to-body width="703px">
+                <span style="color: #8C8C8C;font-size: 14px">请选择同步更新经销商/直销客户合作协议产品的方式:</span>
+                <el-form :model="cooperateForm" style="margin-top: 20px">
+                  <el-radio v-model="cooperateForm.isadd" label="1" style="margin-bottom: 20px">
+                    <span style="font-size: 16px;color: #333333">同步添加合作协议产品</span><br><br>
+                    <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
                     将协议中所有产品添加到表体,若表体已存在产品,则协议中相同产品的信息及其折扣价格覆盖更新
                     将协议中所有产品添加到表体,若表体已存在产品,则协议中相同产品的信息及其折扣价格覆盖更新
                   </span><br><br>
                   </span><br><br>
-                  <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
+                    <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
                     到表体。
                     到表体。
                   </span> <br><br>
                   </span> <br><br>
-                </el-radio>
+                  </el-radio>
 
 
-                <el-radio v-model="cooperateForm.isadd" label="0">
-                  <span style="font-size: 16px;color: #333333">仅更新合作协议的产品折扣价格</span><br><br>
-                  <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
+                  <el-radio v-model="cooperateForm.isadd" label="0">
+                    <span style="font-size: 16px;color: #333333">仅更新合作协议的产品折扣价格</span><br><br>
+                    <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
                    将协议中与表体相同的产品信息及其折扣价格覆盖更新到表体,不添加协议产品。
                    将协议中与表体相同的产品信息及其折扣价格覆盖更新到表体,不添加协议产品。
                   </span>
                   </span>
-                </el-radio>
-              </el-form>
-              <div slot="footer" class="dialog-footer">
-                <el-button size="small" @click="cooperateVisible = false" class="normal-btn-width">取 消</el-button>
-                <el-button size="small" type="primary" @click="onCooperate" class="normal-btn-width">确 定</el-button>
-              </div>
-            </el-dialog>
-          </template>
-        </productBillno>
-        <!--产品明细折扣表-->
-        <productDetailList :data="mainData" :isLeader="isLeader" ref="productDetailList" v-if="mainData.type == '框架' || mainData.type == '直销' || (mainData.type == '居间' && siteid !== 'HY')"  @priceChange="queryMainData($route.query.id)" @closeDrawer="queryMainData($route.query.id)">
-          <importFile
-            v-if="tool.checkAuth($route.name,'exportProduct') && isLeader && mainData.status === '新建'"
-            slot="export"
-            ref="importFile"
-            class="inline-16"
-            :bindData="{ownertable:'sa_contract',ownerid:$route.query.id,usetype:'default'}"
-            :errorUrl="errorUrl"
-            @clearUrl="errorUrl = null"
-            @onSuccess="bindImportOrder"
-          ></importFile>
-          <template v-slot:cooperate="scope">
-            <el-button class="inline-16" :disabled="mainData.status !== '新建'" size="small" :type="mainData.status === '新建'?'primary':''" @click="cooperateVisible = true" v-if="tool.checkAuth($route.name,'productDetailManage') && isLeader && mainData.type == '居间'">同步协议</el-button>
-            <el-dialog title="同步协议" :visible.sync="cooperateVisible" append-to-body width="703px" center>
+                  </el-radio>
+                </el-form>
+                <div slot="footer" class="dialog-footer">
+                  <el-button size="small" @click="cooperateVisible = false" class="normal-btn-width">取 消</el-button>
+                  <el-button size="small" type="primary" @click="onCooperate" class="normal-btn-width">确 定</el-button>
+                </div>
+              </el-dialog>
+            </template>
+          </productBillno>
+        </div>
+        <div v-if="mainData.type == '框架' || mainData.type == '直销' ">
+          <!--产品明细折扣表-->
+          <productDetailList :data="mainData" :isLeader="isLeader" ref="productDetailList"   @priceChange="queryMainData($route.query.id)" @closeDrawer="queryMainData($route.query.id)">
+            <importFile
+                v-if="tool.checkAuth($route.name,'exportProduct') && isLeader && mainData.status === '新建'"
+                slot="export"
+                ref="importFile"
+                class="inline-16"
+                :bindData="{ownertable:'sa_contract',ownerid:$route.query.id,usetype:'default'}"
+                :errorUrl="errorUrl"
+                @clearUrl="errorUrl = null"
+                @onSuccess="bindImportOrder"
+            ></importFile>
+            <template v-slot:cooperate="scope">
+              <el-button class="inline-16" :disabled="mainData.status !== '新建'" size="small" :type="mainData.status === '新建'?'primary':''" @click="cooperateVisible = true" v-if="tool.checkAuth($route.name,'productDetailManage') && isLeader && mainData.type == '居间'">同步协议</el-button>
+              <el-dialog title="同步协议" :visible.sync="cooperateVisible" append-to-body width="703px" center>
+              <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
+                是否添加关联的项目或客户合同中的产品明细同步更新到列表
+              </span>
+                <div slot="footer" class="dialog-footer">
+                  <el-button size="small" @click="cooperateVisible = false" class="normal-btn-width">取 消</el-button>
+                  <el-button size="small" type="primary" @click="onCooperate" class="normal-btn-width">确 定</el-button>
+                </div>
+              </el-dialog>
+            </template>
+          </productDetailList>
+        </div>
+        <div v-if="mainData.type == '居间'">
+          <!--  详细信息      -->
+          <BaseInfo v-if="siteid === 'HY'" :detailInfo="detailInfo"/>
+          <!--产品明细折扣表-->
+          <productDetailList v-else :data="mainData" :isLeader="isLeader" ref="productDetailList"   @priceChange="queryMainData($route.query.id)" @closeDrawer="queryMainData($route.query.id)">
+            <importFile
+                v-if="tool.checkAuth($route.name,'exportProduct') && isLeader && mainData.status === '新建'"
+                slot="export"
+                ref="importFile"
+                class="inline-16"
+                :bindData="{ownertable:'sa_contract',ownerid:$route.query.id,usetype:'default'}"
+                :errorUrl="errorUrl"
+                @clearUrl="errorUrl = null"
+                @onSuccess="bindImportOrder"
+            ></importFile>
+            <template v-slot:cooperate="scope">
+              <el-button class="inline-16" :disabled="mainData.status !== '新建'" size="small" :type="mainData.status === '新建'?'primary':''" @click="cooperateVisible = true" v-if="tool.checkAuth($route.name,'productDetailManage') && isLeader && mainData.type == '居间'">同步协议</el-button>
+              <el-dialog title="同步协议" :visible.sync="cooperateVisible" append-to-body width="703px" center>
               <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
               <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
                 是否添加关联的项目或客户合同中的产品明细同步更新到列表
                 是否添加关联的项目或客户合同中的产品明细同步更新到列表
               </span>
               </span>
-              <div slot="footer" class="dialog-footer">
-                <el-button size="small" @click="cooperateVisible = false" class="normal-btn-width">取 消</el-button>
-                <el-button size="small" type="primary" @click="onCooperate" class="normal-btn-width">确 定</el-button>
-              </div>
-            </el-dialog>
-          </template>
-        </productDetailList>
-        <!--工具清单-->
-        <toolList :data="mainData" :isLeader="isLeader" ref="toolList" v-if="mainData.type == '工具借用'" @priceChange="queryMainData($route.query.id)">
-          <template v-slot:edit="scope">
-          </template>
-        </toolList>
-        <!--  详细信息      -->
-        <BaseInfo v-if="mainData.type === '居间' && siteid === 'HY'" :detailInfo="detailInfo"/>
+                <div slot="footer" class="dialog-footer">
+                  <el-button size="small" @click="cooperateVisible = false" class="normal-btn-width">取 消</el-button>
+                  <el-button size="small" type="primary" @click="onCooperate" class="normal-btn-width">确 定</el-button>
+                </div>
+              </el-dialog>
+            </template>
+          </productDetailList>
+        </div>
+        <div v-if="mainData.type == '工具借用'">
+          <!--工具清单-->
+          <toolList :data="mainData" :isLeader="isLeader" ref="toolList" v-if="mainData.type == '工具借用'" @priceChange="queryMainData($route.query.id)">
+            <template v-slot:edit="scope">
+            </template>
+          </toolList>
+        </div>
+
       </div>
       </div>
       <div slot="slot1" >
       <div slot="slot1" >
-        <!--产品类别折扣表-->
-        <productClassList :data="mainData" :isLeader="isLeader" ref="classList" @priceChange="queryMainData($route.query.id)" v-if="mainData.type == '框架' || mainData.type == '直销' || mainData.type == '居间'">
-          <addClass class="inline-16" v-if="tool.checkAuth($route.name,'productClassManage')" :disabled="mainData.status != '新建' || !isLeader" :typeName="mainData.type" slot="addProduct" @onSuccess="$refs.classList.listData()"   ref="addProduct" @closeDrawer="closeDrawer"/>
-          <template v-slot:edit="scope">
-          </template>
-          <template v-slot:cooperate="scope">
-            <el-button class="inline-16" :disabled="mainData.status !== '新建'" size="small" :type="mainData.status === '新建'?'primary':''" @click="cooperateVisible = true" v-if="tool.checkAuth($route.name,'productClassManage') && isLeader && mainData.type == '居间'">同步协议</el-button>
-            <el-dialog title="同步协议" :visible.sync="cooperateVisible" append-to-body width="703px" center>
+        <!--   居间     -->
+        <div v-if="mainData.type === '居间'">
+          <contactList v-if="siteid === 'HY' && mainData && tool.checkAuth($route.name,'contact')" :data="mainData"></contactList>
+          <productClassList v-else :data="mainData" :isLeader="isLeader" ref="classList" @priceChange="queryMainData($route.query.id)">
+            <addClass class="inline-16" v-if="tool.checkAuth($route.name,'productClassManage')" :disabled="mainData.status != '新建' || !isLeader" :typeName="mainData.type" slot="addProduct" @onSuccess="$refs.classList.listData()"   ref="addProduct" @closeDrawer="closeDrawer"/>
+            <template v-slot:edit="scope">
+            </template>
+            <template v-slot:cooperate="scope">
+              <el-button class="inline-16" :disabled="mainData.status !== '新建'" size="small" :type="mainData.status === '新建'?'primary':''" @click="cooperateVisible = true" v-if="tool.checkAuth($route.name,'productClassManage') && isLeader && mainData.type == '居间'">同步协议</el-button>
+              <el-dialog title="同步协议" :visible.sync="cooperateVisible" append-to-body width="703px" center>
+              <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
+                是否添加关联的项目或客户合同中的产品类别同步更新到列表
+              </span>
+                <div slot="footer" class="dialog-footer">
+                  <el-button size="small" @click="cooperateVisible = false" class="normal-btn-width">取 消</el-button>
+                  <el-button size="small" type="primary" @click="onCooperateItem" class="normal-btn-width">确 定</el-button>
+                </div>
+              </el-dialog>
+            </template>
+          </productClassList>
+        </div>
+        <div v-if="mainData.type == '框架' || mainData.type == '直销' ">
+          <!--产品类别折扣表-->
+          <productClassList :data="mainData" :isLeader="isLeader" ref="classList" @priceChange="queryMainData($route.query.id)" >
+            <addClass class="inline-16" v-if="tool.checkAuth($route.name,'productClassManage')" :disabled="mainData.status != '新建' || !isLeader" :typeName="mainData.type" slot="addProduct" @onSuccess="$refs.classList.listData()"   ref="addProduct" @closeDrawer="closeDrawer"/>
+            <template v-slot:edit="scope">
+            </template>
+            <template v-slot:cooperate="scope">
+              <el-button class="inline-16" :disabled="mainData.status !== '新建'" size="small" :type="mainData.status === '新建'?'primary':''" @click="cooperateVisible = true" v-if="tool.checkAuth($route.name,'productClassManage') && isLeader && mainData.type == '居间'">同步协议</el-button>
+              <el-dialog title="同步协议" :visible.sync="cooperateVisible" append-to-body width="703px" center>
               <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
               <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
                 是否添加关联的项目或客户合同中的产品类别同步更新到列表
                 是否添加关联的项目或客户合同中的产品类别同步更新到列表
               </span>
               </span>
-              <div slot="footer" class="dialog-footer">
-                <el-button size="small" @click="cooperateVisible = false" class="normal-btn-width">取 消</el-button>
-                <el-button size="small" type="primary" @click="onCooperateItem" class="normal-btn-width">确 定</el-button>
-              </div>
-            </el-dialog>
-          </template>
-        </productClassList>
-        <!--    产品类别折扣    -->
-        <itemClass ref="itemClass" :data="mainData" v-if="mainData.type == '项目'" :isLeader="isLeader" >
-          <template v-slot:cooperate="scope">
-            <el-button :disabled="mainData.status !== '新建'" size="small" :type="mainData.status === '新建'?'primary':''" @click="cooperateVisible = true" v-if="tool.checkAuth($route.name,'productClassManage') && isLeader">同步合作协议</el-button>
-            <el-dialog title="同步合作协议" :visible.sync="cooperateVisible" append-to-body width="703px">
-              <span style="color: #8C8C8C;font-size: 14px">请选择同步更新经销商/直销客户合作协议产品类别的方式:</span>
-              <el-form :model="cooperateForm" style="margin-top: 20px">
-                <el-radio v-model="cooperateForm.isadd" label="1" style="margin-bottom: 20px">
-                  <span style="font-size: 16px;color: #333333">同步添加合作协议产品类别及其折扣</span><br><br>
-                  <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
+                <div slot="footer" class="dialog-footer">
+                  <el-button size="small" @click="cooperateVisible = false" class="normal-btn-width">取 消</el-button>
+                  <el-button size="small" type="primary" @click="onCooperateItem" class="normal-btn-width">确 定</el-button>
+                </div>
+              </el-dialog>
+            </template>
+          </productClassList>
+        </div>
+        <div v-if="mainData.type == '项目'">
+          <!--    产品类别折扣    -->
+          <itemClass ref="itemClass" :data="mainData"  :isLeader="isLeader" >
+            <template v-slot:cooperate="scope">
+              <el-button :disabled="mainData.status !== '新建'" size="small" :type="mainData.status === '新建'?'primary':''" @click="cooperateVisible = true" v-if="tool.checkAuth($route.name,'productClassManage') && isLeader">同步合作协议</el-button>
+              <el-dialog title="同步合作协议" :visible.sync="cooperateVisible" append-to-body width="703px">
+                <span style="color: #8C8C8C;font-size: 14px">请选择同步更新经销商/直销客户合作协议产品类别的方式:</span>
+                <el-form :model="cooperateForm" style="margin-top: 20px">
+                  <el-radio v-model="cooperateForm.isadd" label="1" style="margin-bottom: 20px">
+                    <span style="font-size: 16px;color: #333333">同步添加合作协议产品类别及其折扣</span><br><br>
+                    <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
                     将协议中所有产品类别及其折扣添加到表体,若表体已存在产品类别,则协议中相同产品类别的折扣
                     将协议中所有产品类别及其折扣添加到表体,若表体已存在产品类别,则协议中相同产品类别的折扣
                   </span><br><br>
                   </span><br><br>
-                  <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
+                    <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
                     覆盖更新到表体。
                     覆盖更新到表体。
                   </span> <br><br>
                   </span> <br><br>
-                </el-radio>
+                  </el-radio>
 
 
-                <el-radio v-model="cooperateForm.isadd" label="0">
-                  <span style="font-size: 16px;color: #333333">仅更新合作协议的产品类别折扣</span><br><br>
-                  <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
+                  <el-radio v-model="cooperateForm.isadd" label="0">
+                    <span style="font-size: 16px;color: #333333">仅更新合作协议的产品类别折扣</span><br><br>
+                    <span style="font-size: 14px;color: #8C8C8C;margin: 20px 0 0 22px;padding-top: 20px">
                    将协议中与表体相同的产品类别的折扣价格覆盖更新到表体,不添加协议的产品类别。
                    将协议中与表体相同的产品类别的折扣价格覆盖更新到表体,不添加协议的产品类别。
                   </span>
                   </span>
-                </el-radio>
-              </el-form>
-              <div slot="footer" class="dialog-footer">
-                <el-button size="small" @click="cooperateVisible = false" class="normal-btn-width">取 消</el-button>
-                <el-button size="small" type="primary" @click="onCooperateItem" class="normal-btn-width">确 定</el-button>
-              </div>
-            </el-dialog>
-          </template>
-        </itemClass>
-        <BaseInfo v-if="mainData.type === '工具借用'" :detailInfo="detailInfo"/>
+                  </el-radio>
+                </el-form>
+                <div slot="footer" class="dialog-footer">
+                  <el-button size="small" @click="cooperateVisible = false" class="normal-btn-width">取 消</el-button>
+                  <el-button size="small" type="primary" @click="onCooperateItem" class="normal-btn-width">确 定</el-button>
+                </div>
+              </el-dialog>
+            </template>
+          </itemClass>
+        </div>
+        <div v-if="mainData.type === '工具借用'">
+          <BaseInfo :detailInfo="detailInfo"/>
+        </div>
       </div>
       </div>
       <div slot="slot2">
       <div slot="slot2">
-        <!--业绩目标-->
-        <taskTarget ref="taskTarget" v-if="Object.keys(mainData).length > 0 && (mainData.type == '框架' || mainData.type == '直销')" :data="mainData">
-          <template v-slot:addTarget="scope">
+        <div v-if="Object.keys(mainData).length > 0 && (mainData.type == '框架' || mainData.type == '直销')" >
+          <!--业绩目标-->
+          <taskTarget ref="taskTarget" :data="mainData">
+            <template v-slot:addTarget="scope">
               <add-target :disabled="mainData.status != '新建' || !isLeader" v-if="tool.checkAuth($route.name,'taskTargetManage')" :data="mainData" @onSuccess="successYear"></add-target>
               <add-target :disabled="mainData.status != '新建' || !isLeader" v-if="tool.checkAuth($route.name,'taskTargetManage')" :data="mainData" @onSuccess="successYear"></add-target>
-          </template>
-          <template v-slot:edit="scope">
-            <edit-target class="inline-16" :disabled="mainData.status != '新建' || !isLeader" v-if="tool.checkAuth($route.name,'taskTargetManage')" :data="scope.data" :salerId="mainData" @onSuccess="$refs.taskTarget.queryData()"/>
-          </template>
-          <template v-slot:delete="scope">
-            <del-target @onSuccess="$refs.taskTarget.queryData()" class="inline-16" :disabled="mainData.status != '新建' || !isLeader" v-if="tool.checkAuth($route.name,'taskTargetManage')" :id="scope.data.sa_salestargetbillid"></del-target>
-          </template>
-        </taskTarget>
-        <div>
+            </template>
+            <template v-slot:edit="scope">
+              <edit-target class="inline-16" :disabled="mainData.status != '新建' || !isLeader" v-if="tool.checkAuth($route.name,'taskTargetManage')" :data="scope.data" :salerId="mainData" @onSuccess="$refs.taskTarget.queryData()"/>
+            </template>
+            <template v-slot:delete="scope">
+              <del-target @onSuccess="$refs.taskTarget.queryData()" class="inline-16" :disabled="mainData.status != '新建' || !isLeader" v-if="tool.checkAuth($route.name,'taskTargetManage')" :id="scope.data.sa_salestargetbillid"></del-target>
+            </template>
+          </taskTarget>
+        </div>
+        <div v-if="mainData.type == '项目'">
           <!--   差价     -->
           <!--   差价     -->
-          <priceDifference v-if="mainData.type == '项目' && siteid == 'HY' && tool.checkAuth($route.name,'brokerageFeeEntrySet')" :data="mainData"></priceDifference>
-
+          <priceDifference v-if="siteid == 'HY' && tool.checkAuth($route.name,'brokerageFeeEntrySet')" :data="mainData"></priceDifference>
           <!--   详细信息     -->
           <!--   详细信息     -->
           <BaseInfo v-else :detailInfo="detailInfo"/>
           <BaseInfo v-else :detailInfo="detailInfo"/>
         </div>
         </div>
-
-        <!--   详细信息     -->
-        <BaseInfo v-if="(mainData.type !== '框架' && mainData.type !== '直销' && mainData.type !== '项目')" :detailInfo="detailInfo"/>
+        <div v-if="mainData.type == '居间'">
+          <BaseInfo v-if="siteid !== 'HY'" :detailInfo="detailInfo"/>
+        </div>
       </div>
       </div>
       <div slot="slot3">
       <div slot="slot3">
-        <BaseInfo v-if="mainData.type !== '居间' && mainData.type !== '框架' && mainData.type !== '直销' " :detailInfo="detailInfo"/>
-        <div>
-          <!--   差价     -->
-          <priceDifference v-if="(mainData.type == '框架' || mainData.type == '直销') && siteid == 'HY' && tool.checkAuth($route.name,'brokerageFeeEntrySet')" :data="mainData"></priceDifference>
+        <div  v-if="mainData.type === '居间' && siteid !== 'HY'">
+          <contactList v-if="mainData && tool.checkAuth($route.name,'contact')" :data="mainData"></contactList>
+        </div>
+        <div v-if="mainData.type == '框架' || mainData.type == '直销'">
+          <priceDifference v-if="siteid == 'HY' && tool.checkAuth($route.name,'brokerageFeeEntrySet')" :data="mainData"></priceDifference>
           <BaseInfo v-else :detailInfo="detailInfo"/>
           <BaseInfo v-else :detailInfo="detailInfo"/>
         </div>
         </div>
+        <div v-if="mainData.type == '项目'">
+          <BaseInfo :detailInfo="detailInfo"/>
+        </div>
       </div>
       </div>
       <div slot="slot4">
       <div slot="slot4">
-        <BaseInfo  :detailInfo="detailInfo"/>
+        <div v-if="mainData.type == '框架' || mainData.type == '直销'">
+          <BaseInfo  :detailInfo="detailInfo"/>
+        </div>
       </div>
       </div>
     </basicDetails>
     </basicDetails>
   </div>
   </div>
@@ -217,6 +285,7 @@ import itemClass from '../components/itemClass/index.vue'
 import importFile from '../components/importFile'
 import importFile from '../components/importFile'
 import copyTo from '../components/copyTo'
 import copyTo from '../components/copyTo'
 import priceDifference from '../components/priceDifference/index'
 import priceDifference from '../components/priceDifference/index'
+import contactList from '../components/contactList/index'
 import { Loading } from 'element-ui';
 import { Loading } from 'element-ui';
 export default {
 export default {
   name: "detail",
   name: "detail",
@@ -262,7 +331,8 @@ export default {
     itemClass,
     itemClass,
     importFile,
     importFile,
     copyTo,
     copyTo,
-    priceDifference
+    priceDifference,
+    contactList
   },
   },
   provide () {
   provide () {
     return {
     return {
@@ -323,7 +393,7 @@ export default {
           this.tabs = this.siteid == 'HY'?this.tool.checkAuth(this.$route.name,'brokerageFeeEntrySet')?['产品明细折扣','产品类别折扣','业绩目标','差价','详细信息']:['产品明细折扣','产品类别折扣','业绩目标','详细信息']:['产品明细折扣','产品类别折扣','业绩目标','详细信息']
           this.tabs = this.siteid == 'HY'?this.tool.checkAuth(this.$route.name,'brokerageFeeEntrySet')?['产品明细折扣','产品类别折扣','业绩目标','差价','详细信息']:['产品明细折扣','产品类别折扣','业绩目标','详细信息']:['产品明细折扣','产品类别折扣','业绩目标','详细信息']
               break
               break
         case '居间':
         case '居间':
-          this.tabs = this.siteid == 'HY'?['详细信息']:['产品明细折扣','产品类别折扣','详细信息']
+          this.tabs = this.siteid == 'HY'?this.tool.checkAuth(this.$route.name,'contact')?['详细信息','联系人']:['详细信息']:this.tool.checkAuth(this.$route.name,'contact')?['产品明细折扣','产品类别折扣','详细信息','联系人']:['产品明细折扣','产品类别折扣','详细信息']
               break
               break
         case '直销':
         case '直销':
           this.tabs = this.siteid == 'HY'?this.tool.checkAuth(this.$route.name,'brokerageFeeEntrySet')?['产品明细折扣','产品类别折扣','业绩目标','差价','详细信息']:['产品明细折扣','产品类别折扣','业绩目标','详细信息']:['产品明细折扣','产品类别折扣','业绩目标','详细信息']
           this.tabs = this.siteid == 'HY'?this.tool.checkAuth(this.$route.name,'brokerageFeeEntrySet')?['产品明细折扣','产品类别折扣','业绩目标','差价','详细信息']:['产品明细折扣','产品类别折扣','业绩目标','详细信息']:['产品明细折扣','产品类别折扣','业绩目标','详细信息']

+ 4 - 1
src/HDrpManagement/orderManage/details/tabs/rebatesettlement.vue

@@ -6,7 +6,7 @@
           <el-descriptions-item :labelStyle="{width:'120px'}" label="订单金额比例">{{item.orderratio}}</el-descriptions-item>
           <el-descriptions-item :labelStyle="{width:'120px'}" label="订单金额比例">{{item.orderratio}}</el-descriptions-item>
           <el-descriptions-item :labelStyle="{width:'120px'}" label="订单金额">{{item.amount?tool.formatAmount(item.amount,2):''}}</el-descriptions-item>
           <el-descriptions-item :labelStyle="{width:'120px'}" label="订单金额">{{item.amount?tool.formatAmount(item.amount,2):''}}</el-descriptions-item>
           <el-descriptions-item :labelStyle="{width:'120px'}" label="居间产品折扣">{{Math.round((item.productdiscount * 100)*100)/100 + '%'}}</el-descriptions-item>
           <el-descriptions-item :labelStyle="{width:'120px'}" label="居间产品折扣">{{Math.round((item.productdiscount * 100)*100)/100 + '%'}}</el-descriptions-item>
-          <el-descriptions-item :labelStyle="{width:'120px'}" label="居间费">{{item.rebate}}</el-descriptions-item>
+          <el-descriptions-item :labelStyle="{width:'120px'}" label="居间费">{{tool.formatAmount(item.rebate,2)}}</el-descriptions-item>
           <el-descriptions-item :labelStyle="{width:'120px'}" label="结算经销商">{{item.enterprisename?item.enterprisename:'--'}}</el-descriptions-item>
           <el-descriptions-item :labelStyle="{width:'120px'}" label="结算经销商">{{item.enterprisename?item.enterprisename:'--'}}</el-descriptions-item>
         </el-descriptions>
         </el-descriptions>
         <table-new-layout :layout="tablecols" :data="tableData" :custom="true" :width="true" height="calc(100vh - 750px)" minHeight="400px">
         <table-new-layout :layout="tablecols" :data="tableData" :custom="true" :width="true" height="calc(100vh - 750px)" minHeight="400px">
@@ -14,6 +14,9 @@
             <div v-if="scope.column.columnname === 'price'">
             <div v-if="scope.column.columnname === 'price'">
               {{tool.formatAmount(scope.column.data[scope.column.columnname],2)}}
               {{tool.formatAmount(scope.column.data[scope.column.columnname],2)}}
             </div>
             </div>
+            <div v-else-if="scope.column.columnname === 'marketprice'">
+              {{tool.formatAmount(scope.column.data[scope.column.columnname],2)}}
+            </div>
             <div v-else-if="scope.column.columnname === 'amount'">
             <div v-else-if="scope.column.columnname === 'amount'">
               {{tool.formatAmount(scope.column.data[scope.column.columnname],2)}}
               {{tool.formatAmount(scope.column.data[scope.column.columnname],2)}}
             </div>
             </div>

+ 2 - 2
src/HDrpManagement/projectChange/modules/modules/quotation/modules/add.vue

@@ -413,8 +413,6 @@ export default {
     },
     },
     /*提交*/
     /*提交*/
     getSubmit(){
     getSubmit(){
-      this.dialogFormVisible = false
-      this.loading = true
       if (this.form.date.length === 0){
       if (this.form.date.length === 0){
         this.form.begdate = ''
         this.form.begdate = ''
         this.form.enddate = ''
         this.form.enddate = ''
@@ -425,6 +423,7 @@ export default {
       }
       }
       this.$refs.form.validate(async (valid) => {
       this.$refs.form.validate(async (valid) => {
         if (!valid) return false
         if (!valid) return false
+        this.loading = true
         this.form.discountrate = this.form.discountrate / 100
         this.form.discountrate = this.form.discountrate / 100
         this.form.sa_quotedpriceid = this.ownerid
         this.form.sa_quotedpriceid = this.ownerid
         const res = await this.$api.requested({
         const res = await this.$api.requested({
@@ -433,6 +432,7 @@ export default {
         })
         })
         if (res.code == 0){
         if (res.code == 0){
           this.loading = false
           this.loading = false
+          this.tool.showMessage(res,()=>{})
         }
         }
         this.tool.showMessage(res,() => {
         this.tool.showMessage(res,() => {
           this.loading = false
           this.loading = false

+ 4 - 4
src/HDrpManagement/rebatesettlement/details/index.vue

@@ -96,15 +96,15 @@ export default {
         },
         },
         {
         {
           label:'订单金额比例',
           label:'订单金额比例',
-          value:this.mainData.calculatemodel
+          value:Math.round((this.mainData.orderratio * 100)*100)/100 + '%'
         },
         },
         {
         {
-          label:'产品折扣',
-          value:this.mainData.productdiscount
+          label:'居间产品折扣',
+          value:Math.round((this.mainData.productdiscount * 100)*100)/100 + '%'
         },
         },
         {
         {
           label:'居间费',
           label:'居间费',
-          value:this.mainData.rebate
+          value:this.tool.formatAmount(this.mainData.rebate,2)
         }
         }
       ]
       ]
     },
     },

+ 23 - 6
src/HDrpManagement/rebatesettlement/details/tabs/rebatesettlementmx.vue

@@ -19,18 +19,24 @@
         prop="marketprice"
         prop="marketprice"
         label="牌价"
         label="牌价"
         width="90">
         width="90">
+        <template slot-scope="scope">
+          <span>{{scope.row.marketprice?tool.formatAmount(scope.row.marketprice,2):tool.formatAmount(0,2)}}</span>
+        </template>
       </el-table-column>
       </el-table-column>
       <el-table-column
       <el-table-column
         prop="discountrate"
         prop="discountrate"
         label="折扣"
         label="折扣"
         width="90">
         width="90">
+        <template slot-scope="scope">
+          <span>{{Math.round((scope.row.discountrate * 100)*100)/100}}%</span>
+        </template>
       </el-table-column>
       </el-table-column>
       <el-table-column
       <el-table-column
         prop="price"
         prop="price"
         label="单价"
         label="单价"
         width="90">
         width="90">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          {{tool.formatAmount(scope.row.price,2)}}
+          <span>{{scope.row.price?tool.formatAmount(scope.row.price,2):tool.formatAmount(0,2)}}</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
       <el-table-column
       <el-table-column
@@ -38,20 +44,31 @@
         label="金额"
         label="金额"
         width="100">
         width="100">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <span>{{tool.formatAmount(scope.row.amount,2)}}</span>
+          <span>{{scope.row.amount?tool.formatAmount(scope.row.amount,2):tool.formatAmount(0,2)}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+          prop="returnamount"
+          label="退款金额"
+          width="100">
+        <template slot-scope="scope">
+          <span>{{scope.row.returnamount?tool.formatAmount(scope.row.returnamount,2):tool.formatAmount(0,2)}}</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
       <el-table-column
       <el-table-column
         prop="rebate_discountrate"
         prop="rebate_discountrate"
         label="居间产品折扣"
         label="居间产品折扣"
         width="150">
         width="150">
+        <template slot-scope="scope">
+          <span>{{Math.round((scope.row.rebate_discountrate * 100)*100)/100}}%</span>
+        </template>
       </el-table-column>
       </el-table-column>
       <el-table-column
       <el-table-column
         prop="rebate_price"
         prop="rebate_price"
         label="居间产品单价"
         label="居间产品单价"
         width="150">
         width="150">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <span>{{tool.formatAmount(scope.row.rebate_price,2)}}</span>
+          <span>{{scope.row.rebate_price?tool.formatAmount(scope.row.rebate_price,2):tool.formatAmount(0,2)}}</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
       <el-table-column
       <el-table-column
@@ -59,7 +76,7 @@
         label="居间单价"
         label="居间单价"
         width="120">
         width="120">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <span>{{tool.formatAmount(scope.row.rebate_unit_price,2)}}</span>
+          <span>{{scope.row.rebate_unit_price?tool.formatAmount(scope.row.rebate_unit_price,2):tool.formatAmount(0,2)}}</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
       <el-table-column
       <el-table-column
@@ -67,7 +84,7 @@
         label="居间费"
         label="居间费"
         width="120">
         width="120">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <span>{{tool.formatAmount(scope.row.rebate,2)}}</span>
+          <span>{{scope.row.rebate?tool.formatAmount(scope.row.rebate,2):tool.formatAmount(0,2)}}</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
@@ -132,4 +149,4 @@ export default {
 
 
 </script>
 </script>
 <style>
 <style>
-</style>
+</style>

+ 3 - 0
src/HDrpManagement/rebatesettlement/index.vue

@@ -42,6 +42,9 @@
           <span style="color:#000000" v-if="scope.data.column.data[[scope.data.column.columnname]] == '新建'">{{scope.data.column.data[[scope.data.column.columnname]]}}</span>
           <span style="color:#000000" v-if="scope.data.column.data[[scope.data.column.columnname]] == '新建'">{{scope.data.column.data[[scope.data.column.columnname]]}}</span>
           <span style="color:#52C41A" v-else-if="scope.data.column.data[[scope.data.column.columnname]] == '审核'">{{scope.data.column.data[[scope.data.column.columnname]]}}</span>
           <span style="color:#52C41A" v-else-if="scope.data.column.data[[scope.data.column.columnname]] == '审核'">{{scope.data.column.data[[scope.data.column.columnname]]}}</span>
         </div>
         </div>
+        <div v-else-if="scope.data.column.columnname == 'rebate'">
+          {{tool.formatAmount(scope.data.column.data[[scope.data.column.columnname]],2)}}
+        </div>
         <div v-else>
         <div v-else>
           {{scope.data.column.data[[scope.data.column.columnname]]?scope.data.column.data[[scope.data.column.columnname]]:'--'}}
           {{scope.data.column.data[[scope.data.column.columnname]]?scope.data.column.data[[scope.data.column.columnname]]:'--'}}
         </div>
         </div>

+ 37 - 29
src/HDrpManagement/recvoucher/index.vue

@@ -11,34 +11,42 @@
           path:'/recvoucherDetails'
           path:'/recvoucherDetails'
         }"
         }"
         @listCreate="list">
         @listCreate="list">
-      <div slot="custom" style="display:flex">
-        <label class="search__label " style="margin: auto;width: 70px;">账户类型:</label>
-        <el-select style="margin-right: 24px !important;" class="inline-16" @change="selectChange" v-model="selectParam.accountname" placeholder="请选择账户类型" size="small" clearable>
-          <el-option v-for="(item,index) in accountNameList" :key="index" :value="item.accountname" :label="item.accountname"></el-option>
-        </el-select>
-        <label class="search__label " style="margin: auto;width: 35px;">状态:</label>
-        <el-select style="margin-right: 24px !important;" class="inline-16" @change="selectChange" v-model="selectParam.status" placeholder="请选择状态" size="small" clearable>
-          <el-option v-for="(item,index) in statusData" :key="index" :value="item.value" :label="item.value"></el-option>
-        </el-select>
-        <label class="search__label " style="margin: auto;width: 70px;">核销状态:</label>
-        <el-select style="margin-right: 24px !important;" class="inline-16" @change="selectChange" v-model="selectParam.iswriteoffamount " placeholder="请选择核销状态" size="small" clearable>
-          <el-option value="已核销" label="已核销"></el-option>
-          <el-option value="未核销" label="未核销"></el-option>
-        </el-select>
-        <label class="search__label" style="margin: auto;width: 65px;">单据日期:</label>
-        <el-date-picker
-            style="margin-right: 24px !important;"
-            size="small"
-            @change="selectChange"
-            value-format="yyyy-MM-dd"
-            v-model="dateSelect"
-            type="daterange"
-            range-separator="至"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            clearable>
-        </el-date-picker>
-      </div>
+      <template #custom>
+        <div class="mt-10">
+          <label class="search__label " >账户类型:</label>
+          <el-select  class="inline-16" @change="selectChange" v-model="selectParam.accountname" placeholder="请选择账户类型" size="small" clearable>
+            <el-option v-for="(item,index) in accountNameList" :key="index" :value="item.accountname" :label="item.accountname"></el-option>
+          </el-select>
+        </div>
+        <div class="mt-10">
+          <label class="search__label " >状态:</label>
+          <el-select  class="inline-16" @change="selectChange" v-model="selectParam.status" placeholder="请选择状态" size="small" clearable>
+            <el-option v-for="(item,index) in statusData" :key="index" :value="item.value" :label="item.value"></el-option>
+          </el-select>
+        </div>
+        <div class="mt-10">
+          <label class="search__label " >核销状态:</label>
+          <el-select  class="inline-16" @change="selectChange" v-model="selectParam.iswriteoffamount " placeholder="请选择核销状态" size="small" clearable>
+            <el-option value="已核销" label="已核销"></el-option>
+            <el-option value="未核销" label="未核销"></el-option>
+          </el-select>
+        </div>
+        <div class="mt-10">
+          <label class="search__label" >单据日期:</label>
+          <el-date-picker
+              style="margin-right: 24px !important;"
+              size="small"
+              @change="selectChange"
+              value-format="yyyy-MM-dd"
+              v-model="dateSelect"
+              type="daterange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              clearable>
+          </el-date-picker>
+        </div>
+      </template>
       <template v-slot:tbList="scope">
       <template v-slot:tbList="scope">
         <div v-if="scope.data.column.columnname == 'amount'">
         <div v-if="scope.data.column.columnname == 'amount'">
           <span :style="+scope.data.column.data.amount >= 0 ? 'color:green' : 'color:red'">{{ tool.formatAmount(scope.data.column.data.amount,2) }}</span>
           <span :style="+scope.data.column.data.amount >= 0 ? 'color:green' : 'color:red'">{{ tool.formatAmount(scope.data.column.data.amount,2) }}</span>
@@ -132,4 +140,4 @@ export default {
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>
-</style>
+</style>

+ 1 - 1
src/HManagement/marketing/saler/modules/saler_detail.vue

@@ -115,4 +115,4 @@ export default {
 
 
 </script>
 </script>
 <style>
 <style>
-</style>
+</style>

+ 1 - 1
src/HManagement/marketing2/saler/area/detail/index.vue

@@ -127,7 +127,7 @@ export default {
         },
         },
         {
         {
           label:'手机号',
           label:'手机号',
-          value:this.mainData.phonenumber
+          value:this.mainData.userphonenumber
         },
         },
         {
         {
           label:'邮箱',
           label:'邮箱',

+ 1 - 1
src/HManagement/marketing2/saler/area/detail/modules/detailedData.vue

@@ -7,7 +7,7 @@
         <el-descriptions-item label="业务员">{{ detailData.name?detailData.name:"--" }}</el-descriptions-item>
         <el-descriptions-item label="业务员">{{ detailData.name?detailData.name:"--" }}</el-descriptions-item>
         <el-descriptions-item label="登录账号">{{ detailData.accountno?detailData.accountno:"--"}}</el-descriptions-item>
         <el-descriptions-item label="登录账号">{{ detailData.accountno?detailData.accountno:"--"}}</el-descriptions-item>
         <el-descriptions-item label="部门">{{ detailData.depname?detailData.depname:"--"}}</el-descriptions-item>
         <el-descriptions-item label="部门">{{ detailData.depname?detailData.depname:"--"}}</el-descriptions-item>
-        <el-descriptions-item label="手机号">{{ detailData.phonenumber?detailData.phonenumber:"--" }}</el-descriptions-item>
+        <el-descriptions-item label="手机号">{{ detailData.userphonenumber?detailData.userphonenumber:"--" }}</el-descriptions-item>
         <el-descriptions-item label="邮箱">{{ detailData.email?detailData.email:"--" }}</el-descriptions-item>
         <el-descriptions-item label="邮箱">{{ detailData.email?detailData.email:"--" }}</el-descriptions-item>
         <el-descriptions-item label="负责区域">{{ detailData.areaname?detailData.areaname:"--" }}</el-descriptions-item>
         <el-descriptions-item label="负责区域">{{ detailData.areaname?detailData.areaname:"--" }}</el-descriptions-item>
         <el-descriptions-item label="汇报对象">{{ detailData.reporthrname?detailData.reporthrname:"--" }}</el-descriptions-item>
         <el-descriptions-item label="汇报对象">{{ detailData.reporthrname?detailData.reporthrname:"--" }}</el-descriptions-item>

+ 1 - 1
src/SDrpManagement/rebatesettlement/index.vue

@@ -8,7 +8,7 @@
       }"
       }"
       tableName="rebatesettlement"
       tableName="rebatesettlement"
       idName="sa_rebatesettlementid"
       idName="sa_rebatesettlementid"
-      :apiId="{query:20230104194002,del:20230104193402}"
+      :apiId="{query:20240926150804,del:20230104193402}"
       :autoQuery="false"
       :autoQuery="false"
       :options="options">
       :options="options">
       <template #custom>
       <template #custom>

+ 2 - 1
src/components/socketMessage/index.vue

@@ -28,7 +28,8 @@
     },
     },
     created () {
     created () {
       let token = JSON.parse(sessionStorage.getItem('active_account')).token
       let token = JSON.parse(sessionStorage.getItem('active_account')).token
-      let href =location.href.substring(0,4)
+      let href =location.href.substring(0,5)
+      console.log(href,'href')
       href === 'https'?this.path = "wss://oms.idcgroup.com.cn:8079/yos/webSocket/":this.path = "ws://61.164.207.46:8000//yos/webSocket/"
       href === 'https'?this.path = "wss://oms.idcgroup.com.cn:8079/yos/webSocket/":this.path = "ws://61.164.207.46:8000//yos/webSocket/"
       this.path = this.path + token
       this.path = this.path + token
       console.log(this.path)
       console.log(this.path)

+ 8 - 4
src/template/contactsNewTemplate/index.vue

@@ -77,7 +77,7 @@
             :total="total">
             :total="total">
         </el-pagination>
         </el-pagination>
       </div>
       </div>
-      <el-input  slot="reference"  autosize v-model="name?name:nameValue" placeholder="请填写联系人" @focus="listData"  :disabled="disabled" @change="inputChange"></el-input>
+      <el-input  slot="reference" :readonly="isParam" autosize v-model="name?name:nameValue" placeholder="请填写联系人" @focus="listData"  :disabled="disabled" @change="inputChange"></el-input>
     </el-popover>
     </el-popover>
   </div>
   </div>
 </template>
 </template>
@@ -85,7 +85,7 @@
 <script>
 <script>
 export default {
 export default {
   name: "index",
   name: "index",
-  props:['disabled','ownertable','ownerid','name','placement'],
+  props:['disabled','ownertable','ownerid','name','placement','isParam','newParam'],
   data(){
   data(){
     return {
     return {
       list:[],
       list:[],
@@ -110,8 +110,12 @@ export default {
   },
   },
   methods:{
   methods:{
     async listData(){
     async listData(){
-      this.param.content.ownertable = this.ownertable
-      this.param.content.ownerid = this.ownerid
+      if (this.isParam){
+        this.param = this.newParam
+      }else {
+        this.param.content.ownertable = this.ownertable
+        this.param.content.ownerid = this.ownerid
+      }
       const res = await this.$api.requested(this.param)
       const res = await this.$api.requested(this.param)
       this.list = res.data
       this.list = res.data
       this.total = res.total
       this.total = res.total