Browse Source

前端sdy

zhongtianhaoyuan 4 years ago
parent
commit
60ebccc2c0

+ 29 - 0
package-lock.json

@@ -10932,6 +10932,12 @@
         "topo": "3.x.x"
       }
     },
+    "jquery": {
+      "version": "3.6.0",
+      "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
+      "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==",
+      "dev": true
+    },
     "js-base64": {
       "version": "2.5.2",
       "resolved": "https://registry.npm.taobao.org/js-base64/download/js-base64-2.5.2.tgz",
@@ -17651,6 +17657,21 @@
       "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=",
       "dev": true
     },
+    "uppercamelcase": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/uppercamelcase/-/uppercamelcase-1.1.0.tgz",
+      "integrity": "sha1-Mk2YprOvx+iolT4QZBUJsOTiP5c=",
+      "requires": {
+        "camelcase": "^1.2.1"
+      },
+      "dependencies": {
+        "camelcase": {
+          "version": "1.2.1",
+          "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
+          "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk="
+        }
+      }
+    },
     "uri-js": {
       "version": "4.2.2",
       "resolved": "http://registry.npm.taobao.org/uri-js/download/uri-js-4.2.2.tgz",
@@ -17962,6 +17983,14 @@
       "resolved": "https://registry.npm.taobao.org/vue/download/vue-2.6.10.tgz?cache=0&sync_timestamp=1589829918797&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue%2Fdownload%2Fvue-2.6.10.tgz",
       "integrity": "sha1-pysaQqTYKnIepDjRtr9V5mGVxjc="
     },
+    "vue-amap": {
+      "version": "0.5.10",
+      "resolved": "https://registry.npmjs.org/vue-amap/-/vue-amap-0.5.10.tgz",
+      "integrity": "sha512-9ViNCev1vx32+zZ5RvF/TmUZNbwL9QrdA2/OnD2GlXMfQBkJy7D08Vb7379t6guqnopDPtWJ8K6gg72h9+4GUg==",
+      "requires": {
+        "uppercamelcase": "^1.1.0"
+      }
+    },
     "vue-class-component": {
       "version": "6.3.2",
       "resolved": "https://registry.npm.taobao.org/vue-class-component/download/vue-class-component-6.3.2.tgz",

+ 5 - 1
src/api/V2/warehouse/index.js

@@ -1 +1,5 @@
-export const API_GET_WAREHOUSE_BASEINFO = '/warehouseBaseInfo/selectWarehouseViewinfo'
+export const API_GET_WAREHOUSE_BASEINFO = '/warehouseBaseInfo/selectWarehouseViewinfo'
+//仓库列表查看
+export const API_GET_WAREHOUSE_LOOK = '/warehouseBaseInfo/getWarehouse'
+//仓库名称下拉
+export const API_GET_WAREHOUSE_CUSTOMDROPDOWN = '/warehouseBaseInfo/selectWarehouse'

+ 7 - 1
src/model/warehouse/index.js

@@ -2,6 +2,12 @@ import { errorCatcher, errorHandle, filter } from 'base-core-lib'
 import { appRx } from '../defalutConfig/indexRx'
 import {
     API_GET_WAREHOUSE_BASEINFO,
+    API_GET_WAREHOUSE_LOOK,
+    API_GET_WAREHOUSE_CUSTOMDROPDOWN
 } from '@/api/V2/warehouse'
 // 列表
-export const getList = appRx.get(API_GET_WAREHOUSE_BASEINFO, errorCatcher, errorHandle, filter)
+export const getList = appRx.get(API_GET_WAREHOUSE_BASEINFO, errorCatcher, errorHandle, filter)
+//仓库查看
+export const getLook = appRx.get( API_GET_WAREHOUSE_LOOK, errorCatcher, errorHandle, filter)
+//仓库下拉
+export const xiala = appRx.get( API_GET_WAREHOUSE_CUSTOMDROPDOWN, errorCatcher, errorHandle, filter)

+ 95 - 98
src/views/warehouse/warehouseManagementLook.vue

@@ -22,11 +22,11 @@
           <ws-form-item
             label="仓库名称"
             span="1"
-            prop="contractNo"
+            prop="warehouseName"
             class="readonly"
           >
             <ws-select
-              v-model="deptBudgetList.packingMethod"
+              v-model="deptBudgetList.warehouseName"
               placeholder=""
               class="typeselect"
               @change="selectpackingMethod"
@@ -40,9 +40,9 @@
             </ws-select>
           </ws-form-item>
           <!--负责人-->
-          <ws-form-item label="负责人" span="1" prop="shippingType">
+          <ws-form-item label="负责人" span="1" prop="personCharge">
             <ws-input
-              v-model="deptBudgetList.shippingType"
+              v-model="deptBudgetList.personCharge"
               placeholder="负责人"
               maxlength="20"
               size="small"
@@ -52,20 +52,20 @@
           <ws-form-item
             label="负责人电话"
             span="1"
-            prop="buyer"
+            prop="personPhone"
             class="readonly"
           >
             <ws-input
-              v-model="deptBudgetList.buyer"
+              v-model="deptBudgetList.personPhone"
               placeholder="负责人电话"
               maxlength="100"
               size="small"
             />
           </ws-form-item>
           <!--仓库所在地-->
-          <ws-form-item label="仓库所在地" span="1" prop="settlementMethod">
+          <ws-form-item label="仓库所在地" span="1" prop="warehouseLocation">
             <ws-input
-              v-model="deptBudgetList.settlementMethod"
+              v-model="deptBudgetList.warehouseLocation"
               placeholder="请输入仓库所在地"
               maxlength="120"
               size="small"
@@ -75,65 +75,65 @@
           <ws-form-item
             label="详细地址"
             span="1"
-            prop="seller"
+            prop="detailedAddress"
             class="readonly"
           >
             <ws-input
-              v-model="deptBudgetList.seller"
+              v-model="deptBudgetList.detailedAddress"
               placeholder="请输入详细地址"
               maxlength="100"
               size="small"
             />
           </ws-form-item>
           <!--总储量(吨)-->
-          <ws-form-item label="总储量(吨)" span="1" prop="sourceGoods">
+          <ws-form-item label="总储量(吨)" span="1" prop="totalStorage">
             <ws-input
-              v-model="deptBudgetList.sourceGoods"
+              v-model="deptBudgetList.totalStorage"
               placeholder="请输入总储量(吨)"
               maxlength="20"
               size="small"
             />
           </ws-form-item>
           <!--仓位编号-->
-          <ws-form-item label="仓位编号" span="1" prop="contractNo">
+          <ws-form-item label="仓位编号" span="1" prop="binNumber">
             <ws-input
-              v-model.number="deptBudgetList.buyerPhone"
+              v-model.number="deptBudgetList.binNumber"
               placeholder="请输入仓位编号"
               maxlength="100"
               size="small"
             />
           </ws-form-item>
           <!--最大储量(吨)-->
-          <ws-form-item label="最大储量(吨)" span="1" prop="placeDelivery">
+          <ws-form-item label="最大储量(吨)" span="1" prop="maxStorage">
             <ws-input
-              v-model="deptBudgetList.placeDelivery"
+              v-model="deptBudgetList.maxStorage"
               placeholder="请输入最大储量(吨)"
               maxlength="20"
               size="small"
             />
           </ws-form-item>
           <!--现有储量-->
-          <ws-form-item label="现有储量" span="1" prop="sellerPhone">
+          <ws-form-item label="现有储量" span="1" prop="nowStorage">
             <ws-input
-              v-model="deptBudgetList.sellerPhone"
+              v-model="deptBudgetList.nowStorage"
               placeholder="请输入现有储量"
               maxlength="100"
               size="small"
             />
           </ws-form-item>
           <!--备注(选项)-->
-          <ws-form-item label="备注(选项)" span="1" prop="sellerPhone">
+          <ws-form-item label="备注(选项)" span="1" prop="remark">
             <ws-input
-              v-model="deptBudgetList.sellerPhone"
+              v-model="deptBudgetList.remark"
               placeholder="请输入备注(选项)"
               maxlength="100"
               size="small"
             />
           </ws-form-item>
           <!--仓位编号-->
-          <ws-form-item label="仓位编号" span="1" prop="contractNo" >
+          <ws-form-item label="仓位编号" span="1" prop="binNumber">
             <ws-input
-              v-model.number="deptBudgetList.buyerPhone"
+              v-model.number="deptBudgetList.binNumber"
               placeholder="请输入仓位编号"
               maxlength="100"
               size="small"
@@ -141,27 +141,27 @@
           </ws-form-item>
 
           <!--最大储量(吨)-->
-          <ws-form-item label="最大储量(吨)" span="1" prop="placeDelivery">
+          <ws-form-item label="最大储量(吨)" span="1" prop="maxStorage">
             <ws-input
-              v-model="deptBudgetList.placeDelivery"
+              v-model="deptBudgetList.maxStorage"
               placeholder="请输入最大储量(吨)"
               maxlength="20"
               size="small"
             />
           </ws-form-item>
           <!--现有储量-->
-          <ws-form-item label="现有储量" span="1" prop="sellerPhone">
+          <ws-form-item label="现有储量" span="1" prop="nowStorage">
             <ws-input
-              v-model="deptBudgetList.sellerPhone"
+              v-model="deptBudgetList.nowStorage"
               placeholder="请输入现有储量"
               maxlength="100"
               size="small"
             />
           </ws-form-item>
           <!--备注(选项)-->
-          <ws-form-item label="备注(选项)" span="1" prop="sellerPhone">
+          <ws-form-item label="备注(选项)" span="1" prop="remark">
             <ws-input
-              v-model="deptBudgetList.sellerPhone"
+              v-model="deptBudgetList.remark"
               placeholder="请输入备注(选项)"
               maxlength="100"
               size="small"
@@ -183,12 +183,7 @@
   </div>
 </template>
 <script>
-import {
-  getList,
-  export1,
-  editstatus,
-  billoperatehis,
-} from '@/model/contarct/index'
+import { xiala, billoperatehis, getLook } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -230,11 +225,11 @@ export default {
       endDate: null,
       // 提交类型
       submitType: true,
-      selectpackingMethod:{},
+      selectpackingMethod: {},
       size: 10,
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
-      packtypeList:{},
+      packtypeList: [],
       date: {
         year: dayjs().format('YYYY'),
         month: dayjs().format('MM'),
@@ -255,11 +250,12 @@ export default {
     //cg.viewBudget
     //cg.viewSpareMoney
     // this.getVesselData();
-    this.getList()
+    // this.getList()
+    this.loaddata()
+    this.getLook()
     this.showType = this.isShow
   },
   methods: {
-     
     //返回按钮
     returnWarehouse() {
       this.$router.push({ path: 'warehouseManagementList' })
@@ -299,8 +295,39 @@ export default {
       console.log(`当前页: ${val}`)
       this.getList()
     },
-    getList() {
-      getList({
+    loaddata() {
+      // 仓库名称
+      xiala({ compId: 'CON1' })
+        .toPromise()
+        .then((response) => {
+          this.packtypeList = response
+        })
+        this.getUnitList()
+    },
+    getUnitList() {
+      xiala({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        constCode: 'TYPEYAN',
+      })
+        .toPromise()
+        .then((response) => {
+          this.unitList = response
+          let currItem
+          this.unitList.forEach((item, index, arr) => {
+            item.flag = 'delete'
+            if (this.vModel == item.constKey) {
+              currItem = item
+            }
+          })
+          //
+          if (currItem) {
+            this.selectContract(currItem.constValue)
+          }
+        })
+    },
+
+    getLook() {
+      getLook({
         compId: sessionStorage.getItem('ws-pf_compId'),
         contractType: this.contractType,
         currentPage: this.currentPage,
@@ -328,33 +355,33 @@ export default {
           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 },
-      })
-    },
+    // 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() {
@@ -368,36 +395,6 @@ export default {
           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() {},
@@ -431,6 +428,6 @@ export default {
   text-align: right;
 }
 /deep/.el-form-item {
-    width: 33%;
+  width: 33.33%;
 }
 </style>