qymljy 2 years ago
parent
commit
a680873842

+ 31 - 12
src/Form/QuotedPrice/add.vue

@@ -39,11 +39,13 @@
             <el-col :span="12">
               <el-form-item label="报价单有效期:" >
                 <el-date-picker
-                    style="width: 100%"
-                    v-model="form.invaliddate"
-                    type="date"
-                    value-format="yyyy-MM-dd"
-                    placeholder="选择日期">
+                  style="width: 100%"
+                  v-model="form.invaliddate"
+                  value-format="yyyy-MM-dd"
+                  type="daterange"
+                  range-separator="至"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期">
                 </el-date-picker>
               </el-form-item>
             </el-col>
@@ -51,7 +53,7 @@
               <p>商品明细报价</p>
             </el-col>
             <el-col :span="24">
-              <hr style="margin-top: 2%;margin-bottom: 2%">
+              <el-divider></el-divider>
             </el-col>
             <el-col :span="12">
               <el-form-item label="整单折扣(系数)" >
@@ -68,14 +70,17 @@
             </el-col>
             <el-col :span="12" >
               <el-button size="small" @click="dialogProjectVisible = false" type="info" class="inline-16" style="float: right">删除</el-button>
-              <el-button size="small" @click="dialogProjectVisible = false" type="primary" class="el-icon-plus inline-16" style="float: right">添加商品明细</el-button>
+              <el-button size="small" @click="dialogProjectVisible = false" type="primary" class="el-icon-plus inline-16" style="float: right">添加</el-button>
             </el-col>
-            <product></product>
+            <el-col :span="24">
+              <product></product>
+            </el-col>
+
           </el-form>
         </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">取 消</el-button>
         <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
@@ -126,7 +131,7 @@ export default {
           { required: true, message: '单位不能为空', trigger: 'change' },
         ],
         name: [
-          { required: true, message: '联系人不能为空', trigger: 'change' },
+          { required: false, message: '联系人不能为空', trigger: 'change' },
         ],
       },
       projectData:[],
@@ -158,9 +163,8 @@ export default {
         })
         this.tool.showMessage(res,()=> {
           console.log(res)
-          this.$refs['form'].resetFields();
           this.$emit("onSuccess")
-          this.dialogFormVisible = false
+          this.onClose()
         })
       })
     },
@@ -222,6 +226,21 @@ export default {
     onClose(){
       this.dialogFormVisible = false
       this.$refs['form'].resetFields()
+      this.form={
+        sa_quotedpriceid:0,     //sat_notice_classid<=0时 为新增
+        sys_enterpriseid: "",
+        enterprisename:"",
+        sa_projectid: "0",
+        contactsid:"",
+        name:"",
+        phonenumber:"",
+        discountrate:"" ,
+        remarks: "",
+        invaliddate: "",
+        projectname: "",
+        address: "",
+        projectnum:""
+      }
     }
   },
   created() {

+ 13 - 9
src/Form/QuotedPrice/edit.vue

@@ -39,11 +39,13 @@
             <el-col :span="12">
               <el-form-item label="报价单有效期:" >
                 <el-date-picker
-                    style="width: 100%"
-                    v-model="form.invaliddate"
-                    type="date"
-                    value-format="yyyy-MM-dd"
-                    placeholder="选择日期">
+                  style="width: 100%"
+                  v-model="form.invaliddate"
+                  value-format="yyyy-MM-dd"
+                  type="daterange"
+                  range-separator="至"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期">
                 </el-date-picker>
               </el-form-item>
             </el-col>
@@ -51,7 +53,7 @@
               <p>商品明细报价</p>
             </el-col>
             <el-col :span="24">
-              <hr style="margin-top: 2%;margin-bottom: 2%">
+              <el-divider></el-divider>
             </el-col>
             <el-col :span="12">
               <el-form-item label="整单折扣(系数)" >
@@ -68,9 +70,11 @@
             </el-col>
             <el-col :span="12" >
               <el-button size="small" @click="dialogProjectVisible = false" type="info" class="inline-16" style="float: right">删除</el-button>
-              <el-button size="small" @click="dialogProjectVisible = false" type="primary" class="el-icon-plus inline-16" style="float: right">添加商品明细</el-button>
+              <el-button size="small" @click="dialogProjectVisible = false" type="primary" class="el-icon-plus inline-16" style="float: right">添加</el-button>
+            </el-col>
+            <el-col :span="24">
+              <product></product>
             </el-col>
-            <product></product>
           </el-form>
         </el-row>
       </div>
@@ -128,7 +132,7 @@ export default {
           { required: true, message: '单位不能为空', trigger: 'change' },
         ],
         name: [
-          { required: true, message: '联系人不能为空', trigger: 'change' },
+          { required: false, message: '联系人不能为空', trigger: 'change' },
         ],
       },
       projectData:[],

+ 1 - 2
src/Form/projectManage/add.vue

@@ -38,8 +38,7 @@
             </el-col>
           </el-form>
         </el-row>
-        <el-button size="mini" @click="onSet" v-show="setEvent" style="margin-top: 10px">设置项目阶段</el-button>
-        <div class="container" v-show="set">
+        <div class="container" >
           <el-row :gutter="20">
             <el-col :span="9">
               <div>

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

@@ -1,6 +1,19 @@
 
 <template>
   <div>
+    <div style="margin-top: -10px">
+      <el-input
+          placeholder="请输入搜索内容"
+          suffix-icon="el-icon-search"
+          v-model="search"
+          style="width:200px"
+          size="small"
+          class="input-with-select inline-16"
+          @keyup.native.enter="queryClick"
+          @clear="clearData"
+          clearable>
+      </el-input>
+    </div>
     <div style="margin-top: 20px">
       <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true"  :height="tableHieght" >
         <template v-slot:customcol="scope">
@@ -52,6 +65,7 @@
 <script>
 import buillDetail from './modules/buillDetail'
 export default {
+  props:["data"],
   data () {
     return {
       tableHieght:"600px",
@@ -148,7 +162,16 @@ export default {
       this.params.content.pageNumber = val
       this.listData()
     },
-
+    clearData(){
+      console.log("执行")
+      this.search = ""
+      this.params.content.where.condition = this.search
+      this.listData()
+    },
+    queryClick(){
+      this.params.content.where.condition = this.search
+      this.listData()
+    }
   },
   created() {
     this.getProductList()

+ 125 - 0
src/HDrpManagement/projectChange/modules/modules/quotation/modules/add.vue

@@ -0,0 +1,125 @@
+<template>
+  <div>
+    <el-button size="mini" type="primary" @click="dialogFormVisible = true">新 建</el-button>
+    <el-dialog title="新 建" :visible.sync="dialogFormVisible" width="50%">
+      <div slot="title" style="font-size: 15px">
+        新增报价单
+      </div>
+      <el-row :gutter="20">
+        <el-form :model="form" :rules="rules" ref="form" label-width="120px" label-position="right" size="mini">
+          <el-col :span="12">
+            <el-form-item label="项目名称" prop="projectname">
+              <el-input v-model="form.projectname" placeholder="请输入项目名称"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="折扣率" prop="discountrate">
+              <el-input v-model="form.discountrate" placeholder="请输入折扣率"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="地址" prop="address">
+              <el-input v-model="form.address" placeholder="请输入地址"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="有效日期" prop="invaliddate">
+              <el-date-picker
+                v-model="form.invaliddate"
+                type="date"
+                placeholder="选择日期"
+                @change="timeChange">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="备注" prop="remarks">
+              <el-input type="textarea" v-model="form.remarks" placeholder="请输入备注"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+      <div class="dialog-footer">
+        <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="warning" @click="onSubmit" class="normal-btn-width btn-warning">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "add",
+  inject:['detailData'],
+  components:{},
+  data(){
+    return {
+      dialogFormVisible:false,
+      form:{
+        "sa_quotedpriceid":0,     //sat_notice_classid<=0时 为新增
+        "sys_enterpriseid": "",
+        "sa_projectid": "",
+        "discountrate": "",
+        "remarks": "",
+        "invaliddate": "",
+        "projectname": "",
+        "address": ""
+      },
+      rules:{
+        projectname:[
+          { required: true, message: '输入项目名称', trigger: 'blur'},
+        ],
+        invaliddate:[
+          { required: true, message: '请选择报价有效期', trigger: 'blur'}
+        ],
+        discountrate:[
+          { required: true, message: '整单折扣率,保留2位小数', trigger: 'blur'}
+        ],
+      }
+    }
+  },
+  methods:{
+    onSubmit(){
+      this.$refs['form'].validate(async (valid) => {
+        if (!valid) return false
+        this.form.sys_enterpriseid = this.detailData().sys_enterpriseid
+        this.form.sa_projectid = parseInt(this.$route.query.id)
+        const res = await this.$api.requested({
+          "id": "20221020164803",
+          "version":1,
+          "content": this.form
+        })
+        this.tool.showMessage(res,()=>{
+          this.$emit('onSuccess')
+          this.$refs['form'].resetFields();
+          this.dialogFormVisible = false
+        })
+      })
+    },
+    timeChange(e) {
+      if(!e) {
+        this.form.invaliddate = ''
+      } 
+      let result = this.changeTimeFormat(e.getTime())
+ 
+      this.form.invaliddate = result
+    },
+    changeTimeFormat(time) {
+      var date = new Date(time);
+      var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
+      var currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
+      return date.getFullYear() + "-" + month + "-" + currentDate
+    }
+  }
+}
+</script>
+
+<style scoped>
+/deep/.el-select {
+  height: 28px !important;
+  width: 100%;
+}
+/deep/.el-input__inner {
+  height: 28px !important;
+}
+</style>

+ 1 - 1
src/SDrpManagement/QuotedPrice/detail/index.vue

@@ -2,7 +2,7 @@
   <div>
     <basicDetails
         ref="details"
-        :titleText="mainData.enterprisename"
+        :titleText="mainData.billno"
         formPath="QuotedPrice"
         :editData="mainData"
         :mainAreaData="mainAreaData"

+ 82 - 3
src/SDrpManagement/QuotedPrice/index.vue

@@ -5,11 +5,43 @@
         formPath="QuotedPrice"
         tableName="quotedPriceTable"
         idName="sa_quotedpriceid"
-        :apiId="{query:20221020165103,del:20221020165503}"
+        :apiId="{query:20221020165103,del:''}"
         :options="options"
         :detail-path="{path:'/quotedPriceDetail'}"
       >
-      <div slot="custom"></div>
+      <div slot="custom" style="display:flex">
+        <label  class="search__label" style="margin: auto;width: 70px;">数据分类:</label>
+        <el-select class="inline-24" v-model="tabName" placeholder="请选择数据分类" @change="selectChange" size="small" clearable>
+          <el-option
+              v-for="item in editableTabs"
+              :key="item.name"
+              :label="item.title"
+              :value="item.name">
+          </el-option>
+        </el-select>
+        <label  class="search__label" style="margin: auto;width: 35px;">状态:</label>
+        <el-select class="inline-24" v-model="selectParam.status" placeholder="请选择状态" @change="selectChange" size="small" clearable>
+          <el-option
+              v-for="item in statusList"
+              :key="item.value"
+              :label="item.value"
+              :value="item.value">
+          </el-option>
+        </el-select>
+        <label class="search__label" style="margin: auto;width: 65px;">创建日期:</label>
+        <el-date-picker
+            style="margin-right: 24px !important;"
+            size="small"
+            @change="selectChange"
+            value-format="yyyy-MM-dd"
+            v-model="dateSelect"
+            type="daterange"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            clearable>
+        </el-date-picker>
+      </div>
       <template v-slot:tbList="scope">
         <div>
           {{scope.data.column.data[[scope.data.column.columnname]]}}
@@ -27,7 +59,54 @@ export default {
   name: "index",
   data(){
     return {
-      options:[]
+      options:[],
+      tabName:"1",
+      tabIndex:"1",
+      dateSelect:'',
+      editableTabs: [ {
+        title: '我负责的',
+        name: "1",
+      }, {
+        title: '我参与的',
+        name: "2",
+      }, {
+        title: '我下属负责的',
+        name: "3",
+      }, {
+        title: '我下属参与的',
+        name: "4",
+      }],
+      statusList:[
+        {
+          value:'新建'
+        },
+        {
+          value:'提交'
+        },
+        {
+          value:'审核'
+        }
+      ],
+      selectParam: {
+        status:'',
+        startdate:'',
+        enddate:'',
+      },
+    }
+  },
+  methods:{
+    selectChange(){
+      this.tabIndex = this.tabName
+      if (this.dateSelect !== '' && this.dateSelect !== null){
+        this.selectParam.startdate = this.dateSelect[0]
+        this.selectParam.enddate = this.dateSelect[1]
+      }else {
+        this.selectParam.startdate = ''
+        this.selectParam.enddate = ''
+      }
+      this.$refs.quotedPriceList.param.content.type = this.tabIndex
+      this.$refs.quotedPriceList.param.content.where = this.selectParam
+      this.$refs.quotedPriceList.listData()
     }
   }
 }

+ 4 - 0
src/style/style.css

@@ -102,6 +102,10 @@ ul{
   display: inline-block !important;
   margin-right: 10px !important;
 }
+.inline-24{
+  display: inline-block !important;
+  margin-right: 24px !important;
+}
 .normal_input-width{
   width: 240px !important;
 }