Browse Source

修改bug暂存

qymljy 2 years ago
parent
commit
85701fd52a

+ 2 - 2
src/Form/projectChange/add.vue

@@ -1,8 +1,8 @@
 <template>
   <div>
-    <el-button size="small" type="primary" @click="dialogFormVisible = true">新 </el-button>
+    <el-button size="small" type="primary" @click="dialogFormVisible = true">新 </el-button>
     <el-drawer
-        title="新建项目"
+        title="新建项目商机"
         :visible.sync="dialogFormVisible"
         size="700px"
         direction="rtl"

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

@@ -2,7 +2,7 @@
   <div>
     <el-button size="mini" :disabled="disabled" v-if="tool.checkAuth($route.name,'update') " @click="editBtn" :type="disabled ? '':'primary'">编 辑</el-button>
     <el-drawer
-        title="编辑项目"
+        title="编辑项目商机"
         :visible.sync="dialogFormVisible"
         size="700px"
         direction="rtl"

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

@@ -2,7 +2,7 @@
   <div>
     <el-button size="small" type="primary" @click="onshow">新 建</el-button>
     <el-drawer
-        title="新关联客户"
+        title="新关联客户"
         :visible.sync="visible"
         size="600px"
         direction="rtl"

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

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

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

@@ -262,8 +262,9 @@ export default {
     },
     /*修改商品数量*/
     numChange(val,index,data){
+      data.qty = val.toFixed(2)
       console.log(val,index)
-      data.totalPrice = data.marketprice * val
+      data.totalPrice = data.marketprice * data.qty
       console.log(data.marketprice,val,data.totalPrice)
       this.$set(this.tableData,index,data)
     },

+ 33 - 19
src/HDrpManagement/projectChange/modules/modules/productSet/index.vue

@@ -21,7 +21,8 @@
           style="width: 100%"
           :header-cell-style="{height:'50px',color:'#606266',fontWeight:'400'}"
           :cell-style="{height:'50px',color:'#666666',fontWeight:'400'}"
-          @selection-change="selectionChange">
+          @selection-change="selectionChange"
+          >
         <el-table-column
             type="selection"
             width="55">
@@ -117,40 +118,34 @@
         </el-table-column>
         <el-table-column
             prop="marketprice"
-            label="牌价"
+            label="牌价(元)"
             width="100">
           <template slot-scope="scope">
             <p><span>{{scope.row.marketprice?scope.row.marketprice:'--'}}</span></p>
           </template>
         </el-table-column>
         <el-table-column
-            prop="num"
+            prop="qty"
             label="数量"
+            fixed="right"
             width="180">
           <template slot-scope="scope">
-            <p><span>{{scope.row.qty !== ''?scope.row.qty:'--'}}</span></p>
+            <el-input-number v-model="scope.row.qty" size="mini" :min="1"  label="描述文字" @change="numChange(scope.row.qty,scope.$index,scope.row)"></el-input-number>
           </template>
         </el-table-column>
         <el-table-column
             prop="amount"
-            label="总金额"
+            label="总金额(元)"
+            fixed="right"
             width="100">
           <template slot-scope="scope">
             <p><span>{{scope.row.amount?scope.row.amount:'--'}}</span></p>
           </template>
         </el-table-column>
-<!--          <el-table-column
-              prop="status"
-              label="操作"
-              width="90">
-            <template slot-scope="scope">
-              <delete_product :id="scope.row.sa_project_itemsid" @delSuccess="onSuccess"></delete_product>
-            </template>
-          </el-table-column>-->
       </el-table>
       <div style="margin-top:16px;">
         <div style="float: left">
-          <span>金额:{{totalPrice}}</span>
+          <span>总金额(元):{{totalPrice}}</span>
         </div>
         <div style="float: right">
           <el-pagination
@@ -220,13 +215,11 @@ export default {
       this.totalPrice = 0
       this.params.content.sa_projectid = this.data.sa_projectid
       const res = await this.$api.requested(this.params)
-      console.log(res,'____________________________')
       this.list = res.data
       res.data.forEach((e,index)=>{
         this.totalPrice = this.totalPrice + e.amount
       })
       this.total = res.total
-      console.log(this.list)
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
@@ -243,7 +236,6 @@ export default {
       this.$emit("productSetSuccess")
     },
     clearData(){
-      console.log("执行")
       this.search = ""
       this.params.content.where.condition = this.search
       this.listData()
@@ -253,12 +245,10 @@ export default {
       this.listData()
     },
     selectionChange(val){
-      console.log(val)
       this.delProductData = []
       val.forEach((item,index) => {
         this.delProductData[index] = item.sa_project_itemsid
       })
-      console.log(this.delProductData)
     },
     onDelProduct() {
       this.$confirm('此操作将删除这些商品, 是否继续?', '提示', {
@@ -288,6 +278,30 @@ export default {
         this.listData()
         this.$emit("delSuccess")
       })
+    },
+    /*修改商品数量*/
+    numChange(val,index,data){
+      data.qty = val.toFixed(2)
+      data.amount = (data.marketprice * data.qty).toFixed(2)
+      this.$set(this.list,index,data)
+      this.onChangQty(data,data.qty)
+    },
+    async onChangQty(data,val){
+      const res = await this.$api.requested({
+        "id": 20221021145502,
+        "content": {
+          "sa_projectid": this.data.sa_projectid,
+          "items": [
+            {
+              "sa_project_itemsid":data.sa_project_itemsid,
+              "itemid": data.itemid,
+              "qty": val,
+              "remarks": ""
+            }
+          ]
+        }
+      })
+      this.listData()
     }
   },
   created() {

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

@@ -16,7 +16,7 @@
       </el-input>
     </div>
     <div style="margin-top: 15px">
-      <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true"  :height="tableHieght" >
+      <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true"  :height="tableHieght" fixedName="operation">
         <template v-slot:customcol="scope">
           <div v-if="scope.column.columnname === 'invaliddate'">
             {{scope.column.data.begdate?scope.column.data.begdate + '至' + scope.column.data.enddate:'--'}}

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

@@ -2,7 +2,7 @@
   <div>
     <el-button size="small" type="primary" @click="dialogFormVisible = true">新 建</el-button>
     <el-drawer
-        title="建项目报价单"
+        title="建项目报价单"
         :visible.sync="dialogFormVisible"
         size="93%"
         direction="rtl"

+ 1 - 0
src/HDrpManagement/projectChange/modules/modules/stageTask/index.vue

@@ -28,6 +28,7 @@
       <el-table-column
           prop="address"
           label="操作"
+          fixed="right"
           width="180">
         <template slot-scope="scope">
           <edit v-if="tool.checkAuth($route.name,'assessManage')" class="inline-16" :data="rowData" :rowData="scope.row" @editSuccess="onSuccess"></edit>

+ 35 - 1
src/SDrpManagement/QuotedPrice/components/edit/quotedPriceProduct.vue

@@ -113,6 +113,7 @@
         <el-table-column
             prop="num"
             label="数量"
+            fixed="right"
             width="180">
           <template slot-scope="scope">
             <el-input-number  v-model="scope.row.qty" size="mini" :min="1"  label="描述文字" @change="onChangeNum(scope.row.qty,scope.row,scope.$index,scope.row.orderaddqty)"></el-input-number>
@@ -129,22 +130,48 @@
         <el-table-column
             prop="discountrate"
             label="折扣(%)"
+            fixed="right"
             width="100">
           <template slot-scope="scope">
-            <el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"></el-input>
+            <div v-if="scope.row.discountDifferenceAmount > 0">
+              <el-input :style="[setTopColor]" v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"></el-input>
+            </div>
+            <div v-else-if="scope.row.discountDifferenceAmount < 0">
+              <el-input :style="[setDownColor]" v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"></el-input>
+            </div>
           </template>
         </el-table-column>
+        <el-table-column
+            prop="mindiscountrate"
+            label="最低授权折扣(%)"
+            fixed="right"
+            width="130">
+<!--          <template slot-scope="scope">
+            <el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入最低授权折扣"></el-input>
+          </template>-->
+        </el-table-column>
         <el-table-column
           prop="price"
           label="单价"
+          fixed="right"
           width="100">
           <template slot-scope="scope">
             <el-input v-model="scope.row.price" size="mini" placeholder="请输入单价" @change="onChangePrice(scope.row.price,scope.row,scope.$index)"></el-input>
           </template>
         </el-table-column>
+        <el-table-column
+            prop="discountDifferenceAmount"
+            label="授权折扣差额"
+            fixed="right"
+            width="130">
+<!--          <template slot-scope="scope">
+            <el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入授权折扣差额" ></el-input>
+          </template>-->
+        </el-table-column>
         <el-table-column
           prop="amount"
           label="金额"
+          fixed="right"
           width="100">
           <template slot-scope="scope">
             <p><span>{{scope.row.amount}}</span></p>
@@ -152,6 +179,7 @@
         </el-table-column>
         <el-table-column
           prop="specialoffer"
+          fixed="right"
           label="是否特价"
           width="100">
           <template slot-scope="scope">
@@ -201,6 +229,12 @@ export default {
       total:0,
       currentPage:0,
       changeList:[],
+      setTopColor:{
+        color:'#79da56'
+      },
+      setDownColor:{
+        color:'#ef230c'
+      },
       param:{
         "id": 20221021095503,
         "version":1,

+ 23 - 0
src/SDrpManagement/QuotedPrice/components/quotedPriceProduct.vue

@@ -113,6 +113,7 @@
         <el-table-column
             prop="num"
             label="数量"
+            fixed="right"
             width="180">
           <template slot-scope="scope">
             <el-input-number  v-model="scope.row.qty" size="mini" :min="1"  label="描述文字" @change="onChangeNum(scope.row.qty,scope.row,scope.$index,scope.row.orderaddqty)"></el-input-number>
@@ -129,22 +130,43 @@
         <el-table-column
             prop="discountrate"
             label="折扣(%)"
+            fixed="right"
             width="100">
           <template slot-scope="scope">
             <el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"></el-input>
           </template>
         </el-table-column>
+        <el-table-column
+            prop="mindiscountrate"
+            label="最低授权折扣(%)"
+            fixed="right"
+            width="130">
+          <!--          <template slot-scope="scope">
+                      <el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入最低授权折扣"></el-input>
+                    </template>-->
+        </el-table-column>
         <el-table-column
           prop="price"
           label="单价"
+          fixed="right"
           width="100">
           <template slot-scope="scope">
             <el-input v-model="scope.row.price" size="mini" placeholder="请输入单价" @change="onChangePrice(scope.row.price,scope.row,scope.$index)"></el-input>
           </template>
         </el-table-column>
+        <el-table-column
+            prop="discountDifferenceAmount"
+            label="授权折扣差额"
+            fixed="right"
+            width="130">
+          <!--          <template slot-scope="scope">
+                      <el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入授权折扣差额" ></el-input>
+                    </template>-->
+        </el-table-column>
         <el-table-column
           prop="amount"
           label="金额"
+          fixed="right"
           width="100">
           <template slot-scope="scope">
             <p><span>{{scope.row.amount}}</span></p>
@@ -152,6 +174,7 @@
         </el-table-column>
         <el-table-column
           prop="specialoffer"
+          fixed="right"
           label="是否特价"
           width="100">
           <template slot-scope="scope">

+ 56 - 4
src/SManagement/orderclue_detail/components/changeCustomer.vue

@@ -155,7 +155,7 @@
         </el-row>
       </div>
       <div class="fixed__btn__panel">
-        <el-button size="small" @click="drawer = false" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" @click="onClose" class="normal-btn-width inline-16">取 消</el-button>
         <duplicateCheck :data="form"></duplicateCheck>
         <el-button size="small" type="primary" @click="onSave" class="normal-btn-width">确 定</el-button>
       </div>
@@ -303,7 +303,27 @@ export default {
       })
       this.$emit('onChangeCustomer')
       this.$refs['form'].resetFields();
-      this.form = {}
+      this.form = {
+        "sat_orderclueid": '',
+        "enterprisename_customer":'',
+        "sa_customersid": 0, //新增是传0
+        "parentid": 0, //上级客户ID,默认或没有上级的时候传0
+        "sys_enterpriseid": 0, //合作企业档案ID,新增是传0,更新
+        "enterprisename": "", //客户名称(企业名称)
+        "type": "", //客户类型
+        "source": "", //客户来源
+        "province": "", //非必填,可选
+        "city": "", //非必填,可选
+        "county": "", //非必填,可选
+        "address": "", //非必填,可选
+        "abbreviation": "", //非必填,可选
+        "taxno": "", //税号,非必填,可选
+        "grade": '', // 客户等级(商户等级)
+        "industry": "", //非必填,可选,所属行业
+        "contact": "", //非必填,可选
+        "phonenumber": "", //非必填,可选
+        "customergrade": "", //客户等级
+      }
       this.drawer = false
       this.checkResults = ''
       this.value = ''
@@ -321,7 +341,9 @@ export default {
           if (this.checkResults === 0){
             this.$emit('onChangeCustomer')
             this.$refs['form'].resetFields();
-            this.form = {}
+            this.form = {
+
+            }
             this.drawer = false
             this.checkResults = ''
             this.value = ''
@@ -331,13 +353,43 @@ export default {
         })
       })
     },
-    onClose(){},
+    onClose(){
+      this.$refs['form'].resetFields();
+      this.form = {
+        "sat_orderclueid": '',
+        "enterprisename_customer":'',
+        "sa_customersid": 0, //新增是传0
+        "parentid": 0, //上级客户ID,默认或没有上级的时候传0
+        "sys_enterpriseid": 0, //合作企业档案ID,新增是传0,更新
+        "enterprisename": "", //客户名称(企业名称)
+        "type": "", //客户类型
+        "source": "", //客户来源
+        "province": "", //非必填,可选
+        "city": "", //非必填,可选
+        "county": "", //非必填,可选
+        "address": "", //非必填,可选
+        "abbreviation": "", //非必填,可选
+        "taxno": "", //税号,非必填,可选
+        "grade": '', // 客户等级(商户等级)
+        "industry": "", //非必填,可选,所属行业
+        "contact": "", //非必填,可选
+        "phonenumber": "", //非必填,可选
+        "customergrade": "", //客户等级
+      }
+      this.drawer = false
+      this.checkResults = ''
+      this.value = ''
+    },
     /*获取工商信息*/
     onBusinessData(val){
       this.form.enterprisename_customer = val.companyName
       this.form.enterprisename = val.companyName
       this.form.address = val.address
       this.form.taxno = val.taxNum
+      this.value = [val.regProvince,val.regCity,val.regArea]
+      this.form.province = val.regProvince
+      this.form.city = val.regCity
+      this.form.county = val.regArea
     },
     /*省市县*/
     cascaderChange (val) {