Browse Source

前端sdy

zhongtianhaoyuan 4 years ago
parent
commit
d833beb50d

+ 112 - 26
package-lock.json

@@ -5940,7 +5940,6 @@
       "version": "4.0.1",
       "resolved": "https://registry.npm.taobao.org/clone-deep/download/clone-deep-4.0.1.tgz",
       "integrity": "sha1-wZ/Zvbv4WUK0/ZechNz31fB8I4c=",
-      "dev": true,
       "requires": {
         "is-plain-object": "^2.0.4",
         "kind-of": "^6.0.2",
@@ -7525,6 +7524,13 @@
         "verror": "^1.10.0"
       },
       "dependencies": {
+        "ansi-regex": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+          "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+          "dev": true,
+          "optional": true
+        },
         "cli-truncate": {
           "version": "1.1.0",
           "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-1.1.0.tgz",
@@ -7532,7 +7538,36 @@
           "dev": true,
           "optional": true,
           "requires": {
-            "slice-ansi": "^1.0.0"
+            "slice-ansi": "^1.0.0",
+            "string-width": "^2.0.0"
+          }
+        },
+        "is-fullwidth-code-point": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+          "dev": true,
+          "optional": true
+        },
+        "string-width": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz",
+          "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "is-fullwidth-code-point": "^2.0.0",
+            "strip-ansi": "^4.0.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+          "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "ansi-regex": "^3.0.0"
           }
         }
       }
@@ -10131,7 +10166,66 @@
       "resolved": "https://registry.npmjs.org/iconv-corefoundation/-/iconv-corefoundation-1.1.6.tgz",
       "integrity": "sha512-1NBe55C75bKGZaY9UHxvXG3G0gEp0ziht7quhuFrW3SPgZDw9HI6qvYXRSV5M/Eupyu8ljuJ6Cba+ec15PZ4Xw==",
       "dev": true,
-      "optional": true
+      "optional": true,
+      "requires": {
+        "cli-truncate": "^1.1.0",
+        "node-addon-api": "^1.6.3"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+          "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+          "dev": true,
+          "optional": true
+        },
+        "cli-truncate": {
+          "version": "1.1.0",
+          "resolved": "https://registry.npm.taobao.org/cli-truncate/download/cli-truncate-1.1.0.tgz",
+          "integrity": "sha1-Ky39g8U8/TVyuH/E1DCoCK+wQIY=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "slice-ansi": "^1.0.0",
+            "string-width": "^2.0.0"
+          }
+        },
+        "is-fullwidth-code-point": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+          "dev": true,
+          "optional": true
+        },
+        "node-addon-api": {
+          "version": "1.7.2",
+          "resolved": "https://registry.nlark.com/node-addon-api/download/node-addon-api-1.7.2.tgz",
+          "integrity": "sha1-PfMLlXILU8JOWZSLSVMrZiRE9U0=",
+          "dev": true,
+          "optional": true
+        },
+        "string-width": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz",
+          "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "is-fullwidth-code-point": "^2.0.0",
+            "strip-ansi": "^4.0.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+          "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "ansi-regex": "^3.0.0"
+          }
+        }
+      }
     },
     "iconv-lite": {
       "version": "0.4.24",
@@ -10671,7 +10765,6 @@
       "version": "2.0.4",
       "resolved": "https://registry.npm.taobao.org/is-plain-object/download/is-plain-object-2.0.4.tgz",
       "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=",
-      "dev": true,
       "requires": {
         "isobject": "^3.0.1"
       }
@@ -10784,8 +10877,7 @@
     "isobject": {
       "version": "3.0.1",
       "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
-      "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
-      "dev": true
+      "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
     },
     "isstream": {
       "version": "0.1.2",
@@ -11030,8 +11122,7 @@
     "kind-of": {
       "version": "6.0.3",
       "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-6.0.3.tgz?cache=0&sync_timestamp=1579194040958&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fkind-of%2Fdownload%2Fkind-of-6.0.3.tgz",
-      "integrity": "sha1-B8BQNKbDSfoG4k+jWqdttFgM5N0=",
-      "dev": true
+      "integrity": "sha1-B8BQNKbDSfoG4k+jWqdttFgM5N0="
     },
     "ko-sleep": {
       "version": "1.0.3",
@@ -12475,8 +12566,7 @@
     "neo-async": {
       "version": "2.6.1",
       "resolved": "https://registry.npm.taobao.org/neo-async/download/neo-async-2.6.1.tgz",
-      "integrity": "sha1-rCetpmFn+ohJpq3dg39rGJrSCBw=",
-      "dev": true
+      "integrity": "sha1-rCetpmFn+ohJpq3dg39rGJrSCBw="
     },
     "netmask": {
       "version": "1.0.6",
@@ -12742,7 +12832,7 @@
     },
     "node-sass": {
       "version": "4.14.1",
-      "resolved": "https://registry.npm.taobao.org/node-sass/download/node-sass-4.14.1.tgz",
+      "resolved": "https://registry.nlark.com/node-sass/download/node-sass-4.14.1.tgz?cache=0&sync_timestamp=1620488284683&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnode-sass%2Fdownload%2Fnode-sass-4.14.1.tgz",
       "integrity": "sha1-mch+wu+3BH7WOPtMnbfzpC4iF7U=",
       "requires": {
         "async-foreach": "^0.1.3",
@@ -12766,12 +12856,12 @@
       "dependencies": {
         "ansi-styles": {
           "version": "2.2.1",
-          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+          "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-2.2.1.tgz",
           "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
         },
         "chalk": {
           "version": "1.1.3",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+          "resolved": "https://registry.nlark.com/chalk/download/chalk-1.1.3.tgz",
           "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
           "requires": {
             "ansi-styles": "^2.2.1",
@@ -12783,7 +12873,7 @@
         },
         "cross-spawn": {
           "version": "3.0.1",
-          "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz",
+          "resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-3.0.1.tgz?cache=0&sync_timestamp=1609302869441&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcross-spawn%2Fdownload%2Fcross-spawn-3.0.1.tgz",
           "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=",
           "requires": {
             "lru-cache": "^4.0.1",
@@ -12792,7 +12882,7 @@
         },
         "lru-cache": {
           "version": "4.1.5",
-          "resolved": "http://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.5.tgz",
+          "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.5.tgz?cache=0&sync_timestamp=1594427569171&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-4.1.5.tgz",
           "integrity": "sha1-i75Q6oW+1ZvJ4z3KuCNe6bz0Q80=",
           "requires": {
             "pseudomap": "^1.0.2",
@@ -12801,7 +12891,7 @@
         },
         "node-gyp": {
           "version": "3.8.0",
-          "resolved": "https://registry.npm.taobao.org/node-gyp/download/node-gyp-3.8.0.tgz",
+          "resolved": "https://registry.nlark.com/node-gyp/download/node-gyp-3.8.0.tgz",
           "integrity": "sha1-VAMEJhwzDoDQ1e3OJTpoyzlkIYw=",
           "requires": {
             "fstream": "^1.0.0",
@@ -12828,12 +12918,12 @@
         },
         "semver": {
           "version": "5.3.0",
-          "resolved": "https://registry.npm.taobao.org/semver/download/semver-5.3.0.tgz",
+          "resolved": "https://registry.npm.taobao.org/semver/download/semver-5.3.0.tgz?cache=0&sync_timestamp=1616463540350&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-5.3.0.tgz",
           "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8="
         },
         "supports-color": {
           "version": "2.0.0",
-          "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz",
+          "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz?cache=0&sync_timestamp=1618561027869&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-2.0.0.tgz",
           "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
         },
         "tar": {
@@ -12848,7 +12938,7 @@
         },
         "yallist": {
           "version": "2.1.2",
-          "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
+          "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz",
           "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
         }
       }
@@ -13599,8 +13689,7 @@
     "pify": {
       "version": "4.0.1",
       "resolved": "https://registry.npm.taobao.org/pify/download/pify-4.0.1.tgz",
-      "integrity": "sha1-SyzSXFDVmHNcUCkiJP2MbfQeMjE=",
-      "dev": true
+      "integrity": "sha1-SyzSXFDVmHNcUCkiJP2MbfQeMjE="
     },
     "pinkie": {
       "version": "2.0.4",
@@ -15599,7 +15688,6 @@
       "version": "7.3.1",
       "resolved": "https://registry.npm.taobao.org/sass-loader/download/sass-loader-7.3.1.tgz",
       "integrity": "sha1-pb9ooEvOocE/+ELXRxUPerfQ0j8=",
-      "dev": true,
       "requires": {
         "clone-deep": "^4.0.1",
         "loader-utils": "^1.0.1",
@@ -15611,8 +15699,7 @@
         "semver": {
           "version": "6.3.0",
           "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz",
-          "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=",
-          "dev": true
+          "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0="
         }
       }
     },
@@ -15856,7 +15943,6 @@
       "version": "3.0.1",
       "resolved": "https://registry.npm.taobao.org/shallow-clone/download/shallow-clone-3.0.1.tgz",
       "integrity": "sha1-jymBrZJTH1UDWwH7IwdppA4C76M=",
-      "dev": true,
       "requires": {
         "kind-of": "^6.0.2"
       }
@@ -19863,4 +19949,4 @@
       "integrity": "sha512-TNloHe0ums6zxbHfnaCryM61J4IWDajZwNq6dHk9vfWhhysO/OeFvvR0drBs/nbXha2YxSzfQj2FiCd6RVBe+Q=="
     }
   }
-}
+}

+ 4 - 3
package.json

@@ -59,6 +59,7 @@
     "pinyin": "^2.9.1",
     "querystring": "^0.2.0",
     "register-service-worker": "^1.0.0",
+    "sass-loader": "^7.1.0",
     "script-loader": "^0.7.2",
     "sortablejs": "^1.8.4",
     "tinymce": "4.9.2",
@@ -76,7 +77,6 @@
   },
   "devDependencies": {
     "@babel/core": "7.0.0",
-    "autoprefixer": "^9.5.1",
     "@babel/register": "7.0.0",
     "@pixul/node-rancher-api": "^1.4.0",
     "@vue/cli-plugin-babel": "3.6.0",
@@ -84,6 +84,7 @@
     "@vue/cli-plugin-pwa": "^3.12.1",
     "@vue/cli-service": "3.5.3",
     "@vue/test-utils": "1.0.0-beta.29",
+    "autoprefixer": "^9.5.1",
     "babel-core": "7.0.0-bridge.0",
     "babel-plugin-dynamic-import-node": "^2.3.3",
     "chai": "^4.1.2",
@@ -97,7 +98,7 @@
     "lint-staged": "^10.2.13",
     "mockjs": "^1.0.1-beta3",
     "node-rancher-client-api": "^1.1.1",
-    "node-sass": "^4.12.0",
+    "node-sass": "^4.14.1",
     "postcss-import": "^11.1.0",
     "postcss-loader": "^2.0.8",
     "postcss-url": "^7.2.1",
@@ -143,4 +144,4 @@
   "files": [
     "dist"
   ]
-}
+}

+ 7 - 0
src/lang/zh.js

@@ -491,6 +491,9 @@
     //仓库管理、
     warehouseManagementList:'仓库管理',
     warehouseManagementAdd:'仓库管理添加',
+    warehouseManagementLook:'仓库管理查看',
+    warehouseManagementDelete:'仓库管理删除',
+    warehouseManagementIoss:'仓库管理盘损',
     // 采购模块
     procurement: '采购管理',
     sparepart: '备件采购',
@@ -4673,6 +4676,10 @@
   warehouseManagement:{
     warehouseManagementList:'仓库管理',
     warehouseManagementAdd:'仓库管理添加',
+    warehouseManagementLook:'仓库管理查看',
+    warehouseManagementDelete:'仓库管理删除',
+
+    warehouseManagementIoss:'仓库管理盘损',
   },
   // 年度培训
   annualTraining: {

+ 47 - 0
src/views/warehouse/component/router/index.js

@@ -43,6 +43,53 @@ const warehouseManagementRouter = {
       },
       hidden: true
     },
+
+    {
+      path: 'warehouseManagementLook',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/warehouse/warehouseManagementLook'),
+      name: 'warehouseManagementLook',
+      meta: {
+        title: 'warehouseManagementLook',
+        shortcutEntrance: 'warehouseManagementLook',
+        module: 'warehouse.warehouseManagementLook',
+        permissicon: [],
+        keepAlive: true
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    },
+    {
+      path: 'warehouseManagementDelete',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/warehouse/warehouseManagementDelete'),
+      name: 'warehouseManagementDelete',
+      meta: {
+        title: 'warehouseManagementDelete',
+        shortcutEntrance: 'warehouseManagementDelete',
+        module: 'warehouse.warehouseManagementDelete',
+        permissicon: [],
+        keepAlive: true
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    },
+
+    {
+      path: 'warehouseManagementIoss',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/warehouse/warehouseManagementIoss'),
+      name: 'warehouseManagementIoss',
+      meta: {
+        title: 'warehouseManagementIoss',
+        shortcutEntrance: 'warehouseManagementIoss',
+        module: 'warehouse.warehouseManagementIoss',
+        permissicon: [],
+        keepAlive: true
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    },
   ],
 };
 export default warehouseManagementRouter;

+ 398 - 0
src/views/warehouse/warehouseManagementDelete.vue

@@ -0,0 +1,398 @@
+<template>
+  <div >
+      
+     <el-row>
+      <el-col :span="20">
+        <h2 class="bg-left title">删除仓库</h2>
+      </el-col>
+      <el-col :span="4" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnWarehouse()"
+          >返回</el-button
+        >
+      </el-col>
+    </el-row>
+   <div class="connert">
+      <el-table
+        class="wenzi"
+        :data="contractList.records"
+        style="width: 100%; margin-top: 20px"
+        height="780"
+      >
+         <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="仓库名称" >
+        </el-table-column>
+        <el-table-column prop="goodsName" label="仓库所在地" >
+        </el-table-column>
+        <el-table-column prop="weight" label="应余库存(吨)"> </el-table-column>
+        <el-table-column prop="unitContractPrice" label="负责人">
+        </el-table-column>
+       
+        
+        <el-table-column prop="address" label="操作" width="200">
+          <!-- <template slot-scope="scope"> -->
+            <ws-button
+              type="primary"
+              @click="handleAdd()"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+              >隐藏</ws-button
+            >
+
+            <ws-button
+              type="primary"
+              @click="handleAdd()"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+              >删除</ws-button
+            >
+          <!-- </template> -->
+        </el-table-column>
+      </el-table>
+      
+    </div>
+  </div>
+</template>
+<script>
+import {
+  getList,
+  export1,
+  editstatus,
+  billoperatehis,
+} from '@/model/contarct/index'
+import { downloadFile } from '@/utils/batchDown'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+import { dayjs, fmoney, EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    vesselId(val) {
+      this.getList()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      deptBudgetTotal: 0,
+      currentPage: 1,
+      pageSize: 10,
+      searchType: 1,
+      searchKeyWord: '',
+      contractType: 2,
+      startDate: null,
+      endDate: null,
+      // 提交类型
+      submitType: true,
+      size: 10,
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM'),
+      },
+      contractList: [],
+      deptBudgetList: {},
+      historyList: [],
+
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+      taskTypeList: [
+        { value: '未完成', type: 1 },
+        { 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() {
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.getList()
+    this.showType = this.isShow
+  },
+  methods: {
+    handleLook() {
+       this.$router.push({ path: 'warehouseManagementLook' })
+    },
+    handleAdd() {
+      this.$router.push({ path: 'warehouseManagementAdd' })
+    },
+    handleEdit() {},
+    handleDelete() {
+       this.$router.push({ path: 'warehouseManagementDelete' })
+    },
+    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()
+    },
+    getList() {
+      getList({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        contractType: this.contractType,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchType: this.searchType,
+        searchKeyWord: this.searchKeyWord,
+        startDate: this.startDate,
+        endDate: this.endDate,
+        contrPage: this.contrPage,
+      })
+        .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
+          this.contractList = 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
+    },
+    editClick(row) {
+      var status = ''
+      if (row.status == '待执行' || row.status == '已完成') {
+        status = '执行中'
+      } else if (row.status == '执行中') {
+        status = '已完成'
+      }
+      //cancelButtonClass: "btn-custom-cancel"
+      this.$confirm(`是否将状态改为${status}`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          editstatus({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '状态修改成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
+    fujian(row) {
+      if (
+        row.receiveAttachmentPath === null ||
+        row.receiveAttachmentPath === ''
+      ) {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
+      } else {
+        this.accessoryTFs = true
+      }
+      this.appendixIdss = row.receiveAttachmentPath
+    },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    },
+
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleCloe() {
+      this.dialogViewSpareMoney = false
+    },
+    history(row) {
+      console.log(row)
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+    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() {
+      const { data } = await export1(
+        {
+          compId: sessionStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          searchType: this.searchType,
+          searchKeyWord: this.searchKeyWord,
+          startDate: this.startDate,
+          endDate: this.endDate,
+        },
+        {},
+        { responseType: 'blob' }
+      ).toPromise()
+      downloadFile({
+        res: data,
+        fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_采购合同`,
+        type: 'xls',
+      })
+    },
+    // deletecontract(){},
+    //删除
+
+    approve() {},
+    listQuery() {},
+    total() {},
+    clearfiltQuery() {},
+    selectCrtDuty() {},
+  },
+}
+</script>
+<style lang="scss" scoped>
+.connert {
+  width: 90%;
+  margin: 0 auto;
+}
+.vertical-text-left {
+  width: 62px;
+  text-align: right;
+}
+
+</style>

+ 283 - 0
src/views/warehouse/warehouseManagementIoss.vue

@@ -0,0 +1,283 @@
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="20">
+        <h2 class="bg-left title">盘损当期仓损</h2>
+      </el-col>
+      <el-col :span="4" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnWarehouse()"
+          >返回</el-button
+        >
+      </el-col>
+    </el-row>
+    <div class="center">
+      <h2></h2>
+
+    <div style="text-align: right; padding: 10px">
+      <el-button
+        class="bg-bottom-up"
+        type="primary"
+        size="small"
+        @click="returnWarehouse()"
+        >关闭</el-button
+      >
+    </div>
+     </div>
+  </div>
+</template>
+<script>
+import {
+  getList,
+  export1,
+  editstatus,
+  billoperatehis,
+} from '@/model/contarct/index'
+import { downloadFile } from '@/utils/batchDown'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+import { dayjs, fmoney, EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    vesselId(val) {
+      this.getList()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      deptBudgetTotal: 0,
+      currentPage: 1,
+      pageSize: 10,
+      searchType: 1,
+      searchKeyWord: '',
+      contractType: 2,
+      startDate: null,
+      endDate: null,
+      // 提交类型
+      submitType: true,
+      selectpackingMethod:{},
+      size: 10,
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      packtypeList:{},
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM'),
+      },
+      contractList: [],
+      deptBudgetList: {},
+      historyList: [],
+
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+    }
+  },
+  activated() {
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.getList()
+    this.showType = this.isShow
+  },
+  methods: {
+     
+    //返回按钮
+    returnWarehouse() {
+      this.$router.push({ path: 'warehouseManagementList' })
+    },
+    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()
+    },
+    getList() {
+      getList({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        contractType: this.contractType,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchType: this.searchType,
+        searchKeyWord: this.searchKeyWord,
+        startDate: this.startDate,
+        endDate: this.endDate,
+        contrPage: this.contrPage,
+      })
+        .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
+          this.contractList = response
+        })
+    },
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
+    fujian(row) {
+      if (
+        row.receiveAttachmentPath === null ||
+        row.receiveAttachmentPath === ''
+      ) {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
+      } else {
+        this.accessoryTFs = true
+      }
+      this.appendixIdss = row.receiveAttachmentPath
+    },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    },
+
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleCloe() {
+      this.dialogViewSpareMoney = false
+    },
+    history(row) {
+      console.log(row)
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+    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() {
+      const { data } = await export1(
+        {
+          compId: sessionStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          searchType: this.searchType,
+          searchKeyWord: this.searchKeyWord,
+          startDate: this.startDate,
+          endDate: this.endDate,
+        },
+        {},
+        { responseType: 'blob' }
+      ).toPromise()
+      downloadFile({
+        res: data,
+        fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_采购合同`,
+        type: 'xls',
+      })
+    },
+    // deletecontract(){},
+    //删除
+
+    approve() {},
+    listQuery() {},
+    total() {},
+    clearfiltQuery() {},
+    selectCrtDuty() {},
+  },
+}
+</script>
+<style lang="scss" scoped>
+.center {
+  position: relative;
+  margin-top: 100px;
+  top: 100px;
+  width: 90%;
+  height: 500px;
+  margin: 0 auto;
+}
+.container .bg-left {
+  margin-left: 40px;
+}
+.container .bg-bottom {
+  position: absolute;
+  float: right;
+  top: 15px;
+  right: 20px;
+}
+.vertical-text-left {
+  width: 62px;
+  text-align: right;
+}
+/deep/.el-form-item {
+    width: 33%;
+}
+</style>

+ 99 - 504
src/views/warehouse/warehouseManagementList.vue

@@ -67,107 +67,73 @@
         /></ws-button>
       </template>
     </BaseHeaderLayout>
-    <el-table
-      class="wenzi"
-      :data="contractList.records"
-      style="width: 100%; margin-top: 10px"
-    >
-      <!-- <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="容量(吨)" width="80">
-        <!-- <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>
-      <el-table-column prop="packingMethod" label="应余量"> 
-      </el-table-column>
-      <el-table-column prop="buyer" label="出入库"> 
-      </el-table-column>
-      <el-table-column prop="address" label="操作" width="200">
-        <template slot-scope="scope">
-          <img
-            width="16"
-            height="16"
-            style="vertical-align: text-top; margin: 0 6px"
-            src="../../../public/img/chakan.png"
-            @click="handleExamine(scope.row)"
-            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>
-    <el-pagination
-      @size-change="handleSizeChange"
-      @current-change="handleCurrentChange"
-      :current-page="currentPage"
-      :page-size="deptCircularPage.pageSize"
-      layout="total, sizes, prev, pager, next, jumper"
-      :total="deptBudgetTotal"
-    >
-    </el-pagination>
-    <!-- 附件弹框 -->
-    <WinseaContentModal
-      v-model="accessoryTFs"
-      :title="$t('system.noticeCircular.information')"
-      @on-cancel="handleClose"
-    >
-      <p>查看附件</p>
-      <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"
-      />
-    </WinseaContentModal>
+    <div class="connert">
+      <el-table
+        class="wenzi"
+        :data="contractList.records"
+        style="width: 100%; margin-top: 20px"
+        height="780"
+      >
+        <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="weight" label="容量(吨)"> </el-table-column>
+        <el-table-column prop="unitContractPrice" label="入库量(吨)">
+        </el-table-column>
+        <el-table-column prop="packingMethod" label="出库量(吨)">
+        </el-table-column>
+        <el-table-column prop="buyer" label="应余量(吨)"> </el-table-column>
+        <el-table-column prop="seller" label="出入库" width="160">
+           <button
+              type="primary"
+              @click="staywarehousing()"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+              >待完成</button
+            > <button
+              type="primary"
+              @click="delivery()"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+              >出库</button
+            >
+             <button
+              type="primary"
+              @click="warehousing()"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+              >入库</button
+            >
+          
+           </el-table-column>
+        <el-table-column prop="address" label="操作" width="200">
+          <!-- <template slot-scope="scope"> -->
+            <ws-button
+              type="primary"
+              @click="record()"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+              >记录</ws-button
+            >
+
+            <ws-button
+              type="primary"
+              @click="loss()"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+              >盘损</ws-button
+            >
+          <!-- </template> -->
+        </el-table-column>
+      </el-table>
+      
+    </div>
   </div>
 </template>
 <script>
@@ -176,7 +142,6 @@ import {
   export1,
   editstatus,
   billoperatehis,
-  
 } from '@/model/contarct/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
@@ -205,30 +170,23 @@ export default {
       monetaryKey: null,
       // 表格显示数据
       tableDate: [],
-    
+
       // 是否显示
       showType: true,
       // 年
       year: '',
-      deptBudgetTotal: 0,
       currentPage: 1,
       pageSize: 10,
-      appendixIdsAdd: '',
       searchType: 1,
-      searchTypeText: '未完成',
-      searchKeyWord: '',
+       searchTypeText: '未完成',
+       searchKeyWord: '',
       contractType: 2,
       startDate: null,
       endDate: null,
       // 提交类型
       submitType: true,
-      contractForm: {},
-      categoryIndex: 0,
-      rulesVendor: {},
-     
       size: 10,
       compId: sessionStorage.getItem('ws-pf_compId'),
-      handleCurrentChange:{},
       deptCircularPage: {},
       date: {
         year: dayjs().format('YYYY'),
@@ -237,64 +195,12 @@ export default {
       contractList: [],
       deptBudgetList: {},
       historyList: [],
-      
       pickerBeginDateBefore: {
         disabledDate: (time) => {
           return time.getTime() > Date.now()
         },
       },
       accessoryTFs: false,
-      taskTypeList: [
-        { value: '未完成', type: 1 },
-        { 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() {
@@ -305,17 +211,36 @@ export default {
     this.showType = this.isShow
   },
   methods: {
-    handleLook(){
+    //出库
+    delivery(){
 
     },
-    handleAdd(){
-      this.$router.push({ path: 'warehouseManagementAdd' })
+    //入库
+    warehousing(){
+
     },
-    handleEdit(){
+    //待入库
+    staywarehousing(){
 
     },
-    handleDelete(){
+    //记录
+    record(){
 
+    },
+    //盘损
+    loss(){
+       this.$router.push({ path: 'warehouseManagementIoss' })
+    },
+
+    handleLook() {
+       this.$router.push({ path: 'warehouseManagementLook' })
+    },
+    handleAdd() {
+      this.$router.push({ path: 'warehouseManagementAdd' })
+    },
+    handleEdit() {},
+    handleDelete() {
+       this.$router.push({ path: 'warehouseManagementDelete' })
     },
     dateFormat(fmt, date) {
       let ret
@@ -381,19 +306,7 @@ export default {
           this.contractList = 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
-    },
     editClick(row) {
-      
       var status = ''
       if (row.status == '待执行' || row.status == '已完成') {
         status = '执行中'
@@ -403,9 +316,8 @@ export default {
       //cancelButtonClass: "btn-custom-cancel"
       this.$confirm(`是否将状态改为${status}`, {
         confirmButtonText: '确定',
-        cancelButtonText:'取消',
+        cancelButtonText: '取消',
         type: 'warning',
-      
       })
         .then(() => {
           editstatus({ id: row.id })
@@ -447,13 +359,11 @@ export default {
       this.appendixIdss = row.receiveAttachmentPath
     },
     handleExamine(row) {
-    
       this.$router.push({
         name: 'salesContractExamine',
         query: { id: row.id },
       })
     },
-
     // 关闭 dialog时 处理文件url 初始化upload组件
     handleCloe() {
       this.dialogViewSpareMoney = false
@@ -495,332 +405,17 @@ export default {
         type: 'xls',
       })
     },
-    // deletecontract(){},
-    //删除 
-    
-
-    approve() {},
-    listQuery() {},
-    total() {},
-    clearfiltQuery() {},
-    selectCrtDuty() {},
   },
 }
 </script>
 <style lang="scss" scoped>
+.connert {
+  width: 90%;
+  margin: 0 auto;
+}
 .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;
-  top: 131px;
-  left: 794px;
-  transform-origin: right center;
-  z-index: 2005;
-}
-.vertical-line {
-  height: 100px;
-  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;
-}
-.el-pagination {
-  padding: 10px 15px;
-  margin-bottom: 0;
-  text-align: center;
-}
-/deep/.el-pager li.active {
-  color: #5878e8;
-  cursor: default;
-}
-/deep/.el-pager li:hover {
-  color: #5878e8;
-  cursor: default;
-}
-.vertical-circle {
-  width: 10px;
-  height: 10px;
-  border: 2px solid #5878e8;
-  background-color: #ffffff;
-  -webkit-border-radius: 100px;
-}
-.vertical-circle:first-child {
-  color: red;
-}
-.vertical-text {
-  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 {
-  text-align: center;
-}
-.typeselect {
-  width: 500px;
-}
-.padding-xs {
-  padding: 15px;
-  text-align: right;
-}
-.clearfix:after {
-  content: '';
-  display: block;
-  clear: both;
-}
-.el-table {
-  font-size: 16px;
-}
-.taskType {
-  width: 100%;
-  background-color: #fff;
-  margin-top: 2px;
-  margin-bottom: 10px;
-  list-style: none;
-  // padding-bottom: 20px;
-  li {
-    float: left;
-    border: 1px solid #6ea0f3;
-    border-radius: 5px;
-    max-width: 190px;
-    padding: 0 5px;
-    text-align: center;
-    margin: 10px 20px;
-    cursor: pointer;
-    font-size: 14px;
-    p {
-      margin: 8px 0px;
-      span {
-        color: #e74c3c;
-      }
-    }
-  }
-  li:hover {
-    background-color: #e4eeff;
-    color: #1d6ced;
-  }
-}
-.el-date-editor--date {
-  margin: 0 10px;
-}
-.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;
-  justify-content: space-between;
-  align-items: center;
-  background-color: #fff;
-  width: 100%;
-  height: 50px;
-  padding: 0 10px;
-  & > div {
-    margin-left: 10px;
-    display: flex;
-    flex-wrap: nowrap;
-    flex-direction: row;
-    & > span {
-      line-height: 50px;
-    }
-  }
-
-  /deep/.auditFlow-box {
-    position: unset;
-    margin-left: 10px;
-    &/deep/.auditFlow-icon {
-      width: auto;
-      padding-right: 30px;
-    }
-    &/deep/.auditFlow-main {
-      position: absolute;
-    }
-  }
-}
-.box-app {
-  display: inline-block;
-  float: left;
-  margin-left: 30px;
-  line-height: 50px;
-}
-/deep/.el-dialog {
-  .el-form-item {
-    margin-bottom: 0 !important;
-    .el-input--medium {
-      textarea {
-        min-height: 100px !important;
-      }
-    }
-  }
-}
-.collapse-bottom {
-  margin-bottom: 20px;
-}
-
-.input-main .textarea .el-textarea__inner {
-  width: 100%;
-  z-index: 1;
-}
-/*.crt-main .textarea /deep/ .el-form-item__label {*/
-/*  height: 82px;*/
-/*}*/
-// 控制select为只读的时候显示样式
 
-.hide-sel {
-  .el-input__inner {
-    border: 0px;
-  }
-  .el-icon-arrow-up {
-    display: none;
-  }
-  .el-textarea__inner {
-    background-color: #fff !important;
-    border: 0;
-  }
-  .el-date-editor {
-    i {
-      display: none;
-    }
-  }
-  .is-disabled {
-    .el-input__inner:hover {
-      background-color: #fff !important;
-      border: 0;
-    }
-    color: #606266;
-    .el-input__inner {
-      background-color: #fff !important;
-      border: 0;
-      color: #606266;
-    }
-    .el-textarea__inner {
-      background-color: #fff !important;
-      border: 0;
-      color: #606266;
-    }
-  }
-}
-// 控制select为只读的时候显示样式
-/deep/.ws-class-table-col {
-  height: auto;
-  padding: 0px 2px;
-  /deep/.el-input__inner {
-    padding: 0px 2px;
-  }
-}
-/deep/.is-disabled {
-  .el-input__prefix,
-  .el-input__suffix {
-    display: none;
-  }
-  .el-input__inner {
-    background-color: #fff;
-    border-color: #fff !important;
-    color: #000 !important;
-    font-size: 14px;
-    cursor: text;
-    padding: 0 !important;
-  }
-  .el-message-box{
-    width: 440px;
-    height: 160px;
-    background: #FFFFFF;
-    box-shadow: 0px 2px 31px 0px rgba(66, 75, 112, 0.23);
-    border-radius: 4px;
-  }
- /deep/.el-message-box__message p{
-    width: 351px;
-    height: 20px;
-    font-size: 14px;
-    font-family: PingFangSC-Regular, PingFang SC;
-    font-weight: 400;
-    color: #191919;
-    line-height: 20px;
-  }
-.el-message-box__title{
-  width: 440px;
-  height: 160px;
-  background: #FFFFFF;
-  box-shadow: 0px 2px 31px 0px rgba(66, 75, 112, 0.23);
-  border-radius: 4px;
-}
-}
 </style>

+ 436 - 0
src/views/warehouse/warehouseManagementLook.vue

@@ -0,0 +1,436 @@
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="20">
+        <h2 class="bg-left title">查看仓库详情</h2>
+      </el-col>
+      <el-col :span="4" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnWarehouse()"
+          >返回</el-button
+        >
+      </el-col>
+    </el-row>
+    <div class="center">
+      <ws-form ref="deptBudgetList" :model="deptBudgetList">
+        <!--基本信息-->
+        <ws-info-table>
+          <!--仓库名称-->
+          <ws-form-item
+            label="仓库名称"
+            span="1"
+            prop="contractNo"
+            class="readonly"
+          >
+            <ws-select
+              v-model="deptBudgetList.packingMethod"
+              placeholder=""
+              class="typeselect"
+              @change="selectpackingMethod"
+            >
+              <ws-option
+                v-for="item in packtypeList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+          <!--负责人-->
+          <ws-form-item label="负责人" span="1" prop="shippingType">
+            <ws-input
+              v-model="deptBudgetList.shippingType"
+              placeholder="负责人"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          <!--负责人电话-->
+          <ws-form-item
+            label="负责人电话"
+            span="1"
+            prop="buyer"
+            class="readonly"
+          >
+            <ws-input
+              v-model="deptBudgetList.buyer"
+              placeholder="负责人电话"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!--仓库所在地-->
+          <ws-form-item label="仓库所在地" span="1" prop="settlementMethod">
+            <ws-input
+              v-model="deptBudgetList.settlementMethod"
+              placeholder="请输入仓库所在地"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--详细地址-->
+          <ws-form-item
+            label="详细地址"
+            span="1"
+            prop="seller"
+            class="readonly"
+          >
+            <ws-input
+              v-model="deptBudgetList.seller"
+              placeholder="请输入详细地址"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!--总储量(吨)-->
+          <ws-form-item label="总储量(吨)" span="1" prop="sourceGoods">
+            <ws-input
+              v-model="deptBudgetList.sourceGoods"
+              placeholder="请输入总储量(吨)"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          <!--仓位编号-->
+          <ws-form-item label="仓位编号" span="1" prop="contractNo">
+            <ws-input
+              v-model.number="deptBudgetList.buyerPhone"
+              placeholder="请输入仓位编号"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!--最大储量(吨)-->
+          <ws-form-item label="最大储量(吨)" span="1" prop="placeDelivery">
+            <ws-input
+              v-model="deptBudgetList.placeDelivery"
+              placeholder="请输入最大储量(吨)"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          <!--现有储量-->
+          <ws-form-item label="现有储量" span="1" prop="sellerPhone">
+            <ws-input
+              v-model="deptBudgetList.sellerPhone"
+              placeholder="请输入现有储量"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!--备注(选项)-->
+          <ws-form-item label="备注(选项)" span="1" prop="sellerPhone">
+            <ws-input
+              v-model="deptBudgetList.sellerPhone"
+              placeholder="请输入备注(选项)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!--仓位编号-->
+          <ws-form-item label="仓位编号" span="1" prop="contractNo" >
+            <ws-input
+              v-model.number="deptBudgetList.buyerPhone"
+              placeholder="请输入仓位编号"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--最大储量(吨)-->
+          <ws-form-item label="最大储量(吨)" span="1" prop="placeDelivery">
+            <ws-input
+              v-model="deptBudgetList.placeDelivery"
+              placeholder="请输入最大储量(吨)"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          <!--现有储量-->
+          <ws-form-item label="现有储量" span="1" prop="sellerPhone">
+            <ws-input
+              v-model="deptBudgetList.sellerPhone"
+              placeholder="请输入现有储量"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!--备注(选项)-->
+          <ws-form-item label="备注(选项)" span="1" prop="sellerPhone">
+            <ws-input
+              v-model="deptBudgetList.sellerPhone"
+              placeholder="请输入备注(选项)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+      </ws-form>
+    </div>
+
+    <div style="text-align: right; padding: 10px">
+      <el-button
+        class="bg-bottom-up"
+        type="primary"
+        size="small"
+        @click="returnWarehouse()"
+        >关闭</el-button
+      >
+    </div>
+  </div>
+</template>
+<script>
+import {
+  getList,
+  export1,
+  editstatus,
+  billoperatehis,
+} from '@/model/contarct/index'
+import { downloadFile } from '@/utils/batchDown'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+import { dayjs, fmoney, EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    vesselId(val) {
+      this.getList()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      deptBudgetTotal: 0,
+      currentPage: 1,
+      pageSize: 10,
+      searchType: 1,
+      searchKeyWord: '',
+      contractType: 2,
+      startDate: null,
+      endDate: null,
+      // 提交类型
+      submitType: true,
+      selectpackingMethod:{},
+      size: 10,
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      packtypeList:{},
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM'),
+      },
+      contractList: [],
+      deptBudgetList: {},
+      historyList: [],
+
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+    }
+  },
+  activated() {
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.getList()
+    this.showType = this.isShow
+  },
+  methods: {
+     
+    //返回按钮
+    returnWarehouse() {
+      this.$router.push({ path: 'warehouseManagementList' })
+    },
+    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()
+    },
+    getList() {
+      getList({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        contractType: this.contractType,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchType: this.searchType,
+        searchKeyWord: this.searchKeyWord,
+        startDate: this.startDate,
+        endDate: this.endDate,
+        contrPage: this.contrPage,
+      })
+        .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
+          this.contractList = response
+        })
+    },
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
+    fujian(row) {
+      if (
+        row.receiveAttachmentPath === null ||
+        row.receiveAttachmentPath === ''
+      ) {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
+      } else {
+        this.accessoryTFs = true
+      }
+      this.appendixIdss = row.receiveAttachmentPath
+    },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    },
+
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleCloe() {
+      this.dialogViewSpareMoney = false
+    },
+    history(row) {
+      console.log(row)
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+    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() {
+      const { data } = await export1(
+        {
+          compId: sessionStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          searchType: this.searchType,
+          searchKeyWord: this.searchKeyWord,
+          startDate: this.startDate,
+          endDate: this.endDate,
+        },
+        {},
+        { responseType: 'blob' }
+      ).toPromise()
+      downloadFile({
+        res: data,
+        fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_采购合同`,
+        type: 'xls',
+      })
+    },
+    // deletecontract(){},
+    //删除
+
+    approve() {},
+    listQuery() {},
+    total() {},
+    clearfiltQuery() {},
+    selectCrtDuty() {},
+  },
+}
+</script>
+<style lang="scss" scoped>
+.center {
+  position: relative;
+  margin-top: 100px;
+  top: 100px;
+  width: 90%;
+  height: 500px;
+  margin: 0 auto;
+}
+.container .bg-left {
+  margin-left: 40px;
+}
+.container .bg-bottom {
+  position: absolute;
+  float: right;
+  top: 15px;
+  right: 20px;
+}
+.vertical-text-left {
+  width: 62px;
+  text-align: right;
+}
+/deep/.el-form-item {
+    width: 33%;
+}
+</style>