Browse Source

前端高敬炎

18513069273 4 years ago
parent
commit
f4d904f575

+ 11 - 11
src/styles/theme/default.scss

@@ -47,7 +47,7 @@
   }
   .winseaview-logo,
   .tags-container {
-    background-color: #001529;
+    background-color: #424B71;
   }
   .winseaview-logo {
   }
@@ -98,17 +98,17 @@
   }
   .winseaview-sidebar {
     box-shadow: 2px 0 6px rgba(0, 21, 41, 0.15);
-    background-color: #20222a;
+    background-color: #424B71;
     padding-top: 70px;
     .el-menu-item,
     .el-submenu__title {
-      background-color: rgb(0, 12, 23);
-      border-top: 1px solid #1a252f;
+      background-color: #424B71;
+      border-top: 1px solid #424B71;
       height: 50px;
       line-height: 50px;
       i,
       span {
-        color: rgb(153, 153, 153);
+        color: #fff;
       }
       &:hover {
         i,
@@ -120,7 +120,7 @@
         &:before {
           width: 0;
         }
-        background-color: #1d6ced;
+        background-color: #5473E8;
         i,
         span {
           color: #fff;
@@ -140,17 +140,17 @@
       line-height: 36px;
       min-width: 200px !important;
       padding-left: 48px !important;
-      border-top: 0px solid #1a252f;
-      background-color: #001529;
+      border-top: 0px solid #424B71;
+      background-color: #424B71;
       &.is-active {
-        background-color: #1d6ced;
+        background-color: #5473E8;
       }
     }
   }
   .winseaview-main {
     .el-table {
       th > .cell {
-        color: #333333;
+        color:#8890B1;
       }
       &__header-wrapper,
       &__footer-wrapper {
@@ -161,7 +161,7 @@
         th.gutter,
         td.gutter,
         th.is-leaf {
-          background: #eee;
+          background: #F6F7FC;
         }
       }
       &__body {

+ 1 - 1
src/views/contractManagement/purchaseContract.vue

@@ -366,7 +366,7 @@ export default {
     handleEdit(row) {
       this.$router.push({
         name: 'purchaseContractEdit',
-        params: { id: row.id },
+        query: { id: row.id },
       })
     },
     // 关闭 dialog时 处理文件url 初始化upload组件

+ 191 - 23
src/views/contractManagement/purchaseContractEdit.vue

@@ -202,8 +202,9 @@
           <ws-form-item
             label="合同单价(元/吨)"
             span="1"
-            prop="unitContractPrice">
-            {{deptBudgetList.unitContractPrice}}
+            prop="unitContractPrice"
+            >
+            <span v-if='deptBudgetList.unitContractPrice!="null"'>{{deptBudgetList.unitContractPrice}}</span>
           </ws-form-item>
           <ws-form-item
             label="交货日期(止)"
@@ -263,28 +264,52 @@
             span="1"
             prop="intendedShipId"
           >
-          {{deptBudgetList.contractGoodsInfo.waterContent}}
+          <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.waterContent"
+              maxlength="100"
+              size="small"
+            />
           </ws-form-item>
           <ws-form-item
             label="品级"
             span="1"
             prop="grade"
           >
-           {{deptBudgetList.contractGoodsInfo.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="impurity"
           >
-          {{deptBudgetList.contractGoodsInfo.impurity}}
+           <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.impurity"
+              maxlength="100"
+              size="small"
+            />
           </ws-form-item>
           <ws-form-item
             label="容重(克/升)<="
             span="1"
             prop="bulkDensity"
           >
-          {{deptBudgetList.contractGoodsInfo.bulkDensity}}
+          <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.bulkDensity"
+              maxlength="100"
+              size="small"
+            />
           </ws-form-item>
           <ws-form-item
             label="霉变粒(%)<="
@@ -292,14 +317,22 @@
             prop="mildewGrain"
             class="result"
           >
-            {{deptBudgetList.contractGoodsInfo.mildewGrain}}
+          <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.mildewGrain"
+              maxlength="100"
+              size="small"
+            />
           </ws-form-item>
            <ws-form-item
             label="热损伤(%)<="
             span="1"
             prop="jiaorenli"
           >
-            {{deptBudgetList.contractGoodsInfo.jiaorenli}}
+          <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.jiaorenli"
+              maxlength="100"
+              size="small"
+            />
           </ws-form-item>
           <ws-form-item
             label="不完善粒(%)<="
@@ -307,7 +340,11 @@
             prop="imperfectGrain"
             class="result"
           >
-            {{deptBudgetList.contractGoodsInfo.imperfectGrain}}
+          <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.imperfectGrain"
+              maxlength="100"
+              size="small"
+            />
           </ws-form-item>
         </ws-info-table>
         <div class="remark">
@@ -319,52 +356,106 @@
             span="1"
             prop="goodsNameKey"
           >
-          {{deptBudgetList.contractProcessInfo.goodsNameKey}}
+          <ws-input
+              v-model="deptBudgetList.contractProcessInfo.goodsNameKey"
+              maxlength="100"
+              size="small"
+            />
           </ws-form-item>
           <ws-form-item
             label="已开发票(元)"
             span="1"
             prop="goodsName"
-          >
-          {{deptBudgetList.contractProcessInfo.goodsName}}
+          >、
+          <ws-input
+              v-model="deptBudgetList.contractProcessInfo.goodsName"
+              maxlength="100"
+              size="small"
+            />
           </ws-form-item>
           <ws-form-item
             label="费用支出(元)"
             span="1"
             prop="waterContent"
-          >{{deptBudgetList.contractProcessInfo.waterContent}}
+          >
+          <ws-input
+              v-model="deptBudgetList.contractProcessInfo.waterContent"
+              maxlength="100"
+              size="small"
+            />
           </ws-form-item>
           <ws-form-item
             label="未开发票(元)"
             span="1"
             prop="impurity"
-          >{{deptBudgetList.contractProcessInfo.impurity}}
+          ><ws-input
+              v-model="deptBudgetList.contractProcessInfo.impurity"
+              maxlength="100"
+              size="small"
+            />
           </ws-form-item>
           <ws-form-item
             label="未回款(元)"
             span="1"
             prop="mildewGrain"
-          >{{deptBudgetList.contractProcessInfo.mildewGrain}}
+          ><ws-input
+              v-model="deptBudgetList.contractProcessInfo.mildewGrain"
+              maxlength="100"
+              size="small"
+            />
           </ws-form-item>
           <ws-form-item
             label="已完成发运量(吨)"
             span="1"
             prop="imperfectGrain"
             class="result"
-          >{{deptBudgetList.contractProcessInfo.imperfectGrain}}
+          >
+          <ws-input
+              v-model="deptBudgetList.contractProcessInfo.imperfectGrain"
+              maxlength="100"
+              size="small"
+            />
           </ws-form-item>
            <ws-form-item
             label="双章原件回收情况"
             span="1"
             prop="grade"
-          >{{deptBudgetList.contractProcessInfo.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>
-        {{deptBudgetList.remarks}}
-        <img :src="deptBudgetList.addressUrl" alt="">
+        <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"
+          accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+        />
       </base-card>
     </ws-form>
     <div style='text-align:right;padding:10px;'>
@@ -372,8 +463,8 @@
           class="bg-bottom"
           type="primary"
           size="small"
-          @click="returnsales()"
-          >关闭</el-button
+          @click="submit()"
+          >提交</el-button
         >
     </div>
   </div>
@@ -387,8 +478,10 @@ import {
   editxiala,
   delxiala,
   examineList,
+  editInfo,
 } from '@/model/contarct/index'
-import { dayjs } from 'base-core-lib'
+import WsUpload from '@/components/WsUpload'
+import { EventBus, dayjs } from 'base-core-lib'
 export default {
   name: 'viewSpareMoney',
   watch: {
@@ -399,6 +492,9 @@ export default {
       this.showType = val
     },
   },
+  components: {
+    WsUpload,
+  },
   data() {
     return {
       //弹出框
@@ -412,6 +508,7 @@ export default {
       showType: true,
       // 年
       year: '',
+      size: 10,
       // 提交类型
       submitType: true,
       tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
@@ -427,6 +524,13 @@ export default {
       goodnameList: [],
       gradeList: [],
       ChapterTwoList: [],
+      appendixIdsAdd: '',
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      compId: sessionStorage.getItem('ws-pf_compId'),
     }
   },
 
@@ -437,9 +541,13 @@ export default {
   methods: {
     loaddata() {
       // 数据
-      examineList({ id: this.$route.params.id })
+      examineList({ id: this.$route.query.id })
         .toPromise()
         .then((response) => {
+          response.weight = String(response.weight)
+          response.overShort = String(response.overShort)
+          response.totalContractPrice = String(response.totalContractPrice)
+          response.unitContractPrice = String(response.unitContractPrice)
           this.deptBudgetList = response
         })
       // 包装方式
@@ -469,6 +577,17 @@ export default {
           this.ChapterTwoList = response
         })
     },
+    // 上传附件
+    uploadSuccess(data, files, url) {
+      console.log(data, files, url)
+
+      // this.deptBudgetList.
+      // this.formData.append('files', files)
+      // this.feedbackObj.uploadNameAttachment = data.appendixName
+      // this.feedbackObj.pathUploadAttachment = data.appendixPath
+      // // this.newAppendixs = files
+      // this.onChangeFlag = true
+    },
     getUnitList() {
       xiala({
         compId: sessionStorage.getItem('ws-pf_compId'),
@@ -499,6 +618,55 @@ export default {
     returnsales() {
       this.$router.push({ path: 'purchaseContract' })
     },
+    selectChapterTwo(e) {
+      for (var i = 0; i < this.ChapterTwoList.length; i++) {
+        if (this.ChapterTwoList[i].constValue == e) {
+          this.deptBudgetList.gradeKey = this.ChapterTwoList[i].constKey
+        }
+      }
+    },
+    selectunitList(e) {
+      for (var i = 0; i < this.unitList.length; i++) {
+        if (this.unitList[i].constValue == e) {
+          this.deptBudgetList.packingMethodKey = this.unitList[i].constKey
+        }
+      }
+    },
+    selectgrade(e) {
+      for (var i = 0; i < this.gradeList.length; i++) {
+        if (this.gradeList[i].constValue == e) {
+          this.deptBudgetList.gradeKey = this.gradeList[i].constKey
+        }
+      }
+    },
+    selectpackingMethod(e) {
+      for (var i = 0; i < this.packtypeList.length; i++) {
+        if (this.packtypeList[i].constValue == e) {
+          this.deptBudgetList.acceptanceMethodKey = this.packtypeList[
+            i
+          ].constKey
+        }
+      }
+    },
+    submit() {
+      console.log(this.deptBudgetList)
+      this.$refs.deptBudgetList.validate((valid) => {
+        if (valid) {
+          this.deptBudgetList.compId = this.compId
+          this.deptBudgetList.contractType = 2
+          console.log(this.deptBudgetList)
+          editInfo(this.deptBudgetList)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('编辑成功')
+              this.$router.push({ path: 'purchaseContract' })
+            })
+        } else {
+          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          return false
+        }
+      })
+    },
   },
 }
 </script>