zerp il y a 2 ans
Parent
commit
12ce3372ce

+ 4 - 4
config/index.js

@@ -12,9 +12,9 @@ module.exports = {
             '/': {
                 // target: 'http://47.108.151.62:80/pre', //后端接口地址     中间人运营平台
                 // target: 'http://47.108.151.62', //后端接口地址   
-                target: 'http://192.168.3.12:7001', //后端接口地址   
+                // target: 'http://192.168.3.12:7001', //后端接口地址   
                 // target: 'http://127.0.0.1:28081', //后端接口地址   
-                // target: 'http://47.108.14.99:7001/', //后端接口地址   
+                target: 'http://47.108.14.99:7001/', //后端接口地址   
                 changeOrigin: true, //是否跨域
                 pathRewrite: {
                     '^/': '/', //重写,
@@ -24,8 +24,8 @@ module.exports = {
         },
 
         // 本地开发使用   192.168.0.126  localhost
-        host: '192.168.3.4',
-        // host: '192.168.124.14',
+        // host: '192.168.3.4',
+        host: '192.168.124.10',
         port: 8081,
         autoOpenBrowser: true,
         errorOverlay: true,

+ 7 - 0
src/api/bid.js

@@ -94,6 +94,13 @@ export function getCustomerName(parms) {
   })
 }
 
+// 置中标
+export function getContract(tenderld,biddingld,tenderType){
+  return request({
+    url:"/common/tender/success/contract/" +tenderld +"/"+biddingld+"/"+tenderType,
+    method:"get"
+  })
+}
  
 
 /***

+ 162 - 11
src/views/bid/tender/dialog.vue

@@ -2,6 +2,7 @@
   <div class="" style="margin: 30px 0 10px 0;">
     <!-- 查询和其他操作 -->
     <div class="" style="margin: 10px 0 30px 0;">
+      
       <span style="font-size:14px">客户名称:</span>
       <el-select v-model="goodsName" filterable style="width: 200px;" clearable size="small" placeholder="请选择" @clear="handleFind">
             <el-option v-for="item in userDataList" :key="item.customerId" :label="item.customerName" :value="item.customerId" />
@@ -19,9 +20,32 @@
 
       <el-button style=" width:90px;  " size="small" type="primary" icon="el-icon-search" @click="handleFind">查询
       </el-button>
+       <!-- <el-upload
+                    :disabled="!showType"
+                    class="upload-demo"
+                    :limit="1"
+                    :on-change="handleChange"
+                    :on-remove="handleRemove"
+                    :show-file-list="false"
+                    name="multipartFile"
+                    style="display:inline-block"
+                    :action="BASE_API+'/common/tender/file/'"
+                    list-type="text"
+                    :data="fileData"
+                    :file-list="fileList"
+                    multiple
+                  >
+                          <el-button @click="handleUpload" class="el-icon-upload" size="small" type="primary" style="width:90px; ">发送文件</el-button>
+                  </el-upload> -->
     </div>
 
-    <el-table  ref="multipleTable" v-loading="loading" :data="tableData"  :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border  >
+    <el-table  ref="multipleTable" v-loading="loading" :data="tableData"  @selection-change="handleSelectionChange" @row-click="handleHighlightChangeTable" :header-cell-style="{ background: '#f5f7fa', }" style="width: 100%" border  >
+       <!-- <el-table-column
+       :selectable="selectable"
+       :max="1"
+      type="selection"
+      width="55">
+    </el-table-column> -->
 <el-table-column label="客户名称" prop="customerName" fixed="left" width="150" align="center" :show-overflow-tooltip="true">
       </el-table-column>
       <el-table-column label="运输方式" prop="goodsName"   align="center" :show-overflow-tooltip="true">
@@ -79,6 +103,28 @@
 
       <el-table-column label="备注" prop="biddingLogisticsRemark" width="150" align="center" :show-overflow-tooltip="true">
       </el-table-column>
+        <el-table-column label="操作" width="250" fixed="right" align="center">
+          <template slot-scope="scope">
+            <el-button  slot="reference"  :disabled="scope.row.biddingStatus !=6"  icon="el-icon-check" type="text" @click="dialogVisible=true;dataForm=scope.row">中标</el-button>
+            <!-- <el-button  slot="reference" icon="el-icon-check" type="text" @click="dialogVisible=true">中标</el-button> -->
+             <el-upload
+                    :disabled="scope.row.biddingStatus !=7"
+                    class="upload-demo"
+                    :on-change="handleChange"
+                    :on-remove="handleRemove"
+                    :show-file-list="false"
+                    name="multipartFile"
+                    style="display:inline-block"
+                    :action="BASE_API+'/common/tender/contract/send/' + scope.row.customerId"
+                    list-type="text"
+                    :data="fileData"
+                    :file-list="fileList"
+                    multiple
+                  >
+                          <el-button @click="handleUpload" :disabled="scope.row.biddingStatus !=7" class="el-icon-upload2" size="small" type="text" style="width:90px;font-size:14px ">发送合同</el-button>
+                  </el-upload>
+          </template>
+        </el-table-column>
     </el-table>
 
     <!--分页-->
@@ -96,6 +142,35 @@
 
     </div>
 
+     <el-dialog
+      title=""
+      :visible.sync="dialogVisible"
+      width="35%"
+      top="35vh"
+      append-to-body
+     >
+      <span style="font-size:16px">此操作将“{{dataForm.customerName}}”,置中标</span>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+            <el-upload
+                    class="upload-demo"
+                    :on-change="handleChange"
+                    :on-remove="handleRemove"
+                    :show-file-list="false"
+                    name="multipartFile"
+                    style="display:inline-block"
+                    :action="BASE_API+'/common/tender/contract/send/' + dataForm.customerId"
+                    list-type="text"
+                    :data="fileData"
+                    :file-list="fileList"
+                    multiple
+                  >
+                          <el-button @click="changeBid"  type="primary"  >确定并发送合同</el-button>
+                  </el-upload>
+        <el-button type="primary" @click="changeBid">确 定</el-button>
+        
+      </span>
+    </el-dialog>
 
 
 
@@ -105,7 +180,7 @@
 <script>
 import { Listarea } from '@/api/dataForm'
 import { parseTime } from '@/utils/index'
-import { getLogisticsInfo,getCustomerName } from '@/api/bid'
+import { getLogisticsInfo,getCustomerName ,getContract} from '@/api/bid'
 
 export default {
   data() {
@@ -155,14 +230,68 @@ export default {
       userDataList:[],
       startTime:"",
       endTime:"",
-        isShow:true
+        isShow:true,
+        showType:false,
+        fileData:{}
     }
   },
   created() {
     this.onCustmerName()
-    console.log('res')
+          console.log(this.priceData,"priceData")
+
   },
   methods: {
+    // 置中标
+    changeBid(){
+      console.log(this.dataForm)
+      console.log(this.priceData,"priceData")
+      getContract(this.dataForm.tenderLogisticsId,this.dataForm.biddingLogisticsId,this.priceData.tenderType).then((res)=>{
+        if(res.data.code == 200){
+           this.$message({
+              message: '操作成功',
+              type: 'success'
+            });
+            this.dialogVisible = false
+            this.getTenantList()
+        }
+      })
+    },
+     // 点击时候
+    handleUpload(){
+      console.log(this.SelectionList,"我被固定了")
+      // if(this.SelectionList.length == 0){
+      //  this.$message({
+      //     message: '请先选择已中标的客户',
+      //     type: 'warning'
+      //   });
+      // }
+      // return false
+    },
+    // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.fileUrl = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+           this.$message({
+              message: '合同发送成功',
+              type: 'success'
+            });
+          // this.form.fileUrl = file.response.data.filePath
+          // this.form.tenderParentId = file.response.data.tenderParentId
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+        }
+      }
+    },
     onCustmerName(){
         getCustomerName().then((res)=>{
             console.log(res)
@@ -186,7 +315,6 @@ export default {
         console.log(response)
         this.loading = false
          let data = response.data.data.records
-        console.log(new Date().valueOf(),"当前时间")
         data.map((res)=>{
           // 投标时间
           let startTime = this.priceData.endTime
@@ -207,9 +335,8 @@ export default {
           }
           return res
         })
-        console.log(data)
+
         this.tableData = data
-        console.log('1' + response.data.data.records)
         this.total = response.data.data.total
       })
     },
@@ -251,10 +378,34 @@ export default {
        console.log(row,i)
        this.$refs.multipleTable.toggleRowSelection(row);
    },
-    handleSelectionChange(row){
-        console.log(row)
-        this.SelectionList = row
-    }
+
+
+
+   selectable(row){
+     console.log(row,"我是selectable")
+     if(row.biddingStatus == 7){
+
+       return true
+     }
+   },
+    handleSelectionChange(list){
+        console.log(list)
+      if (list.length > 1) {
+        this.$refs.multipleTable.clearSelection();
+        return;
+      }
+      this.SelectionList = [...list];
+      if(this.SelectionList.length >0){
+         this.showType = true
+      }else{
+         this.showType = false
+      }
+    },
+    handleHighlightChangeTable(row){
+       if(row.biddingStatus == 7){
+          this.$refs.multipleTable.toggleRowSelection(row);
+       }
+    },
   }
 }
 </script>

+ 2 - 2
src/views/bid/tender/tender.vue

@@ -124,7 +124,7 @@
                                         <el-table-column prop="destinationName" label="目的地" :show-overflow-tooltip="true" align="center" />
                                         <el-table-column prop="predictDistance" label="预估运输距离(公里/海里)" width="128" :show-overflow-tooltip="true" align="center" />
                                         <el-table-column prop="transportUnitPrice" label="运输单价含税价(元/吨)"  width="120" :show-overflow-tooltip="true" align="center" />
-                                        <el-table-column prop="appendix" label="附件" align="center" width="100">
+                                        <el-table-column prop="appendix" label="回执" align="center" width="100">
                                             <template slot-scope="scope">
                                                 <el-link :disabled="scope.row.receiptPathUrl ? false : true" :href="scope.row.receiptPathUrl" type="primary" target="_target"><i class="el-icon-view"></i> 下载</el-link>
                                             </template>
@@ -314,7 +314,7 @@ export default {
       this.dialogTableVisible = true
       setTimeout(() => {
         this.goodsName = val.goodsName
-       this.$refs.ckDialog.historyValue = ""
+       this.$refs.ckDialog.historyValue = 0
        this.$refs.ckDialog.goodsName = ""
        this.$refs.ckDialog.priceData = val
       this.$refs.ckDialog.handleFind()

+ 58 - 1
src/views/bid/tender1/dialog.vue

@@ -45,7 +45,28 @@
                           </el-table-column>
                             <el-table-column prop="biddingTime" label="投标时间"  width="152" :show-overflow-tooltip="true" align="center" />
                             <el-table-column prop="remark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
-                 
+                  <!-- <el-table-column label="操作" width="250" fixed="right" align="center">
+                    <template slot-scope="scope">
+                      <el-button  slot="reference" :disabled="scope.row.biddingStatus !=6" icon="el-icon-check" type="text" @click="handleView(scope.row)">中标</el-button>
+                      <el-upload
+                              :disabled="scope.row.biddingStatus !=7"
+                              class="upload-demo"
+                              :limit="1"
+                              :on-change="handleChange"
+                              :on-remove="handleRemove"
+                              :show-file-list="false"
+                              name="multipartFile"
+                              style="display:inline-block"
+                              :action="BASE_API+'/common/tender/contract/send/' + scope.row.customerId"
+                              list-type="text"
+                              :data="fileData"
+                              :file-list="fileList"
+                              multiple
+                            >
+                                    <el-button @click="handleUpload" :disabled="scope.row.biddingStatus !=7" class="el-icon-upload" size="small" type="text" style="width:90px; ">发送合同</el-button>
+                            </el-upload>
+                    </template>
+                  </el-table-column> -->
     </el-table>
 
     <!--分页-->
@@ -130,6 +151,42 @@ export default {
     console.log('res')
   },
   methods: {
+    // 点击时候
+    handleUpload(){
+      console.log(this.SelectionList,"我被固定了")
+      // if(this.SelectionList.length == 0){
+      //  this.$message({
+      //     message: '请先选择已中标的客户',
+      //     type: 'warning'
+      //   });
+      // }
+      // return false
+    },
+    // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.fileUrl = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+           this.$message({
+              message: '合同发送成功',
+              type: 'success'
+            });
+          // this.form.fileUrl = file.response.data.filePath
+          // this.form.tenderParentId = file.response.data.tenderParentId
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+        }
+      }
+    },
     onCustmerName(){
         getCustomerName().then((res)=>{
             console.log(res)

+ 1 - 1
src/views/bid/tender1/tender.vue

@@ -435,7 +435,7 @@ export default {
       // this.$refs.ckDialog.getTenantList()
         // console.log(this.$refs.ckDialog)
          this.goodsName = val.goodsName
-          this.$refs.ckDialog.historyValue = ""
+          this.$refs.ckDialog.historyValue = 0
           this.$refs.ckDialog.goodsName = ""
           this.$refs.ckDialog.priceData = val
           this.$refs.ckDialog.handleFind()

+ 58 - 1
src/views/bid/tender2/dialog.vue

@@ -68,7 +68,28 @@
                         
                             <el-table-column prop="biddingTime" label="投标时间"  width="152" :show-overflow-tooltip="true" align="center" />
                             <el-table-column prop="remark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
-                 
+                    <!-- <el-table-column label="操作" width="250" fixed="right" align="center">
+                        <template slot-scope="scope">
+                          <el-button  slot="reference" :disabled="scope.row.biddingStatus !=6" icon="el-icon-check" type="text" @click="handleView(scope.row)">中标</el-button>
+                          <el-upload
+                                  :disabled="scope.row.biddingStatus !=7"
+                                  class="upload-demo"
+                                  :limit="1"
+                                  :on-change="handleChange"
+                                  :on-remove="handleRemove"
+                                  :show-file-list="false"
+                                  name="multipartFile"
+                                  style="display:inline-block"
+                                  :action="BASE_API+'/common/tender/contract/send/' + scope.row.customerId"
+                                  list-type="text"
+                                  :data="fileData"
+                                  :file-list="fileList"
+                                  multiple
+                                >
+                                        <el-button @click="handleUpload" :disabled="scope.row.biddingStatus !=7" class="el-icon-upload" size="small" type="text" style="width:90px; ">发送合同</el-button>
+                                </el-upload>
+                        </template>
+                      </el-table-column> -->
     </el-table>
 
     <!--分页-->
@@ -153,6 +174,42 @@ export default {
     console.log('res')
   },
   methods: {
+    // 点击时候
+    handleUpload(){
+      console.log(this.SelectionList,"我被固定了")
+      // if(this.SelectionList.length == 0){
+      //  this.$message({
+      //     message: '请先选择已中标的客户',
+      //     type: 'warning'
+      //   });
+      // }
+      // return false
+    },
+    // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.fileUrl = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+           this.$message({
+              message: '合同发送成功',
+              type: 'success'
+            });
+          // this.form.fileUrl = file.response.data.filePath
+          // this.form.tenderParentId = file.response.data.tenderParentId
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+        }
+      }
+    },
     onCustmerName(){
         getCustomerName().then((res)=>{
             console.log(res)

+ 1 - 1
src/views/bid/tender2/tender.vue

@@ -440,7 +440,7 @@ export default {
       // this.$refs.ckDialog.getTenantList()
       //   console.log(this.$refs.ckDialog)
        this.goodsName = val.goodsName
-          this.$refs.ckDialog.historyValue = ""
+          this.$refs.ckDialog.historyValue = 0
           this.$refs.ckDialog.goodsName = ""
           this.$refs.ckDialog.priceData = val
           this.$refs.ckDialog.handleFind()

+ 70 - 1
src/views/bid/tender3/dialog.vue

@@ -50,7 +50,29 @@
             <el-table-column prop="biddingPrice" width="100" label="投标价格" :show-overflow-tooltip="true" align="center" />
             <el-table-column prop="biddingTime" label="投标时间"  width="152" :show-overflow-tooltip="true" align="center" />
             <el-table-column prop="remark" label="备注" width="162" :show-overflow-tooltip="true" align="center" />
-                 
+                <!-- <el-table-column label="操作" width="250" fixed="right" align="center">
+                    <template slot-scope="scope">
+                      <el-button  slot="reference"  icon="el-icon-check" type="text" @click="dialogVisible = true">中标</el-button>
+                      <el-button  slot="reference" :disabled="scope.row.biddingStatus !=6" icon="el-icon-check" type="text" @click="dialogVisible = true">中标</el-button>
+                      <el-upload
+                              :disabled="scope.row.biddingStatus !=7"
+                              class="upload-demo"
+                              :limit="1"
+                              :on-change="handleChange"
+                              :on-remove="handleRemove"
+                              :show-file-list="false"
+                              name="multipartFile"
+                              style="display:inline-block"
+                              :action="BASE_API+'/common/tender/contract/send/' + scope.row.customerId"
+                              list-type="text"
+                              :data="fileData"
+                              :file-list="fileList"
+                              multiple
+                            >
+                                    <el-button @click="handleUpload" :disabled="scope.row.biddingStatus !=7" class="el-icon-upload" size="small" type="text" style="width:90px; ">发送合同</el-button>
+                            </el-upload>
+                    </template>
+                  </el-table-column> -->
     </el-table>
 
     <!--分页-->
@@ -68,6 +90,17 @@
 
     </div>
 
+    <!-- <el-dialog
+      title=""
+      :visible.sync="dialogVisible"
+      width="30%"
+      :before-close="handleClose">
+      <span>是否</span>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
+      </span>
+    </el-dialog> -->
 
 
 
@@ -135,6 +168,42 @@ export default {
     console.log('res')
   },
   methods: {
+    // 点击时候
+    handleUpload(){
+      console.log(this.SelectionList,"我被固定了")
+      // if(this.SelectionList.length == 0){
+      //  this.$message({
+      //     message: '请先选择已中标的客户',
+      //     type: 'warning'
+      //   });
+      // }
+      // return false
+    },
+    // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.fileUrl = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+           this.$message({
+              message: '合同发送成功',
+              type: 'success'
+            });
+          // this.form.fileUrl = file.response.data.filePath
+          // this.form.tenderParentId = file.response.data.tenderParentId
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+        }
+      }
+    },
     onCustmerName(){
         getCustomerName().then((res)=>{
             console.log(res)

+ 1 - 1
src/views/bid/tender3/tender.vue

@@ -467,7 +467,7 @@ export default {
       // this.$refs.ckDialog.getTenantList()
       //   console.log(this.$refs.ckDialog)
        this.goodsName = val.goodsName
-          this.$refs.ckDialog.historyValue = ""
+          this.$refs.ckDialog.historyValue = 0
           this.$refs.ckDialog.goodsName = ""
           this.$refs.ckDialog.priceData = val
           this.$refs.ckDialog.handleFind()

+ 63 - 0
src/views/tender/tender/dialog.vue

@@ -73,6 +73,28 @@
 
       <el-table-column label="备注" prop="biddingLogisticsRemark" width="150" align="center" :show-overflow-tooltip="true">
       </el-table-column>
+       <el-table-column label="操作" width="250" fixed="right" align="center">
+          <template slot-scope="scope">
+             <el-upload
+                    :disabled="scope.row.biddingStatus !=7"
+                    class="upload-demo"
+                    :on-change="handleChange"
+                    :on-remove="handleRemove"
+                    :before-upload="beforeUpload"
+                    :show-file-list="false"
+                    name="multipartFile"
+                    style="display:inline-block"
+                    :action="BASE_API+'/common/bidding/receipt/' + scope.row.tenderLogisticsId +'/'+ priceData.tenderType"
+                    list-type="text"
+                    :data="fileData"
+                    :file-list="fileList"
+                    multiple
+                    accept=".zip"
+                  >
+                          <el-button @click="handleUpload" :disabled="scope.row.biddingStatus !=7" class="el-icon-upload2" size="small" type="text" style="width:90px;fontSize:14px ">上传回执</el-button>
+                  </el-upload>
+          </template>
+       </el-table-column>
     </el-table>
 
     <!--分页-->
@@ -101,6 +123,7 @@
 import { Listarea } from '@/api/dataForm'
 import { parseTime } from '@/utils/index'
 import { getLogisticsInfo } from '@/api/tender'
+// import { Notification, MessageBox } from 'element-ui'
 
 export default {
   data() {
@@ -152,6 +175,46 @@ export default {
     console.log('res')
   },
   methods: {
+       // 文件移除的时候
+    handleRemove(file, fileList) {
+      this.form.fileUrl = ''
+      console.log(file, fileList, this.fileList, '移出')
+    },
+    // 格式限制
+    beforeUpload(file){ 
+      
+      var testmsg = file.name.substring(file.name.lastIndexOf(".") + 1);
+     const extension = testmsg === "zip"
+     if (!extension ) {
+       this.$message({
+         message: "上传文件只能是.zip格式!",
+         type: "warning",
+       });
+     }
+
+     return extension;
+
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      console.log(file, fileList, '上传')
+      if (file.response) {
+        console.log(file.response, 'file')
+        if (file.response.code == '200') {
+           this.$message({
+              message: '回执上传成功',
+              type: 'success'
+            });
+          // this.form.fileUrl = file.response.data.filePath
+          // this.form.tenderParentId = file.response.data.tenderParentId
+        } else {
+          Notification.error({
+            title: file.response.msg,
+            duration: 1000
+          })
+        }
+      }
+    },
       onshow(){
           this.isShow = !this.isShow
       },