瀏覽代碼

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

zhangqi 3 年之前
父節點
當前提交
d5481b6e69
共有 25 個文件被更改,包括 2439 次插入166 次删除
  1. 121 22
      src/Form/projectChange/add.vue
  2. 88 5
      src/Form/projectChange/edit.vue
  3. 233 38
      src/Form/publicCustomer/add.vue
  4. 191 18
      src/Form/publicCustomer/edit.vue
  5. 226 34
      src/Form/salerPrivatecustomer/add.vue
  6. 191 20
      src/Form/salerPrivatecustomer/edit.vue
  7. 53 9
      src/HDrpManagement/projectChange/components/putPeople.vue
  8. 5 4
      src/HDrpManagement/projectChange/modules/detail.vue
  9. 6 1
      src/HDrpManagement/publicCustomer/index.vue
  10. 205 0
      src/HDrpManagement/publicCustomer/modules/importCustomer.vue
  11. 41 0
      src/SDrpManagement/QuotedPrice/components/copy/index.vue
  12. 3 3
      src/SDrpManagement/QuotedPrice/components/edit/productTable.vue
  13. 285 0
      src/SDrpManagement/QuotedPrice/components/edit/productTableProject.vue
  14. 4 2
      src/SDrpManagement/QuotedPrice/components/edit/quotedPriceProduct.vue
  15. 2 2
      src/SDrpManagement/QuotedPrice/components/productTable.vue
  16. 289 0
      src/SDrpManagement/QuotedPrice/components/productTableProject.vue
  17. 4 2
      src/SDrpManagement/QuotedPrice/components/quotedPriceProduct.vue
  18. 126 0
      src/SDrpManagement/QuotedPrice/detail/components/copyTo.vue
  19. 18 2
      src/SDrpManagement/QuotedPrice/detail/index.vue
  20. 98 0
      src/SDrpManagement/QuotedPrice/detail/modules/historicalQuotation/index.vue
  21. 6 1
      src/SDrpManagement/QuotedPrice/detail/modules/productInventory/index.vue
  22. 7 2
      src/SDrpManagement/salerPrivatecustomer/detail/customerDetail.vue
  23. 108 0
      src/SDrpManagement/salerPrivatecustomer/detail/modules/followLeads/index.vue
  24. 118 0
      src/SDrpManagement/salerPrivatecustomer/detail/modules/followLeads/modules/add.vue
  25. 11 1
      src/router/SDrpManagement.js

+ 121 - 22
src/Form/projectChange/add.vue

@@ -90,7 +90,8 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
+        <el-button size="small" type="primary" @click="duplicateChecking" class="normal-btn-width">查 重</el-button>
+        <el-button size="small" type="primary" @click="onSave" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
   </div>
@@ -109,6 +110,7 @@ export default {
         }
       },
       dialogFormVisible:false,
+      checkResults:'',
       projectAddress:[],
       form:{
         sa_projectid:0,
@@ -162,6 +164,65 @@ export default {
       this.form = Object.assign({},this.form,{province:val[0],city:val[1],county:val[2]})
 
     },
+    /*手动查重*/
+    duplicateChecking(){
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221208184202,
+          "content": {
+            "projectname":this.form.projectname,
+            "address":this.form.address
+          },
+        })
+        console.log(res,"查重结果")
+        if (res.data.length !== 0){
+          console.log("重复")
+        }
+        this.checkResults = res.data.length
+      })
+    },
+    /*自动查重判断*/
+    duplicateCheck(){
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221208184202,
+          "content": {
+            "projectname":this.form.projectname,
+            "address":this.form.address
+          },
+        })
+        console.log(res,"查重结果")
+        if (res.data.length !== 0){
+          console.log("重复")
+        }
+        this.checkResults = res.data.length
+        this.onSave()
+      })
+    },
+    onSave(){
+      if (this.checkResults === ''){
+        this.duplicateCheck()
+      }else {
+        if (this.checkResults !== 0){
+          this.$confirm('该项目疑似重复,是否确认创建项目?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            this.onSubmit()
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: '已取消删除'
+            });
+          });
+        }else {
+          this.onSubmit()
+        }
+      }
+    },
     onSubmit(){
       console.log(this.form)
       if (this.form.signdate_due !== ''){
@@ -177,7 +238,6 @@ export default {
         this.form.signdate_due = ''
         this.form.signdate_due = ''
       }
-
       console.log(this.form)
       this.$refs['form'].validate(async (valid) => {
         if (!valid) return false
@@ -187,30 +247,69 @@ export default {
           "content": this.form
         })
         this.tool.showMessage(res,()=>{
-          this.$emit('onSuccess')
-          this.$refs['form'].resetFields();
-          this.value = ''
-          this.form={
-            sa_projectid:0,
-            projectname:"",
-            projectnum:"",
-            address:"",//可选
-            grade:"",//可选
-            budgetary:"",//可选
-            remarks:"",//可选
-            projecttype:"",//可选
-            sa_projstagetempid:"",//可选
-            signdate_due:"",//可选
-            scale:"",//可选
-            signamount_due:"",//可选
-            province:"",
-            city:"",
-            county:"",
+          if (this.checkResults === 0){
+            this.$emit('onSuccess')
+            this.$refs['form'].resetFields();
+            this.value = ''
+            this.form={
+              sa_projectid:0,
+              projectname:"",
+              projectnum:"",
+              address:"",//可选
+              grade:"",//可选
+              budgetary:"",//可选
+              remarks:"",//可选
+              projecttype:"",//可选
+              sa_projstagetempid:"",//可选
+              signdate_due:"",//可选
+              scale:"",//可选
+              signamount_due:"",//可选
+              province:"",
+              city:"",
+              county:"",
+            }
+            this.dialogFormVisible = false
+            this.checkResults = ''
+          }else {
+            this.setTag(res.data.sa_projectid)
           }
-          this.dialogFormVisible = false
+
         })
       })
     },
+    async setTag(id){
+      const res = await this.$api.requested({
+        "id": 20220929090901,
+        "content": {
+          "ownertable":"sa_project",
+          "ownerid":id,
+          "datatag":[
+            "疑似重复",
+          ]
+        }
+      })
+      this.$emit('onSuccess')
+      this.$refs['form'].resetFields();
+      this.form={
+        sa_projectid:0,
+        projectname:"",
+        projectnum:"",
+        address:"",//可选
+        grade:"",//可选
+        budgetary:"",//可选
+        remarks:"",//可选
+        projecttype:"",//可选
+        sa_projstagetempid:"",//可选
+        signdate_due:"",//可选
+        scale:"",//可选
+        signamount_due:"",//可选
+        province:"",
+        city:"",
+        county:"",
+      }
+      this.dialogFormVisible = false
+      this.checkResults = ''
+    },
     timeChange(e) {
       if(!e) {
         this.form.signdate_due = ''

+ 88 - 5
src/Form/projectChange/edit.vue

@@ -89,7 +89,8 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" type="warning" @click="onSubmit" class="normal-btn-width">保 存</el-button>
+        <el-button size="small" type="primary" @click="duplicateChecking" class="normal-btn-width">查 重</el-button>
+        <el-button size="small" type="warning" @click="onSave" class="normal-btn-width">保 存</el-button>
       </div>
     </el-drawer>
   </div>
@@ -106,6 +107,7 @@ export default {
       dialogFormVisible:false,
       projectAddress:[],
       addChange:false,
+      checkResults:'',
       form:{
         "sa_projectid":0,
         "projectname":"",
@@ -157,6 +159,65 @@ export default {
       /*this.form.grade = parseInt(this.form.grade)*/
       console.log(this.form,"项目商机内容")
     },
+    /*手动查重*/
+    duplicateChecking(){
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221208184202,
+          "content": {
+            "projectname":this.form.projectname,
+            "address":this.form.address
+          },
+        })
+        console.log(res,"查重结果")
+        if (res.data.length !== 0){
+          console.log("重复")
+        }
+        this.checkResults = res.data.length
+      })
+    },
+    /*自动查重判断*/
+    duplicateCheck(){
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221208184202,
+          "content": {
+            "projectname":this.form.projectname,
+            "address":this.form.address
+          },
+        })
+        console.log(res,"查重结果")
+        if (res.data.length !== 0){
+          console.log("重复")
+        }
+        this.checkResults = res.data.length
+        this.onSave()
+      })
+    },
+    onSave(){
+      if (this.checkResults === ''){
+        this.duplicateCheck()
+      }else {
+        if (this.checkResults !== 0){
+          this.$confirm('该项目疑似重复,是否确认创建项目?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            this.onSubmit()
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: '已取消删除'
+            });
+          });
+        }else {
+          this.onSubmit()
+        }
+      }
+    },
     onSubmit(){
       this.$refs['form'].validate(async (valid) => {
         if (!valid) return false
@@ -167,13 +228,35 @@ export default {
           "content": this.form
         })
         this.tool.showMessage(res,()=>{
-          this.$emit('onSuccess')
-          this.$refs['form'].resetFields();
-          this.dialogFormVisible = false
-          this.addChange = false
+          if (this.checkResults === 0){
+            this.$emit('onSuccess')
+            this.$refs['form'].resetFields();
+            this.dialogFormVisible = false
+            this.addChange = false
+            this.checkResults = ''
+          }else {
+            this.setTag(this.form.sa_projectid)
+          }
+
         })
       })
     },
+    async setTag(id) {
+      const res = await this.$api.requested({
+        "id": 20220929090901,
+        "content": {
+          "ownertable": "sa_project",
+          "ownerid": id,
+          "datatag": [
+            "疑似重复",
+          ]
+        }
+      })
+      this.$emit('onSuccess')
+      this.$refs['form'].resetFields();
+      this.dialogFormVisible = false
+      this.checkResults = ''
+    },
     timeChange(e) {
       if(!e) {
         this.form.signdate_due = ''

+ 233 - 38
src/Form/publicCustomer/add.vue

@@ -9,16 +9,53 @@
         :show-close="false"
         :visible.sync="dialogFormVisible"
         @close="onClose"
-        size="30%">
+        size="40%">
       <div class="drawer__panel">
         <el-row :gutter="20">
           <el-form :model="form" :rules="rules" ref="form" label-width="90px" label-position="right" size="mini">
-            <el-col :span="12">
+            <el-col :span="20">
               <el-form-item label="客户名称:" prop="enterprisename">
                 <el-input v-model="form.enterprisename" placeholder="客户名称"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="4">
+              <el-popover
+                  placement="right"
+                  width="600"
+                  v-model="businessShow"
+                  trigger="click">
+                <el-table :data="businessData" @row-click="businessSelect">
+                  <el-table-column width="260" label="客户名称">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.companyName?scope.row.companyName:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="350" label="客户地址">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="200"  label="客户税号">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.taxNum?scope.row.taxNum:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                </el-table>
+                <!--                <div class="container normal-panel" style="text-align:right">
+                                  <el-pagination
+                                      background
+                                      @size-change="handleSizeChange"
+                                      @current-change="handleCurrentChange"
+                                      :current-page="currentPage"
+                                      :page-sizes="[5]"
+                                      layout="total,sizes, prev, pager, next, jumper"
+                                      :total="total">
+                                  </el-pagination>
+                                </div>-->
+                <el-button size="mini" type="primary" style="width: 100%" @click="businessSearch" slot="reference">工商查询</el-button>
+              </el-popover>
+            </el-col>
+            <el-col :span="24">
               <el-form-item label="客户类型:" prop="type">
                 <el-select v-model="form.type" placeholder="请选择客户类型" size="small">
                   <el-option
@@ -32,12 +69,12 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="客户来源:" prop="source">
                 <el-input v-model="form.source" placeholder="客户来源"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="客户等级:" prop="grade">
                 <el-select v-model="form.grade" placeholder="请选择客户等级" size="small">
                   <el-option
@@ -49,37 +86,37 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="详细地址:" prop="address">
                 <el-input v-model="form.address" placeholder="详细地址"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="企业简称:" prop="abbreviation">
                 <el-input v-model="form.abbreviation" placeholder="企业简称"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="税号:" prop="taxno">
                 <el-input v-model="form.taxno" placeholder="税号"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="所属行业:" prop="industry">
                 <el-input v-model="form.industry" placeholder="所属行业"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="联系人:" prop="contact">
                 <el-input v-model="form.contact" placeholder="联系人"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="联系电话:" prop="phonenumber">
                 <el-input v-model="form.phonenumber" placeholder="联系电话"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="省市县:" prop="province">
                 <el-cascader
                   size="small"
@@ -90,7 +127,7 @@
                 </el-cascader>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="公海池:" prop="sa_customerpoolid">
                 <el-select v-model="form.sa_customerpoolid" placeholder="请选择公海池" size="small">
                   <el-option
@@ -107,7 +144,8 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
+        <el-button size="small" type="primary" @click="duplicateChecking" class="normal-btn-width">查 重</el-button>
+        <el-button size="small" type="primary" @click="onSave" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
   </div>
@@ -122,6 +160,19 @@ export default {
       dialogFormVisible:false,
       isordercheck:true,
       isusedcheck:false,
+      checkResults:'',
+      businessData:[],
+      businessParam:{
+        "id": 20221208103601,
+        "content": {
+          "pageNumber":1,
+          "pageSize":5,
+          "keyword":''
+        },
+      },
+      businessShow:false,
+      total:0,
+      currentPage:0,
       form:{
         "sa_customersid": 0,//新增是传0
         "parentid": 0, //上级客户ID,默认或没有上级的时候传0
@@ -139,7 +190,8 @@ export default {
         "grade":'',// 客户等级(商户等级)
         "industry":"",//非必填,可选,所属行业
         "contact":"",//非必填,可选
-        "phonenumber":""//非必填,可选
+        "phonenumber":"",//非必填,可选
+        "ispublic":1
       },
       rules:{
         enterprisename:[
@@ -158,6 +210,106 @@ export default {
     }
   },
   methods:{
+    /*手动查重*/
+    duplicateChecking(){
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221208172002,
+          "content": {
+            "enterprisename":this.form.enterprisename,
+            "taxno":this.form.taxno,
+            "address":this.form.address
+
+          },
+        })
+        console.log(res,"查重结果")
+        if (res.data.length !== 0){
+          console.log("重复")
+        }
+        this.checkResults = res.data.length
+      })
+    },
+    /*工商查询*/
+    async businessSearch(){
+      this.businessParam.content.keyword = this.form.enterprisename
+      const res = await this.$api.requested(this.businessParam)
+      console.log(res,"工商查询结果")
+      this.businessData = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    /*选择工商信息*/
+    businessSelect(val){
+      console.log("选择的工商信息",val)
+      this.$confirm('是否以查询的工商信息更新客户信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.businessShow = false
+        this.form.enterprisename = val.companyName
+        this.form.address = val.address
+        this.form.taxno = val.taxNum
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消更新'
+        });
+      })
+    },
+    /*handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.businessSearch()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.businessSearch()
+    },*/
+    /*自动查重判断*/
+    duplicateCheck(){
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221208172002,
+          "content": {
+            "enterprisename":this.form.enterprisename,
+            "taxno":this.form.taxno,
+            "address":this.form.address
+          },
+        })
+        console.log(res,"查重结果")
+        if (res.data.length !== 0){
+          console.log("重复")
+        }
+        this.checkResults = res.data.length
+        this.onSave()
+      })
+    },
+    onSave(){
+      if (this.checkResults === ''){
+        this.duplicateCheck()
+      }else {
+        if (this.checkResults !== 0){
+          this.$confirm('该客户疑似重复,是否确认创建客户?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            this.onSubmit()
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: '已取消删除'
+            });
+          });
+        }else {
+          this.onSubmit()
+        }
+      }
+    },
     onSubmit(){
       this.$refs['form'].validate(async (valid) => {
         if (!valid) return false
@@ -172,33 +324,74 @@ export default {
           "content": this.form
         })
         this.tool.showMessage(res,()=>{
-          this.$emit('onSuccess')
-          this.$refs['form'].resetFields();
-          this.form = {
-            "sa_customersid": 0,//新增是传0
-            "parentid": 0, //上级客户ID,默认或没有上级的时候传0
-            "sys_enterpriseid": 0, //合作企业档案ID,新增是传0,更新
-            "enterprisename":"",//客户名称(企业名称)
-            "type": "", //客户类型
-            "sa_customerpoolid": '', //客户池(公海池)ID,默认或没有的时候传0
-            "source": "", //客户来源
-            "province":"",//非必填,可选
-            "city":"",//非必填,可选
-            "county":"",//非必填,可选
-            "address":"",//非必填,可选
-            "abbreviation":"",//非必填,可选
-            "taxno":"",//税号,非必填,可选
-            "grade":'',// 客户等级(商户等级)
-            "industry":"",//非必填,可选,所属行业
-            "contact":"",//非必填,可选
-            "phonenumber":""//非必填,可选
+          if (this.checkResults === 0){
+            this.$emit('onSuccess')
+            this.$refs['form'].resetFields();
+            this.form = {
+              "sa_customersid": 0,//新增是传0
+              "parentid": 0, //上级客户ID,默认或没有上级的时候传0
+              "sys_enterpriseid": 0, //合作企业档案ID,新增是传0,更新
+              "enterprisename":"",//客户名称(企业名称)
+              "type": "", //客户类型
+              "sa_customerpoolid": '', //客户池(公海池)ID,默认或没有的时候传0
+              "source": "", //客户来源
+              "province":"",//非必填,可选
+              "city":"",//非必填,可选
+              "county":"",//非必填,可选
+              "address":"",//非必填,可选
+              "abbreviation":"",//非必填,可选
+              "taxno":"",//税号,非必填,可选
+              "grade":'',// 客户等级(商户等级)
+              "industry":"",//非必填,可选,所属行业
+              "contact":"",//非必填,可选
+              "phonenumber":""//非必填,可选
+            }
+            this.dialogFormVisible = false
+            this.checkResults = ''
+          }else {
+            this.setTag(res.data.sa_customersid)
           }
-          this.dialogFormVisible = false
-          this.$router.push({path:'/PublicCustomerDetail',query:{id:res.data.sa_customersid,rowindex:0}})
-          this.$store.dispatch('changeDetailDrawer',true)
+
+          /*this.$router.push({path:'/PublicCustomerDetail',query:{id:res.data.sa_customersid,rowindex:0}})
+          this.$store.dispatch('changeDetailDrawer',true)*/
         })
       })
     },
+    async setTag(id){
+      const res = await this.$api.requested({
+        "id": 20220929090901,
+        "content": {
+          "ownertable":"sa_customers",
+          "ownerid":id,
+          "datatag":[
+            "疑似重复",
+          ]
+        }
+      })
+      this.$emit('onSuccess')
+      this.$refs['form'].resetFields();
+      this.form = {
+        "sa_customersid": 0,//新增是传0
+        "parentid": 0, //上级客户ID,默认或没有上级的时候传0
+        "sys_enterpriseid": 0, //合作企业档案ID,新增是传0,更新
+        "enterprisename":"",//客户名称(企业名称)
+        "type": "", //客户类型
+        "sa_customerpoolid": '', //客户池(公海池)ID,默认或没有的时候传0
+        "source": "", //客户来源
+        "province":"",//非必填,可选
+        "city":"",//非必填,可选
+        "county":"",//非必填,可选
+        "address":"",//非必填,可选
+        "abbreviation":"",//非必填,可选
+        "taxno":"",//税号,非必填,可选
+        "grade":'',// 客户等级(商户等级)
+        "industry":"",//非必填,可选,所属行业
+        "contact":"",//非必填,可选
+        "phonenumber":""//非必填,可选
+      }
+      this.dialogFormVisible = false
+      this.checkResults = ''
+    },
     onClose(){
       this.$refs['form'].resetFields();
       this.form = {
@@ -220,6 +413,8 @@ export default {
         "contact":"",//非必填,可选
         "phonenumber":""//非必填,可选
       }
+      this.dialogFormVisible = false
+      this.checkResults = ''
     },
     cascaderChange() {
 

+ 191 - 18
src/Form/publicCustomer/edit.vue

@@ -7,16 +7,53 @@
         title="编辑公海客户"
         :show-close="false"
         :visible.sync="dialogFormVisible"
-        size="30%">
+        size="40%">
       <div class="drawer__panel">
         <el-row :gutter="20">
           <el-form :model="form" :rules="rules" ref="form" label-width="90px" label-position="right" size="mini">
-            <el-col :span="12">
+            <el-col :span="20">
               <el-form-item label="客户名称:" prop="enterprisename">
                 <el-input v-model="form.enterprisename" placeholder="客户名称"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="4">
+              <el-popover
+                  placement="right"
+                  width="600"
+                  v-model="businessShow"
+                  trigger="click">
+                <el-table :data="businessData" @row-click="businessSelect">
+                  <el-table-column width="260" label="客户名称">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.companyName?scope.row.companyName:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="350" label="客户地址">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="200"  label="客户税号">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.taxNum?scope.row.taxNum:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                </el-table>
+                <!--                <div class="container normal-panel" style="text-align:right">
+                                  <el-pagination
+                                      background
+                                      @size-change="handleSizeChange"
+                                      @current-change="handleCurrentChange"
+                                      :current-page="currentPage"
+                                      :page-sizes="[5]"
+                                      layout="total,sizes, prev, pager, next, jumper"
+                                      :total="total">
+                                  </el-pagination>
+                                </div>-->
+                <el-button size="mini" type="primary" style="width: 100%" @click="businessSearch" slot="reference">工商查询</el-button>
+              </el-popover>
+            </el-col>
+            <el-col :span="24">
               <el-form-item label="客户类型:" prop="type">
                 <el-select v-model="form.type" placeholder="请选择客户类型" size="small">
                   <el-option
@@ -28,12 +65,12 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="客户来源:" >
                 <el-input v-model="form.source" placeholder="客户来源"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="客户等级:" prop="grade">
                 <el-select v-model="form.grade" placeholder="请选择客户等级" size="small">
                   <el-option
@@ -45,37 +82,37 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="详细地址:" prop="address">
                 <el-input v-model="form.address" placeholder="详细地址"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="企业简称:" prop="abbreviation">
                 <el-input v-model="form.abbreviation" placeholder="企业简称"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="税号:" prop="taxno">
                 <el-input v-model="form.taxno" placeholder="税号"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="所属行业:" prop="industry">
                 <el-input v-model="form.industry" placeholder="所属行业"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="联系人:" prop="contact">
                 <el-input v-model="form.contact" placeholder="联系人"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="联系电话:" prop="phonenumber">
                 <el-input v-model="form.phonenumber" placeholder="联系电话"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="省市县:" prop="province">
                 <el-cascader
                   size="small"
@@ -86,7 +123,7 @@
                 </el-cascader>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="公海池:" prop="sa_customerpoolid">
                 <el-select v-model="form.sa_customerpoolid" placeholder="请选择公海池" size="small">
                   <el-option
@@ -103,7 +140,8 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" type="warning" @click="onSubmit" class="normal-btn-width">保 存</el-button>
+        <el-button size="small" type="primary" @click="duplicateChecking" class="normal-btn-width">查 重</el-button>
+        <el-button size="small" type="warning" @click="onSave" class="normal-btn-width">保 存</el-button>
       </div>
     </el-drawer>
   </div>
@@ -118,6 +156,19 @@ export default {
       dialogFormVisible:false,
       isordercheck:true,
       isusedcheck:false,
+      checkResults:'',
+      businessData:[],
+      businessParam:{
+        "id": 20221208103601,
+        "content": {
+          "pageNumber":1,
+          "pageSize":5,
+          "keyword":''
+        },
+      },
+      businessShow:false,
+      total:0,
+      currentPage:0,
       form:{
         "sa_customersid": 0,//新增是传0
         "parentid": 0, //上级客户ID,默认或没有上级的时候传0
@@ -135,7 +186,8 @@ export default {
         "grade":'',// 客户等级(商户等级)
         "industry":"",//非必填,可选,所属行业
         "contact":"",//非必填,可选
-        "phonenumber":""//非必填,可选
+        "phonenumber":"",//非必填,可选
+        "ispublic":1
       },
       rules:{
         enterprisename:[
@@ -156,6 +208,106 @@ export default {
       this.dialogFormVisible = true
       this.form = Object.assign({},this.form,this.data)
     },
+    /*工商查询*/
+    async businessSearch(){
+      this.businessParam.content.keyword = this.form.enterprisename
+      const res = await this.$api.requested(this.businessParam)
+      console.log(res,"工商查询结果")
+      this.businessData = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    /*选择工商信息*/
+    businessSelect(val){
+      console.log("选择的工商信息",val)
+      this.$confirm('是否以查询的工商信息更新客户信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.businessShow = false
+        this.form.enterprisename = val.companyName
+        this.form.address = val.address
+        this.form.taxno = val.taxNum
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消更新'
+        });
+      })
+    },
+    /*handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.businessSearch()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.businessSearch()
+    },*/
+    /*手动查重*/
+    duplicateChecking(){
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221208172002,
+          "content": {
+            "enterprisename":this.form.enterprisename,
+            "taxno":this.form.taxno,
+            "address":this.form.address
+
+          },
+        })
+        console.log(res,"查重结果")
+        if (res.data.length !== 0){
+          console.log("重复")
+        }
+        this.checkResults = res.data.length
+      })
+    },
+    /*自动查重判断*/
+    duplicateCheck(){
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221208172002,
+          "content": {
+            "enterprisename":this.form.enterprisename,
+            "taxno":this.form.taxno,
+            "address":this.form.address
+          },
+        })
+        console.log(res,"查重结果")
+        if (res.data.length !== 0){
+          console.log("重复")
+        }
+        this.checkResults = res.data.length
+        this.onSave()
+      })
+    },
+    onSave(){
+      if (this.checkResults === ''){
+        this.duplicateCheck()
+      }else {
+        if (this.checkResults !== 0){
+          this.$confirm('该客户疑似重复,是否确认创建客户?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            this.onSubmit()
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: '已取消删除'
+            });
+          });
+        }else {
+          this.onSubmit()
+        }
+      }
+    },
     onSubmit(){
       this.$refs['form'].validate(async (valid) => {
         if (!valid) return false
@@ -170,12 +322,33 @@ export default {
           "content": this.form
         })
         this.tool.showMessage(res,()=>{
-          this.$emit('onSuccess')
-          this.$refs['form'].resetFields();
-          this.dialogFormVisible = false
+          if (this.checkResults === 0){
+            this.$emit('onSuccess')
+            this.$refs['form'].resetFields();
+            this.dialogFormVisible = false
+            this.checkResults = ''
+          }else {
+            this.setTag(this.form.sa_customersid)
+          }
         })
       })
     },
+    async setTag(id) {
+      const res = await this.$api.requested({
+        "id": 20220929090901,
+        "content": {
+          "ownertable": "sa_customers",
+          "ownerid": id,
+          "datatag": [
+            "疑似重复",
+          ]
+        }
+      })
+      this.$emit('onSuccess')
+      this.$refs['form'].resetFields();
+      this.dialogFormVisible = false
+      this.checkResults = ''
+    },
     cascaderChange() {
 
     }

+ 226 - 34
src/Form/salerPrivatecustomer/add.vue

@@ -4,7 +4,7 @@
     <el-drawer
         title="创建客户"
         :visible.sync="dialogFormVisible"
-        size="35%"
+        size="40%"
         direction="rtl"
         :show-close="false"
         append-to-body
@@ -12,12 +12,49 @@
       <div class="drawer__panel">
         <el-row :gutter="20">
           <el-form :model="form" :rules="rules" ref="form" label-width="85px" label-position="right" size="mini">
-            <el-col :span="12">
+            <el-col :span="20">
               <el-form-item label="客户名称:" prop="enterprisename">
                 <el-input v-model="form.enterprisename" placeholder="请输入客户名称" style="width: 100%"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12" >
+            <el-col :span="4">
+              <el-popover
+                  placement="right"
+                  width="600"
+                  v-model="businessShow"
+                  trigger="click">
+                <el-table :data="businessData" @row-click="businessSelect">
+                  <el-table-column width="260" label="客户名称">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.companyName?scope.row.companyName:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="350" label="客户地址">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="200"  label="客户税号">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.taxNum?scope.row.taxNum:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                </el-table>
+<!--                <div class="container normal-panel" style="text-align:right">
+                  <el-pagination
+                      background
+                      @size-change="handleSizeChange"
+                      @current-change="handleCurrentChange"
+                      :current-page="currentPage"
+                      :page-sizes="[5]"
+                      layout="total,sizes, prev, pager, next, jumper"
+                      :total="total">
+                  </el-pagination>
+                </div>-->
+                <el-button size="mini" type="primary" style="width: 100%" @click="businessSearch" slot="reference">工商查询</el-button>
+              </el-popover>
+            </el-col>
+            <el-col :span="24" >
               <el-form-item label="客户类型:" prop="type">
                 <el-select v-model="form.type" placeholder="请选择客户类型" style="width: 100%">
                   <el-option
@@ -31,12 +68,12 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="客户来源:" >
                 <el-input v-model="form.source" placeholder="请输入客户来源" style="width: 100%"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="客户等级:" >
                 <el-select v-model="form.customergrade" placeholder="请选择客户等级" style="width: 100%">
                   <el-option
@@ -50,7 +87,7 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="所属行业:" >
                 <el-select v-model="form.industry" placeholder="请选择所属行业" style="width: 100%">
                   <el-option
@@ -62,12 +99,12 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="上级客户:" >
                 <el-input v-model="form.superiorenterprisename"  placeholder="请选择上级客户" @focus="enterpriseList"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="省市县:" >
                 <el-cascader
                     style="width: 100%"
@@ -77,23 +114,23 @@
                 </el-cascader>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="企业地址:" prop="address">
                 <el-input v-model="form.address" placeholder="请输入企业地址" style="width: 100%"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="企业简称:" prop="abbreviation">
                 <el-input v-model="form.abbreviation" placeholder="请输入企业简称" style="width: 100%"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="企业税号:" prop="taxno">
                 <el-input v-model="form.taxno" placeholder="请输入企业税号" style="width: 100%"></el-input>
               </el-form-item>
             </el-col>
 
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="联系方式:" prop="phonenumber">
                 <el-input v-model="form.phonenumber" placeholder="请输入联系方式" style="width: 100%"></el-input>
               </el-form-item>
@@ -103,7 +140,8 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
+        <el-button size="small" type="primary" @click="duplicateChecking" class="normal-btn-width">查 重</el-button>
+        <el-button size="small" type="primary" @click="onSave" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
     <enterprise
@@ -137,7 +175,20 @@ export default {
     return {
       dialogFormVisible:false,
       visibleEnterprise:false,
+      checkResults:'',
       index:'',
+      businessData:[],
+      businessParam:{
+        "id": 20221208103601,
+        "content": {
+          "pageNumber":1,
+          "pageSize":5,
+          "keyword":''
+        },
+      },
+      businessShow:false,
+      total:0,
+      currentPage:0,
       form:{
         sa_customersid:0,
         sys_enterpriseid:0,
@@ -155,7 +206,7 @@ export default {
         city:'',
         county:'',
         address:'',
-
+        ispublic:0
       },
       value:'',
       options:{
@@ -187,6 +238,106 @@ export default {
       this.gradeList()
       this.industryList()
     },
+    /*工商查询*/
+    async businessSearch(){
+      this.businessParam.content.keyword = this.form.enterprisename
+      const res = await this.$api.requested(this.businessParam)
+      console.log(res,"工商查询结果")
+      this.businessData = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    /*选择工商信息*/
+    businessSelect(val){
+      console.log("选择的工商信息",val)
+      this.$confirm('是否以查询的工商信息更新客户信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.businessShow = false
+        this.form.enterprisename = val.companyName
+        this.form.address = val.address
+        this.form.taxno = val.taxNum
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消更新'
+        });
+      })
+    },
+    /*handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.businessSearch()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.businessSearch()
+    },*/
+    /*手动查重*/
+    duplicateChecking(){
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221208172002,
+          "content": {
+            "enterprisename":this.form.enterprisename,
+            "taxno":this.form.taxno,
+            "address":this.form.address
+
+          },
+        })
+        console.log(res,"查重结果")
+        if (res.data.length !== 0){
+          console.log("重复")
+        }
+        this.checkResults = res.data.length
+      })
+    },
+    /*自动查重判断*/
+    duplicateCheck(){
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221208172002,
+          "content": {
+            "enterprisename":this.form.enterprisename,
+            "taxno":this.form.taxno,
+            "address":this.form.address
+          },
+        })
+        console.log(res,"查重结果")
+        if (res.data.length !== 0){
+          console.log("重复")
+        }
+        this.checkResults = res.data.length
+        this.onSave()
+      })
+    },
+    onSave(){
+      if (this.checkResults === ''){
+        this.duplicateCheck()
+      }else {
+        if (this.checkResults !== 0){
+          this.$confirm('该客户疑似重复,是否确认创建客户?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            this.onSubmit()
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: '已取消删除'
+            });
+          });
+        }else {
+          this.onSubmit()
+        }
+      }
+    },
     onSubmit(){
       this.$refs['form'].validate(async (valid) => {
         if (!valid) return false
@@ -195,31 +346,71 @@ export default {
           "content": this.form
         })
         this.tool.showMessage(res, ()=>{
-          this.$emit('onSuccess')
-          this.$refs['form'].resetFields();
-          this.form = {
-            sa_customersid:0,
-            sys_enterpriseid:0,
-            enterprisename:'',
-            type:'',
-            source:'',
-            parentid:0,
-            superiorenterprisename:'',
-            abbreviation:'',
-            taxno:'',
-            customergrade:'',
-            industry:'',
-            phonenumber:'',
-            province:'',
-            city:'',
-            county:'',
-            address:'',
+          console.log(this.checkResults,"查重结果")
+          if (this.checkResults === 0){
+            this.$emit('onSuccess')
+            this.$refs['form'].resetFields();
+            this.form = {
+              sa_customersid:0,
+              sys_enterpriseid:0,
+              enterprisename:'',
+              type:'',
+              source:'',
+              parentid:0,
+              superiorenterprisename:'',
+              abbreviation:'',
+              taxno:'',
+              customergrade:'',
+              industry:'',
+              phonenumber:'',
+              province:'',
+              city:'',
+              county:'',
+              address:'',
 
+            }
+            this.dialogFormVisible = false
+            this.checkResults = ''
+          }else {
+            this.setTag(res.data.sa_customersid)
           }
-          this.dialogFormVisible = false
         })
       })
+    },
+    async setTag(id){
+      const res = await this.$api.requested({
+        "id": 20220929090901,
+        "content": {
+          "ownertable":"sa_customers",
+          "ownerid":id,
+          "datatag":[
+            "疑似重复",
+          ]
+        }
+      })
+      this.$emit('onSuccess')
+      this.$refs['form'].resetFields();
+      this.form = {
+        sa_customersid:0,
+        sys_enterpriseid:0,
+        enterprisename:'',
+        type:'',
+        source:'',
+        parentid:0,
+        superiorenterprisename:'',
+        abbreviation:'',
+        taxno:'',
+        customergrade:'',
+        industry:'',
+        phonenumber:'',
+        province:'',
+        city:'',
+        county:'',
+        address:'',
 
+      }
+      this.dialogFormVisible = false
+      this.checkResults = ''
     },
     onClose () {
       this.$refs['form'].resetFields();
@@ -243,6 +434,7 @@ export default {
 
       }
       this.dialogFormVisible = false
+      this.checkResults = ''
     },
     /*客户类型列表*/
     async typeList(){

+ 191 - 20
src/Form/salerPrivatecustomer/edit.vue

@@ -4,7 +4,7 @@
     <el-drawer
         title="编辑客户"
         :visible.sync="dialogFormVisible"
-        size="35%"
+        size="40%"
         direction="rtl"
         :show-close="false"
         append-to-body
@@ -12,12 +12,49 @@
       <div class="drawer__panel">
         <el-row :gutter="20">
           <el-form :model="form" :rules="rules" ref="form" label-width="85px" label-position="right" size="mini">
-            <el-col :span="12">
+            <el-col :span="20">
               <el-form-item label="客户名称:" prop="enterprisename">
                 <el-input v-model="form.enterprisename" placeholder="请输入客户名称" style="width: 100%"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="4">
+              <el-popover
+                  placement="right"
+                  width="600"
+                  v-model="businessShow"
+                  trigger="click">
+                <el-table :data="businessData" @row-click="businessSelect">
+                  <el-table-column width="260" label="客户名称">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.companyName?scope.row.companyName:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="350" label="客户地址">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="200"  label="客户税号">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.taxNum?scope.row.taxNum:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                </el-table>
+                <!--                <div class="container normal-panel" style="text-align:right">
+                                  <el-pagination
+                                      background
+                                      @size-change="handleSizeChange"
+                                      @current-change="handleCurrentChange"
+                                      :current-page="currentPage"
+                                      :page-sizes="[5]"
+                                      layout="total,sizes, prev, pager, next, jumper"
+                                      :total="total">
+                                  </el-pagination>
+                                </div>-->
+                <el-button size="mini" type="primary" style="width: 100%" @click="businessSearch" slot="reference">工商查询</el-button>
+              </el-popover>
+            </el-col>
+            <el-col :span="24">
               <el-form-item label="客户类型:" prop="type">
                 <el-select v-model="form.type" placeholder="请选择客户类型" style="width: 100%">
                   <el-option
@@ -29,12 +66,12 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="客户来源:" >
                 <el-input v-model="form.source" placeholder="请输入客户来源" style="width: 100%"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="客户等级:" >
                 <el-select v-model="form.customergrade" placeholder="请选择客户等级" style="width: 100%">
                   <el-option
@@ -48,7 +85,7 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="所属行业:" >
                 <el-select v-model="form.industry" placeholder="请选择所属行业" style="width: 100%">
                   <el-option
@@ -60,12 +97,12 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="上级客户:" >
                 <el-input v-model="form.superiorenterprisename"  placeholder="请选择上级客户" @focus="enterpriseList"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="省市县:" >
                 <el-cascader
                     style="width: 100%"
@@ -75,23 +112,23 @@
                 </el-cascader>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="企业地址:" >
                 <el-input v-model="form.address" placeholder="请输入企业地址" style="width: 100%"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="企业简称:" >
                 <el-input v-model="form.abbreviation" placeholder="请输入企业简称" style="width: 100%"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="企业税号:" >
                 <el-input v-model="form.taxno" placeholder="请输入企业税号" style="width: 100%"></el-input>
               </el-form-item>
             </el-col>
 
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="联系方式:" >
                 <el-input v-model="form.phonenumber" placeholder="请输入联系方式" style="width: 100%"></el-input>
               </el-form-item>
@@ -101,7 +138,8 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" type="warning" @click="onSubmit" class="normal-btn-width">保 存</el-button>
+        <el-button size="small" type="primary" @click="duplicateChecking" class="normal-btn-width">查 重</el-button>
+        <el-button size="small" type="warning" @click="onSave" class="normal-btn-width">保 存</el-button>
       </div>
     </el-drawer>
     <enterprise
@@ -124,7 +162,20 @@ export default {
     return {
       dialogFormVisible:false,
       visibleEnterprise:false,
+      checkResults:'',
       index:'',
+      businessData:[],
+      businessParam:{
+        "id": 20221208103601,
+        "content": {
+          "pageNumber":1,
+          "pageSize":5,
+          "keyword":''
+        },
+      },
+      businessShow:false,
+      total:0,
+      currentPage:0,
       form:{
         value:[],
         sa_customersid:0,
@@ -142,7 +193,8 @@ export default {
         city:'',
         county:'',
         address:'',
-        datastatus:''
+        datastatus:'',
+        ispublic:0
       },
       value:'',
       options:{
@@ -178,10 +230,107 @@ export default {
         this.form.parentid = '未选择'
       }*/
     },
+    /*工商查询*/
+    async businessSearch(){
+      this.businessParam.content.keyword = this.form.enterprisename
+      const res = await this.$api.requested(this.businessParam)
+      console.log(res,"工商查询结果")
+      this.businessData = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    /*选择工商信息*/
+    businessSelect(val){
+      console.log("选择的工商信息",val)
+      this.$confirm('是否以查询的工商信息更新客户信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.businessShow = false
+        this.form.enterprisename = val.companyName
+        this.form.address = val.address
+        this.form.taxno = val.taxNum
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消更新'
+        });
+      })
+    },
+    /*handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.businessSearch()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.businessSearch()
+    },*/
+    /*手动查重*/
+    duplicateChecking(){
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221208172002,
+          "content": {
+            "enterprisename":this.form.enterprisename,
+            "taxno":this.form.taxno,
+            "address":this.form.address
+
+          },
+        })
+        console.log(res,"查重结果")
+        if (res.data.length !== 0){
+          console.log("重复")
+        }
+        this.checkResults = res.data.length
+      })
+    },
+    /*自动查重判断*/
+    duplicateCheck(){
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221208172002,
+          "content": {
+            "enterprisename":this.form.enterprisename,
+            "taxno":this.form.taxno,
+            "address":this.form.address
+          },
+        })
+        console.log(res,"查重结果")
+        if (res.data.length !== 0){
+          console.log("重复")
+        }
+        this.checkResults = res.data.length
+        this.onSave()
+      })
+    },
+    onSave(){
+      if (this.checkResults === ''){
+        this.duplicateCheck()
+      }else {
+        if (this.checkResults !== 0){
+          this.$confirm('该客户疑似重复,是否确认创建客户?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            this.onSubmit()
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: '已取消删除'
+            });
+          });
+        }else {
+          this.onSubmit()
+        }
+      }
+    },
     onSubmit(){
-      /*if (this.form.parentid === '未选择'){
-        this.form.parentid = 0
-      }*/
       console.log(this.form)
       this.$refs['form'].validate(async (valid) => {
         if (!valid) return false
@@ -190,13 +339,35 @@ export default {
           "content": this.form
         })
         this.tool.showMessage(res, ()=>{
-          this.$emit('onSuccess')
-          this.$refs['form'].resetFields();
-          this.dialogFormVisible = false
+          if (this.checkResults === 0){
+            this.$emit('onSuccess')
+            this.$refs['form'].resetFields();
+            this.dialogFormVisible = false
+            this.checkResults = ''
+          }else {
+            this.setTag(this.form.sa_customersid)
+          }
+
         })
       })
 
     },
+    async setTag(id) {
+      const res = await this.$api.requested({
+        "id": 20220929090901,
+        "content": {
+          "ownertable": "sa_customers",
+          "ownerid": id,
+          "datatag": [
+            "疑似重复",
+          ]
+        }
+      })
+      this.$emit('onSuccess')
+      this.$refs['form'].resetFields();
+      this.dialogFormVisible = false
+      this.checkResults = ''
+    },
     /*客户类型列表*/
     async typeList(){
       const res = await this.$api.requested({

+ 53 - 9
src/HDrpManagement/projectChange/components/putPeople.vue

@@ -1,18 +1,37 @@
 <template>
   <div>
-    <el-popconfirm
-        title="确定进行报备操作吗?"
-        @confirm="onSubmit"
-    >
-      <el-button size="mini" slot="reference">{{ flag === 0?'报 备':'报备审核' }}</el-button>
-    </el-popconfirm>
+    <div v-if="flag === 0">
+      <el-popconfirm
+          title="确定进行提交报备操作吗?"
+          @confirm="onSubmit"
+      >
+        <el-button size="mini"  slot="reference">提交报备</el-button>
+      </el-popconfirm>
+    </div>
+    <div v-else-if="flag === 1">
+      <el-popconfirm
+          title="确定进行报备审核操作吗?"
+          @confirm="onCheck"
+      >
+        <el-button size="mini"  slot="reference">报备审核</el-button>
+      </el-popconfirm>
+    </div>
+    <div v-else-if="flag === 2" >
+      <el-popconfirm
+          title="确定进行取消审核操作吗?"
+          @confirm="onUnCheck"
+      >
+        <el-button size="mini" slot="reference">取消审核</el-button>
+      </el-popconfirm>
+    </div>
+
   </div>
 </template>
 
 <script>
 export default {
   name: "add",
-  props:['data','rowData'],
+  props:['data','rowData','flagTag'],
   data(){
     return {
       butTag:'',
@@ -33,7 +52,7 @@ export default {
         "id": 20221114163402,
         "content": {
           "sa_projectid": this.rowData.sa_projectid,
-          "type": this.flag === 0?'1':'2' //报备中,已报备
+          "type": 1 //报备中,已报备
         },
       })
       this.tool.showMessage(res,()=>{
@@ -54,6 +73,30 @@ export default {
         })
       })*/
     },
+    async onCheck(){
+      const res = await this.$api.requested({
+        "id": 20221114163402,
+        "content": {
+          "sa_projectid": this.rowData.sa_projectid,
+          "type": 2 //报备中,已报备
+        },
+      })
+      this.tool.showMessage(res,()=>{
+        this.$emit('putSuccess')
+      })
+    },
+    async onUnCheck(){
+      const res = await this.$api.requested({
+        "id": 20221114163402,
+        "content": {
+          "sa_projectid": this.rowData.sa_projectid,
+          "type": 3 //报备中,已报备
+        },
+      })
+      this.tool.showMessage(res,()=>{
+        this.$emit('putSuccess')
+      })
+    },
     async tagData(){
       console.log(this.rowData.sa_projectid,"rowData数据")
       const res = await this.$api.requested({
@@ -84,7 +127,8 @@ export default {
     }
   },
   mounted() {
-    this.tagData()
+    this.flag = this.flagTag
+    console.log("报备状态",this.flagTag)
   },
   created() {
   }

+ 5 - 4
src/HDrpManagement/projectChange/modules/detail.vue

@@ -19,8 +19,9 @@
       <div style="margin-right: 10px" class="inline-16">
         <putPeople
             @putSuccess="queryMainData"
-            v-if="tool.checkAuth($route.name,'put') && flag === 1 && flagTag !==2"
+            v-if="tool.checkAuth($route.name,'put') && flagTag !== ''"
             :rowData="mainData"
+            :flagTag="flagTag"
             style="width:100%;"
         />
       </div>
@@ -38,7 +39,7 @@
             :nameId="20221020144302"
             nameKey="sa_projectids"
             class="inline-16"
-            v-if="tool.checkAuth($route.name,'delete')"
+            v-if="tool.checkAuth($route.name,'delete') "
             @deleteSuccess="deleteSuccess"
         />
       </div>
@@ -103,7 +104,7 @@ export default {
       totalPrice:0,
       dialogVisible:false,
       nowStage:'',
-      flagTag:0,
+      flagTag:'',
       flag:0,
       mainData:'',
       mainAreaData:'',
@@ -168,7 +169,7 @@ export default {
       this.$router.replace({path:'/projectChangeDetail',query:{id:id,rowindex:rowindex}})
       this.queryMainData(id)
     },
-    /*获取标签数据*/
+    // 获取标签数据
     async tagData(){
       console.log(this.$refs.details.tags,'标签')
       const res = await this.$api.requested({

+ 6 - 1
src/HDrpManagement/publicCustomer/index.vue

@@ -12,6 +12,7 @@
       }"
       >
       <template #titleRight>
+        <importCustomer style="margin-left:10px" @onSuccess="onSuccess"></importCustomer>
       </template>
       <template #custom>
       <div class="mt-10">
@@ -103,6 +104,7 @@
 
 <script>
 import statusChange from './components/statusChange'
+import importCustomer from './modules/importCustomer'
 export default {
   data () {
     return {
@@ -151,7 +153,7 @@ export default {
       publicList:() => this.publicList
     }
   },
-  components:{statusChange},
+  components:{statusChange,importCustomer},
   methods:{
     /* 获取系统选项数据 */
     async getSysOption() {
@@ -288,6 +290,9 @@ export default {
       }
       this.$refs.basicLayout.param.content.where = this.selectParam
       this.$refs.basicLayout.listData()
+    },
+    onSuccess(){
+      this.$refs.basicLayout.listData()
     }
   },
   created() {

+ 205 - 0
src/HDrpManagement/publicCustomer/modules/importCustomer.vue

@@ -0,0 +1,205 @@
+<template>
+  <div>
+    <!-- 按钮类型 -->
+    <el-button type="success" size="small" @click="dialogUploadVisible = true" icon="el-icon-upload">导 入</el-button>
+    <el-dialog class="import-panel" :visible.sync="dialogUploadVisible" width="500px" append-to-body :close-on-click-modal="false" :show-close="false" :before-close="clearFiles">
+      <div style="padding:20px">
+        <el-upload
+          style="width:100%"
+          ref="my-upload"
+          class="upload-demo normal-margin"
+          accept=".xls,.xlsx"
+          action="#"
+          :auto-upload="false"
+          :show-file-list="false"
+          :on-change="handleChange"
+          drag
+          multiple>
+          <i class="el-icon-upload"></i>
+          <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+        </el-upload>
+        <div class="progress_panel" v-for="file in filelist" :key="file.uid">
+          <img v-if="file.type === 'DOC' || file.type === 'DOCX'" width="30" src="@/assets/file_icons/word.png"
+            alt="">
+          <img v-else-if="file.type === 'PDF'" width="30" src="@/assets/file_icons/PDF.png" alt="">
+          <img v-else-if="file.type === 'MP4' || file.type === 'AVI'" width="30" src="@/assets/file_icons/video.png"
+            alt="">
+          <img v-else-if="file.type === 'XLS' || file.type === 'XLSX'" width="30" src="@/assets/file_icons/excel.png"
+            alt="">
+          <img v-else-if="file.type === 'PNG' || file.type === 'JPG'|| file.type === 'JPEG'" width="30"
+            src="@/assets/file_icons/image.png" alt="">
+          <img v-else-if="file.type === 'PPT' || file.type === 'PPTX'" width="30" src="@/assets/file_icons/PPT.png"
+            alt="">
+          <img v-else width="30" src="@/assets/file_icons/unknow.png" alt="">
+          <div>
+            <p v-if="file.progress === 100" style="float:right"><span style="color:#67C23A">●</span>上传成功</p>
+            <p>{{file.raw?file.raw.name:'暂无上传文件'}}</p>
+            <el-progress :percentage="file.progress" :show-text="false"></el-progress>
+          </div>
+        </div>
+        <slot name="errorFile"></slot>
+        <p class="tips">• 为保证数据导入顺利,推荐您下载并使用<a :href="modelurl">《Excel标准模板》</a></p>
+        <p class="tips">• 文件中数据不能超过5000行</p>
+        <div class="dialog-footer">
+          <el-button size="small" @click="dialogUploadVisible = false" class="normal-btn-width">取 消</el-button>
+          <el-button size="small" type="warning" @click="dialogUploadVisible = false" class="normal-btn-width btn-warning">确 定</el-button>
+        </div>
+      </div>
+      
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+
+export default {
+  /*
+    folderid:文件夹id; 必填
+    btntype:展示上传按钮的类型;
+    accept:限制上传文件类型;
+    bindData:附件上传成功后对应需要绑定的数据信息
+  */
+  props:[],
+  data () {
+    return {
+      folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
+      dialogUploadVisible: false,
+      params: {
+        "classname": "system.attachment.huawei.OBS",
+        "method": "getFileName",
+        "content": {
+          "filename": '',
+          "filetype": '',
+          "parentid": ""//归属文件夹ID
+        }
+      },
+      file: {},
+      filelist: [],
+      CampaignList:[],
+      activeName:'first',
+      modelurl:'',
+      campaignid:''
+
+    }
+  },
+  mounted () {
+    this.getModelUrl()
+  },
+  methods: {
+    handleChange (file, filelist) {
+      this.filelist = filelist
+      var index = file.raw.name.lastIndexOf(".");
+      var ext = file.name.substr(index + 1);
+      this.params.content.filename = file.raw.name
+      this.params.content.filetype = ext
+      this.getUploadUrl(file, ext)
+    },
+    handleClick () {
+      this.getModelUrl()
+    },
+    // 获取导入模板
+    async getModelUrl () {
+      const res = await this.$api.requested({
+        "id": "20221028100502",
+        "content":{}
+      })
+      this.modelurl = res.msg
+    },
+    // 获取华为云上传地址
+    async getUploadUrl (file, ext) {
+      this.params.content.parentid = this.folderid
+      const res = await this.$api.requested(this.params)
+      let url = res.data.uploadurl
+      let obsfilename = res.data.serialfilename
+
+      this.upoladFileToServer(url, file, ext, obsfilename)
+    },
+    // 上传到华为云
+    async upoladFileToServer (url, file, ext, obsfilename) {      
+      let THIS = this
+      let config = {
+        headers: ext === 'pdf' ? { 'Content-Type': 'application/pdf' } : { 'Content-Type': 'application/octet-stream' },
+        onUploadProgress: function (progressEvent) {
+          let percent = progressEvent.loaded / progressEvent.total * 100
+          THIS.filelist.forEach(e => {
+            if (e.uid === file.uid) {
+              THIS.$set(e, 'type', ext.toUpperCase());
+              THIS.$set(e, 'progress', percent);
+            }
+          })
+        },
+      }
+      const res = await this.$upload.hw_upload(url, file.raw, config)
+      this.createFileRecord(obsfilename)
+    },
+
+    // 上传成功以后生成附件记录
+    async createFileRecord (obsfilename) {
+      let obj = {
+         "serialfilename": obsfilename
+      }
+      obj = Object.assign({},obj)
+      let param = {
+        "classname": "system.attachment.huawei.OBS",
+        "method": "uploadSuccess",
+        "content":obj
+      }
+      const res = await this.$api.requested(param)
+      this.importData(res.data.attachmentids[0])
+    },
+    async importData (id) {
+      const res = await this.$api.requested({
+        "id": "20221110135304",
+        "content": {
+          "attachmentid": id
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        this.$emit('onSuccess')
+        this.clearFiles()
+      })
+    },
+    clearFiles () {
+      this.$refs['my-upload'].clearFiles()
+      this.filelist = []
+      this.dialogUploadVisible = false
+    }
+  }
+}
+
+</script>
+<style>
+.import-panel .el-dialog__header,.import-panel .el-dialog__body{
+  padding: 0 !important;
+}
+.upload-demo > div {
+  width: 100% !important;
+}
+.upload-demo .el-upload-dragger {
+  width: 100% !important;
+}
+</style>
+<style scoped>
+.progress_panel {
+  display: flex;
+  align-items: center;
+  padding: 10px;
+  margin: 10px 0;
+  border-radius: 5px;
+  transition: linear 0.2s all;
+}
+.progress_panel:hover {
+  box-shadow: 0px 0px 5px #ccc;
+}
+.progress_panel > div {
+  flex: 1;
+  padding: 0 10px;
+}
+.progress_panel > div > p {
+  line-height: 30px;
+}
+.tips{
+  line-height: 30px;
+}
+</style>
+

+ 41 - 0
src/SDrpManagement/QuotedPrice/components/copy/index.vue

@@ -0,0 +1,41 @@
+<template>
+  <div>
+    <el-drawer
+        title="编辑报价单"
+        :visible.sync="drawer"
+        size="92%"
+        direction="rtl"
+        :show-close="false"
+        append-to-body
+        >
+      <div class="drawer__panel" style="margin-bottom: 0px">
+
+      </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" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="warning"  class="normal-btn-width">确 定</el-button>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "index",
+  data(){
+    return {
+      drawer:false
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 3 - 3
src/SDrpManagement/QuotedPrice/components/edit/productTable.vue

@@ -193,7 +193,7 @@ export default {
     queryProduct(){
       this.dialogProductVisible = true
       console.log(this.id,this.sa_quotedpriceid,"接受传过来的数据")
-      this.params.content.sa_projectid = this.id
+      this.params.content.sa_projectid = 0
       this.productData()
     },
     /*产品配置信息*/
@@ -206,14 +206,14 @@ export default {
       this.total = res.total
       console.log(res,'产品配置信息')
       console.log(this.quotedpricetype)
-      this.$nextTick(()=>{
+      /*this.$nextTick(()=>{
         console.log(this.quotedpricetype)
         if (this.quotedpricetype === '项目报价'){
           for (let i=0;i<this.list.length;i++){
             this.$refs.multipleTable.toggleRowSelection(this.list[i],true)
           }
         }
-      })
+      })*/
 
     },
     handleSizeChange(val) {

+ 285 - 0
src/SDrpManagement/QuotedPrice/components/edit/productTableProject.vue

@@ -0,0 +1,285 @@
+<template>
+  <div>
+    <el-button size="small"  type="primary" icon="el-icon-plus" @click="queryProduct">自项目产品添加</el-button>
+    <el-drawer
+        title="选择商品"
+        :visible.sync="dialogProductVisible"
+        append-to-body
+        size="80%"
+        direction="rtl"
+        @close="onColes">
+      <div class="drawer__panel">
+        <div class="flex-align-center flex-between ">
+          <slot name="operation"></slot>
+          <div class="flex-align-center">
+            <el-input size="small"  suffix-icon="el-icon-search" v-model="params.content.where.condition" placeholder="产品名称,编号" @keyup.enter.native="productData(params.content.pageNumber = 1)" @clear="productData(params.content.pageNumber = 1)" clearable></el-input>&nbsp;
+          </div>
+        </div>
+        <div class="produtMag-panel">
+          <el-table
+              ref="multipleTable"
+              :data="list"
+              style="width: 100%"
+              :header-cell-style="{height:'50px',color:'#768093',fontWeight:'100'}"
+              :cell-style="{height:'50px',color:'#768093',fontWeight:'200'}"
+              @selection-change="selectionChange">
+            <el-table-column
+                type="selection"
+                width="55">
+            </el-table-column>
+            <el-table-column
+                align="center"
+                label="产品图"
+                width="80">
+              <template slot-scope="scope">
+                <div v-if="scope.row.attinfos[0]">
+                  <previewImage class="image" :image="scope.row.attinfos[0]" :list="scope.row.attinfos" :deletebtn="false"></previewImage>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="itemno"
+                label="产品编号"
+                width="180">
+            </el-table-column>
+            <el-table-column
+                prop="itemname"
+                label="产品名称"
+                width="180">
+            </el-table-column>
+            <el-table-column
+                label="型号/规格"
+                width="180">
+              <template slot-scope="scope">
+                <p><span>{{scope.row.model}}</span>&nbsp;/&nbsp;<span>{{scope.row.spec}}</span></p>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="caliber"
+                label="口径"
+                width="180">
+            </el-table-column>
+            <el-table-column
+                prop="pressure"
+                label="压力"
+                width="180">
+            </el-table-column>
+            <el-table-column
+                prop="material"
+                label="材质"
+                width="180">
+            </el-table-column>
+            <el-table-column
+                prop="brand"
+                label="品牌"
+                width="180">
+              <template slot-scope="scope">
+                <p v-for="(item,index) in scope.row.brand">
+                  <span style="float: left" v-if="index === scope.row.brand.length -1">{{item?item.brandname+'':'--'}}</span>
+                  <span style="float: left" v-else>{{item?item.brandname+',':'--'}}</span>
+                </p>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="itemclass"
+                label="类别"
+                width="0">
+              <template slot-scope="scope">
+                <p v-for="(item,index) in scope.row.itemclass">
+                  <span style="float: left" v-if="index === scope.row.itemclass.length -1">{{item?item.itemclassname+'':'--'}}</span>
+                  <span style="float: left" v-else>{{item?item.itemclassname+',':'--'}}</span>
+                </p>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="unitid"
+                label="计量单位"
+                width="100">
+              <template slot-scope="scope">
+                <el-tag size="mini" type="info" effect="plain">{{scope.row.unitname}}/{{scope.row.axunitname}}</el-tag>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="marketprice"
+                label="牌价"
+                width="100">
+              <template slot-scope="scope">
+                  <span >{{scope.row.marketprice?scope.row.marketprice+',':'--'}}</span>
+              </template>
+            </el-table-column>
+          </el-table>
+          <div style="margin-top:16px;text-align:right">
+            <el-pagination
+                background
+                small
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="currentPage"
+                :page-size="params.content.pageSize"
+                layout="total, prev, pager, next, jumper"
+                :total="total">
+            </el-pagination>
+          </div>
+        </div>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="onColes" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="primary" @click="onSubmit"  class="normal-btn-width">确 定</el-button>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import uploadFile from "@/components/upload/hw_obs_upload";
+import previewImage from "@/components/previewImage";
+
+export default {
+  name: "productTable",
+  props:["id","sa_quotedpriceid","quotedpricetype"],
+  components:{uploadFile, previewImage},
+  data(){
+    return {
+      dialogProductVisible:false,
+      type:'',
+      tablecols:[],
+      list:[],
+      total:0,
+      currentPage:0,
+      tableSelectData:[],
+      selectData:[],
+      params:{
+        "id": 20221020164903,
+        "version":1,
+        "content": {
+          "sa_projectid":'',
+          "sa_quotedpriceid":"",
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+
+        }
+      }
+    }
+  },
+  methods:{
+    onShow(){
+     /* this.dialogProjectVisible = true*/
+     /* console.log(this.id,"项目编号")
+      this.$emit('checkForm')*/
+      /*this.productData()*/
+
+    },
+    onColes(){
+      this.dialogProductVisible = false
+    },
+    async onSubmit(){
+      const res = await this.$api.requested({
+        "id": 20221021095403,
+        "content": {
+          "sa_quotedpriceid":this.sa_quotedpriceid,     //sat_notice_classid<=0时 为新增
+          "items":this.selectData
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        console.log(res)
+        this.dialogProductVisible = false
+        this.$emit('productAdd')
+      })
+    },
+    /*获取产品信息*/
+    queryProduct(){
+      this.dialogProductVisible = true
+      console.log(this.id,this.sa_quotedpriceid,"接受传过来的数据")
+      this.params.content.sa_projectid = this.id
+      this.productData()
+    },
+    /*产品配置信息*/
+    async productData(){
+      console.log("执行")
+      this.params.content.sa_quotedpriceid = this.sa_quotedpriceid
+      const res = await this.$api.requested(this.params)
+      console.log(res,"产品配置")
+      this.list = res.data
+      this.total = res.total
+      console.log(res,'产品配置信息')
+      console.log(this.quotedpricetype)
+      this.$nextTick(()=>{
+        console.log(this.quotedpricetype)
+        if (this.quotedpricetype === '项目报价'){
+          for (let i=0;i<this.list.length;i++){
+            this.$refs.multipleTable.toggleRowSelection(this.list[i],true)
+          }
+        }
+      })
+
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.productData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.productData()
+    },
+    onSuccess(){
+      this.productData()
+    },
+    clearData(){
+      console.log("执行")
+      this.search = ""
+      this.param.content.where.condition = this.search
+      this.productData()
+    },
+    queryClick(){
+      this.param.content.where.condition = this.search
+      this.productData()
+    },
+    selectionChange(val){
+      console.log(val)
+      this.tableSelectData = val
+      if (this.type === '项目报价'){
+        let obj = this.tableSelectData.map(e=>{
+          return {
+            sa_quotedprice_itemsid:'0',
+            itemid:e.itemid,
+            oldprice:e.marketprice,
+            /*price:(e.marketprice * 100)/100,*/
+            price:0,
+            discountrate:0,
+            qty:e.qty
+          }
+        })
+        console.log(obj)
+        this.selectData = obj
+      }else {
+        let obj = this.tableSelectData.map(e=>{
+          return {
+            sa_quotedprice_itemsid:'0',
+            itemid:e.itemid,
+            oldprice:e.marketprice,
+            /*price:(e.marketprice * 100)/100,*/
+            price:0,
+            discountrate:0,
+            qty:1
+          }
+        })
+        console.log(obj)
+        this.selectData = obj
+      }
+    }
+  },
+  mounted() {
+  }
+}
+</script>
+
+<style scoped>
+.image {
+  width:38px;height:38px;margin:0px auto;
+}
+</style>

+ 4 - 2
src/SDrpManagement/QuotedPrice/components/edit/quotedPriceProduct.vue

@@ -13,6 +13,7 @@
       </el-input>
 
       <importExcel style="float: right" v-if="quotedpricetype === '普通报价'" :sa_quotedpriceid="sa_quotedpriceid" @onSuccess="onSuccess"></importExcel>
+      <productTableProject style="float: right;margin-right: 10px;margin-bottom: 10px" :id="sa_projectid" :sa_quotedpriceid="sa_quotedpriceid" :quotedpricetype="quotedpricetype" ref="quoterPriceProject" @productAdd="productData"></productTableProject>
       <productTable style="float: right;margin-right: 10px;margin-bottom: 10px" :id="sa_projectid" :sa_quotedpriceid="sa_quotedpriceid" :quotedpricetype="quotedpricetype"  ref="quoterPrice" @productAdd="productData"></productTable>
       <delProduct style="float: right;margin-right: 10px" :data="selectDel" @delSuccess="delSuccess"></delProduct>
     </div>
@@ -209,11 +210,11 @@ import previewImage from "@/components/previewImage";
 import productTable from './productTable'
 import importExcel from './importQuotedPrice'
 import delProduct from "@/SDrpManagement/QuotedPrice/components/delProduct";
-
+import productTableProject from "./productTableProject"
 export default {
   props:["sa_projectid","sa_quotedpriceid","quotedpricetype"],
   name: "quotedPriceProduct",
-  components:{uploadFile, previewImage,productTable,delProduct,importExcel},
+  components:{uploadFile, previewImage,productTable,delProduct,importExcel,productTableProject},
   data(){
     return {
       selectDel:[],
@@ -298,6 +299,7 @@ export default {
       console.log(sa_quotedpriceid,"报价单id")
       console.log(type,"项目报价")
       this.$refs.quoterPrice.queryProduct(sa_quotedpriceid,type)
+      this.$refs.quoterPriceProject.queryProduct(sa_quotedpriceid,type)
     },
     onChangeNum (val,data,index,step) {
       console.log("步长",this.step)

+ 2 - 2
src/SDrpManagement/QuotedPrice/components/productTable.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="small"  type="primary" icon="el-icon-plus" @click="onShow">添加商品</el-button>
+    <el-button size="small"  type="primary" icon="el-icon-plus" @click="onShow">自产品档案添加</el-button>
     <el-drawer
         title="选择商品"
         :visible.sync="dialogProductVisible"
@@ -194,7 +194,7 @@ export default {
     queryProduct(id,type){
       console.log(id,type)
       this.dialogProductVisible = true
-      this.params.content.sa_projectid = this.id
+      this.params.content.sa_projectid = 0
       console.log(id,"报价单id五")
       this.type = type
       console.log(this.type)

+ 289 - 0
src/SDrpManagement/QuotedPrice/components/productTableProject.vue

@@ -0,0 +1,289 @@
+<template>
+  <div>
+    <el-button size="small"  type="primary" icon="el-icon-plus" @click="onShow">自项目产品添加</el-button>
+    <el-drawer
+        title="选择商品"
+        :visible.sync="dialogProductVisible"
+        append-to-body
+        size="80%"
+        direction="rtl"
+        @close="onColes">
+      <div class="drawer__panel">
+        <div class="flex-align-center flex-between ">
+          <slot name="operation"></slot>
+          <div class="flex-align-center">
+            <el-input size="small"  suffix-icon="el-icon-search" v-model="params.content.where.condition" placeholder="产品名称,编号" @keyup.enter.native="productData(params.content.pageNumber = 1)" @clear="productData(params.content.pageNumber = 1)" clearable></el-input>&nbsp;
+          </div>
+        </div>
+        <div class="produtMag-panel">
+          <el-table
+              ref="multipleTable"
+              :data="list"
+              style="width: 100%"
+              :header-cell-style="{height:'50px',color:'#768093',fontWeight:'100'}"
+              :cell-style="{height:'50px',color:'#768093',fontWeight:'200'}"
+              @selection-change="selectionChange">
+            <el-table-column
+                type="selection"
+                width="55">
+            </el-table-column>
+            <el-table-column
+                align="center"
+                label="产品图"
+                width="80">
+              <template slot-scope="scope">
+                <div v-if="scope.row.attinfos[0]">
+                  <previewImage class="image" :image="scope.row.attinfos[0]" :list="scope.row.attinfos" :deletebtn="false"></previewImage>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="itemno"
+                label="产品编号"
+                width="180">
+            </el-table-column>
+            <el-table-column
+                prop="itemname"
+                label="产品名称"
+                width="180">
+            </el-table-column>
+            <el-table-column
+                label="型号/规格"
+                width="180">
+              <template slot-scope="scope">
+                <p><span>{{scope.row.model}}</span>&nbsp;/&nbsp;<span>{{scope.row.spec}}</span></p>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="caliber"
+                label="口径"
+                width="180">
+            </el-table-column>
+            <el-table-column
+                prop="pressure"
+                label="压力"
+                width="180">
+            </el-table-column>
+            <el-table-column
+                prop="material"
+                label="材质"
+                width="180">
+            </el-table-column>
+            <el-table-column
+                prop="brand"
+                label="品牌"
+                width="180">
+              <template slot-scope="scope">
+                <p v-for="(item,index) in scope.row.brand">
+                  <span style="float: left" v-if="index === scope.row.brand.length -1">{{item?item.brandname+'':'--'}}</span>
+                  <span style="float: left" v-else>{{item?item.brandname+',':'--'}}</span>
+                </p>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="itemclass"
+                label="类别"
+                width="0">
+              <template slot-scope="scope">
+                <p v-for="(item,index) in scope.row.itemclass">
+                  <span style="float: left" v-if="index === scope.row.itemclass.length -1">{{item?item.itemclassname+'':'--'}}</span>
+                  <span style="float: left" v-else>{{item?item.itemclassname+',':'--'}}</span>
+                </p>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="unitid"
+                label="计量单位"
+                width="100">
+              <template slot-scope="scope">
+                <el-tag size="mini" type="info" effect="plain">{{scope.row.unitname}}/{{scope.row.axunitname}}</el-tag>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="marketprice"
+                label="牌价"
+                width="100">
+              <template slot-scope="scope">
+                  <span >{{scope.row.marketprice?scope.row.marketprice+',':'--'}}</span>
+              </template>
+            </el-table-column>
+          </el-table>
+          <div style="margin-top:16px;text-align:right">
+            <el-pagination
+                background
+                small
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="currentPage"
+                :page-size="params.content.pageSize"
+                layout="total, prev, pager, next, jumper"
+                :total="total">
+            </el-pagination>
+          </div>
+        </div>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="onColes" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="primary" @click="onSubmit"  class="normal-btn-width">确 定</el-button>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import uploadFile from "@/components/upload/hw_obs_upload";
+import previewImage from "@/components/previewImage";
+
+export default {
+  name: "productTable",
+  props:["id"],
+  components:{uploadFile, previewImage},
+  data(){
+    return {
+      dialogProductVisible:false,
+      type:'',
+      tablecols:[],
+      list:[],
+      total:0,
+      currentPage:0,
+      tableSelectData:[],
+      selectData:[],
+      sa_quotedpriceid:'',
+      params:{
+        "id": 20221020164903,
+        "version":1,
+        "content": {
+          "sa_projectid":'',
+          "sa_quotedpriceid":"",
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+
+        }
+      }
+    }
+  },
+  methods:{
+    onShow(){
+     /* this.dialogProjectVisible = true*/
+      console.log(this.id,"项目编号")
+      this.$emit('checkForm')
+      /*this.productData()*/
+
+    },
+    onColes(){
+      this.dialogProductVisible = false
+    },
+    async onSubmit(){
+      const res = await this.$api.requested({
+        "id": 20221021095403,
+        "content": {
+          "sa_quotedpriceid":this.sa_quotedpriceid,     //sat_notice_classid<=0时 为新增
+          "items":this.selectData
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        console.log(res)
+        this.dialogProductVisible = false
+        this.$emit('productAdd')
+      })
+    },
+    /*获取产品信息*/
+    queryProduct(id,type){
+      console.log(id,type)
+      this.dialogProductVisible = true
+      this.params.content.sa_projectid = this.id
+      console.log(id,"报价单id五")
+      this.type = type
+      console.log(this.type)
+      this.sa_quotedpriceid = id
+      this.productData()
+    },
+    /*产品配置信息*/
+    async productData(){
+      console.log("执行")
+      console.log(this.sa_quotedpriceid,"报价单id四")
+      this.params.content.sa_quotedpriceid = this.sa_quotedpriceid
+      const res = await this.$api.requested(this.params)
+      this.list = res.data
+      this.total = res.total
+      console.log(res,'产品配置信息')
+      console.log(this.type)
+      this.$nextTick(()=>{
+        console.log(this.type)
+        if (this.type === '项目报价'){
+          for (let i=0;i<this.list.length;i++){
+            this.$refs.multipleTable.toggleRowSelection(this.list[i],true)
+          }
+        }
+      })
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.productData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.productData()
+    },
+    onSuccess(){
+      this.productData()
+    },
+    clearData(){
+      console.log("执行")
+      this.search = ""
+      this.param.content.where.condition = this.search
+      this.productData()
+    },
+    queryClick(){
+      this.param.content.where.condition = this.search
+      this.productData()
+    },
+    selectionChange(val){
+      console.log(val)
+      this.tableSelectData = val
+      if (this.type === '项目报价'){
+        let obj = this.tableSelectData.map(e=>{
+          return {
+            sa_quotedprice_itemsid:'0',
+            itemid:e.itemid,
+            oldprice:e.marketprice,
+            /*price:(e.marketprice * 100)/100,*/
+            price:0,
+            discountrate:0,
+            qty:e.qty
+          }
+        })
+        console.log(obj)
+        this.selectData = obj
+      }else {
+        let obj = this.tableSelectData.map(e=>{
+          return {
+            sa_quotedprice_itemsid:'0',
+            itemid:e.itemid,
+            oldprice:e.marketprice,
+            /*price:(e.marketprice * 100)/100,*/
+            price:0,
+            discountrate:0,
+            qty:1
+          }
+        })
+        console.log(obj)
+        this.selectData = obj
+      }
+    }
+  },
+  mounted() {
+  }
+}
+</script>
+
+<style scoped>
+.image {
+  width:38px;height:38px;margin:0px auto;
+}
+</style>

+ 4 - 2
src/SDrpManagement/QuotedPrice/components/quotedPriceProduct.vue

@@ -13,6 +13,7 @@
       </el-input>
 
       <importExcel style="float: right" @onSuccess="onSuccess" v-if="type === '客户报价'" ref="quoterImport" @checkForm="checkFormImport"></importExcel>
+      <productTableProject style="float: right;margin-right: 10px;margin-bottom: 10px" :id="sa_projectid" @checkForm="checkForm" ref="quoterPriceProject" @productAdd="productData"></productTableProject>
       <productTable style="float: right;margin-right: 10px;margin-bottom: 10px" :id="sa_projectid" @checkForm="checkForm" ref="quoterPrice" @productAdd="productData"></productTable>
       <delProduct style="float: right;margin-right: 10px" :data="selectDel" @delSuccess="delSuccess"></delProduct>
     </div>
@@ -193,11 +194,11 @@ import previewImage from "@/components/previewImage";
 import productTable from '../components/productTable'
 import importExcel from '../modules/importQuotedPrice'
 import delProduct from "@/SDrpManagement/QuotedPrice/components/delProduct";
-
+import productTableProject from './productTableProject'
 export default {
   props:["sa_projectid","type"],
   name: "quotedPriceProduct",
-  components:{uploadFile, previewImage,productTable,importExcel,delProduct},
+  components:{uploadFile, previewImage,productTable,importExcel,delProduct,productTableProject},
   data(){
     return {
       selectDel:[],
@@ -316,6 +317,7 @@ export default {
       console.log(sa_quotedpriceid,"报价单id")
       console.log(type,"项目报价")
       this.$refs.quoterPrice.queryProduct(sa_quotedpriceid,type)
+      this.$refs.quoterPriceProject.queryProduct(sa_quotedpriceid,type)
     },
     onChangeNum (val,data,index,step) {
       data.amount = val * data.price

+ 126 - 0
src/SDrpManagement/QuotedPrice/detail/components/copyTo.vue

@@ -0,0 +1,126 @@
+<template>
+  <div>
+    <el-popover
+        placement="right"
+        width="800"
+        trigger="click"
+        v-model="historicalShow">
+      <el-table :data="historicalData" @row-click="historicalSelect">
+        <el-table-column width="150" property="billno" label="报价单号"></el-table-column>
+        <el-table-column width="260" property="enterprisename" label="客户"></el-table-column>
+        <el-table-column width="100" property="quotedpricetype" label="报价类型"></el-table-column>
+        <el-table-column width="150" property="projectnum" label="项目编号"></el-table-column>
+        <el-table-column width="200" property="projectname" label="项目名称"></el-table-column>
+        <el-table-column width="80" property="specialoffer" label="特价">
+          <template slot-scope="scope">
+            <span style="margin-left: 10px">{{ scope.row.specialoffer === 1?'是':'否' }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column width="150" property="billdate" label="报价日期"></el-table-column>
+        <el-table-column width="300" property="begdate" label="有效期">
+          <template slot-scope="scope">
+            <span style="margin-left: 10px">{{ scope.row.begdate?scope.row.begdate + '至' + scope.row.enddate :'--' }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column width="90" property="status" label="状态"></el-table-column>
+        <el-table-column width="90" property="name" label="负责人"></el-table-column>
+        <el-table-column width="100" property="createby" label="创建人"></el-table-column>
+        <el-table-column width="190" property="createdate" label="创建日期"></el-table-column>
+      </el-table>
+      <div  class="container normal-panel" style="text-align:right">
+        <el-pagination
+            background
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10]"
+            layout="total,sizes, prev, pager, next, jumper"
+            :total="total">
+        </el-pagination>
+      </div>
+      <el-button slot="reference" size="mini" style="width:100%" type="primary" @click="listData">复 制</el-button>
+    </el-popover>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "copyTo",
+  props:["data"],
+  data(){
+    return {
+      historicalData:[],
+      historicalShow:false,
+      total:0,
+      currentPage:0,
+      param:{
+        "content": {
+          "isExport": 0,
+          "pageNumber": 1,
+          "pageSize": 10,
+          "where": {
+            "status": "",
+            "isproject": "",
+            "startdate": "",
+            "enddate": ""
+          },
+          "type": "0",
+          "sa_quotedpriceid":""
+        },
+        "id": 20221209093003,
+      }
+    }
+  },
+  methods:{
+    async listData(){
+      this.param.content.sa_quotedpriceid = this.data
+      const res = await this.$api.requested(this.param)
+      this.historicalData = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+      console.log(this.historicalData,"数据")
+    },
+    /*选择复制*/
+    historicalSelect(val){
+      console.log(val,"选择")
+      this.historicalShow = false
+      this.copyData(val.sa_quotedpriceid)
+    },
+    /*复制的内容*/
+    async copyData(id){
+      const res = await this.$api.requested({
+        "content": {
+          "sa_quotedpriceid":id
+        },
+        "id": 20221209094103,
+      })
+      console.log(res,"复制的内容")
+      this.$store.dispatch('changeDetailDrawer',true)
+      this.$router.push({
+        path:'/quotedPriceCopy',
+        query:{
+          data:res.data
+        }
+      })
+
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.listData()
+    },
+  },
+  mounted() {
+
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 18 - 2
src/SDrpManagement/QuotedPrice/detail/index.vue

@@ -12,7 +12,7 @@
         ownertable="sa_quotedprice"
         :statusCheck="[{key:'status',value:'审核'},{key:'status',value:'提交'}]"
         :tags="[]"
-        :tabs="['产品清单','详细信息']"
+        :tabs="['产品清单','详细信息','历史报价']"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
       <div slot="tags">
@@ -23,6 +23,7 @@
         <!-- 此区域提供了自定义操作按钮 -->
         <submit_to class="inline-16" v-if="tool.checkAuth($route.name,'submit') && mainData.status === '新建'" :sa_quotedpriceid="mainData.sa_quotedpriceid" @onSubmit="onSuccess"></submit_to>
         <toVoid class="inline-16" v-if="tool.checkAuth($route.name,'toVoid') && mainData.status === '新建'" :data="mainData.sa_quotedpriceid" ></toVoid>
+        <copyTo class="inline-16" v-if="tool.checkAuth($route.name,'copyTo') && mainData.status === '新建'" :data="mainData.sa_quotedpriceid" ></copyTo>
         <examine_to class="inline-16" v-if="tool.checkAuth($route.name,'toExamine') && mainData.status === '提交'" :sa_quotedpriceid="mainData.sa_quotedpriceid" @onExamine="onSuccess"></examine_to>
       </div>
       <div slot="slot1" class=" normal-panel">
@@ -31,6 +32,9 @@
       <div slot="slot0" class=" normal-panel">
         <productInventory ref="productList" :data="mainData" v-if="flag"></productInventory>
       </div>
+      <div slot="slot2" class=" normal-panel">
+        <historicalQuotation :data="mainData" v-if="flag"></historicalQuotation>
+      </div>
     </basicDetails>
   </div>
 </template>
@@ -45,6 +49,8 @@ import project_change from './modules/projectChange/index'
 import customer_assocalated from './modules/customerAssociated/index'
 import productInventory from './modules/productInventory/index'
 import toVoid from './components/toVoid'
+import historicalQuotation from './modules/historicalQuotation/index'
+import copyTo from "@/SDrpManagement/QuotedPrice/detail/components/copyTo";
 export default {
   name: "index",
   data(){
@@ -56,7 +62,17 @@ export default {
     }
   },
   components:{
-    detailed,contacts,address_manage,submit_to,examine_to,project_change,customer_assocalated,productInventory,toVoid
+    detailed,
+    contacts,
+    address_manage,
+    submit_to,
+    examine_to,
+    project_change,
+    customer_assocalated,
+    productInventory,
+    toVoid,
+    historicalQuotation,
+    copyTo
   },
   methods:{
     async queryMainData(id){

+ 98 - 0
src/SDrpManagement/QuotedPrice/detail/modules/historicalQuotation/index.vue

@@ -0,0 +1,98 @@
+<template>
+  <div>
+    <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true"   >
+      <template v-slot:customcol="scope">
+        <div v-if="scope.column.columnname === 'specialoffer'">
+          <div v-if="scope.column.data.specialoffer === 0">
+            否
+          </div>
+          <div v-else-if="scope.column.data.specialoffer === 1">
+            是
+          </div>
+        </div>
+        <div v-else-if="scope.column.columnname === 'invaliddate'">
+          <p>{{scope.column.data.begdate?scope.column.data.begdate+ '至' + scope.column.data.enddate:'--'}}</p>
+        </div>
+        <div v-else>
+          {{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'--'}}
+        </div>
+      </template>
+      <template v-slot:opreation="scope">
+        <!--        <edit v-if="tool.checkAuth($route.name,'update')" :data="scope.data" @updateSuccess="onSuccess"></edit>
+                <toVoid v-if="tool.checkAuth($route.name,'toVoid')" :data="scope.data" @toVoidSuccess="onSuccess"></toVoid>-->historicalQuotation
+      </template>
+    </tableLayout>
+    <div style="margin-top:16px;text-align:right">
+      <el-pagination
+          background
+          small
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-size="param.content.pageSize"
+          layout="total, prev, pager, next, jumper"
+          :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "index",
+  props:["data"],
+  data(){
+    return {
+      tablecols:[],
+      list:[],
+      total:0,
+      currentPage:0,
+      param:{
+        "content": {
+          "isExport": 0,
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "status": "",
+            "isproject": "",
+            "startdate": "",
+            "enddate": ""
+          },
+          "type": "0",
+          "sa_quotedpriceid":""
+        },
+        "id": 20221209093003,
+      }
+    }
+  },
+  methods:{
+    async listData(){
+      this.param.content.sa_quotedpriceid = this.data.sa_quotedpriceid
+      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()
+    },
+  },
+  mounted() {
+    this.listData()
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).historicalQuotation.tablecols
+  },
+}
+</script>
+
+<style scoped>
+
+</style>

+ 6 - 1
src/SDrpManagement/QuotedPrice/detail/modules/productInventory/index.vue

@@ -150,7 +150,12 @@
             label="单价"
             width="100">
           <template slot-scope="scope">
-            <p><span :style="[setColor]">{{scope.row.price}}</span></p>
+            <div v-if="scope.row.discountDifferenceAmount > 0">
+              <p><span :style="[setTopColor]">{{scope.row.price}}</span></p>
+            </div>
+            <div v-else-if="scope.row.discountDifferenceAmount < 0" >
+              <p><span :style="[setDownColor]">{{scope.row.price}}</span></p>
+            </div>
           </template>
         </el-table-column>
         <el-table-column

+ 7 - 2
src/SDrpManagement/salerPrivatecustomer/detail/customerDetail.vue

@@ -9,7 +9,7 @@
         turnPageId="20221012164402"
         idname="sa_customersid"
         tags=""
-        :tabs="['详细信息','联系人信息','客户地址','开票信息','项目商机','报价单']"
+        :tabs="['详细信息','联系人信息','客户地址','开票信息','项目商机','报价单','跟进线索']"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
       <div slot="tags">
@@ -45,6 +45,9 @@
       <div slot="slot5" class="normal-panel">
         <quotedPrice :data="mainData"  v-if="flag"></quotedPrice>
       </div>
+      <div slot="slot6" class="normal-panel">
+        <followLeads :data="mainData"  v-if="flag"></followLeads>
+      </div>
     </basicDetails>
   </div>
 </template>
@@ -64,6 +67,7 @@ import recovery from './modules/operation/recovery'
 import financial from '@/components/financialInfo/index.vue'
 import projectChange from './modules/projectChange/list'
 import quotedPrice from './modules/quotedPrice/list'
+import followLeads from './modules/followLeads/index'
 export default {
   name: "detail",
   data() {
@@ -96,7 +100,8 @@ export default {
     recovery,
     financial,
     projectChange,
-    quotedPrice
+    quotedPrice,
+    followLeads
   },
   methods:{
     async queryMainData(id) {

+ 108 - 0
src/SDrpManagement/salerPrivatecustomer/detail/modules/followLeads/index.vue

@@ -0,0 +1,108 @@
+<template>
+  <div >
+    <div class="flex-align-center normal-margin">
+      <add class="inline-16" :data="data"  @insertSuccess="onSuccess"></add>
+      <el-input
+          style="width:300px"
+          placeholder="请输入内容"
+          v-model="search"
+          clearable
+          @clear="clearData()"
+          size="small"
+          @keyup.enter.native="queryClick()">
+        <i slot="prefix" class="el-icon-search" @click="queryClick()"></i>
+      </el-input>
+    </div>
+    <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true"  >
+      <template v-slot:customcol="scope">
+        <p>{{scope.column.data[scope.column.columnname]}}</p>
+      </template>
+      <template v-slot:opreation="scope">
+<!--        <edit v-if="tool.checkAuth($route.name,'update')" :data="scope.data" @updateSuccess="onSuccess"></edit>
+        <toVoid v-if="tool.checkAuth($route.name,'toVoid')" :data="scope.data" @toVoidSuccess="onSuccess"></toVoid>-->
+      </template>
+    </tableLayout>
+    <div style="margin-top:16px;text-align:right">
+      <el-pagination
+          background
+          small
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-size="param.content.pageSize"
+          layout="total, prev, pager, next, jumper"
+          :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+import add from './modules/add'
+export default {
+  name: "index",
+  props:["data"],
+  components:{add},
+  data(){
+    return {
+      tablecols: [],
+      list: [],
+      total: 0,
+      currentPage: 0,
+      search:'',
+      param: {
+        "id": 20221208163302,
+        "content": {
+          "sa_customersid": 1,
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+        }
+      }
+    }
+  },
+  methods:{
+    async listData(){
+      this.param.content.sa_customersid = this.data.sa_customersid
+      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()
+    },
+    clearData(){
+      this.search = ""
+    },
+    queryClick(){
+      this.param.content.where.condition = this.search
+      this.listData()
+    }
+
+  },
+  mounted() {
+    this.listData()
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).followLeads.tablecols
+  },
+}
+</script>
+
+<style scoped>
+/deep/.el-input__prefix {
+  display: flex;
+  align-items: center;
+}
+
+</style>

+ 118 - 0
src/SDrpManagement/salerPrivatecustomer/detail/modules/followLeads/modules/add.vue

@@ -0,0 +1,118 @@
+<template>
+  <div>
+    <el-button size="small" type="primary" >新 建</el-button>
+    <el-drawer
+        title="新建线索"
+        :visible.sync="dialogFormVisible"
+        size="25%"
+        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="75px">
+            <el-col :span="24">
+              <el-form-item  label="姓名:" prop="name">
+                <el-input  autosize v-model="form.name" placeholder="请输入姓名"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item  label="手机号:" prop="phonenumber">
+                <el-input  autosize v-model="form.phonenumber" placeholder="请输入手机号码"></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: 'blur' }
+            ]">
+                <el-input   autosize v-model="form.email" placeholder="请输入邮箱"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item  label="部门:" >
+                <el-input  autosize v-model="form.depname" placeholder="请输入部门"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item  label="职位:" >
+                <el-input  autosize v-model="form.position" placeholder="请输入职位"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item  label="性别:" >
+                <el-radio v-model="form.sex" label="男">男</el-radio>
+                <el-radio v-model="form.sex" label="女">女</el-radio>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item  label="生日:" >
+                <el-date-picker
+                    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="请输入家庭住址"></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="请输入备注"></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">取 消</el-button>
+        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "add",
+  props:["data"],
+  data(){
+    return {
+      dialogFormVisible:false,
+      form:{
+        "sat_orderclueid": 0,
+        "enterprisename":"客户名称",
+        "name": "联系人",
+        "phonenumber": "13812345678",
+        "province": "浙江省",
+        "city": "嘉兴市",
+        "county": "秀洲区",
+        "address": "秀洲大桥",
+        "notes": "",
+        "cluesource": "朋友介绍",
+        "sat_campaignid":0,//活动id,当活动id大于0是默认业务员创建
+        "isprivate":0,//0表示公海,1表示私域,
+        "sa_customersid":0//可不传
+      },
+      rules:{
+        name: [
+          { required: true, message: '姓名不能为空', trigger: 'blur' },
+        ],
+        phonenumber: [
+          { required: true, validator: validateMobilePhone, trigger: 'blur' },
+        ]
+      },
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 11 - 1
src/router/SDrpManagement.js

@@ -113,7 +113,17 @@ const SDrpManagement = [
           keeproute: true
         },
         component: () => import(/* webpackChunkName: "about" */ '@/SDrpManagement/QuotedPrice/detail/index')
-      }
+      },
+      {
+        path: '/quotedPriceCopy',
+        name: 'quotedprice',
+        meta: {
+          title: "项目报价复制",
+          ast_nav:true,
+          keeproute: true
+        },
+        component: () => import(/* webpackChunkName: "about" */ '@/SDrpManagement/QuotedPrice/components/copy/index')
+      },
     ]
   },