Przeglądaj źródła

合同项目自报价单添加调整

qymljy 1 rok temu
rodzic
commit
859a66a18b

+ 1 - 1
src/SDrpManagement/ProductGroup/modules/Select2.vue

@@ -272,4 +272,4 @@ export default {
 .margin-notAll {
   margin-left: -18px;
 }
-</style>
+</style>

+ 4 - 3
src/SDrpManagement/ProductGroup/modules/classTree.vue

@@ -38,7 +38,7 @@ export default {
   cursor: pointer;
   transition: .2s all linear;
   font-size: 14px;
-  
+
 }
 .right-line {
   border-right: 1px solid #e3e5ea;
@@ -58,7 +58,8 @@ export default {
   margin:10px 0px 10px 0;
   font-size:14px !important;
   cursor: pointer;
-  padding-left: 10px;
+  padding-right: 10px;
+  text-align: right;
   border-right: 1px solid #e3e5ea;
 }
 .flex-start{
@@ -68,4 +69,4 @@ export default {
   position: relative;
   width: 80px;
 }
-</style>
+</style>

+ 31 - 15
src/template/addProduct/index.vue

@@ -94,15 +94,18 @@ export default {
   methods:{
     onShow(){
       this.dialogFormVisible = true
-      this.$store.dispatch('optiontypeselect','itemstandards').then(res=>{
-        this.options.itemstandards = res.data
-      })
-      this.$store.dispatch('optiontypeselect','itemmaterial').then(res=>{
-        this.options.itemmaterials = res.data
-      })
-      this.querySa_brandid !== '' ?this.sa_brandid = this.querySa_brandid : this.sa_brandid = ''
-      this.queryBrands()
-      this.queryClass()
+      this.params = {
+        "id": 20221124093602,
+        "content": {
+          "sa_contractid": this.$route.query.id,
+          "pageNumber": 1,
+          "pageSize": 100,
+          "where": {
+            "condition": "",
+            "istool": 0
+          }
+        },
+      }
       this.listData(this.params.content.pageNumber = 1)
     },
     /*可添加商品*/
@@ -209,9 +212,10 @@ export default {
       return arr
     },
     brandChange(id){
-      this.params.content.where.sa_brandid = this.params.id == 20221021171802 ?id[0]:id
+
+      this.params.content.where.sa_brandid = this.params.id == 20221021171802 || this.params.id == 20221020164903 || this.params.id == 20221124093602 ? id[0] : id
       this.$refs.class.clickClass(false)
-      this.listData(this.params.content.pageNumber = 1)
+      // this.listData(this.params.content.pageNumber = 1)
     },
     onClassChange (n) {
       this.params.content.where.itemclassid = n.itemclassid
@@ -275,10 +279,22 @@ export default {
     },
     onClose(){
       this.dialogFormVisible = false
-      this.sa_brandid = ''
-      this.itemclassid = ''
-      this.itemstandard = ''
-      this.itemmaterial = ''
+      this.$refs.class.value= "",
+      this.$refs.class.brands= []
+      this.$refs.class.ields= []
+      this.$refs.class.itemclass= []
+      this.$refs.class.activeClass= {}
+      this.$refs.class.field_act= ""
+      this.$refs.class.tradefield= ""
+      this.$refs.class.brand_act= 0
+      this.$refs.class.class_act= ""
+      this.$refs.class.areaBases= []
+      this.$refs.class.areaBase= ""
+      this.$refs.class.queryClass();
+      this.$refs.class.queryAgentiInfo();
+      this.$refs.class.queryBrands();
+      this.$refs.class.queryAreaBase();
+
       this.$emit("closeDrawer")
     },
     handleSizeChange(val) {

+ 68 - 93
src/template/addProductContract/index.vue

@@ -153,39 +153,6 @@
           </el-popover>
         </div>
         <el-divider style="margin-top: -30px"></el-divider>
-        <div class="top-margin">
-          <el-select
-            v-model="sa_brandid"
-            :placeholder="$t(`选择品牌`)"
-            size="small"
-            clearable
-            class="inline-24"
-            @change="brandChange"
-            :disabled="querySa_brandid > 0"
-          >
-            <el-option
-              v-for="item in options.brands"
-              :key="item.sa_brandid"
-              :label="$t(item.brandname)"
-              :value="item.sa_brandid"
-            >
-            </el-option>
-          </el-select>
-          <el-cascader
-            :placeholder="$t(`选择分类`)"
-            size="small"
-            v-model="itemclassid"
-            :options="options.itemclass"
-            :props="{
-              checkStrictly: true,
-              children: 'subdep',
-              label: 'itemclassname',
-              value: 'itemclassid',
-            }"
-            clearable
-            @change="classChange"
-          ></el-cascader>
-        </div>
         <div class="top-margin">
           <uploadAllData
             class="inline-16"
@@ -220,46 +187,6 @@
             clearable
           >
           </el-input>
-          <el-select
-            v-model="itemstandard"
-            :placeholder="$t(`选择标准`)"
-            size="small"
-            clearable
-            class="inline-24 bottom-margin"
-            @change="queryChange"
-          >
-            <el-option
-              v-for="item in options.itemstandards"
-              :key="item.value"
-              :label="$t(item.value)"
-              :value="item.value"
-            >
-              <span style="float: left">{{ $t(item.value) }}</span>
-              <span style="float: right; color: #8492a6; font-size: 12px">{{
-                item.remarks ? $t(item.remarks) : $t("暂无描述")
-              }}</span>
-            </el-option>
-          </el-select>
-          <el-select
-            v-model="itemmaterial"
-            :placeholder="$t(`选择材质`)"
-            size="small"
-            clearable
-            class="inline-24 bottom-margin"
-            @change="queryChange"
-          >
-            <el-option
-              v-for="item in options.itemmaterials"
-              :key="item.value"
-              :label="$t(item.value)"
-              :value="item.value"
-            >
-              <span style="float: left">{{ $t(item.value) }}</span>
-              <span style="float: right; color: #8492a6; font-size: 12px">{{
-                item.remarks ? $t(item.remarks) : $t("暂无描述")
-              }}</span>
-            </el-option>
-          </el-select>
           <el-input
             style="width: 200px"
             :placeholder="$t(`型号`)"
@@ -297,6 +224,7 @@
           >
           </el-input>
         </div>
+        <selectClass ref="class" @clickAreaBase="clickAreaBase" @brandChange="brandChange" @onClassChange="onClassChange" @Search="Search" @clearSearch="clearSearch" @clickField="clickField" :default="true"></selectClass>
         <div>
           <tableTemp
             ref="tableTemp"
@@ -462,6 +390,7 @@
 import tableTemp from "./table";
 import uploadAllData from "@/components/uploadAllData/index";
 import previewImage from "@/components/previewImage/index";
+import selectClass from '@/SDrpManagement/ProductGroup/modules/Select2.vue'
 export default {
   name: "index",
   props: [
@@ -473,7 +402,12 @@ export default {
     "sa_projectid",
     "querySa_brandid",
   ],
-  components: { tableTemp, uploadAllData, previewImage },
+  components: { tableTemp, uploadAllData, previewImage , selectClass },
+  provide () {
+    return {
+      sys_enterpriseid:() => ''
+    }
+  },
   data() {
     return {
       billno: "",
@@ -523,18 +457,6 @@ export default {
   methods: {
     onShow() {
       this.dialogFormVisible = true;
-      this.$store.dispatch("optiontypeselect", "itemstandards").then((res) => {
-        this.options.itemstandards = res.data;
-      });
-      this.$store.dispatch("optiontypeselect", "itemmaterial").then((res) => {
-        this.options.itemmaterials = res.data;
-      });
-      this.querySa_brandid !== ""
-        ? (this.sa_brandid = this.querySa_brandid)
-        : (this.sa_brandid = "");
-      this.queryBrands();
-      this.queryClass();
-      /*this.listData()*/
     },
     /*获取报价单*/
     async queryQuotationData() {
@@ -577,8 +499,10 @@ export default {
     },
     brandChange() {
       this.params.content.where.sa_brandid = this.sa_brandid;
-      this.listData();
-      this.queryClass();
+      this.$refs.class.clickClass(false)
+      this.listData(this.params.content.pageNumber = 1)
+      // this.listData();
+      // this.queryClass();
     },
     /*获取分类*/
     async queryClass() {
@@ -677,10 +601,37 @@ export default {
     },
     onClose() {
       this.dialogFormVisible = false;
-      this.sa_brandid = "";
-      this.itemclassid = "";
-      this.itemstandard = "";
-      this.itemmaterial = "";
+      this.quotationParams.content.where.condition = ''
+      this.billno = ""
+      this.$refs.class.value= "",
+      this.$refs.class.brands= []
+      this.$refs.class.ields= []
+      this.$refs.class.itemclass= []
+      this.$refs.class.activeClass= {}
+      this.$refs.class.field_act= ""
+      this.$refs.class.tradefield= ""
+      this.$refs.class.brand_act= 0
+      this.$refs.class.class_act= ""
+      this.$refs.class.areaBases= []
+      this.$refs.class.areaBase= ""
+      this.$refs.class.queryClass();
+      this.$refs.class.queryAgentiInfo();
+      this.$refs.class.queryBrands();
+      this.$refs.class.queryAreaBase();
+      this.params = {
+        id: 20221123162902,
+        content: {
+          sa_contractid: this.$route.query.id,
+          sa_quotedpriceid: "",
+          pageNumber: 1,
+          pageSize: 100,
+          nocache: true,
+          where: {
+            condition: "",
+          },
+        },
+      }
+      this.listData(this.params.content.pageNumber = 1)
       this.$emit("closeDrawer");
     },
     handleSizeChange(val) {
@@ -703,8 +654,32 @@ export default {
       this.quotationParams.content.pageNumber = val;
       this.queryQuotationData();
     },
+    onClassChange (n) {
+      this.params.content.where.itemclassid = n.itemclassid
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    clickField (item) {
+      this.params.content.where.tradefield = item.tradefield
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    clickAreaBase (item) {
+      this.params.content.where.standards = item
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    Search(data) {
+      this.params.content.where.condition = data
+      this.params.content.pageNumber = 1
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    clearSearch() {
+      this.params.content.where.condition = ''
+      this.params.content.pageNumber = 1
+      this.listData(this.params.content.pageNumber = 1)
+    },
+  },
+  mounted() {
+
   },
-  mounted() {},
   created() {},
 };
 </script>