qymljy 2 yıl önce
ebeveyn
işleme
39d610ad24

+ 3 - 1
src/Form/QuotedPrice/edit.vue

@@ -153,6 +153,8 @@ export default {
       this.drawer = true
       console.log(this.data,"报价单")
       this.form = this.data
+      this.date[0] = this.form.begdate
+      this.date[1] = this.form.enddate
       if (this.form.typeData === '项目报价'){
         this.isQuotedPrice = true
       }else {
@@ -185,7 +187,7 @@ export default {
           "content": this.form
         })
         console.log(res,"报价单id一")
-        /*this.$refs.quoterPrice.quoterPrice(res.data.sa_quotedpriceid,this.form.type)*/
+        this.$refs.quoterPrice.quoterPrice(res.data.sa_quotedpriceid,this.form.type)
       })
     },
     getSubmit(){

+ 14 - 1
src/SDrpManagement/QuotedPrice/components/quotedPriceProduct.vue

@@ -159,7 +159,7 @@
             label="操作"
             width="100">
           <template slot-scope="scope">
-            <el-button size="mini" type="text">删除</el-button>
+            <el-button size="mini" type="text" @click="deleteProduct(scope.row)">删除</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -296,6 +296,19 @@ export default {
         }
       })
       console.log(res)
+    },
+    async deleteProduct(val){
+      console.log(val)
+      const res = await this.$api.requested({
+        "id": 20221021095603,
+        "version":1,
+        "content": {
+          "sa_quotedprice_itemsids":[val.sa_quotedprice_itemsid]     //sat_notice_classid<=0时 为新增
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        this.productData(val.sa_quotedpriceid)
+      })
     }
   }
 }

+ 3 - 7
src/SDrpManagement/QuotedPrice/modules/ProjectQuotationAdd.vue

@@ -152,18 +152,14 @@ export default {
       this.$emit('addSuccess')
     },
     onSubmit(){
-      console.log(this.data)
-      /*this.form.begdate = ''
-      this.form.enddate = ''
-      if (this.date === '' && this.date === 'undefined'){
+      console.log(this.date)
+      if (this.date.length === 0){
         this.form.begdate = ''
         this.form.enddate = ''
       }else {
         this.form.begdate = this.date[0]
         this.form.enddate = this.date[1]
-      }*/
-      this.data?this.form.begdate=this.date[0]:''
-      this.data?this.form.enddate=this.date[1]:''
+      }
       console.log(this.form,"表单")
       this.$refs.form.validate(async (valid) => {
         if (!valid) return false