Browse Source

报价单,将删除改成作废

qymljy 2 years ago
parent
commit
be5cfbe72d

+ 0 - 26
src/HDrpManagement/projectChange/components/putPeople.vue

@@ -6,29 +6,6 @@
     >
       <el-button size="mini" slot="reference">{{ flag === 0?'报 备':'报备审核' }}</el-button>
     </el-popconfirm>
-<!--    <el-button size="mini" @click="btn" style="width:100%">报 备</el-button>-->
-<!--    <el-dialog title="选择报备人" append-to-body :visible.sync="dialogFormVisible" width="25%">
-      <el-row :gutter="20">
-        <el-form :model="form" :rules="rules" ref="form" label-width="120px" label-position="right" size="mini">
-          <el-col :span="20">
-            <el-form-item label="选择报备人" prop="reportby">
-              <el-select v-model="form.reportby" placeholder="请选择报备人" size="small">
-                <el-option
-                  v-for="item in data"
-                  :key="item.userid"
-                  :label="item.name"
-                  :value="item.name">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-        </el-form>
-      </el-row>
-      <div class="dialog-footer">
-        <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 btn-warning">确 定</el-button>
-      </div>
-    </el-dialog>-->
   </div>
 </template>
 
@@ -47,9 +24,6 @@ export default {
     }
   },
   methods:{
-    /*btn () {
-      this.dialogFormVisible = true
-    },*/
     onshow(){
       console.log(this.rowData)
       /*this.tagData()*/

+ 31 - 27
src/HDrpManagement/projectChange/modules/detail.vue

@@ -8,12 +8,12 @@
     :mainAreaData="mainAreaData" 
     :turnPageId="20221020143502" 
     idname="sa_projectid"
-    tags=""
-    :tabs="['详细信息','阶段任务','关联客户','产品配置单','报价单','竞争对手','关联线索']"
+    :tags="[]"
+    :tabs="['详细信息','工作任务','关联客户','产品配置单','报价单','竞争对手','关联线索']"
     @pageChange="pageChange"
     @onEditSuccess="queryMainData($route.query.id)">
     <!-- 使用此插槽可不传[tags] -->
-    <tagPanl slot="tags" :data="tagObj" ownertable="sa_project" :id="mainData.sa_projectid" @onSuccess="queryMainData"/>
+<!--    <tagPanl slot="tags" :data="tagObj" ownertable="sa_project" :id="mainData.sa_projectid" @onSuccess="queryMainData"/>-->
     <div slot="customOperation">
       <!-- 此区域提供了自定义操作按钮 -->
       <div style="margin-right: 10px" class="inline-16">
@@ -54,7 +54,7 @@
           </div>
         </div>
         <div style="float: right;margin-right:15px;">
-          <el-button size="mini" type="primary" plain>进入阶段</el-button>
+          <el-button size="mini" type="primary" plain @click="setStage">变更阶段</el-button>
         </div>
       </div>
 
@@ -100,6 +100,7 @@ export default {
   components:{Quotation,product_set,Rival,BaseInfo,StageTask,putPeople,Check,Locked,andEnterprise,Del,clue},
   data () {
     return {
+      nowStage:'',
       flagTag:0,
       flag:0,
       mainData:'',
@@ -149,12 +150,13 @@ export default {
         }
       })
       this.mainData = res.data
-      console.log(this.mainData);
+      console.log(this.mainData,"重新刷新数据");
       /* 获取标签数据 */
-      this.tagObj = await this.$store.dispatch('queryTagList',{table:'sa_project',id:this.mainData.sa_projectid})
+      /*this.tagObj = await this.$store.dispatch('queryTagList',{table:'sa_project',id:this.mainData.sa_projectid})*/
       this.flag = 1
       this.getProjectAddres()
       this.projectStage()
+      this.tagData()
     },
     // 监听切换数据,上一页,下一页
     pageChange (id,rowindex) {
@@ -164,6 +166,7 @@ export default {
     },
     /*获取标签数据*/
     async tagData(){
+      console.log(this.$refs.details.tags,'标签')
       const res = await this.$api.requested({
         content: {
           ownertable: "sa_project",
@@ -188,8 +191,23 @@ export default {
           }
         }
       }
+      this.$refs.details.$refs.tag.queryTag()
       console.log(this.flagTag,'报备标签状态')
     },
+    /*修改项目阶段*/
+    async setStage(){
+      console.log(this.nowStage)
+      const res = await this.$api.requested({
+        "id": "20221024160102",
+        "content": {
+          "sa_projectid":this.nowStage.sa_projectid,
+          "sa_project_stageid":this.nowStage.sa_project_stageid
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        this.queryMainData(this.$route.query.id)
+      })
+    },
     /*获取货品选择信息*/
     selectionChange(val){
       console.log("返回")
@@ -210,7 +228,7 @@ export default {
       })
     },
     /* 获取当前用户信息 */
-    async getUserInfo() {
+   /* async getUserInfo() {
       let res = await this.$api.requested({
         "classname": "common.usercenter.usercenter",
         "method": "queryUserMsg",
@@ -220,9 +238,9 @@ export default {
       this.userInfo = res.data
       console.log(this.userInfo);
       
-    },
+    },*/
     /* 可报备人 */
-    async getPutPeople () {
+    /*async getPutPeople () {
       let res = await this.$api.requested({
         "id": 20221021093202,
         "content": {
@@ -234,7 +252,7 @@ export default {
         },
       })
       this.putPeople = res.data
-    },
+    },*/
     async getSysetms () {
       /* 获取项目类型 */
       let res = await this.$store.dispatch('optiontypeselect','projecttype')
@@ -254,20 +272,6 @@ export default {
       })
       this.enterpriseList = res.data
     },
-    /* 获取项目模板 */
-    async getProjectPanl () {
-      let res = await this.$api.requested({
-        "id": "20221019085604",
-        "content": {
-            "pageNumber": 1,
-            "pageSize": 99999999,
-            "where":{
-                "condition":""
-            }
-        }
-      })
-      this.projectPanl = res.data
-    },
     /* 获取项目地址 */
     async getProjectAddres () {
       let res = await this.$api.requested({
@@ -383,6 +387,7 @@ export default {
     /*切换阶段*/
     changeSelect(val){
       console.log(val)
+      this.nowStage = val
       this.selectRowindex = val.rowindex
     }
   },
@@ -390,9 +395,8 @@ export default {
   },
   async created () {
     this.queryMainData(this.$route.query.id)
-    this.getUserInfo()
-    this.getPutPeople()
-    this.getProjectPanl()
+    /*this.getUserInfo()
+    this.getPutPeople()*/
     this.getEnterprise()
     this.getSysetms()
     // 验证权限

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

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="mini" type="primary" @click="onshow">新增关联客户</el-button>
+    <el-button size="small" type="primary" @click="onshow">新增关联客户</el-button>
     <el-drawer
         title="新增关联客户"
         :visible.sync="visible"

+ 1 - 1
src/HDrpManagement/projectChange/modules/modules/andEnterprise/index.vue

@@ -14,7 +14,7 @@
           clearable>
       </el-input>
     </div>
-    <div style="margin-top: 20px">
+    <div style="margin-top: 15px">
       <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true"  :height="tableHieght" >
         <template v-slot:customcol="scope">
           <div v-if="scope.column.columnname === 'province'">

+ 4 - 4
src/HDrpManagement/projectChange/modules/modules/productSet/add.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="mini" type="primary" @click="onShow" >创建产品配置单</el-button>
+    <el-button size="small" type="primary" @click="onShow" >创建产品配置单</el-button>
     <el-drawer
         title="创建产品配置单"
         :visible.sync="dialogFormVisible"
@@ -11,7 +11,7 @@
       <div class="drawer__panel">
         <div class="flex-align-center flex-between ">
           <slot name="operation"></slot>
-          <div class="flex-align-center">
+          <div class="flex-align-center" style="margin-top:-10px;margin-bottom: 10px">
             <el-input size="small"  suffix-icon="el-icon-search" v-model="params.content.where.condition" placeholder="产品名称,编号" @keyup.enter.native="listData(params.content.pageNumber = 1)" @clear="listData(params.content.pageNumber = 1)" clearable></el-input>&nbsp;
           </div>
         </div>
@@ -20,8 +20,8 @@
               ref="multipleTable"
               :data="tableData"
               style="width: 100%"
-              :header-cell-style="{height:'50px',color:'#768093',fontWeight:'100'}"
-              :cell-style="{height:'50px',color:'#768093',fontWeight:'200'}"
+              :header-cell-style="{height:'50px',color:'#606266',fontWeight:'400'}"
+              :cell-style="{height:'50px',color:'#666666',fontWeight:'400'}"
               @selection-change="selectionChange">
             <el-table-column
                 type="selection"

+ 4 - 4
src/HDrpManagement/projectChange/modules/modules/productSet/index.vue

@@ -1,8 +1,8 @@
 
 <template>
   <div>
-    <div style="margin-bottom: 20px">
-      <add class="inline-16" :data="rowData" @addSuccess="onSuccess"></add>
+    <div style="margin-bottom: 15px">
+      <add class="inline-16"  @addSuccess="onSuccess"></add>
       <el-input
           size="small"
           style="width: 200px;"
@@ -18,8 +18,8 @@
           ref="multipleTable"
           :data="list"
           style="width: 100%"
-          :header-cell-style="{height:'50px',color:'#768093',fontWeight:'100'}"
-          :cell-style="{height:'50px',color:'#768093',fontWeight:'200'}"
+          :header-cell-style="{height:'50px',color:'#606266',fontWeight:'400'}"
+          :cell-style="{height:'50px',color:'#666666',fontWeight:'400'}"
           @selection-change="selectionChange">
         <el-table-column
             type="selection"

+ 1 - 1
src/HDrpManagement/projectChange/modules/modules/quotation/index.vue

@@ -14,7 +14,7 @@
           clearable>
       </el-input>
     </div>
-    <div style="margin-top: 20px">
+    <div style="margin-top: 15px">
       <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true"  :height="tableHieght" >
         <template v-slot:customcol="scope">
           <p >{{scope.column.data[scope.column.columnname]}}</p>

+ 11 - 0
src/HDrpManagement/projectChange/modules/modules/rival/index.vue

@@ -1,6 +1,17 @@
 
 <template>
   <div>
+    <div style="margin-bottom: 15px">
+      <el-input
+          size="small"
+          style="width: 200px;"
+          suffix-icon="el-icon-search"
+          v-model="params.content.where.condition"
+          placeholder="品牌名称/企业名称"
+          @keyup.enter.native="listData(params.content.pageNumber= 1)"
+          @clear="listData(params.content.pageNumber= 1)"
+          clearable></el-input>&nbsp;
+    </div>
     <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true"  height="calc(100vh - 340px)" >
       <template v-slot:customcol="scope">
         <p >{{scope.column.data[scope.column.columnname]}}</p>

+ 20 - 10
src/SDrpManagement/QuotedPrice/detail/components/examineTo.vue

@@ -2,14 +2,7 @@
   <div>
     <el-button slot="reference" size="mini" style="width:100%" @click="onShow" type="primary">审 核</el-button>
     <el-dialog title="报价单审核" :visible.sync="draw" width="20%" append-to-body>
-      <el-form :model="form">
-        <el-form-item  :label-width="formLabelWidth">
-          <p>是否对该报价单进行审核</p>
-        </el-form-item>
-        <el-form-item v-if="examineDraw" label="退回原因:" :label-width="formLabelWidth" prop="backreason">
-          <el-input size="small" v-model="form.backreason"></el-input>
-        </el-form-item>
-      </el-form>
+      <span>确定通过该报价单的审核嘛?</span>
       <div slot="footer" class="dialog-footer">
         <el-button size="mini" @click="draw = false">取 消</el-button>
         <el-button type="primary" size="mini" @click="breakShow">退 回</el-button>
@@ -65,7 +58,24 @@ export default {
       this.draw = true
     },
     breakShow(){
+      this.draw = false
       this.examineDraw = true
+      this.$prompt('请输入退回原因', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        inputValidator: (value => {
+          if (!value){
+            return '请输入退回原因'
+          }
+        }),
+      }).then(({ value }) => {
+        this.onBack(value)
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消审核'
+        });
+      });
     },
     onExamine(){
       console.log("审核操作开始")
@@ -77,7 +87,7 @@ export default {
         this.onBack()
       }
     },
-    async onBack(){
+    async onBack(val){
       console.log("执行")
       /*this.$refs.form.validate(async (valid) => {
         if (!valid) return false*/
@@ -86,7 +96,7 @@ export default {
           "version":1,
           "content":{
             "sa_quotedpriceid":this.sa_quotedpriceid,
-            "backreason":this.form.backreason
+            "backreason":val
           }
         })
         this.tool.showMessage(res,()=>{

+ 49 - 0
src/SDrpManagement/QuotedPrice/detail/components/toVoid.vue

@@ -0,0 +1,49 @@
+<template>
+  <div>
+    <el-button type="primary" size="mini" @click="onToVoid">作 废</el-button>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "toVoid",
+  props:['data'],
+  methods:{
+    onToVoid(){
+      this.$prompt('请输入作废原因', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        inputValidator: (value => {
+          if (!value){
+            return '请输入作废原因'
+          }
+        }),
+      }).then(({ value }) => {
+        this.toVoidOk(value)
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消作废操作'
+        });
+      });
+    },
+    async toVoidOk(val){
+      console.log("执行作废",this.data)
+      const res = await this.$api.requested({
+        "id": 20221020165503,
+        "content": {
+          "sa_quotedpriceids":[this.data],
+          "deletereason":val
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        this.$emit('onSuccess')
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 6 - 3
src/SDrpManagement/QuotedPrice/detail/index.vue

@@ -22,6 +22,7 @@
       <div slot="customOperation">
         <!-- 此区域提供了自定义操作按钮 -->
         <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>
         <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">
@@ -43,6 +44,7 @@ import examine_to from './components/examineTo'
 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'
 export default {
   name: "index",
   data(){
@@ -54,7 +56,7 @@ export default {
     }
   },
   components:{
-    detailed,contacts,address_manage,submit_to,examine_to,project_change,customer_assocalated,productInventory
+    detailed,contacts,address_manage,submit_to,examine_to,project_change,customer_assocalated,productInventory,toVoid
   },
   methods:{
     async queryMainData(id){
@@ -62,6 +64,7 @@ export default {
         "id": 20221020165203,
         "version":1,
         "content": {
+          nocache:true,
           "sa_quotedpriceid":id
         }
       })
@@ -117,10 +120,10 @@ export default {
           label:'手机号',
           value:this.mainData.contactsphonenumber
         },
-        {
+        /*{
           label:'邮箱',
           value:this.mainData.email
-        }
+        }*/
       ]
     },
     /*产品配置信息*/