Browse Source

Merge branch 'master' of http://219.147.85.210:8080/gmcs/HongHu-PSM

zzs 3 months ago
parent
commit
a335da03a8

+ 9 - 0
ruoyi-ui/src/api/system/plan.js

@@ -199,6 +199,15 @@ export function getServicePrice(data) {
   });
 }
 
+// 获取项目中报价供应商
+export function getChangeSupplier(data) {
+  return request({
+    url: '/bidding/tender/getChangeSupplier',
+    method: "GET",
+    params: data,
+  })
+}
+
 // 获取可中标变更项目
 export function selectTenderByChange(data) {
   return request({

+ 61 - 18
ruoyi-ui/src/views/bidding/BidWinning/components/CompPurchase.vue

@@ -64,9 +64,7 @@
           </el-input>
         </el-form-item>
         <el-form-item label="供应商ID" prop="hid" class="form-input">
-          <el-input v-model="form.hName" readonly>
-            <el-button slot="append" icon="el-icon-search" @click="handleSearchSuppliers(1)"></el-button>
-          </el-input>
+          <el-input v-model="form.hName" readonly></el-input>
         </el-form-item>
 
         <el-form-item label="发布人姓名" prop="gsPubman" class="form-input" v-if="false">
@@ -74,17 +72,23 @@
         </el-form-item>
         <el-form-item label="中标金额" prop="projMoney" class="form-input"
           v-if="this.form.gsState === '1' || this.form.gsState === '2'">
-          <el-input v-model="form.projMoney" placeholder="请输入中标金额" />
+          <el-input v-model="form.projMoney" placeholder="请输入中标金额" readonly />
         </el-form-item>
         <el-form-item label="代理服务费" prop="serviceFee" class="form-input"
           v-if="this.form.gsState === '1' || this.form.gsState === '2'">
-          <el-input v-model="form.serviceFee" placeholder="请输入代理服务费" />
+          <el-input v-model="form.serviceFee" placeholder="请输入代理服务费" readonly />
         </el-form-item>
         <el-form-item label="变更供应商" prop="supplierNameChange" class="form-input" v-if="this.form.gsState === '2'">
           <el-input v-model="form.supplierNameChange" readonly>
-            <el-button slot="append" icon="el-icon-search" @click="handleSearchSuppliers(2)"></el-button>
+            <el-button slot="append" icon="el-icon-search" @click="handleSearchSuppliers"></el-button>
           </el-input>
         </el-form-item>
+        <el-form-item label="变更后中标金额" prop="supplierChangePrice" class="form-input" v-if="this.form.gsState === '2'">
+          <el-input v-model="form.supplierChangePrice" placeholder="请输入中标金额" readonly />
+        </el-form-item>
+        <el-form-item label="变更后代理服务费" prop="supplierChangeService" class="form-input" v-if="this.form.gsState === '2'">
+          <el-input v-model="form.supplierChangeService" placeholder="请输入代理服务费" readonly />
+        </el-form-item>
         <el-form-item label="公示时间" prop="gsResDate" class="form-input">
           <el-date-picker v-model="form.gsResDate" type="datetime" placeholder="公示发布时间"
             value-format="yyyy-MM-dd HH:mm:ss" default-time="09:00:00">
@@ -110,7 +114,7 @@
     </el-dialog>
     <el-dialog v-if="gsApproveState === 1" title="选择供应商" :visible.sync="dialogSelectedSuppliers.visible" width="42%"
       append-to-body>
-      <suppliers v-if="dialogSelectedSuppliers.visible" @selectedSuppliers="handleSelectedSuppliers" />
+      <suppliers v-if="dialogSelectedSuppliers.visible" :sid="form.sid" @selectedSuppliers="handleSelectedSuppliers" />
     </el-dialog>
 
     <!-- 详情弹窗 -->
@@ -148,6 +152,14 @@
             <el-descriptions-item label="变更供应商" v-if="dialogDetail.detail.gsState == '2'">
               {{ dialogDetail.detail.supplierNameChange }}
             </el-descriptions-item>
+            <el-descriptions-item label="变更后中标金额"
+              v-if="dialogDetail.detail.gsState == '2'">
+              {{ changeForm.finalPrice }}
+            </el-descriptions-item>
+            <el-descriptions-item label="变更后代理服务费"
+              v-if="dialogDetail.detail.gsState == '2'">
+              {{ changeForm.servicePrice }}
+            </el-descriptions-item>
             <el-descriptions-item label="公示审批状态" v-if="false">
               {{ dialogDetail.detail.gsApproveState }}
             </el-descriptions-item>
@@ -244,6 +256,7 @@ import { listRecord } from "@/api/system/approval";
 import CompSearchProject from "./CompSearchProject.vue";
 import suppliers from "./suppliers.vue";
 import { getUserProfile } from "@/api/system/user";
+import { getServicePrice, getChangeSupplier } from '@/api/system/plan';
 
 export default {
   props: {
@@ -320,6 +333,8 @@ export default {
         serviceFee: null,
         suppliersChange: null,
         supplierNameChange: null,
+        supplierChangeService: null,
+        supplierChangePrice: null,
         tenderName: null,
         gsAnnex: null
       },
@@ -347,6 +362,12 @@ export default {
         filesLength: 0,
         uploadFiles: [],
       },
+
+      // 变更后金额和服务费
+      changeForm: {
+        finalPrice: null,
+        servicePrice: null
+      }
     }
   },
   created () {
@@ -377,6 +398,8 @@ export default {
       this.form.serviceFee = ''
       this.form.suppliersChange = ''
       this.form.supplierNameChange = ''
+      this.form.supplierChangeService = ''
+      this.form.supplierChangePrice = ''
       this.form.tenderName = ''
       this.form.gsAnnex = ''
     },
@@ -423,6 +446,8 @@ export default {
         this.form.serviceFee = data.serviceFee
         this.form.suppliersChange = data.suppliersChange
         this.form.supplierNameChange = data.supplierNameChange
+        this.form.supplierChangeService = data.supplierChangeService
+        this.form.supplierChangePrice = data.supplierChangePrice
         this.form.tenderName = data.tenderName
         this.form.gsAnnex = data.gsAnnex
         if (data.gsAnnex) {
@@ -515,22 +540,36 @@ export default {
         console.log(res)
       })
     },
-    handleSearchSuppliers (type) {
-      this.dialogSelectedSuppliers.visible = true;
-      this.dialogSelectedSuppliers.type = type;
+    handleSearchSuppliers() {
+      if (this.form.sid) {
+        this.dialogSelectedSuppliers.visible = true;
+      } else {
+        this.$message({
+          message: '请先选择招标项目',
+          type: 'warning'
+        });
+      }
     },
     /** 选中供应商事件 */
     handleSelectedSuppliers (row) {
-      console.log(row);
-      if (this.dialogSelectedSuppliers.type === 1) {
-        this.form.hid = row.hid;
-        this.form.hName = row.hName;
-      } else if (this.dialogSelectedSuppliers.type === 2) {
-        this.form.suppliersChange = row.hid;
-        this.form.supplierNameChange = row.hName;
-      }
+      this.handleGetServicePrice(row.hid);
+
+      this.form.suppliersChange = row.hid;
+      this.form.supplierNameChange = row.hName;
       this.dialogSelectedSuppliers.visible = false;
     },
+
+    handleGetServicePrice(hid) {
+      getServicePrice({
+        sid: this.form.sid,
+        hid
+      })
+      .then(res => {
+        this.form.supplierChangeService = res.data.servicePrice
+        this.form.supplierChangePrice = res.data.finalPrice
+      })
+    },
+
     /** 查看 */
     handleInfo (row) {
       this.resetDetail()
@@ -554,6 +593,8 @@ export default {
         this.dialogDetail.detail.serviceFee = data.serviceFee
         this.dialogDetail.detail.suppliersChange = data.suppliersChange
         this.dialogDetail.detail.supplierNameChange = data.supplierNameChange
+        this.dialogDetail.detail.supplierChangeService = data.supplierChangeService
+        this.dialogDetail.detail.supplierChangePrice = data.supplierChangePrice
         this.dialogDetail.detail.tenderName = data.tenderName
         if (data.gsAnnex) {
           this.dialogDetail.detail.uploadFiles = JSON.parse(data.gsAnnex)
@@ -587,6 +628,8 @@ export default {
       this.dialogDetail.detail.serviceFee = null
       this.dialogDetail.detail.suppliersChange = null
       this.dialogDetail.detail.supplierNameChange = null
+      this.dialogDetail.detail.supplierChangeService = null
+      this.dialogDetail.detail.supplierChangePrice = null
       this.dialogDetail.detail.tenderName = null
     },
     /** 提交审核 */

+ 13 - 2
ruoyi-ui/src/views/bidding/BidWinning/components/CompSearchProject.vue

@@ -42,7 +42,7 @@
 
 <script>
 import { listOrigin } from '@/api/system/tender/tender'
-import { getSelectTenderByState } from "@/api/system/plan";
+import { getSelectTenderByState, selectTenderByChange } from "@/api/system/plan";
 
 export default {
 	model: {
@@ -88,7 +88,18 @@ export default {
 		getList() {
 			this.loading = true;
 			
-			if (this.gonggaoType == 3) {
+			if (this.gonggaoType == 2) {
+			    delete this.queryParams.sProjectState
+				selectTenderByChange({
+					...this.queryParams,
+					cState: 1
+				})
+				.then(res => {
+					this.data = res.rows
+					this.total = res.total
+					this.loading = false;
+				})
+			} else if (this.gonggaoType == 3) {
 			    delete this.queryParams.sProjectState
 				getSelectTenderByState({
 					...this.queryParams,

+ 21 - 93
ruoyi-ui/src/views/bidding/BidWinning/components/suppliers.vue

@@ -1,124 +1,52 @@
 <template>
   <div class="app-container">
-    <div class="tcl">
-      <el-tabs v-model="activeName" @tab-click="handleClick">
-        <el-tab-pane label="合格供应商" name="first">
-          <el-form ref="elForm1" :model="formData" :rules="rules" size="medium" label-width="100px">
-            <el-row type="flex" justify="start" align="middle" :gutter="15">
-              <el-form-item label="供应商名称" prop="hName">
-                <el-input v-model="formData.hName" placeholder="请输入供应商名称" clearable :style="{ width: '100%' }">
-                </el-input>
-              </el-form-item>
-              <el-form-item label="统一社会信用代码" prop="hCreditCode" label-width="150px">
-                <el-input v-model="formData.hCreditCode" placeholder="请输入统一社会信用代码" clearable :style="{ width: '100%' }">
-                </el-input>
-              </el-form-item>
-            </el-row>
-            <el-row>
-
-              <el-form-item size="medium">
-                <el-button type="primary" @click="query1">查询</el-button>
-                <el-button @click="resetForm1">重置</el-button>
-              </el-form-item>
-            </el-row>
-          </el-form>
-          <el-table stripe v-loading="loading" :data="supplierList" @cell-dblclick="handleSelectedProject">
-            <el-table-column type="index" label="序号" align="center" width="80" />
-            <el-table-column label="供应商名称" align="center" prop="hName" />
-            <el-table-column label="统一社会信用代码" align="center" prop="hCreditCode" />
-          </el-table>
-          <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
-            :limit.sync="queryParams.pageSize" @pagination="getList" />
-        </el-tab-pane>
-      </el-tabs>
-    </div>
+    <el-table stripe v-loading="loading" :data="supplierList" @cell-dblclick="handleSelectedProject">
+      <el-table-column type="index" label="序号" align="center" width="80" />
+      <el-table-column label="供应商名称" align="center" prop="hName" />
+      <el-table-column label="统一社会信用代码" align="center" prop="hCreditCode" />
+    </el-table>
   </div>
 </template>
 
 <script>
 import { listSupplier } from "@/api/system/supplier";
-import { parseTime } from "@/utils/ruoyi";
+import { getChangeSupplier } from '@/api/system/plan';
 import moment from "moment";
 
 export default {
-  components: {},
   name: "Supplier",
+
+  props: {
+    sid: {
+      type: Number,
+      required: true
+    }
+  },
+
   data () {
     return {
-      activeName: "first",
       // 遮罩层
       loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
+      
       // 合格供应商表格数据
-      supplierList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        hName: "",
-        hCreditCode: "",
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      formData: {
-      },
-      rules: {
-      },
+      supplierList: []
     };
   },
   created () {
     this.getList();
   },
   methods: {
-    parseTime,
-    dateFormat (row, column) {
-      let date = row[column.property];
-      if (date === undefined) {
-        return "";
-      }
-      return moment(date).format("YYYY-MM-DD HH:mm:ss");
-    },
-    query1 () {
-      this.loading = true;
-      this.queryParams.hName = this.formData.hName;
-      this.queryParams.hCreditCode = this.formData.hCreditCode;
-      this.queryParams.pageNum = 1;
-      listSupplier(this.queryParams).then((response) => {
-        this.supplierList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    resetForm1 () {
-      this.formData.hName = null;
-      this.formData.hCreditCode = null;
-    },
-    handleClick (tab, event) {
-      console.log(tab, event);
-    },
     /** 查询供应商列表 */
     getList () {
       this.loading = true;
-      listSupplier(this.queryParams).then((response) => {
-        this.supplierList = response.rows;
-        this.total = response.total;
+      getChangeSupplier({
+        sid: this.sid
+      }).then((response) => {
+        this.supplierList = response.data;
         this.loading = false;
       });
     },
+
     handleSelectedProject (row, column, cell, event) {
       this.$emit('selectedSuppliers', row)
     }

+ 12 - 7
ruoyi-ui/src/views/purchase/stop/bidWinningChange.vue

@@ -97,6 +97,11 @@
           uploadFiles: [],
         },
         changeAnnex: [],
+        applyForm: {
+          cState: null,
+          sid: null,
+          changeFile: null
+        },
 
         fullscreenLoading: false
       }
@@ -116,7 +121,7 @@
       checkPermi,
   
       /*查看采购计划*/
-      handleClick (activeName, oldActiveName) {
+      handleClick(activeName, oldActiveName) {
         switch (activeName.name) {
           case 'first':
             this.queryParams.cState = 0
@@ -125,18 +130,18 @@
             this.queryParams.cState = 1
             break
         }
+
+        this.handleQuery()
       },
       //搜索按钮
-      handleQuery () {
+      handleQuery() {
         this.queryParams.pageNum = 1
-        this.queryParams.sCode = queryParams.sCode
-        this.queryParams.sName = queryParams.sName
         this.queryParams.cState = this.activeName == 'first' ? 0 : 1
         this.getList()
   
       },
       /** 重置按钮操作 */
-      resetQuery () {
+      resetQuery() {
         this.queryParams.sCode = null
         this.queryParams.sName = null
         this.handleQuery()
@@ -166,7 +171,7 @@
         this.dialogFormVisible.visible = true;
         this.applyForm = {
           sid: row.sid,
-          file: row.aAstate
+          cState: 1
         };
         this.changeAnnex = []
         this.fjAnnex = {
@@ -177,7 +182,7 @@
 
       submitApply () {
         if (this.changeAnnex && this.changeAnnex.length > 0) {
-            this.applyForm.file = this.changeAnnex
+            this.applyForm.changeFile = this.changeAnnex
 
           this.$modal.confirm('你确定要中标变更吗?').then(() => {
             this.fullscreenLoading = true;