18513069273 4 gadi atpakaļ
vecāks
revīzija
4d337447d0

+ 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;*/

+ 135 - 37
src/views/contractManagement/purchaseContract.vue

@@ -46,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="可按照合同编号、买方名称、卖方名称进行查找"
@@ -143,7 +136,7 @@
         <template slot-scope="scope">
           <el-popover
             placement="left"
-            :width="400"
+            :width="285"
             trigger="click"
             visible-arrow="false"
             @show="history(scope.row)"
@@ -163,18 +156,21 @@
               </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>
@@ -202,6 +198,9 @@
             @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>
@@ -341,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() {
@@ -351,6 +396,28 @@ 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
     },
@@ -378,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
@@ -475,6 +551,8 @@ 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()
     },
@@ -537,6 +615,16 @@ export default {
 }
 </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;
@@ -609,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;
@@ -618,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 {

+ 9 - 2
src/views/contractManagement/purchaseContractAdd.vue

@@ -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">
@@ -474,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) => {