qymljy há 2 anos atrás
pai
commit
bf02b3dab2

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

@@ -2,7 +2,7 @@
 <template>
   <div>
     <div style="margin-bottom: 15px">
-      <addProduct v-if="tool.checkAuth($route.name,'productSetManage') && data.disabled" class="inline-16"  @addSuccess="onSuccess" :discountrate="discountrate"></addProduct>
+      <add :tradefield="data.tradefield" v-if="tool.checkAuth($route.name,'productSetManage') && data.disabled" class="inline-16"  @addSuccess="onSuccess" :discountrate="discountrate"></add>
       <el-button  v-if="tool.checkAuth($route.name,'productSetManage') && data.disabled" class="inline-16" size="small" :type="delProductData.length === 0?'':'primary'" @click="onDelProduct" :disabled="delProductData.length === 0">删 除</el-button>
       <el-input
           size="small"
@@ -199,7 +199,7 @@
 </template>
 
 <script>
-/*import add from './add'*/
+import add from './add'
 import addProduct from '@/template/addProduct'
 import edit from "@/HDrpManagement/projectChange/modules/modules/andEnterprise/components/edit";
 import to_del from "@/HDrpManagement/projectChange/modules/modules/andEnterprise/components/toDel";
@@ -208,7 +208,7 @@ import previewImage from "@/components/previewImage";
 import delete_product from './deleteProduct'
 export default {
   props:["data"],
-  components:{addProduct,uploadFile, previewImage,delete_product},
+  components:{add,addProduct,uploadFile, previewImage,delete_product},
   data () {
     return {
       tableHieght:"860px",

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

@@ -68,7 +68,7 @@
             width="80"
         >
           <template slot-scope="scope">
-            <div v-if="scope.row.discountDifferenceAmount > 0 ">
+            <div v-if="scope.row.discountDifferenceAmount >= 0 ">
               <p v-if="!saveShow || index !== scope.row.rowindex"><span :style="[setTopColor]">{{scope.row.discountrate}}</span></p>
               <span v-if="saveShow && index === scope.row.rowindex">
                  <el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"></el-input>
@@ -80,7 +80,7 @@
                  <el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"></el-input>
               </span>
             </div>
-            <span v-else>
+<!--            <span v-else>
               <span v-if="saveShow && index === scope.row.rowindex">
                  <el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"></el-input>
               </span>
@@ -88,7 +88,7 @@
                 <span >{{tool.formatAmount(scope.row.discountrate,2)}}</span>
               </span>
 
-            </span>
+            </span>-->
           </template>
         </el-table-column>
         <el-table-column
@@ -97,7 +97,7 @@
             width="120"
         >
           <template slot-scope="scope">
-            <div v-if="scope.row.discountDifferenceAmount > 0 ">
+            <div v-if="scope.row.discountDifferenceAmount >= 0 ">
               <p v-if="!saveShow || index !== scope.row.rowindex"><span :style="[setTopColor]">{{tool.formatAmount(scope.row.price,2)}}</span></p>
               <span v-if="saveShow && index === scope.row.rowindex">
                 <el-input v-model="scope.row.price" size="mini" placeholder="请输入单价" @change="onChangePrice(scope.row.price,scope.row,scope.$index)"></el-input>
@@ -109,14 +109,14 @@
                 <el-input v-model="scope.row.price" size="mini" placeholder="请输入单价" @change="onChangePrice(scope.row.price,scope.row,scope.$index)"></el-input>
               </span>
             </div>
-            <span v-else>
+<!--            <span v-else>
               <span v-if="saveShow && index === scope.row.rowindex">
                 <el-input v-model="scope.row.price" size="mini" placeholder="请输入单价" @change="onChangePrice(scope.row.price,scope.row,scope.$index)"></el-input>
               </span>
                <span v-else>
                 <span >{{tool.formatAmount(scope.row.price,2)}}</span>
               </span>
-            </span>
+            </span>-->
           </template>
         </el-table-column>
         <el-table-column
@@ -241,13 +241,13 @@
             width="100"
             fixed="right">
           <template slot-scope="scope">
-            <div v-if="scope.row.discountDifferenceAmount > 0  ">
+            <div v-if="scope.row.discountDifferenceAmount >= 0  ">
               <p ><span style="color: #79da56">{{tool.formatAmount(scope.row.amount,2)}}</span></p>
             </div>
             <div v-else-if="scope.row.discountDifferenceAmount < 0 " >
               <p><span style="color: #ef230c ">{{tool.formatAmount(scope.row.amount,2)}}</span></p>
             </div>
-            <p v-else><span>{{tool.formatAmount(scope.row.amount,2)}}</span></p>
+<!--            <p v-else><span>{{tool.formatAmount(scope.row.amount,2)}}</span></p>-->
           </template>
         </el-table-column>
         <el-table-column

+ 42 - 8
src/template/addProduct/index.vue

@@ -10,13 +10,21 @@
         append-to-body
         @close="onClose">
       <div class="drawer__panel">
-        <div class="flex-align-center flex-between">
-          <el-select v-model="value" placeholder="请选择领域">
+        <div class=" flex-between">
+          <el-select v-model="sa_brandid" placeholder="选择品牌" size="small" clearable class="inline-16" @change="queryClass">
             <el-option
-                v-for="item in options"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value">
+                v-for="item in options.brands"
+                :key="item.sa_brandid"
+                :label="item.brandname"
+                :value="item.sa_brandid">
+            </el-option>
+          </el-select>
+          <el-select v-model="sa_brandid" placeholder="选择分类" size="small" clearable class="inline-16" >
+            <el-option
+                v-for="item in options.brands"
+                :key="item.sa_brandid"
+                :label="item.brandname"
+                :value="item.sa_brandid">
             </el-option>
           </el-select>
         </div>
@@ -28,18 +36,44 @@
 <script>
 export default {
   name: "index",
+  props:["tradefield"],
   data(){
     return {
       dialogFormVisible:false,
-
+      sa_brandid:'',
       options:{
-
+        brands:[]
       }
     }
   },
   methods:{
     onShow(){
       this.dialogFormVisible = true
+      console.log(this.tradefield)
+      this.queryBrands()
+    },
+    /*获取品牌*/
+    async queryBrands () {
+      const res = await this.$api.requested({
+        "id": "20220924163702",
+        "content": {
+          "pageSize":1000,
+          "where":{
+            "condition":""
+          }
+        }
+      })
+      this.options.brands = res.data
+    },
+    /*获取分类*/
+    async queryClass () {
+      const res = await this.$api.requested({
+        "id":"20220922110403",
+        "content":{
+          "sa_brandid":this.sa_brandid !== '' ? this.sa_brandid : 0
+        }
+      })
+      console.log(res.data,'pop')
     },
     onClose(){