lilei 2 lat temu
rodzic
commit
4262e7118f

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1682233786271
+  "version": 1682241627534
 }

+ 8 - 0
src/api/shelf.js

@@ -75,6 +75,14 @@ export const shelfProductSave = (params) => {
     method: 'post'
   })
 }
+// 禁用货架产品 
+export const shelfProductEnable = (params) => {
+  return axios({
+    url: `/shelfProduct/updateEnableFlag`,
+    data: params,
+    method: 'post'
+  })
+}
 // 获取价格显示
 export const getShelfPriceShow = (params) => {
   return axios({

+ 1 - 0
src/views/numsGoodsShelves/replenishmentManagement/creatReplenishmentOrder.vue

@@ -159,6 +159,7 @@ export default {
         this.spinning = true
         this.disabled = true
         this.queryParam.shelfSn = this.nowData.shelfSn
+        this.queryParam.enableFlag = 1
         return queryProductListForReplenish(this.queryParam).then(res => {
           let data
           if (res.status == 200) {

+ 32 - 6
src/views/numsGoodsShelves/shelfSet/set.vue

@@ -98,10 +98,10 @@
             <a-button
               size="small"
               type="link"
-              class="button-error"
+              :class="record.enableFlag==1?'button-error':'button-primary'"
               v-if="record.shelfProductApiEntity&&!(record.shelfProductApiEntity.qty)&&record.shelfProductApiEntity.productSn"
               @click="handleEnable(record)"
-            >禁用</a-button>
+            >{{record.enableFlag==1?'禁用':'启用'}}</a-button>
             <a-button
               size="small"
               type="link"
@@ -112,14 +112,16 @@
             <a-button
               size="small"
               type="link"
-              class="button-primary"
+              :class="record.enableFlag==1?'button-primary':''"
+              :disabled="record.enableFlag==0"
               v-else
               @click="handleReplace(record)"
             >更换产品</a-button>
             <a-button
               size="small"
               type="link"
-              class="button-primary"
+              :class="record.enableFlag==1?'button-primary':''"
+              :disabled="record.enableFlag==0"
               @click="editHW(record)"
             >编辑</a-button>
             <a-button
@@ -164,7 +166,7 @@ import ImportGuideModal from './importGuideModal.vue'
 import basicInfoModal from './basicInfoModal.vue'
 import importHuoweiModal from './importHuoweiModal.vue'
 // , getShelfPriceShow
-import { shelfDetail, shelfProductList, shelfProductBatchInsert, delShelfPlaceSn } from '@/api/shelf'
+import { shelfDetail, shelfProductList, shelfProductBatchInsert, delShelfPlaceSn, shelfProductEnable } from '@/api/shelf'
 export default {
   name: 'ShelfMonitoringWarehousing',
   components: { STable, VSelect, commonModal, bindProductModal, addHwModal, ImportGuideModal, basicInfoModal, importHuoweiModal },
@@ -202,6 +204,7 @@ export default {
             data = res.data
             for (var i = 0; i < data.length; i++) {
               data[i].no = i + 1
+              data[i].enableFlag = data[i].shelfProductApiEntity.enableFlag
             }
             this.disabled = false
           }
@@ -245,7 +248,30 @@ export default {
     },
     // 禁用启用
     handleEnable(row){
-
+      const _this = this
+      if(row.enableFlag == 1){
+        this.$confirm({
+        title: '提示',
+        content: '禁用后不参于盘点和补货,但是可以退货、调回,确认禁用吗?',
+        centered: true,
+        onOk () {
+            _this.enableFun(row)
+          }
+        })
+      }else{
+        _this.enableFun(row)
+      }
+    },
+    enableFun(row){
+      const _this = this
+      _this.spinning = true
+      shelfProductEnable({ shelfSn: this.$route.params.sn, shelfProductSn: row.shelfProductApiEntity.shelfProductSn, enableFlag: row.enableFlag==1 ? 0 : 1 }).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$refs.table.refresh()
+        }
+        _this.spinning = false
+      })
     },
     // 编辑货位
     editHW (row) {

+ 2 - 2
vue.config.js

@@ -211,8 +211,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.111:8503/qpls-md',
-        target: 'http://p.iscm.360arrow.com/qpls-md',
+        target: 'http://192.168.2.111:8503/qpls-md',
+        // target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,