liuhj 3 月之前
父節點
當前提交
5d2d33d048
共有 2 個文件被更改,包括 53 次插入6 次删除
  1. 50 3
      src/components/MarketplacePick.vue
  2. 3 3
      src/components/OP/EntryQuotation.vue

+ 50 - 3
src/components/MarketplacePick.vue

@@ -3,7 +3,10 @@
         <div class="marketplacepick-form" v-loading.fullscreen.lock="fullscreenLoading">
             <div class="addbox">
                 <div class="addbox-title">需求收集</div>
-                <div @click="additionsj" class="addbox-img"><img src="../assets/shoujitianjia.png" /></div>
+                <div style="display: flex;align-items: center;">
+                    <el-button @click="GroupOrderPreInfoDel" v-if="formid!=0" style="margin-right: 5px;" size="mini" type="danger">作废</el-button>
+                    <div @click="additionsj" class="addbox-img"><img src="../assets/shoujitianjia.png" /></div>
+                </div>
             </div>
             <div class="marketplacepick-form-head">
                 <el-select @change="GroupOrderPreInfochange" style="width: 357px;margin-bottom: 10px;" v-model="tempId"
@@ -150,8 +153,8 @@ export default {
                     });
                     if (!val) {
                         that.tempId=that.tempDatas[0].id;
-                        that.formid=that.names[0].id;
-                        that.formname=that.names[0].value;
+                        that.formid=0;
+                        that.formname='';
                     }
                     // that.names=basicsdata.names;
                     that.groupNames=basicsdata.groupNames.data;
@@ -322,6 +325,46 @@ export default {
             })
         },
 
+        //删除
+        GroupOrderPreInfoDel() {
+            this.$confirm('此操作将作废该数据, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                var url = "/api/Groups/GroupOrderPreInfoDel"
+                var that = this
+                this.$axios({
+                    method: 'post',
+                    url: url,
+                    headers: {
+                        Authorization: 'Bearer '
+                    },
+                    data: {
+                        id: that.formid,
+                        currUserId: that.userid,
+                    }
+                }).then(function (res) {
+                    if (res.data.code==200) {
+                        that.$message({
+                            type: 'success',
+                            message: res.data.msg
+                        });
+                        that.formid=0;
+                        that.formname='';
+                        that.GroupOrderPreInfos(true)
+                    }else{
+                        that.$message.error(res.data.msg);
+                    }
+                })
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '操作已取消!'
+                });
+            });
+            
+        },
         GroupOrderPreInfochange(){
             this.controlarr=[],
             this.cityarr=[],
@@ -414,10 +457,14 @@ export default {
 .addbox-img img{
     width: 100%;
 }
+
 @media screen and (max-width: 749px){
     .marketplacepick-form{
         width: 360px;
     }
+    .el-message-box{
+        width: 280px;
+    }
 }
 @media screen and (min-width: 750px) {
     .marketplacepick-form-li{

+ 3 - 3
src/components/OP/EntryQuotation.vue

@@ -9,9 +9,9 @@
                 <div class="entryquotation-form-content">
                     <div class="entryquotation-content" v-for="(items,index) in item.infos" :key="index">
                         <el-input type="textarea" v-model="items.feeName"></el-input>
-                        <el-input-number :controls="false" v-model="items.unitPrice"></el-input-number>
-                        <el-input-number :controls="false" v-model="items.quantity"></el-input-number>
-                        <el-input-number :controls="false" v-model="items.totalAmt"></el-input-number>
+                        <el-input-number :precision="2" :controls="false" v-model="items.unitPrice"></el-input-number>
+                        <el-input-number :precision="2" :controls="false" v-model="items.quantity"></el-input-number>
+                        <el-input-number :precision="2" :controls="false" v-model="items.totalAmt"></el-input-number>
                         <!-- {{ items.feeName }} -->
                     </div>
                 </div>