Jelajahi Sumber

代码上传

zhangqiOMG 3 tahun lalu
induk
melakukan
bb4e6cb19a

+ 585 - 0
src/Form/QuotedPrice/editCopy copy.vue

@@ -0,0 +1,585 @@
+<template>
+  <div>
+<!--    <el-button size="mini" :disabled="data.status !== '新建'"  :type="btnType?btnType:'text'"  @click="onShow" >编 辑</el-button>-->
+<!--    <el-button size="mini" :disabled="data.status !== '新建'"  :type="data.status === '新建'?primary:text"  @click="onShow" >编 辑</el-button>-->
+    <el-drawer
+        title="编辑报价单"
+        :visible.sync="drawer"
+        size="92%"
+        direction="rtl"
+        :show-close="false"
+        append-to-body
+        @close="onClose">
+      <div class="drawer__panel" style="margin-bottom: 0px">
+        <el-row style="margin-top: 10px">
+          <el-form :model="form" :rules="rules" ref="form"  size="mini" label-position="right">
+            <el-col :span="6">
+              <el-form-item label="报价类型:" label-width="90px" >
+                <el-input v-model="form.quotedpricetype" autocomplete="off" placeholder="报价类型" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col  :span="6">
+              <el-form-item label="是否特价:" label-width="90px" >
+                <el-input  v-model="form.specialoffer === 0?'否':'是'" autocomplete="off" placeholder="是否特价" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col  :span="6" v-if="isQuotedPrice">
+              <el-form-item label="项目名称:" label-width="90px" prop="projectname">
+                <el-popover
+                    placement="bottom"
+                    width="580"
+                    trigger="click"
+                    v-model="projectShow"
+                    @show="projectList">
+                  <el-table :data="project.projectData">
+                    <el-table-column
+                        label="项目编号"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.projectnum?scope.row.projectnum:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="项目名称"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.projectname?scope.row.projectname:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="地址"
+                        width="300">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        fixed="right"
+                        label="操作"
+                        width="60">
+                      <template slot-scope="scope">
+                        <el-button type="text" @click="projectData(scope.row)" @focus="projectShow = true">选择</el-button>
+                      </template>
+                    </el-table-column>
+                  </el-table>
+                  <div class="container normal-panel" style="text-align:right">
+                    <el-pagination
+                        background
+                        small
+                        @size-change="handleSizeChangeProject"
+                        @current-change="handleCurrentChangeProject"
+                        :current-page="project.currentPage"
+                        :total="project.total">
+                    </el-pagination>
+                  </div>
+                  <el-input slot="reference"  v-model="form.projectname" autocomplete="off" placeholder="请选择项目"  @input="selectProject"></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6" v-if="isQuotedPrice">
+              <el-form-item label="项目编号:" label-width="90px" >
+                <el-input  v-model="form.projectnum" autocomplete="off" placeholder="项目编号" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="客户名称:" label-width="90px" prop="enterprisename">
+                <el-popover
+                    placement="bottom"
+                    width="580"
+                    trigger="click"
+                    v-model="customerShow"
+                    @show="customerList">
+                  <el-table :data="customer.customerData">
+                    <el-table-column
+                        label="客户编号"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.sa_customersid?scope.row.sa_customersid:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="客户名称"
+                        width="200">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.enterprisename?scope.row.enterprisename:'--'}}</span>
+                      </template>
+                    </el-table-column>
+<!--                    <el-table-column
+                        label="省市县"
+                        width="230">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.province?scope.row.province + '-' + scope.row.city + '-' + scope.row.county:'&#45;&#45;' }}</span>
+                      </template>
+                    </el-table-column>-->
+                    <el-table-column
+                        label="地址"
+                        width="300">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        fixed="right"
+                        label="操作"
+                        width="60">
+                      <template slot-scope="scope">
+                        <el-button type="text" @click="customerData(scope.row)" @focus="customerShow = true">选择</el-button>
+                      </template>
+                    </el-table-column>
+                  </el-table>
+                  <div class="container normal-panel" style="text-align:right">
+                    <el-pagination
+                        background
+                        small
+                        @size-change="handleSizeChangeCustomer"
+                        @current-change="handleCurrentChangeCustomer"
+                        :current-page="customer.currentPage"
+                        :total="customer.total">
+                    </el-pagination>
+                  </div>
+                  <el-input slot="reference"  v-model="form.enterprisename" autocomplete="off" placeholder="请选择客户"  @input="selectCustomer"></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col  :span="6">
+              <el-form-item label="报价日期:" label-width="90px">
+                <el-date-picker
+                    v-model="form.billdate"
+                    style="width: 100%"
+                    type="date"
+                    value-format="yyyy-MM-dd"
+                    placeholder="选择日期"
+                    :picker-options="pickerOptions">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="有效期:" label-width="90px" >
+                <el-date-picker
+                    v-model="date"
+                    style="width: 100%"
+                    type="daterange"
+                    value-format="yyyy-MM-dd"
+                    range-separator="至"
+                    start-placeholder="开始日期"
+                    end-placeholder="结束日期"
+                    :picker-options="pickerOptions">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="联系人:" label-width="90px" prop="contactsname">
+                <el-popover
+                    placement="bottom"
+                    width="580"
+                    trigger="click"
+                    v-model="contactsShow"
+                    @show="contactsList">
+                  <el-table :data="contacts.contactsData">
+                    <el-table-column
+                        label="姓名"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.name?scope.row.name:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="手机号"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.phonenumber?scope.row.phonenumber:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="邮箱"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.email?scope.row.email:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="地址"
+                        width="300">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        fixed="right"
+                        label="操作"
+                        width="60">
+                      <template slot-scope="scope">
+                        <el-button type="text" @click="contactsData(scope.row)" @focus="contactsShow = true">选择</el-button>
+                      </template>
+                    </el-table-column>
+                  </el-table>
+                  <div class="container normal-panel" style="text-align:right">
+                    <el-pagination
+                        background
+                        small
+                        @size-change="handleSizeChangeContacts"
+                        @current-change="handleCurrentChangeContacts"
+                        :current-page="contacts.currentPage"
+                        :total="contacts.total">
+                    </el-pagination>
+                  </div>
+                  <el-input slot="reference"  v-model="form.contactsname" autocomplete="off" placeholder="请选择联系人"  @input="selectContacts"></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col  :span="6">
+              <el-form-item label="手机号:" label-width="90px" >
+                <el-input  v-model="form.contactsphonenumber" autocomplete="off" placeholder="手机号" disabled></el-input>
+              </el-form-item>
+            </el-col>
+<!--            <el-col :span="6">
+              <el-form-item label="总金额:" label-width="90px" >
+                <el-input  v-model="form.totalPrice" autocomplete="off" placeholder="总金额" disabled></el-input>
+              </el-form-item>
+            </el-col>-->
+          </el-form>
+        </el-row>
+      </div>
+      <div >
+        <el-divider></el-divider>
+      </div>
+      <div style="margin:10px 20px 20px 20px">
+        <quotedPriceProduct :sa_quotedpriceid="form.sa_quotedpriceid" :sa_projectid="form.sa_projectid" :quotedpricetype="form.quotedpricetype" ref="quoterPrice" @checkForm="onSubmit" @productData="productDataChange"></quotedPriceProduct>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="warning" @click="getSubmit" class="normal-btn-width">保 存</el-button>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import quotedPriceProduct from '@/SDrpManagement/QuotedPrice/components/edit/quotedPriceProduct'
+export default {
+  name: "edit",
+  props:['btnType'],
+  components:{quotedPriceProduct},
+  data(){
+    return {
+      projectShow:false,
+      customerShow:false,
+      contactsShow:false,
+      data:'',
+      primary:'primary',
+      text:'',
+      projectParam:{
+        "id": 20221020143502,
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 5,
+          "type":0, //  1:我负责的;2:我参与的;3:我下属负责的;4:我下属参与的
+          "where": {
+            "condition": "",
+            "startdate": "",
+            "enddate": "",
+            "status":"",//跟进中、已成交、已失败
+            "projecttype":"",
+            "stagename":"",
+            "tag":""
+          }
+        },
+      },
+      project:{
+        projectData:[],
+        total:0,
+        currentPage:0,
+      },
+      customerParam:{
+        "id": 20220920083901,
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 5,
+          "where": {
+            "condition": "",
+            "type":4,
+            "sa_projectid":""
+          }
+        }
+      },
+      customer:{
+        customerData:[],
+        total:0,
+        currentPage:0,
+      },
+      contactsParam:{
+        "id": "20221022165503",
+        "version": 1,
+        "content": {
+          "sys_enterpriseid":"",
+          "where": {
+            "condition": "",
+            "workaddress": 0//0表示人,1表示地址
+          }
+        }
+      },
+      contacts:{
+        contactsData:[],
+        total:0,
+        currentPage:0,
+      },
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() + 3600 * 1000 * 24 < Date.now() ;
+        },
+      },
+      drawer:true,
+      isQuotedPrice:false,
+      date:[],
+      form:{
+        quotedpricetype:'',
+        totalPrice:0,
+        type:'',
+        projectnum:'',
+        enterprisename:'',
+        name:'',
+        phonenumber:'',
+        specialOffer:'否',
+        sa_quotedpriceid:0,     //sat_notice_classid<=0时 为新增
+        sys_enterpriseid: "",
+        contactsid:8,
+        sa_projectid: "0",
+        discountrate: 0,
+        remarks: "",
+        invaliddate: "",
+        projectname: "",
+        address: "",
+        billdate:"",
+        enddate:'',
+        begdate:''
+      },
+      rules:{
+        projectname:[
+          { required: true, message: '请选择项目', trigger: 'change'},
+        ],
+        enterprisename:[
+          { required: true, message: '请选择客户', trigger: 'change'},
+        ],
+        contactsname:[
+          { required: true, message: '请选择联系人', trigger: 'change'},
+        ]
+      },
+    }
+  },
+  methods:{
+    onShow(){
+      console.log('弹窗')
+      this.drawer = true
+      /*this.form = this.data*/
+      this.form = Object.assign({},this.form,this.data)
+      this.date[0] = this.form.begdate
+      this.date[1] = this.form.enddate
+      if (this.form.quotedpricetype === '项目报价'){
+        this.isQuotedPrice = true
+      }else {
+        this.isQuotedPrice = false
+      }
+      /*this.$nextTick(()=>{
+        this.$refs.quoterPrice.productData(this.data.sa_quotedpriceid)
+      })*/
+
+    },
+    onClose(){
+      this.drawer = false
+      this.$emit('onSuccess')
+    },
+    onSubmit(){
+      console.log(this.data,"点击添加商品")
+     if (this.data.length !== 0){
+       this.form.begdate = this.date[0]
+       this.form.enddate = this.date[1]
+     }else {
+       this.form.begdate = ''
+       this.form.enddate = ''
+     }
+      console.log(this.form,"表单")
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221020164803,
+          "version":1,
+          "content": this.form
+        })
+        console.log(res,"报价单id一")
+        /*this.$refs.quoterPrice.quoterPrice(res.data.sa_quotedpriceid,res.data.quotedpricetype)*/
+      })
+    },
+    getSubmit(){
+      console.log(this.data)
+      if (this.date.length === 0){
+        this.form.begdate = ''
+        this.form.enddate = ''
+      }else {
+        this.form.begdate = this.date[0]
+        this.form.enddate = this.date[1]
+      }
+      console.log(this.form,"表单")
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221020164803,
+          "version":1,
+          "content": this.form
+        })
+        this.tool.showMessage(res,() => {
+          this.drawer = false
+          this.changeData(this.productObj)
+
+        })
+      })
+    },
+    /*修改后的产品数据*/
+    productDataChange(val){
+      console.log(val,"修改后的产品数据")
+      let obj = val.map(e=>{
+        return {
+          sa_quotedprice_itemsid:e.sa_quotedprice_itemsid,
+          itemid:e.itemid,
+          oldprice:e.marketprice,
+          price:e.price,
+          discountrate:(e.discountrate/100).toFixed(4),
+          qty:e.qty
+        }
+      })
+      this.productObj = obj
+    },
+    async changeData(obj){
+      console.log(this.productObj,"数据")
+      const res = await this.$api.requested({
+        "id": 20221021095403,
+        "content": {
+          "sa_quotedpriceid":this.form.sa_quotedpriceid,     //sat_notice_classid<=0时 为新增
+          "items":obj
+        }
+      })
+      console.log(res)
+      this.$emit('onSuccess')
+    },
+    /*刷新总金额*/
+    queryTotalPrice(val){
+      console.log("总金额",val)
+      this.form.totalPrice = val
+      console.log(this.form)
+    },
+    async projectList(){
+      const res = await this.$api.requested(this.projectParam)
+      console.log(res)
+      this.project.projectData = res.data
+      this.project.total = res.total
+      this.project.currentPage = res.pageNumber
+    },
+    async selectProject(){
+      console.log(this.form.projectname)
+      this.projectShow = true
+      this.projectParam.content.where.condition = this.form.projectname
+      this.projectList()
+    },
+    async customerList(){
+      if (this.form.quotedpricetype === '客户报价'){
+        this.customerParam.content.where.sa_projectid = 0
+        this.customerParam.content.where.type = 2
+      }else {
+        this.customerParam.content.where.type = 4
+        this.customerParam.content.where.sa_projectid = this.form.sa_projectid
+      }
+      const res = await this.$api.requested(this.customerParam)
+      this.customer.customerData = res.data
+      this.customer.total = res.total
+      this.customer.currentPage = res.pageNumber
+    },
+    selectCustomer(){
+      this.customerParam.content.where.condition = this.form.enterprisename
+      this.customerList()
+    },
+    async contactsList(){
+      this.contactsParam.content.sys_enterpriseid = this.form.sys_enterpriseid
+      const res = await this.$api.requested(this.contactsParam)
+      this.contacts.contactsData = res.data
+      this.contacts.total = res.total
+      this.contacts.currentPage = res.pageNumber
+    },
+    selectContacts(){
+      this.contactsShow = true
+      this.contactsParam.content.where.condition = this.form.name
+      this.contactsList()
+    },
+    /*项目选择信息*/
+    projectData(val){
+      this.form.sa_projectid = val.sa_projectid
+      this.form.projectname = val.projectname
+      this.form.projectnum = val.projectnum
+      this.form.sys_enterpriseid = ''
+      this.form.enterprisename = ''
+      this.form.contactsid = ''
+      this.form.contactsname = ''
+      this.form.contactsphonenumber = ''
+    },
+    /*客户选择信息*/
+    customerData(val){
+      this.form.sys_enterpriseid = val.sys_enterpriseid
+      this.form.enterprisename = val.enterprisename
+      this.form.contactsid = ''
+      this.form.contactsname = ''
+      this.form.contactsphonenumber = ''
+    },
+    /*联系人选择信息*/
+    contactsData(val){
+      this.form.contactsid = val.contactsid
+      this.form.contactsname = val.name
+      this.form.contactsphonenumber = val.phonenumber
+    },
+    /*项目翻页*/
+    handleSizeChangeProject(val) {
+      // console.log(`每页 ${val} 条`);
+      this.projectParam.content.pageSize = val
+      this.projectList()
+    },
+    handleCurrentChangeProject(val) {
+      // console.log(`当前页: ${val}`);
+      this.projectParam.content.pageNumber = val
+      this.projectList()
+    },
+    /*客户翻页*/
+    handleSizeChangeCustomer(val) {
+      // console.log(`每页 ${val} 条`);
+      this.projectParam.content.pageSize = val
+      this.customerList()
+    },
+    handleCurrentChangeCustomer(val) {
+      // console.log(`当前页: ${val}`);
+      this.projectParam.content.pageNumber = val
+      this.customerList()
+    },
+    /*联系人翻页*/
+    handleSizeChangeContacts(val) {
+      // console.log(`每页 ${val} 条`);
+      this.projectParam.content.pageSize = val
+      this.contactsList()
+    },
+    handleCurrentChangeContacts(val) {
+      // console.log(`当前页: ${val}`);
+      this.projectParam.content.pageNumber = val
+      this.contactsList()
+    },
+  },
+  mounted() {
+    this.onShow()
+  },
+  created() {
+
+    this.data = this.$route.query.data
+    /*this.drawer = true*/
+    console.log(this.data,"获取项目报价")
+    console.log(this.$route.query.data,"获取项目报价1111")
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 242 - 249
src/Form/QuotedPrice/editCopy.vue

@@ -1,256 +1,248 @@
 <template>
-  <div>
+  <div class="normal-panel">
+    <p class="normal-title container">编辑报价单</p>
 <!--    <el-button size="mini" :disabled="data.status !== '新建'"  :type="btnType?btnType:'text'"  @click="onShow" >编 辑</el-button>-->
 <!--    <el-button size="mini" :disabled="data.status !== '新建'"  :type="data.status === '新建'?primary:text"  @click="onShow" >编 辑</el-button>-->
-    <el-drawer
-        title="编辑报价单"
-        :visible.sync="drawer"
-        size="92%"
-        direction="rtl"
-        :show-close="false"
-        append-to-body
-        @close="onClose">
-      <div class="drawer__panel" style="margin-bottom: 0px">
-        <el-row style="margin-top: 10px">
-          <el-form :model="form" :rules="rules" ref="form"  size="mini" label-position="right">
-            <el-col :span="6">
-              <el-form-item label="报价类型:" label-width="90px" >
-                <el-input v-model="form.quotedpricetype" autocomplete="off" placeholder="报价类型" disabled></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col  :span="6">
-              <el-form-item label="是否特价:" label-width="90px" >
-                <el-input  v-model="form.specialoffer === 0?'否':'是'" autocomplete="off" placeholder="是否特价" disabled></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col  :span="6" v-if="isQuotedPrice">
-              <el-form-item label="项目名称:" label-width="90px" prop="projectname">
-                <el-popover
-                    placement="bottom"
-                    width="580"
-                    trigger="click"
-                    v-model="projectShow"
-                    @show="projectList">
-                  <el-table :data="project.projectData">
-                    <el-table-column
-                        label="项目编号"
-                        width="180">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.projectnum?scope.row.projectnum:'--' }}</span>
-                      </template>
-                    </el-table-column>
-                    <el-table-column
-                        label="项目名称"
-                        width="180">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.projectname?scope.row.projectname:'--' }}</span>
-                      </template>
-                    </el-table-column>
-                    <el-table-column
-                        label="地址"
-                        width="300">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
-                      </template>
-                    </el-table-column>
-                    <el-table-column
-                        fixed="right"
-                        label="操作"
-                        width="60">
-                      <template slot-scope="scope">
-                        <el-button type="text" @click="projectData(scope.row)" @focus="projectShow = true">选择</el-button>
-                      </template>
-                    </el-table-column>
-                  </el-table>
-                  <div class="container normal-panel" style="text-align:right">
-                    <el-pagination
-                        background
-                        small
-                        @size-change="handleSizeChangeProject"
-                        @current-change="handleCurrentChangeProject"
-                        :current-page="project.currentPage"
-                        :total="project.total">
-                    </el-pagination>
-                  </div>
-                  <el-input slot="reference"  v-model="form.projectname" autocomplete="off" placeholder="请选择项目"  @input="selectProject"></el-input>
-                </el-popover>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6" v-if="isQuotedPrice">
-              <el-form-item label="项目编号:" label-width="90px" >
-                <el-input  v-model="form.projectnum" autocomplete="off" placeholder="项目编号" disabled></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="客户名称:" label-width="90px" prop="enterprisename">
-                <el-popover
-                    placement="bottom"
-                    width="580"
-                    trigger="click"
-                    v-model="customerShow"
-                    @show="customerList">
-                  <el-table :data="customer.customerData">
-                    <el-table-column
-                        label="客户编号"
-                        width="180">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.sa_customersid?scope.row.sa_customersid:'--' }}</span>
-                      </template>
-                    </el-table-column>
-                    <el-table-column
-                        label="客户名称"
-                        width="200">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.enterprisename?scope.row.enterprisename:'--'}}</span>
-                      </template>
-                    </el-table-column>
+    <div class="drawer__panel" style="margin-bottom: 0px">
+      <el-row style="margin-top: 10px">
+        <el-form :model="form" :rules="rules" ref="form"  size="mini" label-position="right">
+          <el-col :span="6">
+            <el-form-item label="报价类型:" label-width="90px" >
+              <el-input v-model="form.quotedpricetype" autocomplete="off" placeholder="报价类型" disabled></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col  :span="6">
+            <el-form-item label="是否特价:" label-width="90px" >
+              <el-input  v-model="form.specialoffer === 0?'否':'是'" autocomplete="off" placeholder="是否特价" disabled></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col  :span="6" v-if="isQuotedPrice">
+            <el-form-item label="项目名称:" label-width="90px" prop="projectname">
+              <el-popover
+                  placement="bottom"
+                  width="580"
+                  trigger="click"
+                  v-model="projectShow"
+                  @show="projectList">
+                <el-table :data="project.projectData">
+                  <el-table-column
+                      label="项目编号"
+                      width="180">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.projectnum?scope.row.projectnum:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column
+                      label="项目名称"
+                      width="180">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.projectname?scope.row.projectname:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column
+                      label="地址"
+                      width="300">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column
+                      fixed="right"
+                      label="操作"
+                      width="60">
+                    <template slot-scope="scope">
+                      <el-button type="text" @click="projectData(scope.row)" @focus="projectShow = true">选择</el-button>
+                    </template>
+                  </el-table-column>
+                </el-table>
+                <div class="container normal-panel" style="text-align:right">
+                  <el-pagination
+                      background
+                      small
+                      @size-change="handleSizeChangeProject"
+                      @current-change="handleCurrentChangeProject"
+                      :current-page="project.currentPage"
+                      :total="project.total">
+                  </el-pagination>
+                </div>
+                <el-input slot="reference"  v-model="form.projectname" autocomplete="off" placeholder="请选择项目"  @input="selectProject"></el-input>
+              </el-popover>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6" v-if="isQuotedPrice">
+            <el-form-item label="项目编号:" label-width="90px" >
+              <el-input  v-model="form.projectnum" autocomplete="off" placeholder="项目编号" disabled></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="客户名称:" label-width="90px" prop="enterprisename">
+              <el-popover
+                  placement="bottom"
+                  width="580"
+                  trigger="click"
+                  v-model="customerShow"
+                  @show="customerList">
+                <el-table :data="customer.customerData">
+                  <el-table-column
+                      label="客户编号"
+                      width="180">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.sa_customersid?scope.row.sa_customersid:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column
+                      label="客户名称"
+                      width="200">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.enterprisename?scope.row.enterprisename:'--'}}</span>
+                    </template>
+                  </el-table-column>
 <!--                    <el-table-column
-                        label="省市县"
-                        width="230">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.province?scope.row.province + '-' + scope.row.city + '-' + scope.row.county:'&#45;&#45;' }}</span>
-                      </template>
-                    </el-table-column>-->
-                    <el-table-column
-                        label="地址"
-                        width="300">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
-                      </template>
-                    </el-table-column>
-                    <el-table-column
-                        fixed="right"
-                        label="操作"
-                        width="60">
-                      <template slot-scope="scope">
-                        <el-button type="text" @click="customerData(scope.row)" @focus="customerShow = true">选择</el-button>
-                      </template>
-                    </el-table-column>
-                  </el-table>
-                  <div class="container normal-panel" style="text-align:right">
-                    <el-pagination
-                        background
-                        small
-                        @size-change="handleSizeChangeCustomer"
-                        @current-change="handleCurrentChangeCustomer"
-                        :current-page="customer.currentPage"
-                        :total="customer.total">
-                    </el-pagination>
-                  </div>
-                  <el-input slot="reference"  v-model="form.enterprisename" autocomplete="off" placeholder="请选择客户"  @input="selectCustomer"></el-input>
-                </el-popover>
-              </el-form-item>
-            </el-col>
-            <el-col  :span="6">
-              <el-form-item label="报价日期:" label-width="90px">
-                <el-date-picker
-                    v-model="form.billdate"
-                    style="width: 100%"
-                    type="date"
-                    value-format="yyyy-MM-dd"
-                    placeholder="选择日期"
-                    :picker-options="pickerOptions">
-                </el-date-picker>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="有效期:" label-width="90px" >
-                <el-date-picker
-                    v-model="date"
-                    style="width: 100%"
-                    type="daterange"
-                    value-format="yyyy-MM-dd"
-                    range-separator="至"
-                    start-placeholder="开始日期"
-                    end-placeholder="结束日期"
-                    :picker-options="pickerOptions">
-                </el-date-picker>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="联系人:" label-width="90px" prop="contactsname">
-                <el-popover
-                    placement="bottom"
-                    width="580"
-                    trigger="click"
-                    v-model="contactsShow"
-                    @show="contactsList">
-                  <el-table :data="contacts.contactsData">
-                    <el-table-column
-                        label="姓名"
-                        width="180">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.name?scope.row.name:'--' }}</span>
-                      </template>
-                    </el-table-column>
-                    <el-table-column
-                        label="手机号"
-                        width="180">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.phonenumber?scope.row.phonenumber:'--' }}</span>
-                      </template>
-                    </el-table-column>
-                    <el-table-column
-                        label="邮箱"
-                        width="180">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.email?scope.row.email:'--' }}</span>
-                      </template>
-                    </el-table-column>
-                    <el-table-column
-                        label="地址"
-                        width="300">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
-                      </template>
-                    </el-table-column>
-                    <el-table-column
-                        fixed="right"
-                        label="操作"
-                        width="60">
-                      <template slot-scope="scope">
-                        <el-button type="text" @click="contactsData(scope.row)" @focus="contactsShow = true">选择</el-button>
-                      </template>
-                    </el-table-column>
-                  </el-table>
-                  <div class="container normal-panel" style="text-align:right">
-                    <el-pagination
-                        background
-                        small
-                        @size-change="handleSizeChangeContacts"
-                        @current-change="handleCurrentChangeContacts"
-                        :current-page="contacts.currentPage"
-                        :total="contacts.total">
-                    </el-pagination>
-                  </div>
-                  <el-input slot="reference"  v-model="form.contactsname" autocomplete="off" placeholder="请选择联系人"  @input="selectContacts"></el-input>
-                </el-popover>
-              </el-form-item>
-            </el-col>
-            <el-col  :span="6">
-              <el-form-item label="手机号:" label-width="90px" >
-                <el-input  v-model="form.contactsphonenumber" autocomplete="off" placeholder="手机号" disabled></el-input>
-              </el-form-item>
-            </el-col>
+                      label="省市县"
+                      width="230">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.province?scope.row.province + '-' + scope.row.city + '-' + scope.row.county:'&#45;&#45;' }}</span>
+                    </template>
+                  </el-table-column>-->
+                  <el-table-column
+                      label="地址"
+                      width="300">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column
+                      fixed="right"
+                      label="操作"
+                      width="60">
+                    <template slot-scope="scope">
+                      <el-button type="text" @click="customerData(scope.row)" @focus="customerShow = true">选择</el-button>
+                    </template>
+                  </el-table-column>
+                </el-table>
+                <div class="container normal-panel" style="text-align:right">
+                  <el-pagination
+                      background
+                      small
+                      @size-change="handleSizeChangeCustomer"
+                      @current-change="handleCurrentChangeCustomer"
+                      :current-page="customer.currentPage"
+                      :total="customer.total">
+                  </el-pagination>
+                </div>
+                <el-input slot="reference"  v-model="form.enterprisename" autocomplete="off" placeholder="请选择客户"  @input="selectCustomer"></el-input>
+              </el-popover>
+            </el-form-item>
+          </el-col>
+          <el-col  :span="6">
+            <el-form-item label="报价日期:" label-width="90px">
+              <el-date-picker
+                  v-model="form.billdate"
+                  style="width: 100%"
+                  type="date"
+                  value-format="yyyy-MM-dd"
+                  placeholder="选择日期"
+                  :picker-options="pickerOptions">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="有效期:" label-width="90px" >
+              <el-date-picker
+                  v-model="date"
+                  style="width: 100%"
+                  type="daterange"
+                  value-format="yyyy-MM-dd"
+                  range-separator="至"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期"
+                  :picker-options="pickerOptions">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="联系人:" label-width="90px" prop="contactsname">
+              <el-popover
+                  placement="bottom"
+                  width="580"
+                  trigger="click"
+                  v-model="contactsShow"
+                  @show="contactsList">
+                <el-table :data="contacts.contactsData">
+                  <el-table-column
+                      label="姓名"
+                      width="180">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.name?scope.row.name:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column
+                      label="手机号"
+                      width="180">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.phonenumber?scope.row.phonenumber:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column
+                      label="邮箱"
+                      width="180">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.email?scope.row.email:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column
+                      label="地址"
+                      width="300">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column
+                      fixed="right"
+                      label="操作"
+                      width="60">
+                    <template slot-scope="scope">
+                      <el-button type="text" @click="contactsData(scope.row)" @focus="contactsShow = true">选择</el-button>
+                    </template>
+                  </el-table-column>
+                </el-table>
+                <div class="container normal-panel" style="text-align:right">
+                  <el-pagination
+                      background
+                      small
+                      @size-change="handleSizeChangeContacts"
+                      @current-change="handleCurrentChangeContacts"
+                      :current-page="contacts.currentPage"
+                      :total="contacts.total">
+                  </el-pagination>
+                </div>
+                <el-input slot="reference"  v-model="form.contactsname" autocomplete="off" placeholder="请选择联系人"  @input="selectContacts"></el-input>
+              </el-popover>
+            </el-form-item>
+          </el-col>
+          <el-col  :span="6">
+            <el-form-item label="手机号:" label-width="90px" >
+              <el-input  v-model="form.contactsphonenumber" autocomplete="off" placeholder="手机号" disabled></el-input>
+            </el-form-item>
+          </el-col>
 <!--            <el-col :span="6">
-              <el-form-item label="总金额:" label-width="90px" >
-                <el-input  v-model="form.totalPrice" autocomplete="off" placeholder="总金额" disabled></el-input>
-              </el-form-item>
-            </el-col>-->
-          </el-form>
-        </el-row>
-      </div>
-      <div >
-        <el-divider></el-divider>
-      </div>
-      <div style="margin:10px 20px 20px 20px">
-        <quotedPriceProduct :sa_quotedpriceid="form.sa_quotedpriceid" :sa_projectid="form.sa_projectid" :quotedpricetype="form.quotedpricetype" ref="quoterPrice" @checkForm="onSubmit" @productData="productDataChange"></quotedPriceProduct>
-      </div>
-      <div class="fixed__btn__panel">
-        <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" type="warning" @click="getSubmit" class="normal-btn-width">保 存</el-button>
-      </div>
-    </el-drawer>
+            <el-form-item label="总金额:" label-width="90px" >
+              <el-input  v-model="form.totalPrice" autocomplete="off" placeholder="总金额" disabled></el-input>
+            </el-form-item>
+          </el-col>-->
+        </el-form>
+      </el-row>
+    </div>
+    <div >
+      <el-divider></el-divider>
+    </div>
+    <div style="margin:10px 20px 20px 20px">
+      <quotedPriceProduct :sa_quotedpriceid="form.sa_quotedpriceid" :sa_projectid="form.sa_projectid" :quotedpricetype="form.quotedpricetype" ref="quoterPrice" @checkForm="onSubmit" @productData="productDataChange"></quotedPriceProduct>
+    </div>
+    <div class="fixed__btn__panel">
+      <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
+      <el-button size="small" type="warning" @click="getSubmit" class="normal-btn-width">保 存</el-button>
+    </div>
   </div>
 </template>
 
@@ -368,7 +360,8 @@ export default {
   },
   methods:{
     onShow(){
-      console.log(this.data,"报价单")
+      console.log('弹窗')
+      this.drawer = true
       /*this.form = this.data*/
       this.form = Object.assign({},this.form,this.data)
       this.date[0] = this.form.begdate

+ 1 - 1
src/HDrpManagement/contractManage/components/contractClause/contractClause.vue

@@ -5,7 +5,7 @@
         <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>
         <slot name="addProduct"/>
         <el-popconfirm title="确定重置当前合同吗?" @confirm="reset()">
-          <el-button size="small" slot="reference" class="inline-16" :disabled="disabled" v-if="tool.checkAuth($route.name,'resetClause')">重 置</el-button>
+          <el-button size="small" slot="reference" class="inline-16" :disabled="disabled" v-if="tool.checkAuth($route.name,'resetContractClaus')">重 置</el-button>
         </el-popconfirm>
       </div>
       <tableLayout :layout="tablecols" :data="list" :opwidth="200" :width="false" height="calc(100vh - 550px)" :custom="true" fixedName="operation" >

+ 9 - 9
src/HDrpManagement/contractManage/components/submitCheck.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="inline-16" v-if="data.status">
     <el-popconfirm v-if="refresh" title="确定提交当前合同吗?" @confirm="submit">
-      <el-button size="mini" slot="reference" v-if="data.status=='新建'">提 交</el-button>
-      <el-button size="mini" slot="reference" v-if="data.status=='已提交'">审 核</el-button>
+      <el-button size="mini" slot="reference" v-if="data.status=='新建' && tool.checkAuth($route.name,'submit')">提 交</el-button>
+      <el-button size="mini" slot="reference" v-if="data.status=='已提交' && tool.checkAuth($route.name,'check')">审 核</el-button>
     </el-popconfirm>
   </div>
 </template>
@@ -20,18 +20,18 @@ export default {
   computed:{
   },
   watch:{
-    data (val) {
-      console.log(val);
-      this.refresh = false
-      setTimeout(() => {
-        this.refresh = !this.refresh
-      },50)
-    }
+
   },
   created() {
     console.log('eeee',this.disabled);
   },
   methods: {
+    refreshFun () {
+      this.refresh = false
+      setTimeout(() => {
+        this.refresh = !this.refresh
+      },50)
+    },
     async submit () {
       if (this.data.status == '新建') {
         let res = await this.$api.requested({

+ 18 - 18
src/HDrpManagement/contractManage/modules/detail.vue

@@ -9,25 +9,25 @@
         turnPageId="20221121201502"
         idname="sa_contractid"
         ownertable="sa_contract"
-        :tabs="mainData.type == '项目' ? ['产品清单','合同条款','角色信息'] : mainData.type == '框架' ? ['产品明细折扣','产品类别折扣','业绩目标'] : mainData.type == '居间' ? null : ['工具清单','合同条款']"
+        :tabs="mainData.type == '项目' ? ['产品清单','合同条款'] : mainData.type == '框架' ? ['产品明细折扣','产品类别折扣','业绩目标'] : mainData.type == '居间' ? null : ['工具清单','合同条款']"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
       <div slot="tags">
       </div>
       <div slot="customOperation" >
         <editBtn :modelList="modelList" v-if="tool.checkAuth($route.name,'update')" :disabled="mainData.status != '新建' || !isLeader" @onSuccess="queryMainData();$refs.billno.listData()" :data="mainData" class="inline-16"/>
-        <submit-check :disabled="!isLeader" :data="mainData" @onSuccess="queryMainData" />
-        <reverseCheck @onSuccess="queryMainData()" :data="mainData" v-if="tool.checkAuth($route.name,'reverseCheck') && mainData.status == '审核'" />
+        <submit-check :disabled="!isLeader" ref="submit" :data="mainData" @onSuccess="queryMainData" />
+        <reverseCheck @onSuccess="queryMainData();$refs.submit.refreshFun()" :data="mainData" v-if="tool.checkAuth($route.name,'reverseCheck') && mainData.status == '审核'" />
         <contractOver v-if="tool.checkAuth($route.name,'contractOver') && mainData.status != '已终止' && mainData.status != '审核' && isLeader" :disabled="!isLeader" :id="mainData.sa_contractid" @onSuccess="queryMainData"/>
         <Del :idName="20221121202502" :id="mainData.sa_contractid" idKey="sa_contractids" class="inline-16" v-if="tool.checkAuth($route.name,'delete') && mainData.type == '新建' && isLeader"/>
       </div>
       <div slot="slot0" >
         <!--产品清单表-->
         <productBillno ref="billno" @priceChange="queryMainData" v-if="mainData.type == '项目'">
-          <addProduct v-if="tool.checkAuth($route.name,'addProduct')" :disabled="mainData.status != '新建' || !isLeader" slot="addProduct" @onSuccess="$refs.billno.listData()"/>
+          <addProduct v-if="tool.checkAuth($route.name,'addProductList')" :disabled="mainData.status != '新建' || !isLeader" slot="addProduct" @onSuccess="$refs.billno.listData()"/>
           <template v-slot:edit="scope">
             <el-button 
-              v-if="tool.checkAuth($route.name,'insert')"
+              v-if="tool.checkAuth($route.name,'editProductList')"
               class="inline-16" 
               :disabled="mainData.status != '新建' || !isLeader" 
               type="text" size="mini" slot="edit" 
@@ -35,15 +35,15 @@
             >编 辑</el-button>
           </template>
           <template v-slot:del="scope">
-            <delete-btn :nameId="20221123164502" :disabled="mainData.status != '新建' || !isLeader" nameKey="sa_contract_itemsids" :id="scope.data.sa_contract_itemsid" @deleteSuccess="$refs.billno.listData()"></delete-btn>
+            <delete-btn v-if="tool.checkAuth($route.name,'delProductList')"  :nameId="20221123164502" :disabled="mainData.status != '新建' || !isLeader" nameKey="sa_contract_itemsids" :id="scope.data.sa_contract_itemsid" @deleteSuccess="$refs.billno.listData()"></delete-btn>
           </template>
         </productBillno>
         <!--产品明细折扣表-->
         <productDetailList ref="productDetailList" v-if="mainData.type == '框架'" @priceChange="queryMainData">
-          <addProductDetail :disabled="mainData.status != '新建' || !isLeader" slot="addProduct" v-if="tool.checkAuth($route.name,'addProductDetail')" @onSuccess="$refs.productDetailList.listData()"/>
+          <addProductDetail :disabled="mainData.status != '新建' || !isLeader" slot="addProduct" v-if="tool.checkAuth($route.name,'addProductDiscount')" @onSuccess="$refs.productDetailList.listData()"/>
           <template v-slot:edit="scope">
             <el-button 
-              v-if="tool.checkAuth($route.name,'update')"
+              v-if="tool.checkAuth($route.name,'editProductDiscount')"
               class="inline-16" 
               :disabled="mainData.status != '新建' || !isLeader" 
               type="text" 
@@ -53,7 +53,7 @@
             >编 辑</el-button>
           </template>
           <template v-slot:del="scope">
-            <delete-btn v-if="tool.checkAuth($route.name,'delete')" :nameId="20221123164502" :disabled="mainData.status != '新建' || !isLeader" nameKey="sa_contract_itemsids" :id="scope.data.sa_contract_itemsid" @deleteSuccess="$refs.productDetailList.listData()"></delete-btn>
+            <delete-btn v-if="tool.checkAuth($route.name,'delProductDiscount')" :nameId="20221123164502" :disabled="mainData.status != '新建' || !isLeader" nameKey="sa_contract_itemsids" :id="scope.data.sa_contract_itemsid" @deleteSuccess="$refs.productDetailList.listData()"></delete-btn>
           </template>
         </productDetailList>
         <!--工具清单-->
@@ -61,7 +61,7 @@
           <addTool v-if="tool.checkAuth($route.name,'addTool')" :disabled="mainData.status != '新建' || !isLeader" slot="addProduct" @onSuccess="$refs.toolList.listData()"/>
           <template v-slot:edit="scope">
             <el-button 
-              v-if="tool.checkAuth($route.name,'update')"
+              v-if="tool.checkAuth($route.name,'editTool')"
               class="inline-16" 
               :disabled="mainData.status != '新建' || !isLeader" 
               type="text" 
@@ -71,17 +71,17 @@
             >编 辑</el-button>
           </template>
           <template v-slot:del="scope">
-            <delete-btn v-if="tool.checkAuth($route.name,'delete')" :nameId="20221123164502" :disabled="mainData.status != '新建' || !isLeader" nameKey="sa_contract_itemsids" :id="scope.data.sa_contract_itemsid" @deleteSuccess="$refs.toolList.listData()"></delete-btn>
+            <delete-btn v-if="tool.checkAuth($route.name,'delTool')" :nameId="20221123164502" :disabled="mainData.status != '新建' || !isLeader" nameKey="sa_contract_itemsids" :id="scope.data.sa_contract_itemsid" @deleteSuccess="$refs.toolList.listData()"></delete-btn>
           </template>
         </toolList>
       </div>
       <div slot="slot1" >
         <!--产品类别折扣表-->
         <productClassList ref="classList" @priceChange="queryMainData" v-if="mainData.type == '框架'">
-          <addClass v-if="tool.checkAuth($route.name,'addClass')" :disabled="mainData.status != '新建' || !isLeader" slot="addProduct" @onSuccess="$refs.classList.listData()"/>
+          <addClass v-if="tool.checkAuth($route.name,'addProductClassDiscount')" :disabled="mainData.status != '新建' || !isLeader" slot="addProduct" @onSuccess="$refs.classList.listData()"/>
           <template v-slot:edit="scope">
             <el-button 
-              v-if="tool.checkAuth($route.name,'update')"
+              v-if="tool.checkAuth($route.name,'editProductClassDiscount')"
               class="inline-16" 
               :disabled="mainData.status != '新建' || !isLeader" 
               type="text" size="mini" slot="edit" 
@@ -89,13 +89,13 @@
             >编 辑</el-button>
           </template>
           <template v-slot:del="scope">
-            <delete-btn v-if="tool.checkAuth($route.name,'delete')" :nameId="20221124111202" :disabled="mainData.status != '新建' || !isLeader" nameKey="sa_contract_itemsaleclassids" :id="scope.data.sa_contract_itemsaleclassid" @deleteSuccess="$refs.classList.listData()"></delete-btn>
+            <delete-btn v-if="tool.checkAuth($route.name,'delProductClassDiscount')" :nameId="20221124111202" :disabled="mainData.status != '新建' || !isLeader" nameKey="sa_contract_itemsaleclassids" :id="scope.data.sa_contract_itemsaleclassid" @deleteSuccess="$refs.classList.listData()"></delete-btn>
           </template>
         </productClassList>
         <!--合同条款-->
         <contractClause :disabled="mainData.status != '新建' || !isLeader" ref="Claus" v-if="mainData.type == '项目' || mainData.type == '工具借用'">
           <el-button 
-            v-if="tool.checkAuth($route.name,'addClaus')"
+            v-if="tool.checkAuth($route.name,'addContractClaus')"
             size="small" 
             type="primary" 
             slot="addProduct" 
@@ -105,7 +105,7 @@
           >添 加</el-button>
           <template v-slot:edit="scope">
             <el-button 
-              v-if="tool.checkAuth($route.name,'update')"
+              v-if="tool.checkAuth($route.name,'editContractClaus')"
               class="inline-16" 
               :disabled="mainData.status != '新建' || scope.data.editable != 1 || !isLeader" 
               type="text" size="mini" slot="edit" 
@@ -125,9 +125,9 @@
       </div>
       <div slot="slot2">
         <!--业绩目标-->
-        <taskTarget ref="taskTarget" v-if="Object.keys(mainData).length > 0" :data="mainData">
+        <taskTarget ref="taskTarget" v-if="Object.keys(mainData).length > 0 && mainData.type == '框架'" :data="mainData">
           <template v-slot:edit="scope">
-            <edit-target :disabled="mainData.status != '新建' || !isLeader" v-if="tool.checkAuth($route.name,'update')" :data="scope.data" :salerId="mainData" @onSuccess="$refs.taskTarget.queryData()"/>
+            <edit-target :disabled="mainData.status != '新建' || !isLeader" v-if="tool.checkAuth($route.name,'editTaskTarget')" :data="scope.data" :salerId="mainData" @onSuccess="$refs.taskTarget.queryData()"/>
           </template>
         </taskTarget>
       </div>

+ 3 - 3
src/HDrpManagement/contractModel/modules/detail.vue

@@ -4,7 +4,7 @@
     <div class="content normal-panel">
       <div class="header container">
         <span class="title">{{type[$route.query.type]}}条款设置</span>
-        <el-button size="small" @click="addClause">添加</el-button>
+        <el-button size="small" v-if="tool.checkAuth($route.name,'addClaue')" @click="addClause">添加</el-button>
       </div>
       <div class="container">
         <tableLayout v-if="show" :layout="tablecols" :data="list" :opwidth="200" :custom="true"  height="calc(100vh - 250px)" >
@@ -43,9 +43,9 @@
                 @click="save(scope.data)" 
                 v-if="scope.data.sa_contract_template_clauseid == 0 || currentEdit.sa_contract_template_clauseid==scope.data.sa_contract_template_clauseid"
               >保 存</el-button>
-              <el-button size="mini" type="text" @click="editBtn(scope.data)" v-else>编 辑</el-button>
+              <el-button size="mini" type="text" @click="editBtn(scope.data)" v-else-if="tool.checkAuth($route.name,'editClaue')">编 辑</el-button>
             </span>
-            <delete-btn nameId="20221125195702" :data="scope.data" @deleteSuccess="onDelete" :id="scope.data.sa_contract_template_clauseid" nameKey="sa_contract_template_clauseids"></delete-btn>
+            <delete-btn v-if="tool.checkAuth($route.name,'delClaue')" nameId="20221125195702" :data="scope.data" @deleteSuccess="onDelete" :id="scope.data.sa_contract_template_clauseid" nameKey="sa_contract_template_clauseids"></delete-btn>
           </template>
         </tableLayout>
         <div style="margin-top:16px;text-align:right">

+ 10 - 16
src/SDrpManagement/QuotedPrice/detail/components/copyTo.vue

@@ -45,22 +45,16 @@ export default {
       this.copyList()
     },
     copyList(){
-      // this.$store.dispatch('changeDetailDrawer',false)
-      // setTimeout(()=>{
-      //   this.$router.replace({
-      //     path:'/quotedPriceCopy',
-      //     query:{
-      //       data:this.saQuotedPriceData
-      //     }
-      //   })
-      //   this.$store.dispatch('changeDetailDrawer',true)
-      // },500)
-      this.$router.replace({
-        path:'/quotedPriceCopy',
-        query:{
-          data:this.saQuotedPriceData
-        }
-      })
+      this.$store.dispatch('changeDetailDrawer',false)
+      setTimeout(()=>{
+        this.$router.replace({
+          path:'/quotedPriceCopy',
+          query:{
+            data:this.saQuotedPriceData
+          }
+        })
+        this.$store.dispatch('changeDetailDrawer',true)
+      },500)
 
 
     },

+ 1 - 1
src/SDrpManagement/QuotedPrice/detail/index.vue

@@ -105,7 +105,7 @@ export default {
       this.queryMainData(id)
     },
     changeDataStructure(){
-
+      let that = this
       this.mainAreaData = [
         {
           label:'客户名称',

+ 4 - 0
src/components/newLayout/modules/menu.vue

@@ -38,8 +38,12 @@ export default {
       }
     },
     setActiveModules (mod,app) {
+      console.log(mod);
+      
       this.$store.dispatch('setActiveApp',{name:app.systemappname,app:app,val:''})
       sessionStorage.setItem('active_modules',JSON.stringify(mod))
+      console.log(JSON.parse(sessionStorage.getItem('active_modules')));
+      
     },
     setDefaultData (mod) {
       let active_modules = JSON.parse(sessionStorage.getItem('active_modules'))