Ver Fonte

前端mxx

gjy há 4 anos atrás
pai
commit
ed4570f99f

+ 28 - 9
package-lock.json

@@ -5554,6 +5554,11 @@
       "integrity": "sha1-M1bMoZyIlUTy16le1JzlCKDs9VI=",
       "dev": true
     },
+    "china-area-data": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/china-area-data/-/china-area-data-5.0.1.tgz",
+      "integrity": "sha512-BQDPpiv5Nn+018ekcJK2oSD9PAD+E1bvXB0wgabc//dFVS/KvRqCgg0QOEUt3vBkx9XzB5a9BmkJCEZDBxVjVw=="
+    },
     "chokidar": {
       "version": "3.4.0",
       "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-3.4.0.tgz?cache=0&sync_timestamp=1587911215694&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-3.4.0.tgz",
@@ -8127,6 +8132,15 @@
       "integrity": "sha1-SDcsPqr22sytT4+lmL3MRV3+X/E=",
       "dev": true
     },
+    "element-china-area-data": {
+      "version": "5.0.2",
+      "resolved": "https://registry.npmjs.org/element-china-area-data/-/element-china-area-data-5.0.2.tgz",
+      "integrity": "sha512-vLQuvOKJy/uiX7MRHEk3x/j09hipuIl6DJ/C4XFUG7D7Pj3O47sy+Y6aAArM6k9v8cD9UX6e+yz2S4J+IPnZ8g==",
+      "requires": {
+        "china-area-data": "^5.0.1",
+        "lodash-es": "^4.17.15"
+      }
+    },
     "element-ui": {
       "version": "2.13.2",
       "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.13.2.tgz",
@@ -11676,6 +11690,11 @@
       "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
       "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
     },
+    "lodash-es": {
+      "version": "4.17.21",
+      "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
+      "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
+    },
     "lodash._reinterpolate": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz",
@@ -12838,7 +12857,7 @@
     },
     "node-sass": {
       "version": "4.14.1",
-      "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",
+      "resolved": "https://registry.npm.taobao.org/node-sass/download/node-sass-4.14.1.tgz",
       "integrity": "sha1-mch+wu+3BH7WOPtMnbfzpC4iF7U=",
       "requires": {
         "async-foreach": "^0.1.3",
@@ -12862,12 +12881,12 @@
       "dependencies": {
         "ansi-styles": {
           "version": "2.2.1",
-          "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-2.2.1.tgz",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
           "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
         },
         "chalk": {
           "version": "1.1.3",
-          "resolved": "https://registry.nlark.com/chalk/download/chalk-1.1.3.tgz",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
           "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
           "requires": {
             "ansi-styles": "^2.2.1",
@@ -12879,7 +12898,7 @@
         },
         "cross-spawn": {
           "version": "3.0.1",
-          "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",
+          "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz",
           "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=",
           "requires": {
             "lru-cache": "^4.0.1",
@@ -12888,7 +12907,7 @@
         },
         "lru-cache": {
           "version": "4.1.5",
-          "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",
+          "resolved": "http://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.5.tgz",
           "integrity": "sha1-i75Q6oW+1ZvJ4z3KuCNe6bz0Q80=",
           "requires": {
             "pseudomap": "^1.0.2",
@@ -12897,7 +12916,7 @@
         },
         "node-gyp": {
           "version": "3.8.0",
-          "resolved": "https://registry.nlark.com/node-gyp/download/node-gyp-3.8.0.tgz",
+          "resolved": "https://registry.npm.taobao.org/node-gyp/download/node-gyp-3.8.0.tgz",
           "integrity": "sha1-VAMEJhwzDoDQ1e3OJTpoyzlkIYw=",
           "requires": {
             "fstream": "^1.0.0",
@@ -12924,12 +12943,12 @@
         },
         "semver": {
           "version": "5.3.0",
-          "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",
+          "resolved": "https://registry.npm.taobao.org/semver/download/semver-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?cache=0&sync_timestamp=1618561027869&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-2.0.0.tgz",
+          "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz",
           "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
         },
         "tar": {
@@ -12944,7 +12963,7 @@
         },
         "yallist": {
           "version": "2.1.2",
-          "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz",
+          "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
           "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
         }
       }

+ 6 - 2
src/api/V2/warehouse/index.js

@@ -4,5 +4,9 @@ export const API_POST_ADD_WAREHOUSE_BASEINFO = '/warehouseBaseInfo/api/addWareho
 export const API_GET_WAREHOUSE_LOOK = '/warehouseBaseInfo/getWarehouse'
 //仓库名称下拉
 export const API_GET_WAREHOUSE_CUSTOMDROPDOWN = '/warehouseBaseInfo/selectWarehouse'
-
-export const API_GET_WAREHOUSE_DELETE = '/warehouseBaseInfo/api/deleteWarehouse'
+//删除
+export const API_POST_WAREHOUSE_DELETE = '/warehouseBaseInfo/api/deleteWarehouse'
+//删除仓库列表
+export const API_GET_WAREHOUSE_DELETELIST ='/warehouseBaseInfo/selectAllWarehouse'
+//隐藏
+export const API_POST_WAREHOUSE_HIDE ='/warehouseBaseInfo/api/editShow'

+ 8 - 2
src/model/warehouse/index.js

@@ -5,7 +5,9 @@ import {
     API_POST_ADD_WAREHOUSE_BASEINFO,
     API_GET_WAREHOUSE_LOOK,
     API_GET_WAREHOUSE_CUSTOMDROPDOWN,
-    API_GET_WAREHOUSE_DELETE,
+    API_POST_WAREHOUSE_DELETE,
+    API_GET_WAREHOUSE_DELETELIST,
+    API_POST_WAREHOUSE_HIDE,
 } from '@/api/V2/warehouse'
 // 列表
 export const getList = appRx.get(API_GET_WAREHOUSE_BASEINFO, errorCatcher, errorHandle, filter)
@@ -16,4 +18,8 @@ export const getLook = appRx.get(API_GET_WAREHOUSE_LOOK, errorCatcher, errorHand
 //仓库下拉
 export const xiala = appRx.get( API_GET_WAREHOUSE_CUSTOMDROPDOWN, errorCatcher, errorHandle, filter)
 //删除
-export const deletewarehouse = appRx.get(API_GET_WAREHOUSE_DELETE, errorCatcher, errorHandle, filter)
+export const deletewarehouse = appRx.post(API_POST_WAREHOUSE_DELETE, errorCatcher, errorHandle, filter)
+//删除库房列表
+export const delectlist = appRx.get(API_GET_WAREHOUSE_DELETELIST, errorCatcher, errorHandle, filter)
+//隐藏
+export const hide = appRx.post(API_POST_WAREHOUSE_HIDE, errorCatcher, errorHandle, filter)

+ 83 - 226
src/views/warehouse/warehouseManagementDelete.vue

@@ -18,36 +18,47 @@
    <div class="connert">
       <el-table
         class="wenzi"
-        :data="contractList.records"
+        :data="warehouseList"
         style="width: 100%; margin-top: 20px"
         height="780"
       >
-         <el-table-column type="index" label="序号">
+         <el-table-column type="index" label="序号" >
         <template scope="scope">
           <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
           <span v-else>{{ scope.$index + 1 }}</span>
         </template>
       </el-table-column> 
-        <el-table-column prop="contractNo" label="仓库名称" >
+        <el-table-column prop="warehouseName" label="仓库名称" >
         </el-table-column>
-        <el-table-column prop="goodsName" label="仓库所在地" >
+        <el-table-column prop="warehouseLocation" label="仓库所在地" >
         </el-table-column>
-        <el-table-column prop="weight" label="应余库存(吨)"> </el-table-column>
-        <el-table-column prop="unitContractPrice" label="负责人">
+        <el-table-column prop="nowStorage" label="应余库存(吨)"> </el-table-column>
+        <el-table-column prop="personCharge;" label="负责人">
         </el-table-column>
        
         
         <el-table-column prop="address" label="操作" width="200">
-          <!-- <template slot-scope="scope"> -->
+          <template slot-scope="scope" >
             <ws-button
               type="primary"
-              @click="handleAdd()"
+              @click="handleHide(scope.row)"
               v-hasPermission="
+             
                 `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
               "
+              v-if="scope.row.showFlag==0"
+              >显示</ws-button
+            >
+            <ws-button
+              type="primary"
+              @click="handleHide(scope.row)"
+              v-hasPermission="
+             
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+              v-if="scope.row.showFlag==1"
               >隐藏</ws-button
             >
-
             <ws-button
               type="primary"
               @click="handleDelete(scope.row)"
@@ -56,7 +67,7 @@
               "
               >删除</ws-button
             >
-          <!-- </template> -->
+          </template>
         </el-table-column>
       </el-table>
       
@@ -66,7 +77,10 @@
 <script>
 
 import{
-  deletewarehouse
+  getList,
+  delectlist,
+  deletewarehouse,
+  hide,
 } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
@@ -88,7 +102,7 @@ export default {
   },
   data() {
     return {
-      
+      isshow:false,
       //弹出框
       dialogViewSpareMoney: false,
       dialogApproveFormVisible: false,
@@ -108,7 +122,9 @@ export default {
       contractType: 2,
       startDate: null,
       endDate: null,
-
+      warehouseList:[],
+      scope:[],
+      show:'隐藏',
       // 提交类型
       submitType: true,
       size: 10,
@@ -121,264 +137,96 @@ 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() {
-    //cg.viewBudget
-    //cg.viewSpareMoney
-    // this.getVesselData();
-    // this.deletewarehouse()
-    // this.getList()
-  
+  this.getList()
     this.showType = this.isShow
   },
   methods: {
-    handleDelete(){
-      this.$router.push({ path : 'warehouseManagementDelete'})
-    },
     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
-    },
     
-    getList() {
-      getList({
+    //列表
+     getList() {
+      delectlist({
         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
+          this.warehouseList = 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
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
     },
-    editClick(row) {
-      var status = ''
-      if (row.status == '待执行' || row.status == '已完成') {
-        status = '执行中'
-      } else if (row.status == '执行中') {
-        status = '已完成'
-      }
-      //cancelButtonClass: "btn-custom-cancel"
-      this.$confirm(`是否将状态改为${status}`, {
-        confirmButtonText: '确定',
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleCloe() {
+      this.dialogViewSpareMoney = false
+    },
+    //隐藏
+    handleHide(row) { 
+      console.log(row.showFlag)
+      if(row.showFlag==1){
+        this.$confirm(`隐藏后将对其他用户不可见,是否确认隐藏`, {
         cancelButtonText: '取消',
+        confirmButtonText: '确定',
         type: 'warning',
       })
         .then(() => {
-          editstatus({ id: row.id })
+        hide({ id: row.id})
             .toPromise()
             .then((response) => {
               this.$notify.success({
                 title: '成功',
-                message: '状态修改成功',
+                message: '隐藏成功',
               })
               this.getList()
             })
             .catch((response) => {
-              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              // console.log(3333)
+             // 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
+      }else{
+        hide({ id: row.id})
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '显示成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              // console.log(3333)
+             // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
       }
-      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() {},
-  },
-  handleDelete(row) {
-      var handleDelete = ' '
-      if (row.handleDelete =='') {
-      }
+    handleDelete(row) {
+      // console.log(row)
       this.$confirm(`此操作永久删除该仓库全部信息,是否确认删除`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
         type: 'warning',
       })
         .then(() => {
-          deletewarehouse({ id: row.id })
+        deletewarehouse({ id: row.id})
             .toPromise()
             .then((response) => {
               this.$notify.success({
@@ -388,14 +236,24 @@ export default {
               this.getList()
             })
             .catch((response) => {
-              
+              // console.log(3333)
+             // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
             })
         })
         .catch(() => {
           return false
         })
     },
-}
+    // deletecontract(){},
+    //删除
+    approve() {},
+    listQuery() {},
+    total() {},
+    clearfiltQuery() {},
+    selectCrtDuty() {},
+    delectlist(){},
+    deletewarehouse(){},
+    }
 </script>
 <style lang="scss" scoped>
 .connert {
@@ -406,5 +264,4 @@ export default {
   width: 62px;
   text-align: right;
 }
-
 </style>

+ 2 - 2
src/views/warehouse/warehouseManagementPut.vue

@@ -504,13 +504,13 @@ export default {
   overflow: scroll;
   height: 120vh;
 }
-/deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label{
+/deep/.ws-info-table .el-form-item .el-form-item__label{
   text-align: center;
 }
 .deliverydate{
   width: 35%;
 }
-.center[data-v-32a9842f]{
+.center{
   margin-top: -60px;
 }
 </style>

+ 1 - 1
vue.config.js

@@ -144,7 +144,7 @@ module.exports = {
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
         // target: 'http://192.168.1.124:8090/',
-        target: 'http://192.168.1.120:8090/',
+        target: 'http://192.168.1.124:8090/',
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://product-server.winsea.com/',
         // target: 'http://192.168.24.5:8098',//目标地址