浏览代码

前端sdy

zhongtianhaoyuan 4 年之前
父节点
当前提交
c9a0079011

二进制
public/img/bianji.png


二进制
public/img/chakan.png


二进制
public/img/edit.png


二进制
public/img/fujian.png


二进制
public/img/header-add.png


二进制
public/img/shanchu.png


二进制
public/img/sousuo.png


+ 0 - 3
src/api/V2/certificate/index.js

@@ -111,6 +111,3 @@ export const API_GET_CERTIFICATE_GETCRTLISTBYCONDITIONDATA = `${baseUrl}/certifi
 
 // 证书模块
 export const API_GET_SP_GETCRTLIST = `${baseUrl}/certificate/query/getCrtListByCondition`
-
-// 首页船舶证书统计接口
-export const API_GET_CERTIFICATEQUANTITY = `${baseUrl}/certificateHomePage/query/getCertificateQuantity`

+ 0 - 2
src/api/V2/maintain/index.js

@@ -267,5 +267,3 @@ export const API_GET_STATISTICAL_MAINTAINSTATISTICS_QUERY_GETRATECOMPARISONSTATI
 
 // 维保消耗出库废弃
 export const API_POST_MAINTAIN_DISCARD = `${baseUrl}/maintainOutStoreDetail/api/discardMaintainOutStoreDetail`
-// 首页维修保养统计接口
-export const API_GET_WORKORDERQUANTITY = `${baseUrl}/maintainHomePage/query/getWorkOrderQuantity`

+ 0 - 4
src/api/V2/purchase/index.js

@@ -1085,10 +1085,6 @@ export const API_POST_SPAREPARTAPPLINFO_COPYDATA = `${baseUrl}/sparepartApplInfo
 // 备件复制原有申请单查询
 export const API_POST_MATERIELAPPLINFO_COPYDATA = `${baseUrl}/materielApplInfo/query/copyData`
 
-// 首页备件与物料折线图的统计
-export const API_GET_PURCHASEQUANTITY = `${baseUrl}/purchaseHomePage/query/getPurchaseQuantity`
-// 首页备件与物料柱形图的统计
-export const API_GET_COLUMNARPURCHASEQUANTITY = `${baseUrl}/purchaseHomePage/query/getColumnarPurchaseQuantity`
 
 
 

+ 6 - 3
src/components/WsUpload/index.vue

@@ -5,7 +5,7 @@
         class="upload-btn"
         size="small"
         :disabled="disabled"
-        type="primary"
+        type="default"
         @click="_handleUploadClick"
         >{{ buttonName ? buttonName : $t('upload.uploadButton') }}</el-button
       >
@@ -15,7 +15,7 @@
         class="upload-btn"
         size="small"
         :disabled="disabled"
-        type="primary"
+        type="default"
         @click="_handleUploadClick"
         >{{ buttonName ? buttonName : $t('upload.uploadButton') }}</el-button
       >
@@ -623,7 +623,10 @@ $ctrl-margin-left: 10px;
   .el-upload-list__item-delete:nth-last-of-type(1) {
   display: inline-block !important;
 }
-
+.el-button--default {
+  border: 1px solid #5473e8;
+  color: #5473e8;
+}
 .ws-upload {
   /*.upload-noramark-btn{*/
   /*  padding: 0px;*/

+ 0 - 15
src/model/statistical/index.js

@@ -7,25 +7,10 @@
  */
 import { errorCatcher, errorHandle, filter } from 'base-core-lib'
 import { appRx } from '../defalutConfig/indexRx'
-import { API_GET_CERTIFICATEQUANTITY } from '@/api/V2/certificate'
-import {
-  API_GET_PURCHASEQUANTITY,
-  API_GET_COLUMNARPURCHASEQUANTITY,
-} from '@/api/V2/purchase'
 import {
   API_GET_DISEMBARKSTATISTICS,
   API_GET_CREWTURNOVER_GETCREWTURNOVERDETAIL,
 } from '@/api/V2/crew'
-import { API_GET_WORKORDERQUANTITY } from '@/api/V2/maintain'
-
-// 首页维修保养统计接口
-export const getWorkOrderQuantity = appRx.get(API_GET_WORKORDERQUANTITY, errorCatcher, errorHandle, filter)
-// 首页船舶证书统计接口
-export const getCertificateQuantity = appRx.get(API_GET_CERTIFICATEQUANTITY, errorCatcher, errorHandle, filter)
-//首页备件与物料折线图的统计
-export const getPurchaseQuantity = appRx.get(API_GET_PURCHASEQUANTITY, errorCatcher, errorHandle, filter)
-//首页备件与物料柱形图的统计
-export const getColumnarPurchaseQuantity = appRx.get(API_GET_COLUMNARPURCHASEQUANTITY, errorCatcher, errorHandle, filter)
 // 船员统计 下船船员饼状图的统计
 export const downShipReason = appRx.get(API_GET_DISEMBARKSTATISTICS, errorCatcher, errorHandle, filter)
 // 船员统计 异动明细统计

+ 323 - 72
src/views/contractManagement/purchaseContract.vue

@@ -10,7 +10,18 @@
           v-hasPermission="
             `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
           "
-          >添加</ws-button
+          ><img
+            width="13"
+            height="13"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 2px;
+              left: -4px;
+            "
+            src="../../../public/img/header-add.png"
+            alt=""
+          />添加</ws-button
         >
         <ws-button
           @click="exportlist()"
@@ -35,25 +46,18 @@
             :value="item.value"
           />
         </ws-select>
-        <ws-date-picker
-          :picker-options="pickerBeginDateBefore"
-          v-model="startDate"
-          type="date"
-          default-value="1980-01-01"
-          placeholder="起始日期"
-          format="yyyy-MM-dd"
-          value-format="yyyy-MM-dd"
-        />
-        <span>至</span>
-        <ws-date-picker
-          :picker-options="pickerBeginDateBefore"
-          v-model="endDate"
-          type="date"
-          default-value="1980-01-01"
-          placeholder="截止日期"
-          format="yyyy-MM-dd"
-          value-format="yyyy-MM-dd"
-        />
+
+        <el-date-picker
+          v-model="value2"
+          type="daterange"
+          align="right"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions"
+        >
+        </el-date-picker>
         <ws-input
           v-model="searchKeyWord"
           placeholder="可按照合同编号、买方名称、卖方名称进行查找"
@@ -64,13 +68,24 @@
         ></ws-input>
         <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
         <ws-button
+          class="find"
           type="primary"
           @click="find()"
           v-hasPermission="
             `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
           "
-          >查找</ws-button
-        >
+          ><img
+            width="16"
+            height="16"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            "
+            src="../../../public/img/sousuo.png"
+            alt=""
+        /></ws-button>
       </template>
     </BaseHeaderLayout>
     <el-table
@@ -78,12 +93,32 @@
       :data="contractList.records"
       style="width: 100%; margin-top: 10px"
     >
-      <el-table-column type="index" label="序号" />
+      <el-table-column type="index" label="序号">
+        <template scope="scope">
+          <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+          <span v-else>{{ scope.$index + 1 }}</span>
+        </template>
+      </el-table-column>
       <el-table-column prop="contractNo" label="合同编号" width="80">
       </el-table-column>
       <el-table-column prop="goodsName" label="货名" width="80">
       </el-table-column>
-      <el-table-column prop="grade" label="品级"> </el-table-column>
+      <el-table-column prop="grade" label="品级">
+        <template slot-scope="scope">
+          <span v-if="scope.row.grade == '一等品'" class="top-grade">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '二等品'" class="second-class">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '三等品'" class="third-class">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '等外'" class="substandard">{{
+            scope.row.grade
+          }}</span>
+        </template>
+      </el-table-column>
       <el-table-column prop="weight" label="重量(吨)"> </el-table-column>
       <el-table-column prop="unitContractPrice" label="合同单价(元)">
       </el-table-column>
@@ -91,36 +126,63 @@
       <el-table-column prop="buyer" label="买方"> </el-table-column>
       <el-table-column prop="seller" label="卖方"> </el-table-column>
       <el-table-column prop="imperfectGrain" label="已完成(吨)">
+        <template slot-scope="scope">
+          <span style="color: #5473e8; font-weight: 600">{{
+            scope.row.imperfectGrain
+          }}</span>
+        </template>
       </el-table-column>
-      <el-table-column prop="status" label="状态" >
+      <el-table-column prop="status" label="状态">
         <template slot-scope="scope">
           <el-popover
             placement="left"
-            :width="400"
+            :width="285"
             trigger="click"
             visible-arrow="false"
             @show="history(scope.row)"
           >
-            <template >
-              <span  slot="reference">{{ scope.row.status }}</span>
+            <template>
+              <span slot="reference">
+                <span
+                  v-if="scope.row.status == '待执行'"
+                  class="executory"
+                ></span>
+                <span
+                  v-if="scope.row.status == '执行中'"
+                  class="inExecution"
+                ></span>
+                <span v-if="scope.row.status == '已完成'" class="done"></span
+                >{{ scope.row.status }}
+              </span>
             </template>
             <div>
-              <p>操作历史</p>
-              <div v-for="(item, index) in historyList">
-                <div class="vertical-circle"></div>
+              <p style="margin-top: 0; padding-left: 10px">操作历史</p>
+              <div v-for="(item, index) in historyList" class="flex">
+                <div class="vertical-text vertical-text-left">
+                  {{ item.updateDate }}
+                </div>
+                <div>
+                  <div class="vertical-circle"></div>
+                  <div
+                    v-if="index != historyList.length - 1"
+                    class="vertical-line"
+                  ></div>
+                </div>
                 <div class="vertical-text">
-                  {{ item.operateUser }}{{ item.dealMsg }}<br />{{
-                    item.updateDate
-                  }}
+                  {{ item.operateUser }}<br />{{ item.dealMsg }}
                 </div>
-                <div
-                  v-if="index != historyList.length - 1"
-                  class="vertical-line"
-                ></div>
               </div>
             </div>
           </el-popover>
-          <i class="el-icon-edit" @click="editClick(scope.row)"></i>
+          <img
+            width="17"
+            height="18"
+            style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/edit.png"
+            @click="editClick(scope.row)"
+            alt=""
+          />
+          <!-- <i class="el-icon-edit" @click="editClick(scope.row)"></i> -->
         </template>
       </el-table-column>
       <el-table-column prop="signingDate" label="签订日期"> </el-table-column>
@@ -128,23 +190,51 @@
       </el-table-column>
       <el-table-column prop="addressUrl" label="附件">
         <template slot-scope="scope">
-          <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i>
+          <img
+            width="18"
+            height="20"
+            style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/fujian.png"
+            @click="fujian(scope.row)"
+            alt=""
+          />
+          <span v-if="scope.row.addressUrlArray.length > 0">{{
+            scope.row.addressUrlArray.length
+          }}</span>
+          <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
         </template>
       </el-table-column>
-      <el-table-column prop="address" label="操作" width="300">
+      <el-table-column prop="address" label="操作" width="200">
         <template slot-scope="scope">
-          <el-button
-            type="success"
-            size="small"
+          <img
+            width="16"
+            height="16"
+            style="vertical-align: text-top; margin: 0 6px"
+            src="../../../public/img/chakan.png"
             @click="handleExamine(scope.row)"
-            >查看</el-button
-          >
-          <el-button type="primary" size="small" @click="handleEdit(scope.row)"
-            >编辑</el-button
-          >
-          <el-button type="danger" size="small" @click="handleDelete(scope.row)"
-            >删除</el-button
-          >
+            alt=""
+          />
+          <img
+            width="17"
+            height="16"
+            style="vertical-align: text-top; margin: 0 6px"
+            src="../../../public/img/bianji.png"
+            @click="handleEdit(scope.row)"
+            alt=""
+          />
+          <img
+            width="16"
+            height="17"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: -1px;
+              margin: 0 6px;
+            "
+            src="../../../public/img/shanchu.png"
+            @click="handleDelete(scope.row)"
+            alt=""
+          />
         </template>
       </el-table-column>
     </el-table>
@@ -250,6 +340,52 @@ export default {
         { value: '已完成', type: 2 },
         { value: '全部合同', type: '' },
       ],
+      pickerOptions: {
+        shortcuts: [
+          {
+            text: '本周',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              var thisDay = start.getDay()
+              var thisDate = start.getDate()
+              if (thisDay != 0) {
+                start.setDate(thisDate - thisDay)
+              }
+              picker.$emit('pick', [start, end])
+            },
+          },
+          {
+            text: '本月',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setDate(1)
+              picker.$emit('pick', [start, end])
+            },
+          },
+          {
+            text: '本季度',
+            onClick(picker) {
+              var oDate = new Date()
+
+              var thisYear = oDate.getFullYear()
+              var thisMonth = oDate.getMonth() + 1
+
+              var n = Math.ceil(thisMonth / 3) // 季度
+
+              var Month = n * 3 - 1
+
+              var start = new Date(thisYear, Month - 2, 1)
+              var end = new Date()
+
+              picker.$emit('pick', [start, end])
+            },
+          },
+        ],
+      },
+      value1: '',
+      value2: '',
     }
   },
   activated() {
@@ -260,14 +396,38 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    dateFormat(fmt, date) {
+      let ret
+      const opt = {
+        'Y+': date.getFullYear().toString(), // 年
+        'm+': (date.getMonth() + 1).toString(), // 月
+        'd+': date.getDate().toString(), // 日
+        'H+': date.getHours().toString(), // 时
+        // "M+": date.getMinutes().toString(),         // 分
+        // "S+": date.getSeconds().toString()          // 秒
+        // 有其他格式化字符需求可以继续添加,必须转化成字符串
+      }
+      for (let k in opt) {
+        ret = new RegExp('(' + k + ')').exec(fmt)
+        if (ret) {
+          fmt = fmt.replace(
+            ret[1],
+            ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+          )
+        }
+      }
+      return fmt
+    },
     handleClose() {
       this.accessoryTFs = false
     },
     handleSizeChange(val) {
       console.log(`每页 ${val} 条`)
+      this.pageSize = val
       this.getList()
     },
     handleCurrentChange(val) {
+      this.currentPage = val
       console.log(`当前页: ${val}`)
       this.getList()
     },
@@ -285,6 +445,15 @@ export default {
       })
         .toPromise()
         .then((response) => {
+          for (var i = 0; i < response.records.length; i++) {
+            if (response.records[i].addressUrl != null) {
+              response.records[i].addressUrlArray = response.records[
+                i
+              ].addressUrl.split(',')
+            } else {
+              response.records[i].addressUrlArray = []
+            }
+          }
           this.deptCircularPage.currentPage = response.current
           this.deptCircularPage.pageSize = response.size
           this.deptBudgetTotal = response.total
@@ -308,13 +477,11 @@ export default {
         status = '执行中'
       } else if (row.status == '执行中') {
         status = '已完成'
-        
       }
       this.$confirm(`是否将状态改为${status}`, '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning',
-      
       })
         .then(() => {
           editstatus({ id: row.id })
@@ -359,7 +526,7 @@ export default {
       console.log(row)
       this.$router.push({
         name: 'purchaseContractExamine',
-        params: { id: row.id },
+        query: { id: row.id, status: row.status },
       })
     },
     handleAdd() {
@@ -384,6 +551,9 @@ export default {
         })
     },
     find() {
+      this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
+      this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
+      this.currentPage = 1
       this.getList()
     },
     async exportlist() {
@@ -411,23 +581,20 @@ export default {
     },
     // deletecontract(){},
     //删除
-   handleDelete(row){
-    var handleDelete = ' '//sfdkd
+    handleDelete(row) {
+      var handleDelete = ' ' //sfdkd
       if (row.handleDelete == '待执行' || row.handleDelete == '已完成') {
-       handleDelete = '执行中'
+        handleDelete = '执行中'
       } else if (row.handleDelete == '执行中') {
         handleDelete = '已完成'
-        
       }
       this.$confirm(`合同删除后不可恢复,是否继续删除?`, '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning',
-      
       })
         .then(() => {
-          
-          deletecontract({id: row.id })
+          deletecontract({ id: row.id })
             .toPromise()
             .then((response) => {
               this.$notify.success({
@@ -443,13 +610,83 @@ export default {
         .catch(() => {
           return false
         })
-    }
-
-    
+    },
   },
 }
 </script>
 <style lang="scss" scoped>
+.vertical-text-left {
+  width: 62px;
+  text-align: right;
+}
+.flex {
+  display: flex;
+}
+.el-range-editor.el-input__inner {
+  margin-left: 10px;
+}
+/deep/.base_header_layout .grid-content.right .find.el-button--primary {
+  width: 30px;
+  margin-left: -10px;
+  border-top-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-button--default {
+  border: 1px solid #5473e8;
+  color: #5473e8;
+}
+.warning {
+  width: 100%;
+  height: 2px;
+  background: red;
+}
+.executory,
+.inExecution,
+.done {
+  width: 6px;
+  height: 6px;
+  display: inline-block;
+  border-radius: 50%;
+  position: relative;
+  top: -1px;
+}
+.executory {
+  background: #ff9f24;
+}
+.inExecution {
+  background: #5878e8;
+}
+.done {
+  background: #50cad4;
+}
+.top-grade {
+  background: linear-gradient(90deg, #5678e9, #7993f6);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.second-class {
+  background: linear-gradient(90deg, #50cdd9, #82e2ea);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.third-class {
+  background: linear-gradient(90deg, #ffa735, #ffbf70);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.substandard {
+  background: linear-gradient(90deg, #b2b4bb, #ced0d5);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
 .wrap {
   width: 400px;
   position: absolute;
@@ -460,8 +697,9 @@ export default {
 }
 .vertical-line {
   height: 100px;
-  border-left: 2px solid;
+  border-left: 2px solid #e9ecf7;
   margin-left: 4px;
+  padding: 0 3px;
   // border-image: -webkit-linear-gradient(#00eba7, #08b8e6) 30 30;
   // border-image: -moz-linear-gradient(#00eba7, #08b8e6) 30 30;
   // border-image: linear-gradient(#00eba7, #08b8e6) 30 30;
@@ -469,22 +707,31 @@ export default {
 .el-pagination {
   padding: 10px 15px;
   margin-bottom: 0;
-  text-align: right;
+  text-align: center;
+}
+/deep/.el-pager li.active {
+  color: #5878e8;
+  cursor: default;
+}
+/deep/.el-pager li:hover {
+  color: #5878e8;
+  cursor: default;
 }
 .vertical-circle {
-  float: left;
   width: 10px;
   height: 10px;
-  border: 2px solid white;
-  background-color: #08b8e6;
+  border: 2px solid #5878e8;
+  background-color: #ffffff;
   -webkit-border-radius: 100px;
 }
 .vertical-circle:first-child {
   color: red;
 }
 .vertical-text {
-  float: left;
-  margin-top: -7px;
+  margin: 0 10px;
+  color: #8890b1;
+  font-size: 12px;
+  margin-top: -4px;
 }
 /deep/.el-table .el-table__header .cell,
 /deep/.el-table .el-table__body .cell {
@@ -540,6 +787,10 @@ export default {
 .findValue {
   margin: 0 10px;
 }
+/deep/.findValue .el-input__inner {
+  border-top-right-radius: 0px;
+  border-bottom-right-radius: 0px;
+}
 .button-container {
   display: flex;
   flex-wrap: nowrap;

+ 187 - 178
src/views/contractManagement/purchaseContractAdd.vue

@@ -4,7 +4,7 @@
   <div class="container">
     <el-row>
       <el-col :span="12">
-        <h2 class="bg-left">创建销售合同</h2>
+        <h2 class="bg-left">创建采购合同</h2>
       </el-col>
       <el-col :span="12" class="bg-right">
         <el-button
@@ -24,7 +24,9 @@
     >
       <div class="remark">
         <h3>基本信息</h3>
-        <p>注:基本信息和货物信息均为必填项,“*” 标记的条目提交后不可修改。</p>
+        <p style="color: #8890b1">
+          注:基本信息和货物信息均为必填项,“*” 标记的条目提交后不可修改。
+        </p>
       </div>
       <ws-info-table>
         <ws-form-item label="合同编号" span="1" prop="contractNo">
@@ -235,185 +237,183 @@
           />
         </ws-form-item>
       </ws-info-table>
-      <base-card>
-        <!--面试信息-->
-        <div class="remark">
-          <h3>货物信息</h3>
-        </div>
-        <ws-info-table>
-          <ws-form-item label="货名" span="1" prop="goodsName">
-            <ws-select
-              v-model="deptBudgetList.contractGoodsInfo.goodsName"
-              placeholder=""
-              class="typeselect"
-              @change="selectgoodsName"
-            >
-              <ws-option
-                v-for="item in goodnameList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
-            </ws-select>
-          </ws-form-item>
-          <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
-            <ws-input
-              v-model="deptBudgetList.contractGoodsInfo.waterContent"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item label="品级" span="1" prop="grade">
-            <ws-select
-              v-model="deptBudgetList.contractGoodsInfo.grade"
-              placeholder=""
-              class="typeselect"
-              @change="selectgrade"
-            >
-              <ws-option
-                v-for="item in gradeList"
-                :key="item.constValue"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
-            </ws-select>
-          </ws-form-item>
-          <ws-form-item label="杂质(%)<=" span="1" prop="interviewDates">
-            <ws-input
-              v-model="deptBudgetList.contractGoodsInfo.impurity"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item label="容重(克/升)<=" span="1" prop="interviewType">
-            <ws-input
-              v-model="deptBudgetList.contractGoodsInfo.bulkDensity"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item
-            label="霉变粒(%)<="
-            span="1"
-            prop="mildewGrain"
-            class="result"
+      <!--面试信息-->
+      <div class="remark">
+        <h3>货物信息</h3>
+      </div>
+      <ws-info-table>
+        <ws-form-item label="货名" span="1" prop="goodsName">
+          <ws-select
+            v-model="deptBudgetList.contractGoodsInfo.goodsName"
+            placeholder=""
+            class="typeselect"
+            @change="selectgoodsName"
           >
-            <ws-input
-              v-model="deptBudgetList.contractGoodsInfo.mildewGrain"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
-            <ws-input
-              v-model="deptBudgetList.contractGoodsInfo.jiaorenli"
-              maxlength="100"
-              size="small"
+            <ws-option
+              v-for="item in goodnameList"
+              :key="item.constKey"
+              :label="item.constValue"
+              :value="item.constValue"
             />
-          </ws-form-item>
-          <ws-form-item
-            label="不完善粒(%)<="
-            span="1"
-            prop="imperfectGrain"
-            class="result"
+          </ws-select>
+        </ws-form-item>
+        <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
+          <ws-input
+            v-model="deptBudgetList.contractGoodsInfo.waterContent"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <ws-form-item label="品级" span="1" prop="grade">
+          <ws-select
+            v-model="deptBudgetList.contractGoodsInfo.grade"
+            placeholder=""
+            class="typeselect"
+            @change="selectgrade"
           >
-            <ws-input
-              v-model="deptBudgetList.contractGoodsInfo.imperfectGrain"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-        </ws-info-table>
-        <div class="remark">
-          <h3>流程信息</h3>
-        </div>
-        <ws-info-table>
-          <ws-form-item label="合同收入(元)" span="1" prop="goodsNameKey">
-            <ws-input
-              v-model="deptBudgetList.contractProcessInfo.goodsNameKey"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
-            <ws-input
-              v-model="deptBudgetList.contractProcessInfo.goodsName"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
-            <ws-input
-              v-model="deptBudgetList.contractProcessInfo.waterContent"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item label="未开发票(元)" span="1" prop="impurity">
-            <ws-input
-              v-model="deptBudgetList.contractProcessInfo.impurity"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item label="未回款(元)" span="1" prop="mildewGrain">
-            <ws-input
-              v-model="deptBudgetList.contractProcessInfo.mildewGrain"
-              maxlength="100"
-              size="small"
+            <ws-option
+              v-for="item in gradeList"
+              :key="item.constValue"
+              :label="item.constValue"
+              :value="item.constValue"
             />
-          </ws-form-item>
-          <ws-form-item
-            label="已完成发运量(吨)"
-            span="1"
-            prop="Prettier"
-            class="imperfectGrain"
+          </ws-select>
+        </ws-form-item>
+        <ws-form-item label="杂质(%)<=" span="1" prop="interviewDates">
+          <ws-input
+            v-model="deptBudgetList.contractGoodsInfo.impurity"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <ws-form-item label="容重(克/升)<=" span="1" prop="interviewType">
+          <ws-input
+            v-model="deptBudgetList.contractGoodsInfo.bulkDensity"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <ws-form-item
+          label="霉变粒(%)<="
+          span="1"
+          prop="mildewGrain"
+          class="result"
+        >
+          <ws-input
+            v-model="deptBudgetList.contractGoodsInfo.mildewGrain"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+          <ws-input
+            v-model="deptBudgetList.contractGoodsInfo.jiaorenli"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <ws-form-item
+          label="不完善粒(%)<="
+          span="1"
+          prop="imperfectGrain"
+          class="result"
+        >
+          <ws-input
+            v-model="deptBudgetList.contractGoodsInfo.imperfectGrain"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+      </ws-info-table>
+      <div class="remark">
+        <h3>流程信息</h3>
+      </div>
+      <ws-info-table>
+        <ws-form-item label="合同收入(元)" span="1" prop="goodsNameKey">
+          <ws-input
+            v-model="deptBudgetList.contractProcessInfo.goodsNameKey"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+          <ws-input
+            v-model="deptBudgetList.contractProcessInfo.goodsName"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
+          <ws-input
+            v-model="deptBudgetList.contractProcessInfo.waterContent"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <ws-form-item label="未开发票(元)" span="1" prop="impurity">
+          <ws-input
+            v-model="deptBudgetList.contractProcessInfo.impurity"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <ws-form-item label="未回款(元)" span="1" prop="mildewGrain">
+          <ws-input
+            v-model="deptBudgetList.contractProcessInfo.mildewGrain"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <ws-form-item
+          label="已完成发运量(吨)"
+          span="1"
+          prop="Prettier"
+          class="imperfectGrain"
+        >
+          <ws-input
+            v-model="deptBudgetList.contractProcessInfo.imperfectGrain"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <ws-form-item label="双章原件回收情况" span="1" prop="grade">
+          <ws-select
+            v-model="deptBudgetList.contractProcessInfo.grade"
+            placeholder=""
+            class="typeselect"
+            @change="selectChapterTwo"
           >
-            <ws-input
-              v-model="deptBudgetList.contractProcessInfo.imperfectGrain"
-              maxlength="100"
-              size="small"
+            <ws-option
+              v-for="item in ChapterTwoList"
+              :key="item.constValue"
+              :label="item.constValue"
+              :value="item.constValue"
             />
-          </ws-form-item>
-          <ws-form-item label="双章原件回收情况" span="1" prop="grade">
-            <ws-select
-              v-model="deptBudgetList.contractProcessInfo.grade"
-              placeholder=""
-              class="typeselect"
-              @change="selectChapterTwo"
-            >
-              <ws-option
-                v-for="item in ChapterTwoList"
-                :key="item.constValue"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
-            </ws-select>
-          </ws-form-item>
-        </ws-info-table>
-        <div class="remark">
-          <h3>备注信息</h3>
-        </div>
-        <ws-input
-          v-model="deptBudgetList.remarks"
-          type="textarea"
-          row="3"
-          placeholder="请输入备注信息,不超过200字"
-          maxlength="200"
-        />
-        <ws-upload
-          ref="upload"
-          table-name="maintain_work_order"
-          oss-key="mainPlan"
-          :comp-id="compId"
-          :appendix-ids="appendixIdsAdd"
-          :vesselId="deptBudgetList.addressUrl"
-          :size-limit="size"
-          @uploadSuccess="uploadSuccess"
-          @onChange="onChange"
-          accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
-        />
-      </base-card>
+          </ws-select>
+        </ws-form-item>
+      </ws-info-table>
+      <div class="remark">
+        <h3>备注信息</h3>
+      </div>
+      <ws-input
+        v-model="deptBudgetList.remarks"
+        type="textarea"
+        row="3"
+        placeholder="请输入备注信息,不超过200字"
+        maxlength="200"
+      />
+      <ws-upload
+        ref="upload"
+        table-name="maintain_work_order"
+        oss-key="mainPlan"
+        :comp-id="compId"
+        :appendix-ids="appendixIdsAdd"
+        :vesselId="deptBudgetList.addressUrl"
+        :size-limit="size"
+        @uploadSuccess="uploadSuccess"
+        @onChange="onChange"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+      />
     </ws-form>
     <div style="text-align: right; padding: 10px">
       <el-button class="bg-bottom" type="primary" size="small" @click="submit()"
@@ -435,7 +435,7 @@ import {
 import WsUpload from '@/components/WsUpload'
 export default {
   name: 'viewSpareMoney',
-   components: {
+  components: {
     WsUpload,
   },
   watch: {
@@ -449,7 +449,7 @@ export default {
       this.loaddata()
     },
   },
- 
+
   data() {
     return {
       //弹出框
@@ -476,7 +476,12 @@ export default {
         contractProcessInfo: {},
       },
       appendixIdsAdd: '',
-      mainReportAdd: {},
+      mainReportAdd: {
+        contractNo: [
+          { required: true, message: '请输入活动名称', trigger: 'blur' },
+          { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' },
+        ],
+      },
       trainingMethods: {},
       pickerBeginDateBefore: {
         disabledDate: (time) => {
@@ -719,6 +724,10 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 140px;
+  text-align: center;
+}
 .ws-upload {
   margin-top: 20px;
 }

+ 4 - 0
src/views/contractManagement/purchaseContractEdit.vue

@@ -671,6 +671,10 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 140px;
+  text-align: center;
+}
 .el-form {
   padding: 0 20%;
 }

+ 113 - 203
src/views/contractManagement/purchaseContractExamine.vue

@@ -1,10 +1,12 @@
 <!--销售合同-->
 <!--2019年5月30日 20:25:16 by jlx-->
 <template>
-  <div class='container'>
+  <div class="container">
     <el-row>
       <el-col :span="12">
-        <h2 class="bg-left">查看合同详情</h2>
+        <h2 class="bg-left">
+          查看合同详情<span>状态:{{ status }}</span>
+        </h2>
       </el-col>
       <el-col :span="12" class="bg-right">
         <el-button
@@ -16,169 +18,95 @@
         >
       </el-col>
     </el-row>
-   
+
     <ws-form
       ref="deptBudgetList"
       :rules="mainReportAdd"
       :model="deptBudgetList"
     >
       <div class="remark">
-      <h3>基本信息</h3>
+        <h3>基本信息</h3>
       </div>
-        <ws-info-table>
-          <ws-form-item
-            label="合同编号"
-            span="1"
-            prop="contractNo"
-          >
-          {{deptBudgetList.contractNo}}
-          </ws-form-item>
-          <ws-form-item
-            label="运输方式"
-            span="1"
-            prop="shippingType"
-          >
-          {{deptBudgetList.shippingType}}
-          </ws-form-item>
-          <ws-form-item
-            label="买方"
-            span="1"
-            prop="buyer"
-          >
-          {{deptBudgetList.buyer}}
-          </ws-form-item>
-          <ws-form-item
-            label="结算方式"
-            span="1"
-            prop="settlementMethod"
-          >{{deptBudgetList.settlementMethod}}
-          </ws-form-item>
-          <ws-form-item
-            label="卖方"
-            span="1"
-            prop="seller"
-          >{{deptBudgetList.seller}}
-          </ws-form-item>
-          <ws-form-item
-            label="货源地"
-            span="1"
-            prop="sourceGoods"
-          >{{deptBudgetList.sourceGoods}}
-          </ws-form-item>
-          <ws-form-item
-            label="买方电话"
-            span="1"
-            prop="buyerPhone"
-          >{{deptBudgetList.buyerPhone}}
-          </ws-form-item>
-          <ws-form-item
-            label="交货地"
-            span="1"
-            prop="placeDelivery">
-            {{deptBudgetList.placeDelivery}}
-          </ws-form-item>
-           <ws-form-item
-            label="卖方电话"
-            span="1"
-            prop="sellerPhone">
-            {{deptBudgetList.sellerPhone}}
-          </ws-form-item>
-          <ws-form-item
-            label="包装方式"
-            span="1"
-            prop="packingMethod">
-            {{deptBudgetList.packingMethod}}
-          </ws-form-item>
-          <ws-form-item
-            label="重量(吨)"
-            span="1"
-            prop="weight">
-            {{deptBudgetList.weight}}
-          </ws-form-item>
-          <ws-form-item
-            label="验收方式"
-            span="1"
-            prop="acceptanceMethod">
-            {{deptBudgetList.acceptanceMethod}}
-          </ws-form-item>
-          <ws-form-item
-            label="溢短装(%)"
-            span="1"
-            prop="overShort">
-            {{deptBudgetList.overShort}}
-          </ws-form-item>
-          <ws-form-item
-            label="交货日期(起)"
-            span="1"
-            prop="deliveryDateStart">
-            {{deptBudgetList.deliveryDateStart}}
-          </ws-form-item>
-          <ws-form-item
-            label="合同单价(元/吨)"
-            span="1"
-            prop="unitContractPrice">
-            {{deptBudgetList.unitContractPrice}}
-          </ws-form-item>
-          <ws-form-item
-            label="交货日期(止)"
-            span="1"
-            prop="deliveryDateEnd">
-            {{deptBudgetList.deliveryDateEnd}}
-          </ws-form-item>
-          <ws-form-item
-            label="合同总价(元)"
-            span="1"
-            prop="totalContractPrice">
-            {{deptBudgetList.totalContractPrice}}
-          </ws-form-item>
-          <ws-form-item
-            label="签订日期"
-            span="1"
-            prop="signingDate">
-            {{deptBudgetList.signingDate}}
-          </ws-form-item>
-        </ws-info-table>
+      <ws-info-table>
+        <ws-form-item label="合同编号" span="1" prop="contractNo">
+          {{ deptBudgetList.contractNo }}
+        </ws-form-item>
+        <ws-form-item label="运输方式" span="1" prop="shippingType">
+          {{ deptBudgetList.shippingType }}
+        </ws-form-item>
+        <ws-form-item label="买方" span="1" prop="buyer">
+          {{ deptBudgetList.buyer }}
+        </ws-form-item>
+        <ws-form-item label="结算方式" span="1" prop="settlementMethod"
+          >{{ deptBudgetList.settlementMethod }}
+        </ws-form-item>
+        <ws-form-item label="卖方" span="1" prop="seller"
+          >{{ deptBudgetList.seller }}
+        </ws-form-item>
+        <ws-form-item label="货源地" span="1" prop="sourceGoods"
+          >{{ deptBudgetList.sourceGoods }}
+        </ws-form-item>
+        <ws-form-item label="买方电话" span="1" prop="buyerPhone"
+          >{{ deptBudgetList.buyerPhone }}
+        </ws-form-item>
+        <ws-form-item label="交货地" span="1" prop="placeDelivery">
+          {{ deptBudgetList.placeDelivery }}
+        </ws-form-item>
+        <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
+          {{ deptBudgetList.sellerPhone }}
+        </ws-form-item>
+        <ws-form-item label="包装方式" span="1" prop="packingMethod">
+          {{ deptBudgetList.packingMethod }}
+        </ws-form-item>
+        <ws-form-item label="重量(吨)" span="1" prop="weight">
+          {{ deptBudgetList.weight }}
+        </ws-form-item>
+        <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+          {{ deptBudgetList.acceptanceMethod }}
+        </ws-form-item>
+        <ws-form-item label="溢短装(%)" span="1" prop="overShort">
+          {{ deptBudgetList.overShort }}
+        </ws-form-item>
+        <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
+          {{ deptBudgetList.deliveryDateStart }}
+        </ws-form-item>
+        <ws-form-item
+          label="合同单价(元/吨)"
+          span="1"
+          prop="unitContractPrice"
+        >
+          {{ deptBudgetList.unitContractPrice }}
+        </ws-form-item>
+        <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+          {{ deptBudgetList.deliveryDateEnd }}
+        </ws-form-item>
+        <ws-form-item label="合同总价(元)" span="1" prop="totalContractPrice">
+          {{ deptBudgetList.totalContractPrice }}
+        </ws-form-item>
+        <ws-form-item label="签订日期" span="1" prop="signingDate">
+          {{ deptBudgetList.signingDate }}
+        </ws-form-item>
+      </ws-info-table>
       <base-card>
-      
-      <!--面试信息-->
-      <div class="remark">
-      <h3>货物信息</h3>
-    </div>
+        <!--面试信息-->
+        <div class="remark">
+          <h3>货物信息</h3>
+        </div>
         <ws-info-table>
-          <ws-form-item
-            label="货名"
-            span="1"
-            prop="waterContent"
-          >
-          {{deptBudgetList.contractGoodsInfo.goodsName}}
+          <ws-form-item label="货名" span="1" prop="waterContent">
+            {{ deptBudgetList.contractGoodsInfo.goodsName }}
           </ws-form-item>
-          <ws-form-item
-            label="水分(%)<="
-            span="1"
-            prop="intendedShipId"
-          >
-          {{deptBudgetList.contractGoodsInfo.waterContent}}
+          <ws-form-item label="水分(%)<=" span="1" prop="intendedShipId">
+            {{ deptBudgetList.contractGoodsInfo.waterContent }}
           </ws-form-item>
-          <ws-form-item
-            label="品级"
-            span="1"
-            prop="grade"
-          >
-           {{deptBudgetList.contractGoodsInfo.grade}}
+          <ws-form-item label="品级" span="1" prop="grade">
+            {{ deptBudgetList.contractGoodsInfo.grade }}
           </ws-form-item>
-          <ws-form-item
-            label="杂质(%)<="
-            span="1"
-            prop="impurity"
-          >
-          {{deptBudgetList.contractGoodsInfo.impurity}}
+          <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+            {{ deptBudgetList.contractGoodsInfo.impurity }}
           </ws-form-item>
-          <ws-form-item
-            label="容重(克/升)<="
-            span="1"
-            prop="bulkDensity"
-          >
-          {{deptBudgetList.contractGoodsInfo.bulkDensity}}
+          <ws-form-item label="容重(克/升)<=" span="1" prop="bulkDensity">
+            {{ deptBudgetList.contractGoodsInfo.bulkDensity }}
           </ws-form-item>
           <ws-form-item
             label="霉变粒(%)<="
@@ -186,14 +114,10 @@
             prop="mildewGrain"
             class="result"
           >
-            {{deptBudgetList.contractGoodsInfo.mildewGrain}}
+            {{ deptBudgetList.contractGoodsInfo.mildewGrain }}
           </ws-form-item>
-           <ws-form-item
-            label="热损伤(%)<="
-            span="1"
-            prop="jiaorenli"
-          >
-            {{deptBudgetList.contractGoodsInfo.jiaorenli}}
+          <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+            {{ deptBudgetList.contractGoodsInfo.jiaorenli }}
           </ws-form-item>
           <ws-form-item
             label="不完善粒(%)<="
@@ -201,74 +125,54 @@
             prop="imperfectGrain"
             class="result"
           >
-            {{deptBudgetList.contractGoodsInfo.imperfectGrain}}
+            {{ deptBudgetList.contractGoodsInfo.imperfectGrain }}
           </ws-form-item>
         </ws-info-table>
         <div class="remark">
           <h3>流程信息</h3>
         </div>
         <ws-info-table>
-          <ws-form-item
-            label="合同收入(元)"
-            span="1"
-            prop="goodsNameKey"
-          >
-          {{deptBudgetList.contractProcessInfo.goodsNameKey}}
+          <ws-form-item label="合同收入(元)" span="1" prop="goodsNameKey">
+            {{ deptBudgetList.contractProcessInfo.goodsNameKey }}
           </ws-form-item>
-          <ws-form-item
-            label="已开发票(元)"
-            span="1"
-            prop="goodsName"
-          >
-          {{deptBudgetList.contractProcessInfo.goodsName}}
+          <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+            {{ deptBudgetList.contractProcessInfo.goodsName }}
           </ws-form-item>
-          <ws-form-item
-            label="费用支出(元)"
-            span="1"
-            prop="waterContent"
-          >{{deptBudgetList.contractProcessInfo.waterContent}}
+          <ws-form-item label="费用支出(元)" span="1" prop="waterContent"
+            >{{ deptBudgetList.contractProcessInfo.waterContent }}
           </ws-form-item>
-          <ws-form-item
-            label="未开发票(元)"
-            span="1"
-            prop="impurity"
-          >{{deptBudgetList.contractProcessInfo.impurity}}
+          <ws-form-item label="未开发票(元)" span="1" prop="impurity"
+            >{{ deptBudgetList.contractProcessInfo.impurity }}
           </ws-form-item>
-          <ws-form-item
-            label="未回款(元)"
-            span="1"
-            prop="mildewGrain"
-          >{{deptBudgetList.contractProcessInfo.mildewGrain}}
+          <ws-form-item label="未回款(元)" span="1" prop="mildewGrain"
+            >{{ deptBudgetList.contractProcessInfo.mildewGrain }}
           </ws-form-item>
           <ws-form-item
             label="已完成发运量(吨)"
             span="1"
             prop="imperfectGrain"
             class="result"
-          >{{deptBudgetList.contractProcessInfo.imperfectGrain}}
+            >{{ deptBudgetList.contractProcessInfo.imperfectGrain }}
           </ws-form-item>
-           <ws-form-item
-            label="双章原件回收情况"
-            span="1"
-            prop="grade"
-          >{{deptBudgetList.contractProcessInfo.grade}}
+          <ws-form-item label="双章原件回收情况" span="1" prop="grade"
+            >{{ deptBudgetList.contractProcessInfo.grade }}
           </ws-form-item>
         </ws-info-table>
         <div class="remark">
           <h3>备注信息</h3>
         </div>
-        {{deptBudgetList.remarks}}
-        <img :src="deptBudgetList.addressUrl" alt="">
+        {{ deptBudgetList.remarks }}
+        <img :src="deptBudgetList.addressUrl" alt="" />
       </base-card>
     </ws-form>
-    <div style='text-align:right;padding:10px;'>
+    <div style="text-align: right; padding: 10px">
       <el-button
-          class="bg-bottom"
-          type="primary"
-          size="small"
-          @click="returnsales()"
-          >关闭</el-button
-        >
+        class="bg-bottom"
+        type="primary"
+        size="small"
+        @click="returnsales()"
+        >关闭</el-button
+      >
     </div>
   </div>
 </template>
@@ -306,6 +210,7 @@ export default {
       showType: true,
       // 年
       year: '',
+      status: '',
       // 提交类型
       submitType: true,
       tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
@@ -320,13 +225,14 @@ export default {
   },
 
   activated() {
+    this.status = this.$route.query.status
     this.loaddata()
     this.showType = this.isShow
   },
   methods: {
     loaddata() {
       // 数据
-      examineList({ id: this.$route.params.id })
+      examineList({ id: this.$route.query.id })
         .toPromise()
         .then((response) => {
           this.deptBudgetList = response
@@ -392,6 +298,10 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 140px;
+  text-align: center;
+}
 .el-form {
   padding: 0 20%;
 }

+ 50 - 15
src/views/contractManagement/salesContract.vue

@@ -90,6 +90,16 @@
       <el-table-column prop="buyer" label="买方"> </el-table-column>
       <el-table-column prop="seller" label="卖方"> </el-table-column>
       <el-table-column prop="imperfectGrain" label="已完成(吨)">
+        <template slot-scope="scope">
+          <span v-if="scope.row.proportion >= 90" style="color: red">{{
+            scope.row.imperfectGrain
+          }}</span>
+          <span
+            v-if="scope.row.proportion < 90"
+            style="color: #5473e8; font-weight: 600"
+            >{{ scope.row.imperfectGrain }}</span
+          >
+        </template>
       </el-table-column>
       <el-table-column prop="status" label="状态">
         <template slot-scope="scope">
@@ -238,7 +248,9 @@ export default {
       contractForm: {},
       categoryIndex: 0,
       rulesVendor: {},
-
+      deptBudgetTotal: 0,
+      size: 10,
+      compId: sessionStorage.getItem('ws-pf_compId'),
       deptBudgetTotal:{},
       handleSizeChange:{},
       handleCurrentChange:{},
@@ -247,7 +259,11 @@ export default {
  
       deptCircularPage: {},
       accessoryTFs: false,
-      // pickerBeginDateBefore: {},
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
       tableData: [],
       taskTypeList: [
         { value: '未完成', type: 1 },
@@ -256,7 +272,6 @@ export default {
         { value: '全部合同', type: '' },
       ],
       deptBudgetList: {
-        compId: sessionStorage.getItem('ws-pf_compId'),
         seafarerName: '',
         crtDutyId: '',
         crtDutyName: '',
@@ -282,7 +297,6 @@ export default {
     this.deletecontract()
     this.getList()
     this.showType = this.isShow
-    console.log(11111)
   },
 
 
@@ -298,9 +312,18 @@ export default {
           this.historyList = response
         })
     },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
     uploadSuccess(data, files, url) {
       console.log(data, files, url)
-
       // this.deptBudgetList.
       // this.formData.append('files', files)
       // this.feedbackObj.uploadNameAttachment = data.appendixName
@@ -330,6 +353,21 @@ export default {
       })
         .toPromise()
         .then((response) => {
+          for (var i = 0; i < response.records.length; i++) {
+            if (
+              response.records[i].imperfectGrain != '' &&
+              response.records[i].weight != ''
+            ) {
+              response.records[i].proportion =
+                Math.floor(
+                  (response.records[i].imperfectGrain /
+                    response.records[i].weight) *
+                    10000
+                ) / 100
+            } else {
+              response.records[i].proportion = 0
+            }
+          }
           this.tableData = response
           this.deptCircularPage.currentPage = response.current
           this.deptCircularPage.pageSize = response.size
@@ -353,7 +391,7 @@ export default {
       }
     },
     find() {
-      console.log(this)
+      this.currentPage = 1
       this.getList()
     },
      async exportlist() {
@@ -430,7 +468,7 @@ export default {
       console.log(row)
       this.$router.push({
         name: 'salesContractExamine',
-        params: { id: row.id },
+        query: { id: row.id, status: row.status },
       })
     },
     handleAdd() {
@@ -446,8 +484,7 @@ export default {
     handleEdit(row) {
       this.$router.push({
         name: 'salesContractEdit',
-
-        params: { id: row.id },
+        query: { id: row.id },
       })
     },
 
@@ -456,12 +493,6 @@ export default {
     total() {},
     clearfiltQuery() {},
     selectCrtDuty() {},
-    pickerBeginDateBefore: {
-      disabledDate: (time) => {
-        return time.getTime() > Date.now()
-      },
-    },
-
     handleDelete(row) {
       var handleDelete = ''
       if (row.handleDelete == '待执行' || row.handleDelete == '已完成') {
@@ -685,4 +716,8 @@ export default {
     padding: 0 !important;
   }
 }
+/deep/.el-table .el-table__header .cell,
+/deep/.el-table .el-table__body .cell {
+  text-align: center;
+}
 </style>

+ 4 - 0
src/views/contractManagement/salesContractAdd.vue

@@ -970,6 +970,10 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 140px;
+  text-align: center;
+}
 .button-container {
   display: flex;
   flex-wrap: nowrap;

+ 30 - 22
src/views/contractManagement/salesContractEdit.vue

@@ -32,13 +32,12 @@
         <ws-info-table>
           <!--合同编号-->
           <ws-form-item label="合同编号" span="1" prop="contractNo">
+
             
            <div class="unchanged">
            {{deptBudgetList.contractNo}} 
            </div>
                <span class='unchangeable'>*</span>
-            
-            
           </ws-form-item>
 
           <!--运输方式-->
@@ -57,7 +56,6 @@
             {{deptBudgetList.buyer}}
             </div>
              <span class="unchangeable">*</span>
-
           </ws-form-item>
 
           <!--结算方式-->
@@ -72,10 +70,12 @@
 
           <!--卖方-->
           <ws-form-item label="卖方" span="1" prop="contractNo">
+
            <div  class="unchanged">
             {{deptBudgetList.seller}}
             </div>
            <span class="unchangeable">*</span>
+
           </ws-form-item>
 
           <!--货源地-->
@@ -527,10 +527,15 @@
 <script>
 // import { getVesselOne } from '@/model/procurement/basic'
 // import { dayjs } from 'base-core-lib'
-import { examineList, editInfo, packList , xiala,
+import {
+  examineList,
+  editInfo,
+  packList,
+  xiala,
   addxiala,
   editxiala,
-  delxiala,} from '@/model/contarct/index'
+  delxiala,
+} from '@/model/contarct/index'
 export default {
   name: 'viewSpareMoney',
   watch: {
@@ -558,25 +563,25 @@ export default {
       submitType: true,
       tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
       pickerBeginDateBefore: {
-         disabledDate: (time) => {
+        disabledDate: (time) => {
           return time.getTime() > Date.now()
         },
       },
       // selectpackingMethod:{},
-     selectunitList: {},
+      selectunitList: {},
       //change:{},
-      onChange:{},
-      uploadSuccess:{},
-      selectgrade:{},
+      onChange: {},
+      uploadSuccess: {},
+      selectgrade: {},
       goodnameList: {},
-     selectpackingMethod:{},
+      selectpackingMethod: {},
       unitList: {},
       packtypeList: [],
       compId: sessionStorage.getItem('ws-pf_compId'),
       appendixIdsAdd: '',
       size: 10,
       deptBudgetList: {
-         contractGoodsInfo: {
+        contractGoodsInfo: {
           goodsName: '',
         },
         contractProcessInfo: {},
@@ -590,8 +595,8 @@ export default {
       dutyList: {},
       sexList: {},
       selectDuty: {},
-gradeList:{},
-ChapterTwoList:{},
+      gradeList: {},
+      ChapterTwoList: {},
       selectIntendedShip: {},
       interviewTypeList: {},
     }
@@ -603,7 +608,7 @@ ChapterTwoList:{},
     this.loaddata()
     this.editInfo()
     this.showType = this.isShow
-  // console.log(this.$route.params)
+    // console.log(this.$route.params)
     this.showType = this.isShow
   },
   methods: {
@@ -648,8 +653,8 @@ ChapterTwoList:{},
           this.ChapterTwoList = response
         })
     },
-    
-     getUnitList() {
+
+    getUnitList() {
       xiala({
         compId: sessionStorage.getItem('ws-pf_compId'),
         constCode: 'TYPEYAN',
@@ -700,8 +705,8 @@ ChapterTwoList:{},
           this.pleaseChoose = ''
         })
     },
-     saveClick(item, index) {
-    //  console.log(item)
+    saveClick(item, index) {
+      //  console.log(item)
 
       if (Object.is(item.id, 1)) {
         return
@@ -740,12 +745,12 @@ ChapterTwoList:{},
           })
       }
     },
-    submit() { 
+    submit() {
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
           this.deptBudgetList.compId = this.compId
           this.deptBudgetList.contractType = 1
-         editInfo(this.deptBudgetList)
+          editInfo(this.deptBudgetList)
             .toPromise()
             .then((response) => {
               this.$message.success('添加成功')
@@ -762,11 +767,14 @@ ChapterTwoList:{},
     },
     // getList(){}
   },
-  
 }
 </script>
 
 <style lang="scss" scoped>
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 140px;
+  text-align: center;
+}
 .button-container {
   display: flex;
   flex-wrap: nowrap;

+ 26 - 4
src/views/contractManagement/salesContractExamine.vue

@@ -6,7 +6,9 @@
   <div class="container">
     <el-row>
       <el-col :span="12">
-        <h2 class="bg-left">查看合同详情</h2>
+        <h2 class="bg-left">
+          查看合同详情<span>状态:{{ status }}</span>
+        </h2>
       </el-col>
       <el-col :span="12" class="bg-right">
         <el-button
@@ -136,6 +138,7 @@
       </div>
       <ws-info-table>
         <ws-form-item label="货名" span="1" prop="waterContent">
+
           <div class="unchanged">
             {{ deptBudgetList.contractGoodsInfo.goodsName }}
           </div>
@@ -167,6 +170,7 @@
           prop="mildewGrain"
           class="result"
         >
+
           <div class="unchanged">
             {{ deptBudgetList.contractGoodsInfo.mildewGrain }}
           </div>
@@ -175,6 +179,7 @@
           <div class="unchanged">
             {{ deptBudgetList.contractGoodsInfo.jiaorenli }}
           </div>
+
         </ws-form-item>
         <ws-form-item
           label="不完善粒(%)<="
@@ -182,9 +187,11 @@
           prop="imperfectGrain"
           class="result"
         >
+
           <div class="unchanged">
             {{ deptBudgetList.contractGoodsInfo.imperfectGrain }}
           </div>
+
         </ws-form-item>
       </ws-info-table>
       <div class="remark">
@@ -192,6 +199,7 @@
       </div>
       <ws-info-table>
         <ws-form-item label="合同收入(元)" span="1" prop="goodsNameKey">
+
           <div class="unchanged">
             {{ deptBudgetList.contractProcessInfo.goodsNameKey }}
           </div>
@@ -215,6 +223,7 @@
           <div class="unchanged">
             {{ deptBudgetList.contractProcessInfo.mildewGrain }}
           </div>
+
         </ws-form-item>
         <ws-form-item
           label="已完成发运量(吨)"
@@ -230,14 +239,22 @@
           <div class="unchanged">
             {{ deptBudgetList.contractProcessInfo.grade }}
           </div>
+
+          >{{ deptBudgetList.contractProcessInfo.imperfectGrain }}
+        </ws-form-item>
+        <ws-form-item label="双章原件回收情况" span="1" prop="grade"
+          >{{ deptBudgetList.contractProcessInfo.grade }}
+
         </ws-form-item>
       </ws-info-table>
       <div class="remark">
         <h3>备注信息</h3>
       </div>
+
         <div class="unchanged">
       {{ deptBudgetList.remarks }}
-        </div>
+        </div> 
+
       <img :src="deptBudgetList.addressUrl" alt="" />
 
       <!-- </base-card> -->
@@ -302,7 +319,8 @@ export default {
     }
   },
 
-  created() {
+  activated() {
+    this.status = this.$route.query.status
     this.loaddata()
     this.showType = this.isShow
     this.getList()
@@ -311,7 +329,7 @@ export default {
   methods: {
     loaddata() {
       // 数据
-      examineList({ id: this.$route.params.id })
+      examineList({ id: this.$route.query.id })
         .toPromise()
         .then((response) => {
           this.deptBudgetList = response
@@ -377,6 +395,10 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 140px;
+  text-align: center;
+}
 .el-form {
   padding: 0 20%;
 }

+ 46 - 51
src/views/home/components/shipCertificate.vue

@@ -7,61 +7,70 @@
     </div>
     <div class="shipCertificate">
       <div class="shipCertificate-Progress">
-        <p class="shipCertificate-Progress_title">{{$t('home.testCase')}}</p>
-        <div style="width:100%;border-right:2px solid #EDEDED;position: relative;">
+        <p class="shipCertificate-Progress_title">{{ $t('home.testCase') }}</p>
+        <div
+          style="
+            width: 100%;
+            border-right: 2px solid #ededed;
+            position: relative;
+          "
+        >
           <div class="shipCertificate-Progress_internalTitle">
-            <p>{{$t('home.toBeChecked')}}</p>
-            <p>{{certifiTitle}}{{$t('common.pieces')}}</p>
+            <p>{{ $t('home.toBeChecked') }}</p>
+            <p>{{ certifiTitle }}{{ $t('common.pieces') }}</p>
           </div>
-          <el-progress type="circle"
-                       :stroke-width="10"
-                       color="#3280FF"
-                       :width="100"
-                       :show-text="false"
-                       style="border:2px solid #3280FF;border-radius: 50%;"
-                       :percentage="percentage">
+          <el-progress
+            type="circle"
+            :stroke-width="10"
+            color="#3280FF"
+            :width="100"
+            :show-text="false"
+            style="border: 2px solid #3280ff; border-radius: 50%"
+            :percentage="percentage"
+          >
           </el-progress>
         </div>
         <div class="shipCertificate-Progress_footer">
-          <p>{{$t('home.certificateInspected')}}</p>
-          <p style="padding-left:10px">{{certifiList}}</p>
+          <p>{{ $t('home.certificateInspected') }}</p>
+          <p style="padding-left: 10px">{{ certifiList }}</p>
         </div>
       </div>
       <div class="shipCertificate-Progress">
-        <p class="shipCertificate-Progress_title">{{$t('home.theRenewal')}}</p>
-        <div style="width:100%;position: relative;">
+        <p class="shipCertificate-Progress_title">
+          {{ $t('home.theRenewal') }}
+        </p>
+        <div style="width: 100%; position: relative">
           <div class="shipCertificate-Progress_internalTitleOther">
-            <p>{{$t('zs.common.change')}}</p>
-            <p>{{shipCertifiTitle}}{{$t('common.pieces')}}</p>
+            <p>{{ $t('zs.common.change') }}</p>
+            <p>{{ shipCertifiTitle }}{{ $t('common.pieces') }}</p>
           </div>
-          <el-progress type="circle"
-                       :stroke-width="10"
-                       :width="101"
-                       :show-text="false"
-                       color="#FF8F00"
-                       style="border:2px solid #FF8F00;border-radius: 50%;"
-                       :percentage="percentageOther">
+          <el-progress
+            type="circle"
+            :stroke-width="10"
+            :width="101"
+            :show-text="false"
+            color="#FF8F00"
+            style="border: 2px solid #ff8f00; border-radius: 50%"
+            :percentage="percentageOther"
+          >
           </el-progress>
         </div>
         <div class="shipCertificate-Progress_footer">
-          <p>{{$t('home.certificateRenewal')}}</p>
-          <p style="padding-left:10px">{{shipCertifiList}}</p>
+          <p>{{ $t('home.certificateRenewal') }}</p>
+          <p style="padding-left: 10px">{{ shipCertifiList }}</p>
         </div>
       </div>
     </div>
   </div>
 </template>
 <script>
-import {
-  getCertificateQuantity // 船舶证书的统计
-} from '@/model/statistical/index'
 import WsShipDropdown from '@/components/ShipDown/index'
 export default {
   name: 'shipCertificate',
   components: {
-    WsShipDropdown
+    WsShipDropdown,
   },
-  data () {
+  data() {
     return {
       certifiTitle: '',
       shipCertifiTitle: '',
@@ -70,31 +79,17 @@ export default {
       shipCertifiList: '', //换证情况
       certifiList: '', //检验情况
       page: {
-        vesselId: ''
-      }
+        vesselId: '',
+      },
     }
   },
-  mounted () {
-    this.getCertificateList()
-  },
+  mounted() {},
   methods: {
-    // 首页船舶证书的统计
-    getCertificateList () {
-      getCertificateQuantity(this.page).toPromise().then(res => {
-        const { toBeTestedTotal, toBeReplacedTotal, certificateTotal } = res
-        this.certifiTitle = toBeTestedTotal
-        this.shipCertifiTitle = toBeReplacedTotal
-        this.certifiList = (certificateTotal ? certificateTotal : '0') + '/' + (toBeTestedTotal ? toBeTestedTotal : '0')
-        this.shipCertifiList = (certificateTotal ? certificateTotal : '0') + '/' + (toBeReplacedTotal ? toBeReplacedTotal : '0')
-        this.percentage = (toBeTestedTotal / certificateTotal) * 100
-        this.percentageOther = (toBeReplacedTotal / certificateTotal) * 100
-      })
-    },
-    shipCertificate (command) {
+    shipCertificate(command) {
       this.page.vesselId = command
       this.getCertificateList()
-    }
-  }
+    },
+  },
 }
 </script>
 <style lang="scss" scoped>

+ 5 - 1
vue.config.js

@@ -142,9 +142,13 @@ module.exports = {
 
         // target: 'https://product-server.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
-        // target: 'http://localhost:8090/',
+        target: 'http://localhost:8090/',
         // target: 'http://192.168.1.124:8090/',
+<<<<<<< HEAD
         target: 'http://192.168.1.124:8090/',
+=======
+        // target: 'http://192.168.1.110:8090/',
+>>>>>>> 4d337447d069e7148c2b82db4ee87f2226e67bb7
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://product-server.winsea.com/',
         // target: 'http://192.168.24.5:8098',//目标地址