Browse Source

代码提交

zhangqiOMG 3 năm trước cách đây
mục cha
commit
9c8f68945f

+ 1 - 1
src/Form/projectTask/add.vue

@@ -2,7 +2,7 @@
   <div>
     <el-button size="small" type="primary" @click="(drawer = true)">新 建</el-button>
     <el-drawer
-      title="新建阶段"
+      title="新建项目工作任务"
       :visible.sync="drawer"
       direction="rtl"
       append-to-body

+ 1 - 1
src/Form/projectTask/edit.vue

@@ -2,7 +2,7 @@
   <div>
     <el-button size="mini" type="primary" @click="onShow(drawer = true)">编 辑</el-button>
     <el-drawer
-      title="新建阶段"
+      title="编辑项目工作任务"
       :visible.sync="drawer"
       direction="rtl"
       append-to-body

+ 2 - 1
src/HDrpManagement/projectChange/modules/modules/andEnterprise/components/add.vue

@@ -4,9 +4,10 @@
     <el-drawer
         title="新增关联客户"
         :visible.sync="visible"
-        size="20%"
+        size="30%"
         direction="rtl"
         append-to-body
+        :show-close="false"
         @close="onClose">
       <div class="drawer__panel">
         <el-row :gutter="20">

+ 2 - 1
src/HDrpManagement/projectChange/modules/modules/andEnterprise/components/edit.vue

@@ -4,7 +4,8 @@
     <el-drawer
         title="编辑关联客户"
         :visible.sync="visible"
-        size="20%"
+        size="30%"
+        :show-close="false"
         direction="rtl"
         append-to-body
         @close="onClose">

+ 1 - 0
src/HDrpManagement/projectChange/modules/modules/productSet/add.vue

@@ -6,6 +6,7 @@
         :visible.sync="dialogFormVisible"
         size="80%"
         direction="rtl"
+        :show-close="false"
         append-to-body
         @close="onClose">
       <div class="drawer__panel">

+ 550 - 2
src/SDrpManagement/QuotedPrice/components/copy/index.vue

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

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

@@ -84,9 +84,16 @@ export default {
     historicalSelect(val){
       console.log(val,"选择")
       this.historicalShow = false
-      this.copyData(val.sa_quotedpriceid)
+
+      this.$router.replace({
+        path:'/quotedPriceCopy',
+        query:{
+          id:val.sa_quotedpriceid
+        }
+      })
+
     },
-    /*复制的内容*/
+    /*/!*复制的内容*!/
     async copyData(id){
       const res = await this.$api.requested({
         "content": {
@@ -102,8 +109,7 @@ export default {
           id:res.data.sa_quotedpriceid
         }
       })
-
-    },
+    },*/
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
       this.param.content.pageSize = val

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

@@ -13,11 +13,18 @@
         <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-if="scope.column.columnname === 'operation'">
+          <p>{{scope.column.data[scope.column.columnname]}}</p>
+        </div>
         <div v-else>
           {{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'--'}}
         </div>
       </template>
       <template v-slot:opreation="scope">
+<<<<<<< HEAD
+=======
+        <el-button size="mini" type="text" @click="detailGo(scope.data)">详 情</el-button>
+>>>>>>> 8249ebd501a41de019c344a8d6bbb7e02b929bb0
       </template>
     </tableLayout>
     <div style="margin-top:16px;text-align:right">
@@ -64,6 +71,16 @@ export default {
     }
   },
   methods:{
+    detailGo(row){
+      console.log(row)
+      this.$router.replace({
+        path:'/quotedPriceDetail',
+        query:{
+          id:row.sa_quotedpriceid,
+          rowindex:row.rowindex
+        }
+      })
+    },
     async listData(){
       this.param.content.sa_quotedpriceid = this.data.sa_quotedpriceid
       const res = await this.$api.requested(this.param)

+ 17 - 20
src/SDrpManagement/salerPrivatecustomer/detail/customerDetail.vue

@@ -19,16 +19,17 @@
       </div>
       <div slot="customOperation" >
         <!-- 此区域提供了自定义操作按钮 -->
-        <transaction_status class="inline-16" v-if="tool.checkAuth($route.name,'transaction')" :id="mainData.sa_customersid" @onshow="onSuccess" @shareSuccess="onSuccess"></transaction_status>
+        <transaction_status class="inline-16" v-if="tool.checkAuth($route.name,'transaction')" :id="mainData.sa_customersid"  @shareSuccess="onSuccess"></transaction_status>
+        <statusChange class="inline-16" v-if="tool.checkAuth($route.name,'transaction')" :id="mainData.sa_customersid"  @statusChangeSuccess="statusChangeSuccess"></statusChange>
         <!--<lock class="inline-16" v-if="tool.checkAuth($route.name,'lock')"   :id="mainData.sa_customersid" @onshow="onSuccess"></lock>-->
          <!--<unlock class="inline-16" v-if="tool.checkAuth($route.name,'unlock')" :id="mainData.sa_customersid" @onshow="onSuccess"></unlock> -->
-        <share class="inline-16" v-if="tool.checkAuth($route.name,'share') && mainData.poolname === ''" :id="mainData.sa_customersid" @onshow="onSuccess" @shareSuccess="onSuccess"></share>
-        <send_back style="display:inline" v-if="tool.checkAuth($route.name,'back') "  :data="mainData" @onshow="onSuccess" @backSuccess="onSuccess"></send_back>
-        <to_void class="inline-16" v-if="tool.checkAuth($route.name,'toVoid')" :id="mainData.sa_customersid" @onshow="onSuccess" @toVoidSuccess="onSuccess"></to_void>
-        <recovery class="inline-16" v-if="tool.checkAuth($route.name,'recovery') "  :data="mainData" @onshow="onSuccess" @backSuccess="onSuccess"></recovery>
+        <share class="inline-16" v-if="tool.checkAuth($route.name,'share') && mainData.poolname === ''" :id="mainData.sa_customersid" @shareSuccess="onSuccess"></share>
+        <send_back style="display:inline" v-if="tool.checkAuth($route.name,'back') "  :data="mainData"  @backSuccess="onSuccess"></send_back>
+        <to_void class="inline-16" v-if="tool.checkAuth($route.name,'toVoid')" :id="mainData.sa_customersid" @toVoidSuccess="onSuccess"></to_void>
+        <recovery class="inline-16" v-if="tool.checkAuth($route.name,'recovery') "  :data="mainData" @backSuccess="onSuccess"></recovery>
       </div>
       <div slot="slot0" >
-        <detailed :data="mainData"  v-if="flag"></detailed>
+        <detailed ref="baseDetail" :data="mainData"></detailed>
       </div>
       <div slot="slot1" class=" normal-panel"  >
         <contacts :data="mainData"  @onSuccess="onSuccess" v-if="flag"></contacts>
@@ -63,6 +64,7 @@ import share from './modules/operation/share'
 import send_back from './modules/operation/sendBack'
 import to_void from './modules/operation/toVoid'
 import transaction_status from './modules/operation/transactionStatus'
+import statusChange from './modules/operation/statusChange'
 import recovery from './modules/operation/recovery'
 import financial from '@/components/financialInfo/index.vue'
 import projectChange from './modules/projectChange/list'
@@ -101,7 +103,8 @@ export default {
     financial,
     projectChange,
     quotedPrice,
-    followLeads
+    followLeads,
+    statusChange
   },
   methods:{
     async queryMainData(id) {
@@ -112,12 +115,11 @@ export default {
         },
       })
       this.mainData = res.data
-      console.log("输出数据一")
-      console.log(this.mainData)
       this.$refs['details'].param.content.type = this.$route.query.tabIndex
       this.$refs['details'].param.content.isExport = false
       this.changeDataStructure()
-      this.flag = true
+      // this.flag = true
+      console.log(this.mainAreaData)
     },
     show(){
       this.visible = false
@@ -165,20 +167,15 @@ export default {
       this.$router.replace({path:'/customerDetail',query:{id:id,rowindex:rowindex,tabIndex:tabIndex}})
       this.queryMainData(id)
     },
-    async queryTags(id){
-      const res = await this.$api.requested({
-        "id": 20220929085401,
-        "content": {
-          "ownertable":'sa_customers',
-          "ownerid":id
-        }
-      })
-      this.tags = res.data
-    },
     onSuccess(){
       this.visible = false
       this.queryMainData(this.$route.query.id)
       this.$emit('onSuccess')
+    },
+    statusChangeSuccess () {
+      this.$refs.details.refreshTag()
+      this.$refs.baseDetail.basicData(this.$route.query.id)
+      this.$refs.baseDetail.systemData(this.$route.query.id)
     }
   },
   mounted () {

+ 2 - 2
src/SDrpManagement/salerPrivatecustomer/detail/modules/detailedData.vue

@@ -49,8 +49,8 @@ export default {
     }
   },
   mounted() {
-    this.basicData(this.data.sa_customersid)
-    this.systemData(this.data.sa_customersid)
+    this.basicData(this.$route.query.id)
+    this.systemData(this.$route.query.id)
   },
   methods:{
     /*基本信息*/

+ 92 - 0
src/SDrpManagement/salerPrivatecustomer/detail/modules/operation/statusChange.vue

@@ -0,0 +1,92 @@
+<template>
+  <div>
+    <el-button size="mini"  block @click="onshow">状态变更</el-button>
+    <el-dialog title="" :visible.sync="dialogForm" width="400px" append-to-body>
+      <div slot="title" style="font-size: 15px">
+        状态变更
+      </div>
+      <div>
+        <el-row :gutter="20">
+          <el-form :model="form" :rules="rules"  ref="form"  size="mini" label-position="top" label-width="90px">
+            <el-col :span="24">
+              <el-form-item prop="status"  label="状态:" >
+                <el-select v-model="form.status" placeholder="请选择状态" style="width: 100%">
+                  <el-option
+                      v-for="item in status"
+                      :key="item.value"
+                      :label="item.value"
+                      :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="dialog-footer">
+        <el-button size="small" @click="dialogForm = false" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="warning" @click="onSubmit" class="normal-btn-width btn-warning">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "statusChange",
+  props:["id"],
+  data(){
+    return {
+      dialogForm:false,
+      form:{
+        status:""
+      },
+      rules:{
+        status: [
+          { required: true, message: '未选择状态', trigger: 'change' },
+        ],
+      },
+      status:[
+        {
+          label:'潜在',
+          value:'潜在'
+        },
+        {
+          label:'合作中',
+          value:'合作中'
+        },
+        {
+          label:'已终止',
+          value:'已终止'
+        }
+      ]
+    }
+  },
+  methods:{
+    onshow(){
+      this.dialogForm = true
+      this.$emit("onshow")
+    },
+    onSubmit(){
+      this.$refs['form'].validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221010164602,
+          "content": {
+            "sa_customersids": [this.id],
+            "status": this.form.status//(未成交、已成交、多次成交)
+          },
+        })
+        this.tool.showMessage(res, ()=>{
+          this.dialogForm = false
+          this.$emit("statusChangeSuccess")
+        })
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>